xref: /AOO41X/main/basctl/source/basicide/tbxctl.hxx (revision 96821c268eab8f5c0fa3bcb36189f0c1c257db85)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _BASIDE_TBXCTL_HXX
24 #define _BASIDE_TBXCTL_HXX
25 
26 #include <sfx2/tbxctrl.hxx>
27 #include <com/sun/star/frame/XLayoutManager.hpp>
28 
29 /*
30 #ifdef _BASIDE_POPUPWINDOWTBX
31 
32 // class PopupWindowTbx --------------------------------------------------
33 
34 class PopupWindowTbx : public SfxPopupWindow
35 {
36 private:
37     SfxToolBoxManager   aTbx;
38     Link                aSelectLink;
39 
40     DECL_LINK( SelectHdl, void* );
41 
42 public:
43     PopupWindowTbx( sal_uInt16 nId, WindowAlign eAlign,
44                     ResId aRIdWin, ResId aRIdTbx, SfxBindings& rBind );
45     ~PopupWindowTbx();
46 
47     void                    StartSelection()
48                                 { aTbx.GetToolBox().StartSelection(); }
49     void                    Update();
50 
51     virtual SfxPopupWindow* Clone() const;
52     virtual void            PopupModeEnd();
53 };
54 #endif
55 */
56 //-------------------
57 // class TbxControls
58 //-------------------
59 class TbxControls : public SfxToolBoxControl
60 {
61 private:
62 
63     struct StateChangedInfo
64     {
65         ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager > xLayoutManager;
66         bool bDisabled;
67     };
68 
69     sal_uInt16                  nLastSlot;
70 
71 protected:
72     virtual void            StateChanged( sal_uInt16 nSID, SfxItemState eState,
73                                           const SfxPoolItem* pState );
74 public:
75     SFX_DECL_TOOLBOX_CONTROL();
76 
77     TbxControls(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
~TbxControls()78     ~TbxControls() {}
79 
80     virtual SfxPopupWindowType  GetPopupWindowType() const;
81     virtual SfxPopupWindow*     CreatePopupWindow();
82 
83     using                       SfxToolBoxControl::Select;
84     void                        Select( sal_uInt16 nModifier );
85 };
86 
87 
88 #endif // _BASIDE_TBXCTL_HXX
89 
90