xref: /aoo42x/main/starmath/inc/toolbox.hxx (revision 86e1cf34)
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 TOOLBOX_HXX
24 #define TOOLBOX_HXX
25 
26 #include <sfx2/basedlgs.hxx>
27 #include <sfx2/childwin.hxx>
28 #include <vcl/toolbox.hxx>
29 
30 #include "smmod.hxx"
31 #include "config.hxx"
32 #include "toolbox.hrc"
33 
34 class SmToolBoxWindow : public SfxFloatingWindow
35 {
36 
37 protected:
38 	ToolBox		aToolBoxCat;
39     FixedLine   aToolBoxCat_Delim;  // to visualy separate the catalog part
40 	ToolBox	   *pToolBoxCmd;
41 	ToolBox	   *vToolBoxCategories[NUM_TBX_CATEGORIES];
42     ImageList  *aImageLists [NUM_TBX_CATEGORIES + 1];   /* regular */
43     ImageList  *aImageListsH[NUM_TBX_CATEGORIES + 1];   /* high contrast */
44     sal_uInt16      nActiveCategoryRID;
45 
46     virtual sal_Bool    Close();
47     virtual void    GetFocus();
48 
49     void            ApplyImageLists( sal_uInt16 nCategoryRID );
50 
51 	DECL_LINK( CategoryClickHdl, ToolBox* );
52 	DECL_LINK( CmdSelectHdl, ToolBox* );
53 
54     SmViewShell * GetView();
55     const ImageList * GetImageList( sal_uInt16 nResId, sal_Bool bHighContrast );
56 
57 public:
58 	SmToolBoxWindow(SfxBindings    *pBindings,
59 					SfxChildWindow *pChildWindow,
60 					Window		   *pParent);
61 	~SmToolBoxWindow();
62 
63 	// Window
64 	virtual void	StateChanged( StateChangedType nStateChange );
65     virtual void    DataChanged( const DataChangedEvent &rEvt );
66 
67     void        AdjustPosSize( sal_Bool bSetPos );
68 	void		SetCategory(sal_uInt16 nCategory);
69 };
70 
71 /**************************************************************************/
72 
73 class SmToolBoxWrapper : public SfxChildWindow
74 {
75 	SFX_DECL_CHILDWINDOW(SmToolBoxWrapper);
76 
77 protected:
78 	SmToolBoxWrapper(Window *pParentWindow,
79 					 sal_uInt16, SfxBindings*, SfxChildWinInfo*);
80 };
81 
82 #endif
83 
84