xref: /trunk/main/starmath/inc/toolbox.hxx (revision 86e1cf34)
1f6a9d5caSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3f6a9d5caSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4f6a9d5caSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5f6a9d5caSAndrew Rist  * distributed with this work for additional information
6f6a9d5caSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7f6a9d5caSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8f6a9d5caSAndrew Rist  * "License"); you may not use this file except in compliance
9f6a9d5caSAndrew Rist  * with the License.  You may obtain a copy of the License at
10f6a9d5caSAndrew Rist  *
11f6a9d5caSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12f6a9d5caSAndrew Rist  *
13f6a9d5caSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14f6a9d5caSAndrew Rist  * software distributed under the License is distributed on an
15f6a9d5caSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16f6a9d5caSAndrew Rist  * KIND, either express or implied.  See the License for the
17f6a9d5caSAndrew Rist  * specific language governing permissions and limitations
18f6a9d5caSAndrew Rist  * under the License.
19f6a9d5caSAndrew Rist  *
20f6a9d5caSAndrew Rist  *************************************************************/
21f6a9d5caSAndrew Rist 
22f6a9d5caSAndrew Rist 
23cdf0e10cSrcweir #ifndef TOOLBOX_HXX
24cdf0e10cSrcweir #define TOOLBOX_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include <sfx2/basedlgs.hxx>
27cdf0e10cSrcweir #include <sfx2/childwin.hxx>
28cdf0e10cSrcweir #include <vcl/toolbox.hxx>
29cdf0e10cSrcweir 
30cdf0e10cSrcweir #include "smmod.hxx"
31cdf0e10cSrcweir #include "config.hxx"
32cdf0e10cSrcweir #include "toolbox.hrc"
33cdf0e10cSrcweir 
34cdf0e10cSrcweir class SmToolBoxWindow : public SfxFloatingWindow
35cdf0e10cSrcweir {
36cdf0e10cSrcweir 
37cdf0e10cSrcweir protected:
38cdf0e10cSrcweir 	ToolBox		aToolBoxCat;
39*86e1cf34SPedro Giffuni     FixedLine   aToolBoxCat_Delim;  // to visualy separate the catalog part
40cdf0e10cSrcweir 	ToolBox	   *pToolBoxCmd;
41cdf0e10cSrcweir 	ToolBox	   *vToolBoxCategories[NUM_TBX_CATEGORIES];
42cdf0e10cSrcweir     ImageList  *aImageLists [NUM_TBX_CATEGORIES + 1];   /* regular */
43cdf0e10cSrcweir     ImageList  *aImageListsH[NUM_TBX_CATEGORIES + 1];   /* high contrast */
44cdf0e10cSrcweir     sal_uInt16      nActiveCategoryRID;
45cdf0e10cSrcweir 
46cdf0e10cSrcweir     virtual sal_Bool    Close();
47cdf0e10cSrcweir     virtual void    GetFocus();
48cdf0e10cSrcweir 
49cdf0e10cSrcweir     void            ApplyImageLists( sal_uInt16 nCategoryRID );
50cdf0e10cSrcweir 
51cdf0e10cSrcweir 	DECL_LINK( CategoryClickHdl, ToolBox* );
52cdf0e10cSrcweir 	DECL_LINK( CmdSelectHdl, ToolBox* );
53cdf0e10cSrcweir 
54cdf0e10cSrcweir     SmViewShell * GetView();
55cdf0e10cSrcweir     const ImageList * GetImageList( sal_uInt16 nResId, sal_Bool bHighContrast );
56cdf0e10cSrcweir 
57cdf0e10cSrcweir public:
58cdf0e10cSrcweir 	SmToolBoxWindow(SfxBindings    *pBindings,
59cdf0e10cSrcweir 					SfxChildWindow *pChildWindow,
60cdf0e10cSrcweir 					Window		   *pParent);
61cdf0e10cSrcweir 	~SmToolBoxWindow();
62cdf0e10cSrcweir 
63cdf0e10cSrcweir 	// Window
64cdf0e10cSrcweir 	virtual void	StateChanged( StateChangedType nStateChange );
65cdf0e10cSrcweir     virtual void    DataChanged( const DataChangedEvent &rEvt );
66cdf0e10cSrcweir 
67cdf0e10cSrcweir     void        AdjustPosSize( sal_Bool bSetPos );
68cdf0e10cSrcweir 	void		SetCategory(sal_uInt16 nCategory);
69cdf0e10cSrcweir };
70cdf0e10cSrcweir 
71cdf0e10cSrcweir /**************************************************************************/
72cdf0e10cSrcweir 
73cdf0e10cSrcweir class SmToolBoxWrapper : public SfxChildWindow
74cdf0e10cSrcweir {
75cdf0e10cSrcweir 	SFX_DECL_CHILDWINDOW(SmToolBoxWrapper);
76cdf0e10cSrcweir 
77cdf0e10cSrcweir protected:
78cdf0e10cSrcweir 	SmToolBoxWrapper(Window *pParentWindow,
79cdf0e10cSrcweir 					 sal_uInt16, SfxBindings*, SfxChildWinInfo*);
80cdf0e10cSrcweir };
81cdf0e10cSrcweir 
82cdf0e10cSrcweir #endif
83cdf0e10cSrcweir 
84