Code

Added UXManager. Cleaning up toolbox creation.
[inkscape.git] / src / ui / uxmanager.cpp
1 /** \file
2  * Desktop widget implementation
3  */
4 /* Authors:
5  *   Jon A. Cruz <jon@joncruz.org>
6  *
7  * Copyright (C) 2010 Jon A. Cruz
8  *
9  * Released under GNU GPL, read the file 'COPYING' for more information
10  */
12 #ifdef HAVE_CONFIG_H
13 # include "config.h"
14 #endif
16 #include "uxmanager.h"
17 #include "util/ege-tags.h"
18 #include "widgets/toolbox.h"
20 namespace Inkscape {
21 namespace UI {
23 UXManager* instance = 0;
25 UXManager* UXManager::getInstance()
26 {
27     if (!instance) {
28         instance = new UXManager();
29     }
30     return instance;
31 }
34 UXManager::UXManager()
35 {
36     ege::TagSet tags;
37     tags.setLang("en");
39     tags.addTag(ege::Tag("General"));
40     tags.addTag(ege::Tag("Icons"));
41 }
43 UXManager::~UXManager()
44 {
45 }
48 void UXManager::connectToDesktop( std::vector<GtkWidget *> const & toolboxes, SPDesktop *desktop )
49 {
50     for (std::vector<GtkWidget*>::const_iterator it = toolboxes.begin(); it != toolboxes.end(); ++it ) {
51         sp_toolbox_set_desktop( *it, desktop );
52     }
53 }
56 } // namespace UI
57 } // namespace Inkscape
59 /*
60   Local Variables:
61   mode:c++
62   c-file-style:"stroustrup"
63   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
64   indent-tabs-mode:nil
65   fill-column:99
66   End:
67 */
68 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :