update credits
[LibreOffice.git] / include / dbaccess / ToolBoxHelper.hxx
blob298bbc83b11b7fe2c238e3f1e542d9a8e46d35fb
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef DBAUI_TOOLBOXHELPER_HXX
21 #define DBAUI_TOOLBOXHELPER_HXX
23 #include <sal/types.h>
24 #include <tools/link.hxx>
25 #include <vcl/image.hxx>
26 #include "dbaccessdllapi.h"
28 class SvtMiscOptions;
29 class ToolBox;
30 class VclWindowEvent;
32 namespace dbaui
34 class DBACCESS_DLLPUBLIC OToolBoxHelper
36 sal_Int16 m_nSymbolsSize; // shows the toolbox large or small bitmaps
37 ToolBox* m_pToolBox; // our toolbox (may be NULL)
38 public:
39 OToolBoxHelper();
40 virtual ~OToolBoxHelper();
42 /** will be called when the controls need to be resized.
43 @param _rDiff
44 Contains the difference of the old and new toolbox size.
46 virtual void resizeControls(const Size& _rDiff) = 0;
48 /** will be called when the image list is needed.
49 @param _eSymbolsSize
50 <svtools/imgdef.hxx>
51 @param _bHiContast
52 <TRUE/> when in high contrast mode.
54 virtual ImageList getImageList(sal_Int16 _eSymbolsSize) const = 0;
56 /** only the member will be set, derived classes can overload this function and do what need to be done.
57 @param _pTB
58 The new ToolBox.
59 @attention
60 Must be called after a FreeResource() call.
62 virtual void setToolBox(ToolBox* _pTB);
64 inline ToolBox* getToolBox() const { return m_pToolBox; }
66 /** checks if the toolbox needs a new imagelist.
68 void checkImageList();
70 protected:
71 DECL_LINK(ConfigOptionsChanged, SvtMiscOptions*);
72 DECL_LINK(SettingsChanged, VclWindowEvent* );
75 #endif // DBAUI_TOOLBOXHELPER_HXX
77 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */