1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: ToolBoxHelper.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef DBAUI_TOOLBOXHELPER_HXX
32 #define DBAUI_TOOLBOXHELPER_HXX
35 #include <sal/types.h>
38 #include <tools/link.hxx>
41 #include <tools/gen.hxx>
44 #include <vcl/image.hxx>
46 #include "dbaccessdllapi.h"
54 class DBACCESS_DLLPUBLIC OToolBoxHelper
56 sal_Bool m_bIsHiContrast
;// true when the toolbox is in hi contrast mode
57 sal_Int16 m_nSymbolsSize
; // shows the toolbox large or small bitmaps
58 ToolBox
* m_pToolBox
; // our toolbox (may be NULL)
61 virtual ~OToolBoxHelper();
63 /** will be called when the controls need to be resized.
65 Contains the difference of the old and new toolbox size.
67 virtual void resizeControls(const Size
& _rDiff
) = 0;
69 /** will be called when the image list is needed.
73 <TRUE/> when in high contrast mode.
75 virtual ImageList
getImageList(sal_Int16 _eSymbolsSize
,sal_Bool _bHiContast
) const = 0;
77 /** only the member will be set, derived classes can overload this function and do what need to be done.
81 Must be called after a FreeResource() call.
83 virtual void setToolBox(ToolBox
* _pTB
);
85 inline ToolBox
* getToolBox() const { return m_pToolBox
; }
87 /** checks if the toolbox needs a new imagelist.
89 void checkImageList();
91 inline sal_Bool
isToolBoxHiContrast() const { return m_bIsHiContrast
; }
93 DECL_LINK(ConfigOptionsChanged
, SvtMiscOptions
*);
94 DECL_LINK(SettingsChanged
, VclWindowEvent
* );
97 #endif // DBAUI_TOOLBOXHELPER_HXX