diff options
author | Mark Tiefenbruck <mark@fluxbox.org> | 2007-12-28 07:16:17 (GMT) |
---|---|---|
committer | Mark Tiefenbruck <mark@fluxbox.org> | 2007-12-28 07:16:17 (GMT) |
commit | 2940869cd7cc1688be5114451380275c9a85f5d1 (patch) | |
tree | 8200e95524356dfd45cb9ceaef0b4ea4b0816fa9 /src/FbTk | |
parent | 62bcfaf0e4fd7d77873343d880fc526ec58cdaa6 (diff) | |
download | fluxbox_paul-2940869cd7cc1688be5114451380275c9a85f5d1.zip fluxbox_paul-2940869cd7cc1688be5114451380275c9a85f5d1.tar.bz2 |
merge MenuTheme with FbTk::MenuTheme
Diffstat (limited to 'src/FbTk')
-rw-r--r-- | src/FbTk/MenuTheme.cc | 4 | ||||
-rw-r--r-- | src/FbTk/MenuTheme.hh | 75 |
2 files changed, 42 insertions, 37 deletions
diff --git a/src/FbTk/MenuTheme.cc b/src/FbTk/MenuTheme.cc index 18e51aa..239313c 100644 --- a/src/FbTk/MenuTheme.cc +++ b/src/FbTk/MenuTheme.cc | |||
@@ -54,6 +54,7 @@ MenuTheme::MenuTheme(int screen_num): | |||
54 | titlefont_justify(*this, "menu.title.justify", "Menu.Title.Justify"), | 54 | titlefont_justify(*this, "menu.title.justify", "Menu.Title.Justify"), |
55 | bullet_pos(*this, "menu.bullet.position", "Menu.Bullet.Position"), | 55 | bullet_pos(*this, "menu.bullet.position", "Menu.Bullet.Position"), |
56 | m_bullet(*this, "menu.bullet", "Menu.Bullet"), | 56 | m_bullet(*this, "menu.bullet", "Menu.Bullet"), |
57 | m_shapeplace(*this, "menu.roundCorners", "Menu.RoundCorners"), | ||
57 | m_title_height(*this, "menu.titleHeight", "Menu.TitleHeight"), | 58 | m_title_height(*this, "menu.titleHeight", "Menu.TitleHeight"), |
58 | m_item_height(*this, "menu.itemHeight", "Menu.ItemHeight"), | 59 | m_item_height(*this, "menu.itemHeight", "Menu.ItemHeight"), |
59 | m_border_width(*this, "menu.borderWidth", "Menu.BorderWidth"), | 60 | m_border_width(*this, "menu.borderWidth", "Menu.BorderWidth"), |
@@ -78,11 +79,12 @@ MenuTheme::MenuTheme(int screen_num): | |||
78 | m_delayclose(0), // no delay as default | 79 | m_delayclose(0), // no delay as default |
79 | m_real_title_height(*m_title_height), | 80 | m_real_title_height(*m_title_height), |
80 | m_real_item_height(*m_item_height) | 81 | m_real_item_height(*m_item_height) |
81 | { | 82 | { |
82 | // set default values | 83 | // set default values |
83 | *m_border_width = 0; | 84 | *m_border_width = 0; |
84 | *m_bevel_width = 0; | 85 | *m_bevel_width = 0; |
85 | *m_border_width = 0; | 86 | *m_border_width = 0; |
87 | *m_shapeplace = FbTk::Shape::NONE; | ||
86 | 88 | ||
87 | ThemeManager::instance().loadTheme(*this); | 89 | ThemeManager::instance().loadTheme(*this); |
88 | 90 | ||
diff --git a/src/FbTk/MenuTheme.hh b/src/FbTk/MenuTheme.hh index 0bb77ef..d76c2fb 100644 --- a/src/FbTk/MenuTheme.hh +++ b/src/FbTk/MenuTheme.hh | |||
@@ -27,6 +27,7 @@ | |||
27 | #include "Theme.hh" | 27 | #include "Theme.hh" |
28 | #include "Color.hh" | 28 | #include "Color.hh" |
29 | #include "Font.hh" | 29 | #include "Font.hh" |
30 | #include "Shape.hh" | ||
30 | #include "Texture.hh" | 31 | #include "Texture.hh" |
31 | #include "Text.hh" | 32 | #include "Text.hh" |
32 | #include "Subject.hh" | 33 | #include "Subject.hh" |
@@ -35,7 +36,7 @@ | |||
35 | 36 | ||
36 | namespace FbTk { | 37 | namespace FbTk { |
37 | 38 | ||
38 | class MenuTheme:public FbTk::Theme { | 39 | class MenuTheme:public Theme { |
39 | public: | 40 | public: |
40 | //!! TODO | 41 | //!! TODO |
41 | // this isn't actually used with a theme item | 42 | // this isn't actually used with a theme item |
@@ -54,40 +55,40 @@ public: | |||
54 | @name text colors | 55 | @name text colors |
55 | */ | 56 | */ |
56 | ///@{ | 57 | ///@{ |
57 | inline const FbTk::Color &titleTextColor() const { return *t_text; } | 58 | inline const Color &titleTextColor() const { return *t_text; } |
58 | inline const FbTk::Color &frameTextColor() const { return *f_text; } | 59 | inline const Color &frameTextColor() const { return *f_text; } |
59 | inline const FbTk::Color &frameUnderlineColor() const { return *u_text; } | 60 | inline const Color &frameUnderlineColor() const { return *u_text; } |
60 | inline const FbTk::Color &highlightTextColor() const { return *h_text; } | 61 | inline const Color &highlightTextColor() const { return *h_text; } |
61 | inline const FbTk::Color &disableTextColor() const { return *d_text; } | 62 | inline const Color &disableTextColor() const { return *d_text; } |
62 | ///@} | 63 | ///@} |
63 | /** | 64 | /** |
64 | @name textures | 65 | @name textures |
65 | */ | 66 | */ |
66 | ///@{ | 67 | ///@{ |
67 | inline const FbTk::Texture &titleTexture() const { return *title; } | 68 | inline const Texture &titleTexture() const { return *title; } |
68 | inline const FbTk::Texture &frameTexture() const { return *frame; } | 69 | inline const Texture &frameTexture() const { return *frame; } |
69 | inline const FbTk::Texture &hiliteTexture() const { return *hilite; } | 70 | inline const Texture &hiliteTexture() const { return *hilite; } |
70 | ///@} | 71 | ///@} |
71 | 72 | ||
72 | inline const FbTk::PixmapWithMask &bulletPixmap() const { return *m_bullet_pixmap; } | 73 | inline const PixmapWithMask &bulletPixmap() const { return *m_bullet_pixmap; } |
73 | inline const FbTk::PixmapWithMask &selectedPixmap() const { return *m_selected_pixmap; } | 74 | inline const PixmapWithMask &selectedPixmap() const { return *m_selected_pixmap; } |
74 | inline const FbTk::PixmapWithMask &unselectedPixmap() const { return *m_unselected_pixmap; } | 75 | inline const PixmapWithMask &unselectedPixmap() const { return *m_unselected_pixmap; } |
75 | 76 | ||
76 | inline const FbTk::PixmapWithMask &highlightBulletPixmap() const { return *m_hl_bullet_pixmap; } | 77 | inline const PixmapWithMask &highlightBulletPixmap() const { return *m_hl_bullet_pixmap; } |
77 | inline const FbTk::PixmapWithMask &highlightSelectedPixmap() const { return *m_hl_selected_pixmap; } | 78 | inline const PixmapWithMask &highlightSelectedPixmap() const { return *m_hl_selected_pixmap; } |
78 | inline const FbTk::PixmapWithMask &highlightUnselectedPixmap() const { return *m_hl_unselected_pixmap; } | 79 | inline const PixmapWithMask &highlightUnselectedPixmap() const { return *m_hl_unselected_pixmap; } |
79 | /** | 80 | /** |
80 | @name fonts | 81 | @name fonts |
81 | */ | 82 | */ |
82 | ///@{ | 83 | ///@{ |
83 | inline const FbTk::Font &titleFont() const { return *titlefont; } | 84 | inline const Font &titleFont() const { return *titlefont; } |
84 | inline FbTk::Font &titleFont() { return *titlefont; } | 85 | inline Font &titleFont() { return *titlefont; } |
85 | inline const FbTk::Font &frameFont() const { return *framefont; } | 86 | inline const Font &frameFont() const { return *framefont; } |
86 | inline FbTk::Font &frameFont() { return *framefont; } | 87 | inline Font &frameFont() { return *framefont; } |
87 | ///@} | 88 | ///@} |
88 | 89 | ||
89 | inline FbTk::Justify frameFontJustify() const { return *framefont_justify; } | 90 | inline Justify frameFontJustify() const { return *framefont_justify; } |
90 | inline FbTk::Justify titleFontJustify() const { return *titlefont_justify; } | 91 | inline Justify titleFontJustify() const { return *titlefont_justify; } |
91 | 92 | ||
92 | /** | 93 | /** |
93 | @name graphic contexts | 94 | @name graphic contexts |
@@ -107,7 +108,7 @@ public: | |||
107 | inline GContext &hiliteGC() { return hilite_gc; } | 108 | inline GContext &hiliteGC() { return hilite_gc; } |
108 | ///@} | 109 | ///@} |
109 | inline BulletType bullet() const { return *m_bullet; } | 110 | inline BulletType bullet() const { return *m_bullet; } |
110 | inline FbTk::Justify bulletPos() const { return *bullet_pos; } | 111 | inline Justify bulletPos() const { return *bullet_pos; } |
111 | 112 | ||
112 | inline unsigned int titleHeight() const { return m_real_title_height; } | 113 | inline unsigned int titleHeight() const { return m_real_title_height; } |
113 | inline unsigned int itemHeight() const { return m_real_item_height; } | 114 | inline unsigned int itemHeight() const { return m_real_item_height; } |
@@ -126,7 +127,8 @@ public: | |||
126 | inline int delayOpen() const { return m_delayopen; } | 127 | inline int delayOpen() const { return m_delayopen; } |
127 | inline int delayClose() const { return m_delayclose; } | 128 | inline int delayClose() const { return m_delayclose; } |
128 | 129 | ||
129 | inline const FbTk::Color &borderColor() const { return *m_border_color; } | 130 | inline const Color &borderColor() const { return *m_border_color; } |
131 | inline Shape::ShapePlace shapePlaces() const { return *m_shapeplace; } | ||
130 | 132 | ||
131 | // special override | 133 | // special override |
132 | inline void setSelectedPixmap(Pixmap pm, bool is_imagecached) { | 134 | inline void setSelectedPixmap(Pixmap pm, bool is_imagecached) { |
@@ -142,21 +144,22 @@ public: | |||
142 | } | 144 | } |
143 | 145 | ||
144 | private: | 146 | private: |
145 | FbTk::ThemeItem<FbTk::Color> t_text, f_text, h_text, d_text, u_text; | 147 | ThemeItem<Color> t_text, f_text, h_text, d_text, u_text; |
146 | FbTk::ThemeItem<FbTk::Texture> title, frame, hilite; | 148 | ThemeItem<Texture> title, frame, hilite; |
147 | FbTk::ThemeItem<FbTk::Font> titlefont, framefont; | 149 | ThemeItem<Font> titlefont, framefont; |
148 | FbTk::ThemeItem<FbTk::Justify> framefont_justify, titlefont_justify; | 150 | ThemeItem<Justify> framefont_justify, titlefont_justify; |
149 | FbTk::ThemeItem<FbTk::Justify> bullet_pos; | 151 | ThemeItem<Justify> bullet_pos; |
150 | FbTk::ThemeItem<BulletType> m_bullet; | 152 | ThemeItem<BulletType> m_bullet; |
151 | FbTk::ThemeItem<unsigned int> m_title_height, m_item_height; | 153 | ThemeItem<Shape::ShapePlace> m_shapeplace; |
152 | FbTk::ThemeItem<unsigned int> m_border_width; | 154 | ThemeItem<unsigned int> m_title_height, m_item_height; |
153 | FbTk::ThemeItem<unsigned int> m_bevel_width; | 155 | ThemeItem<unsigned int> m_border_width; |
154 | FbTk::ThemeItem<FbTk::Color> m_border_color; | 156 | ThemeItem<unsigned int> m_bevel_width; |
155 | FbTk::ThemeItem<FbTk::PixmapWithMask> m_bullet_pixmap, m_selected_pixmap, m_unselected_pixmap; | 157 | ThemeItem<Color> m_border_color; |
156 | FbTk::ThemeItem<FbTk::PixmapWithMask> m_hl_bullet_pixmap, m_hl_selected_pixmap, m_hl_unselected_pixmap; | 158 | ThemeItem<PixmapWithMask> m_bullet_pixmap, m_selected_pixmap, m_unselected_pixmap; |
159 | ThemeItem<PixmapWithMask> m_hl_bullet_pixmap, m_hl_selected_pixmap, m_hl_unselected_pixmap; | ||
157 | 160 | ||
158 | Display *m_display; | 161 | Display *m_display; |
159 | FbTk::GContext t_text_gc, f_text_gc, u_text_gc, h_text_gc, d_text_gc, hilite_gc; | 162 | GContext t_text_gc, f_text_gc, u_text_gc, h_text_gc, d_text_gc, hilite_gc; |
160 | 163 | ||
161 | unsigned char m_alpha; | 164 | unsigned char m_alpha; |
162 | MenuMode m_menumode; | 165 | MenuMode m_menumode; |