aboutsummaryrefslogtreecommitdiff
path: root/src/FbWinFrameTheme.hh
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-01-07 20:08:56 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-01-07 20:08:56 (GMT)
commitec3125aeb95a06f08cd4895c5b7c3a8911c1b368 (patch)
tree136d27f04589d0191c48b0abe940c9eb0a17a0db /src/FbWinFrameTheme.hh
parentdbfddf8e0bcf8e7abbba671eff64c9679332a774 (diff)
downloadfluxbox-ec3125aeb95a06f08cd4895c5b7c3a8911c1b368.zip
fluxbox-ec3125aeb95a06f08cd4895c5b7c3a8911c1b368.tar.bz2
switch FbWinFrameTheme to use FocusableTheme
Diffstat (limited to 'src/FbWinFrameTheme.hh')
-rw-r--r--src/FbWinFrameTheme.hh60
1 files changed, 20 insertions, 40 deletions
diff --git a/src/FbWinFrameTheme.hh b/src/FbWinFrameTheme.hh
index bc8ed40..fd2a7e9 100644
--- a/src/FbWinFrameTheme.hh
+++ b/src/FbWinFrameTheme.hh
@@ -31,41 +31,28 @@
31#include "FbTk/Shape.hh" 31#include "FbTk/Shape.hh"
32 32
33#include "IconbarTheme.hh" 33#include "IconbarTheme.hh"
34#include <string>
34 35
35class FbWinFrameTheme: public FbTk::Theme, 36class FbWinFrameTheme: public FbTk::Theme,
36 public FbTk::ThemeProxy<FbWinFrameTheme> { 37 public FbTk::ThemeProxy<FbWinFrameTheme> {
37public: 38public:
38 explicit FbWinFrameTheme(int screen_num); 39 explicit FbWinFrameTheme(int screen_num, const std::string &extra,
40 const std::string &altextra);
39 ~FbWinFrameTheme(); 41 ~FbWinFrameTheme();
40 /** 42 /**
41 @name textures 43 @name textures
42 */ 44 */
43 //@{ 45 //@{
44 const FbTk::Texture &titleFocusTexture() const { return *m_title_focus; } 46 const FbTk::Texture &titleTexture() const { return *m_title; }
45 const FbTk::Texture &titleUnfocusTexture() const { return *m_title_unfocus; } 47 const FbTk::Texture &handleTexture() const { return *m_handle; }
46 48 const FbTk::Texture &buttonTexture() const { return *m_button; }
47 const FbTk::Texture &handleFocusTexture() const { return *m_handle_focus; }
48 const FbTk::Texture &handleUnfocusTexture() const { return *m_handle_unfocus; }
49
50 const FbTk::Texture &buttonFocusTexture() const { return *m_button_focus; }
51 const FbTk::Texture &buttonUnfocusTexture() const { return *m_button_unfocus; }
52 const FbTk::Texture &buttonPressedTexture() const { return *m_button_pressed; } 49 const FbTk::Texture &buttonPressedTexture() const { return *m_button_pressed; }
53 50 const FbTk::Texture &gripTexture() const { return *m_grip; }
54 const FbTk::Texture &gripFocusTexture() const { return *m_grip_focus; }
55 const FbTk::Texture &gripUnfocusTexture() const { return *m_grip_unfocus; }
56 //@} 51 //@}
57 52
58 /** 53 const FbTk::Color &buttonColor() const { return *m_button_color; }
59 @name colors
60 */
61 //@{
62 const FbTk::Color &buttonFocuscolor() const { return *m_button_focus_color; }
63 const FbTk::Color &buttonUnfocuscolor() const { return *m_button_unfocus_color; }
64 //@}
65 FbTk::Font &font() { return *m_font; } 54 FbTk::Font &font() { return *m_font; }
66 55 GC buttonPicGC() const { return m_button_pic_gc.gc(); }
67 GC buttonPicFocusGC() const { return m_button_pic_focus_gc.gc(); }
68 GC buttonPicUnfocusGC() const { return m_button_pic_unfocus_gc.gc(); }
69 56
70 bool fallback(FbTk::ThemeItem_base &item); 57 bool fallback(FbTk::ThemeItem_base &item);
71 void reconfigTheme(); 58 void reconfigTheme();
@@ -81,19 +68,16 @@ public:
81 Cursor bottomSideCursor() const { return m_cursor_bottom_side; } 68 Cursor bottomSideCursor() const { return m_cursor_bottom_side; }
82 69
83 FbTk::Shape::ShapePlace shapePlace() const { return *m_shape_place; } 70 FbTk::Shape::ShapePlace shapePlace() const { return *m_shape_place; }
84 const FbTk::BorderTheme &border(bool focus) const { return (focus ? m_border_focus : m_border_unfocus); } 71 const FbTk::BorderTheme &border() const { return m_border; }
85 72
86 unsigned int titleHeight() const { return *m_title_height; } 73 unsigned int titleHeight() const { return *m_title_height; }
87 unsigned int bevelWidth() const { return *m_bevel_width; } 74 unsigned int bevelWidth() const { return *m_bevel_width; }
88 unsigned int handleWidth() const { return *m_handle_width; } 75 unsigned int handleWidth() const { return *m_handle_width; }
89 76
90 unsigned char focusedAlpha() const { return m_focused_alpha; } 77 unsigned char alpha() const { return m_alpha; }
91 unsigned char unfocusedAlpha() const { return m_unfocused_alpha; } 78 void setAlpha(unsigned char alpha) { m_alpha = alpha; }
92 void setFocusedAlpha(unsigned char alpha) { m_focused_alpha = alpha; }
93 void setUnfocusedAlpha(unsigned char alpha) { m_unfocused_alpha = alpha; }
94 79
95 IconbarTheme &focusedIconbarTheme() { return m_focused_iconbar_theme; } 80 IconbarTheme &iconbarTheme() { return m_iconbar_theme; }
96 IconbarTheme &unfocusedIconbarTheme() { return m_unfocused_iconbar_theme; }
97 81
98 virtual FbTk::Subject &reconfigSig() { return FbTk::Theme::reconfigSig(); } 82 virtual FbTk::Subject &reconfigSig() { return FbTk::Theme::reconfigSig(); }
99 virtual const FbTk::Subject &reconfigSig() const { return FbTk::Theme::reconfigSig(); } 83 virtual const FbTk::Subject &reconfigSig() const { return FbTk::Theme::reconfigSig(); }
@@ -102,20 +86,17 @@ public:
102 virtual const FbWinFrameTheme &operator *() const { return *this; } 86 virtual const FbWinFrameTheme &operator *() const { return *this; }
103 87
104private: 88private:
105 FbTk::ThemeItem<FbTk::Texture> m_title_focus, m_title_unfocus; 89 FbTk::ThemeItem<FbTk::Texture> m_title, m_handle, m_button,
106 FbTk::ThemeItem<FbTk::Texture> m_handle_focus, m_handle_unfocus; 90 m_button_pressed, m_grip;
107 FbTk::ThemeItem<FbTk::Texture> m_button_focus, m_button_unfocus, m_button_pressed;
108 FbTk::ThemeItem<FbTk::Texture> m_grip_focus, m_grip_unfocus;
109
110 FbTk::ThemeItem<FbTk::Color> m_button_focus_color, m_button_unfocus_color;
111 91
92 FbTk::ThemeItem<FbTk::Color> m_button_color;
112 FbTk::ThemeItem<FbTk::Font> m_font; 93 FbTk::ThemeItem<FbTk::Font> m_font;
113 FbTk::ThemeItem<FbTk::Shape::ShapePlace> m_shape_place; 94 FbTk::ThemeItem<FbTk::Shape::ShapePlace> m_shape_place;
114 95
115 FbTk::ThemeItem<int> m_title_height, m_bevel_width, m_handle_width; 96 FbTk::ThemeItem<int> m_title_height, m_bevel_width, m_handle_width;
116 FbTk::BorderTheme m_border_focus, m_border_unfocus; 97 FbTk::BorderTheme m_border;
117 98
118 FbTk::GContext m_button_pic_focus_gc, m_button_pic_unfocus_gc; 99 FbTk::GContext m_button_pic_gc;
119 100
120 Cursor m_cursor_move; 101 Cursor m_cursor_move;
121 Cursor m_cursor_lower_left_angle; 102 Cursor m_cursor_lower_left_angle;
@@ -126,10 +107,9 @@ private:
126 Cursor m_cursor_right_side; 107 Cursor m_cursor_right_side;
127 Cursor m_cursor_top_side; 108 Cursor m_cursor_top_side;
128 Cursor m_cursor_bottom_side; 109 Cursor m_cursor_bottom_side;
129 unsigned char m_focused_alpha; 110 unsigned char m_alpha;
130 unsigned char m_unfocused_alpha;
131 111
132 IconbarTheme m_focused_iconbar_theme, m_unfocused_iconbar_theme; 112 IconbarTheme m_iconbar_theme;
133}; 113};
134 114
135#endif // FBWINFRAMETHEME_HH 115#endif // FBWINFRAMETHEME_HH