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