xref: /trunk/main/sd/source/ui/inc/tbx_ww.hxx (revision 1ecadb572e7010ff3b3382ad9bf179dbc6efadbb)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 
29 #ifndef _SD_TBX_WW_HXX
30 #define _SD_TBX_WW_HXX
31 
32 #include <sdresid.hxx>
33 #include <sfx2/tbxctrl.hxx>
34 
35 //------------------------------------------------------------------------
36 
37 /*
38 class SdPopupWindowTbx : public SfxPopupWindow
39 {
40 private:
41     SfxToolBoxManager   aTbx;
42     SdResId             aSdResIdWin;
43     SdResId             aSdResIdTbx;
44     WindowAlign         eTbxAlign;
45     Link                aSelectLink;
46 
47     DECL_LINK( TbxSelectHdl, ToolBox * );
48 
49 public:
50     SdPopupWindowTbx( sal_uInt16 nId, WindowAlign eAlign,
51                       SdResId aRIdWin, SdResId aRIdTbx, SfxBindings& rBindings );
52     ~SdPopupWindowTbx();
53 
54     virtual SfxPopupWindow* Clone() const;
55 
56     virtual void PopupModeEnd();
57 
58     void         StartSelection() { aTbx.GetToolBox().StartSelection(); }
59     void         Update();
60 
61 private:
62 
63     // Adapt the toolbox to whether CTL is active or not.  If CTL is not
64     //    active then all toolbox items that describe CTL specific shapes are
65     //    deleted from it and its size is re-calculated.
66     void AdaptToCTL (void);
67 };
68 */
69 //------------------------------------------------------------------------
70 
71 class SdTbxControl : public SfxToolBoxControl
72 {
73 private:
74     sal_Bool    IsCheckable( sal_uInt16 nSId );
75 
76 public:
77             SFX_DECL_TOOLBOX_CONTROL();
78 
79             SdTbxControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
80             ~SdTbxControl() {}
81 
82     virtual SfxPopupWindowType  GetPopupWindowType() const;
83     virtual SfxPopupWindow*     CreatePopupWindow();
84     virtual void StateChanged( sal_uInt16 nSId, SfxItemState eState,
85                                 const SfxPoolItem* pState );
86 };
87 
88 #endif      // _SD_TBX_WW_HXX
89 
90