Debian Codegraph @

src/Gui/ToolBoxManager.h

raw
1 /***************************************************************************
2 * Copyright (c) 2005 Werner Mayer <wmayer[at]users.sourceforge.net> *
3 * *
4 * This file is part of the FreeCAD CAx development system. *
5 * *
6 * This library is free software; you can redistribute it and/or *
7 * modify it under the terms of the GNU Library General Public *
8 * License as published by the Free Software Foundation; either *
9 * version 2 of the License, or (at your option) any later version. *
10 * *
11 * This library is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU Library General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU Library General Public *
17 * License along with this library; see the file COPYING.LIB. If not, *
18 * write to the Free Software Foundation, Inc., 59 Temple Place, *
19 * Suite 330, Boston, MA 02111-1307, USA *
20 * *
21 ***************************************************************************/
22
23
24 #ifndef GUI_TOOLBOXMANAGER_H
25 #define GUI_TOOLBOXMANAGER_H
26
27 #include <FCGlobal.h>
28
29 namespace Gui
30 {
31
32 class ToolBarItem;
33
34
35 namespace DockWnd
36 {
37 class ToolBox;
38 }
39
40 /**
41 * The ToolBoxManager class is responsible for the creation of command bars and appending them
42 * to the toolbox window.
43 * @see ToolBarManager
44 * @see MenuManager
45 * @author Werner Mayer
46 */
47 class GuiExport ToolBoxManager
48 {
49 public:
50 /// The one and only instance.
51 static ToolBoxManager* getInstance();
52 static void destruct();
53 /** Sets up the command bars of a given workbench. */
54 void setup(ToolBarItem*) const;
55 void setToolBox(DockWnd::ToolBox*);
56 void retranslate() const;
57
58 protected:
59 ToolBoxManager();
60 ~ToolBoxManager();
61
62 private:
63 DockWnd::ToolBox* _toolBox {nullptr};
64 static ToolBoxManager* _instance;
65 };
66
67 } // namespace Gui
68
69
70 #endif // GUI_TOOLBOXMANAGER_H