aboutsummaryrefslogtreecommitdiff
path: root/src/ToolFactory.hh
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-10-13 23:37:41 (GMT)
committerfluxgen <fluxgen>2003-10-13 23:37:41 (GMT)
commit53be8d6f67a70527990ed32efc22e8e7763af3fb (patch)
treef558f7bcdb5844826ad91459c6622e0889414f3c /src/ToolFactory.hh
parent82ac933efe4ce3b88ec32ee8f64b1c3dcc0528b1 (diff)
downloadfluxbox-53be8d6f67a70527990ed32efc22e8e7763af3fb.zip
fluxbox-53be8d6f67a70527990ed32efc22e8e7763af3fb.tar.bz2
creates tools
Diffstat (limited to 'src/ToolFactory.hh')
-rw-r--r--src/ToolFactory.hh59
1 files changed, 59 insertions, 0 deletions
diff --git a/src/ToolFactory.hh b/src/ToolFactory.hh
new file mode 100644
index 0000000..805b75c
--- /dev/null
+++ b/src/ToolFactory.hh
@@ -0,0 +1,59 @@
1// ToolFactory.hh for Fluxbox
2// Copyright (c) 2003 Henrik Kinnunen (fluxgen at users.sourceforge.net)
3//
4// Permission is hereby granted, free of charge, to any person obtaining a
5// copy of this software and associated documentation files (the "Software"),
6// to deal in the Software without restriction, including without limitation
7// the rights to use, copy, modify, merge, publish, distribute, sublicense,
8// and/or sell copies of the Software, and to permit persons to whom the
9// Software is furnished to do so, subject to the following conditions:
10//
11// The above copyright notice and this permission notice shall be included in
12// all copies or substantial portions of the Software.
13//
14// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE.
21
22// $Id: ToolFactory.hh,v 1.1 2003/10/13 23:37:41 fluxgen Exp $
23
24#ifndef TOOLFACTORY_HH
25#define TOOLFACTORY_HH
26
27#include "ToolTheme.hh"
28#include "IconbarTheme.hh"
29
30#include "FbTk/NotCopyable.hh"
31
32class ToolbarItem;
33class BScreen;
34class Toolbar;
35
36namespace FbTk {
37class FbWindow;
38};
39
40/// creates toolbaritems
41class ToolFactory:private FbTk::NotCopyable {
42public:
43 explicit ToolFactory(BScreen &screen);
44 virtual ~ToolFactory() { }
45
46 ToolbarItem *create(const std::string &name, const FbTk::FbWindow &parent, Toolbar &tbar);
47 void updateThemes();
48 int maxFontHeight() const;
49 inline const BScreen &screen() const { return m_screen; }
50 inline BScreen &screen() { return m_screen; }
51
52private:
53 BScreen &m_screen;
54 ToolTheme m_clock_theme;
55 std::auto_ptr<ToolTheme> m_button_theme, m_workspace_theme;
56 IconbarTheme m_iconbar_theme;
57};
58
59#endif // TOOLFACTORY_HH