xref: /AOO41X/main/sd/source/ui/inc/tbx_ww.hxx (revision 67e470dafe1997e73f56ff7ff4878983707e3e07)
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 
24 
25 #ifndef _SD_TBX_WW_HXX
26 #define _SD_TBX_WW_HXX
27 
28 #include <sdresid.hxx>
29 #include <sfx2/tbxctrl.hxx>
30 
31 //------------------------------------------------------------------------
32 
33 /*
34 class SdPopupWindowTbx : public SfxPopupWindow
35 {
36 private:
37     SfxToolBoxManager   aTbx;
38     SdResId             aSdResIdWin;
39     SdResId             aSdResIdTbx;
40     WindowAlign         eTbxAlign;
41     Link                aSelectLink;
42 
43     DECL_LINK( TbxSelectHdl, ToolBox * );
44 
45 public:
46     SdPopupWindowTbx( sal_uInt16 nId, WindowAlign eAlign,
47                       SdResId aRIdWin, SdResId aRIdTbx, SfxBindings& rBindings );
48     ~SdPopupWindowTbx();
49 
50     virtual SfxPopupWindow* Clone() const;
51 
52     virtual void PopupModeEnd();
53 
54     void         StartSelection() { aTbx.GetToolBox().StartSelection(); }
55     void         Update();
56 
57 private:
58 
59     // Adapt the toolbox to whether CTL is active or not.  If CTL is not
60     //    active then all toolbox items that describe CTL specific shapes are
61     //    deleted from it and its size is re-calculated.
62     void AdaptToCTL (void);
63 };
64 */
65 //------------------------------------------------------------------------
66 
67 class SdTbxControl : public SfxToolBoxControl
68 {
69 private:
70     sal_Bool    IsCheckable( sal_uInt16 nSId );
71 
72 public:
73             SFX_DECL_TOOLBOX_CONTROL();
74 
75             SdTbxControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
~SdTbxControl()76             ~SdTbxControl() {}
77 
78     virtual SfxPopupWindowType  GetPopupWindowType() const;
79     virtual SfxPopupWindow*     CreatePopupWindow();
80     virtual void StateChanged( sal_uInt16 nSId, SfxItemState eState,
81                                 const SfxPoolItem* pState );
82 };
83 
84 #endif      // _SD_TBX_WW_HXX
85 
86