diff options
author | fluxgen <fluxgen> | 2002-12-02 19:56:38 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2002-12-02 19:56:38 (GMT) |
commit | 3633489dbffbb798cfe0ce948cdf933e3fdb31a1 (patch) | |
tree | 712075bf14615795d072e54addf1bdeacff3b2f1 /src/ToolbarTheme.hh | |
parent | bf2642c831a55dc212dda03ba3d9410049ec1d2a (diff) | |
download | fluxbox_pavel-3633489dbffbb798cfe0ce948cdf933e3fdb31a1.zip fluxbox_pavel-3633489dbffbb798cfe0ce948cdf933e3fdb31a1.tar.bz2 |
toolbar theme
Diffstat (limited to 'src/ToolbarTheme.hh')
-rw-r--r-- | src/ToolbarTheme.hh | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/src/ToolbarTheme.hh b/src/ToolbarTheme.hh new file mode 100644 index 0000000..f40ed19 --- /dev/null +++ b/src/ToolbarTheme.hh | |||
@@ -0,0 +1,87 @@ | |||
1 | // ToolbarTheme.hh a theme class for Toolbar | ||
2 | // Copyright (c) 2002 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: ToolbarTheme.hh,v 1.1 2002/12/02 19:56:08 fluxgen Exp $ | ||
23 | |||
24 | #ifndef TOOLBARTHEME_HH | ||
25 | #define TOOLBARTHEME_HH | ||
26 | |||
27 | #include "FbTk/Theme.hh" | ||
28 | #include "Font.hh" | ||
29 | #include "Texture.hh" | ||
30 | #include "Color.hh" | ||
31 | #include "Text.hh" | ||
32 | /** | ||
33 | Toolbar theme class container | ||
34 | */ | ||
35 | class ToolbarTheme: public FbTk::Theme { | ||
36 | public: | ||
37 | explicit ToolbarTheme(int screen_num); | ||
38 | virtual ~ToolbarTheme(); | ||
39 | |||
40 | void reconfigTheme(); | ||
41 | |||
42 | /** | ||
43 | @name colors | ||
44 | */ | ||
45 | ///@{ | ||
46 | const FbTk::Color &labelTextColor() const { return *m_label_textcolor; } | ||
47 | const FbTk::Color &windowTextColor() const { return *m_window_textcolor; } | ||
48 | const FbTk::Color &clockTextColor() const { return *m_clock_textcolor; } | ||
49 | const FbTk::Color &buttonColor() const { return *m_button_color; } | ||
50 | ///@} | ||
51 | /** | ||
52 | @name textures | ||
53 | */ | ||
54 | ///@{ | ||
55 | const FbTk::Texture &toolbar() const { return *m_toolbar; } | ||
56 | const FbTk::Texture &label() const { return *m_label; } | ||
57 | const FbTk::Texture &window() const { return *m_window; } | ||
58 | const FbTk::Texture &button() const { return *m_button; } | ||
59 | const FbTk::Texture &pressedButton() const { return *m_pressed_button; } | ||
60 | const FbTk::Texture &clock() const { return *m_clock; } | ||
61 | ///@} | ||
62 | const FbTk::Font &font() const { return *m_font; } | ||
63 | FbTk::Font &font() { return *m_font; } | ||
64 | /** | ||
65 | @name graphic context | ||
66 | */ | ||
67 | ///@{ | ||
68 | GC labelTextGC() const { return m_label_text_gc; } | ||
69 | GC windowTextGC() const { return m_window_text_gc; } | ||
70 | GC clockTextGC() const { return m_clock_text_gc; } | ||
71 | GC buttonPicGC() const { return m_button_pic_gc; } | ||
72 | ///@} | ||
73 | FbTk::Justify justify() const { return *m_justify; } | ||
74 | private: | ||
75 | // text colors | ||
76 | FbTk::ThemeItem<FbTk::Color> m_label_textcolor, m_window_textcolor, m_clock_textcolor; | ||
77 | FbTk::ThemeItem<FbTk::Color> m_button_color; | ||
78 | // textures | ||
79 | FbTk::ThemeItem<FbTk::Texture> m_toolbar, m_label, m_window, m_button, m_pressed_button, m_clock; | ||
80 | FbTk::ThemeItem<FbTk::Font> m_font; | ||
81 | FbTk::ThemeItem<FbTk::Justify> m_justify; | ||
82 | // graphic context | ||
83 | GC m_label_text_gc, m_window_text_gc, m_clock_text_gc, m_button_pic_gc; | ||
84 | Display *m_display; | ||
85 | }; | ||
86 | |||
87 | #endif // TOOLBARTHEME_HH | ||