diff options
author | fluxgen <fluxgen> | 2002-12-25 11:42:05 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2002-12-25 11:42:05 (GMT) |
commit | 61ec462e668056089d0085e90079196d12596236 (patch) | |
tree | fde90877ffd0a821dda7fc064000db2772e46300 /src/FbTk/MenuTheme.hh | |
parent | 21bf0c15f1e074c6948ddf9a311fc094ebc63f26 (diff) | |
download | fluxbox-61ec462e668056089d0085e90079196d12596236.zip fluxbox-61ec462e668056089d0085e90079196d12596236.tar.bz2 |
first add, theme class for Menu
Diffstat (limited to 'src/FbTk/MenuTheme.hh')
-rw-r--r-- | src/FbTk/MenuTheme.hh | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/src/FbTk/MenuTheme.hh b/src/FbTk/MenuTheme.hh new file mode 100644 index 0000000..c0ac490 --- /dev/null +++ b/src/FbTk/MenuTheme.hh | |||
@@ -0,0 +1,97 @@ | |||
1 | // MenuTheme.hh for FbTk | ||
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: MenuTheme.hh,v 1.1 2002/12/25 11:41:53 fluxgen Exp $ | ||
23 | |||
24 | #ifndef FBTK_MENUTHEME_HH | ||
25 | #define FBTK_MENUTHEME_HH | ||
26 | |||
27 | #include "Theme.hh" | ||
28 | #include "Color.hh" | ||
29 | #include "Font.hh" | ||
30 | #include "Texture.hh" | ||
31 | #include "Text.hh" | ||
32 | |||
33 | namespace FbTk { | ||
34 | |||
35 | class MenuTheme:public FbTk::Theme { | ||
36 | public: | ||
37 | enum BulletType { EMPTY, SQUARE, TRIANGLE}; | ||
38 | MenuTheme(int screen_num); | ||
39 | virtual ~MenuTheme(); | ||
40 | void reconfigTheme(); | ||
41 | /** | ||
42 | @name text colors | ||
43 | */ | ||
44 | ///@{ | ||
45 | const FbTk::Color &titleTextColor() const { return *t_text; } | ||
46 | const FbTk::Color &frameTextColor() const { return *f_text; } | ||
47 | const FbTk::Color &highlightTextColor() const { return *h_text; } | ||
48 | const FbTk::Color &disableTextColor() const { return *d_text; } | ||
49 | ///@} | ||
50 | /** | ||
51 | @name textures | ||
52 | */ | ||
53 | ///@{ | ||
54 | const FbTk::Texture &titleTexture() const { return *title; } | ||
55 | const FbTk::Texture &frameTexture() const { return *frame; } | ||
56 | const FbTk::Texture &hiliteTexture() const { return *hilite; } | ||
57 | ///@} | ||
58 | /** | ||
59 | @name fonts | ||
60 | */ | ||
61 | ///@{ | ||
62 | const FbTk::Font &titleFont() const { return *titlefont; } | ||
63 | const FbTk::Font &frameFont() const { return *framefont; } | ||
64 | ///@} | ||
65 | |||
66 | FbTk::Justify frameFontJustify() const { return *framefont_justify; } | ||
67 | FbTk::Justify titleFontJustify() const { return *titlefont_justify; } | ||
68 | |||
69 | /** | ||
70 | @name graphic contexts | ||
71 | */ | ||
72 | ///@{ | ||
73 | GC titleTextGC() const { return t_text_gc; } | ||
74 | GC frameTextGC() const { return f_text_gc; } | ||
75 | GC hiliteTextGC() const { return h_text_gc; } | ||
76 | GC disableTextGC() const { return d_text_gc; } | ||
77 | GC hiliteGC() const { return hilite_gc; } | ||
78 | ///@} | ||
79 | BulletType bullet() const { return *m_bullet; } | ||
80 | FbTk::Justify bulletPos() const { return *bullet_pos; } | ||
81 | |||
82 | private: | ||
83 | FbTk::ThemeItem<FbTk::Color> t_text, f_text, h_text, d_text; | ||
84 | FbTk::ThemeItem<FbTk::Texture> title, frame, hilite; | ||
85 | FbTk::ThemeItem<FbTk::Font> titlefont, framefont; | ||
86 | FbTk::ThemeItem<FbTk::Justify> framefont_justify, titlefont_justify; | ||
87 | FbTk::ThemeItem<FbTk::Justify> bullet_pos; | ||
88 | FbTk::ThemeItem<BulletType> m_bullet; | ||
89 | |||
90 | Display *m_display; | ||
91 | GC t_text_gc, f_text_gc, h_text_gc, d_text_gc, hilite_gc; | ||
92 | |||
93 | }; | ||
94 | |||
95 | }; // end namespace FbTk | ||
96 | |||
97 | #endif // FBTK_MENUTHEME_HH | ||