00001 /************************************************************************* 00002 * 00003 * OpenOffice.org - a multi-platform office productivity suite 00004 * 00005 * $RCSfile: toolbox.hxx,v $ 00006 * 00007 * $Revision: 1.10 $ 00008 * 00009 * last change: $Author: rt $ $Date: 2006/05/05 07:58:37 $ 00010 * 00011 * The Contents of this file are made available subject to 00012 * the terms of GNU Lesser General Public License Version 2.1. 00013 * 00014 * 00015 * GNU Lesser General Public License Version 2.1 00016 * ============================================= 00017 * Copyright 2005 by Sun Microsystems, Inc. 00018 * 901 San Antonio Road, Palo Alto, CA 94303, USA 00019 * 00020 * This library is free software; you can redistribute it and/or 00021 * modify it under the terms of the GNU Lesser General Public 00022 * License version 2.1, as published by the Free Software Foundation. 00023 * 00024 * This library is distributed in the hope that it will be useful, 00025 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00026 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00027 * Lesser General Public License for more details. 00028 * 00029 * You should have received a copy of the GNU Lesser General Public 00030 * License along with this library; if not, write to the Free Software 00031 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 00032 * MA 02111-1307 USA 00033 * 00034 ************************************************************************/ 00035 #ifndef TOOLBOX_HXX 00036 #define TOOLBOX_HXX 00037 00038 #ifndef _BASEDLGS_HXX //autogen 00039 #include <sfx2/basedlgs.hxx> 00040 #endif 00041 #ifndef _SFX_CHILDWIN_HXX //autogen 00042 #include <sfx2/childwin.hxx> 00043 #endif 00044 #ifndef _SV_TOOLBOX_HXX //autogen 00045 #include <vcl/toolbox.hxx> 00046 #endif 00047 00048 #ifndef _SMMOD_HXX 00049 #include "smmod.hxx" 00050 #endif 00051 #ifndef CONFIG_HXX 00052 #include "config.hxx" 00053 #endif 00054 00055 #include "dialog.hrc" 00056 00057 #define NUM_TBX_CATEGORIES 9 00058 00059 class SmToolBoxWindow : public SfxFloatingWindow 00060 { 00061 00062 protected: 00063 ToolBox aToolBoxCat; 00064 FixedLine aToolBoxCat_Delim; // to visualy seperate the catalog part 00065 ToolBox *pToolBoxCmd; 00066 ToolBox *vToolBoxCategories[NUM_TBX_CATEGORIES]; 00067 ImageList *aImageLists [NUM_TBX_CATEGORIES + 1]; /* regular */ 00068 ImageList *aImageListsH[NUM_TBX_CATEGORIES + 1]; /* high contrast */ 00069 USHORT nActiveCategoryRID; 00070 00071 virtual BOOL Close(); 00072 virtual void GetFocus(); 00073 00074 void ApplyImageLists( USHORT nCategoryRID ); 00075 00076 DECL_LINK( CategoryClickHdl, ToolBox* ); 00077 DECL_LINK( CmdSelectHdl, ToolBox* ); 00078 00079 SmViewShell * GetView(); 00080 const ImageList * GetImageList( USHORT nResId, BOOL bHighContrast ); 00081 00082 public: 00083 SmToolBoxWindow(SfxBindings *pBindings, 00084 SfxChildWindow *pChildWindow, 00085 Window *pParent); 00086 ~SmToolBoxWindow(); 00087 00088 // Window 00089 virtual void StateChanged( StateChangedType nStateChange ); 00090 virtual void DataChanged( const DataChangedEvent &rEvt ); 00091 00092 void AdjustPosSize( BOOL bSetPos ); 00093 void SetCategory(USHORT nCategory); 00094 }; 00095 00096 /**************************************************************************/ 00097 00098 class SmToolBoxWrapper : public SfxChildWindow 00099 { 00100 SFX_DECL_CHILDWINDOW(SmToolBoxWrapper); 00101 00102 protected: 00103 SmToolBoxWrapper(Window *pParentWindow, 00104 USHORT, SfxBindings*, SfxChildWinInfo*); 00105 }; 00106 00107 #endif 00108