diff options
author | simonb <simonb> | 2005-04-10 18:18:14 (GMT) |
---|---|---|
committer | simonb <simonb> | 2005-04-10 18:18:14 (GMT) |
commit | 88c66f0687d2a9e2018f22407b2587dc4d87d012 (patch) | |
tree | 197308ad2426783058f479d12329548c6a8a4374 /src/FbWinFrame.hh | |
parent | 6cf66c66554a20a1c98eddf26af9e35b7c90cbd5 (diff) | |
download | fluxbox-88c66f0687d2a9e2018f22407b2587dc4d87d012.zip fluxbox-88c66f0687d2a9e2018f22407b2587dc4d87d012.tar.bz2 |
Big changes to how transparency works
Consequently rearrange lots of rendering ops, and strip calls to
updateTransparent
Diffstat (limited to 'src/FbWinFrame.hh')
-rw-r--r-- | src/FbWinFrame.hh | 55 |
1 files changed, 37 insertions, 18 deletions
diff --git a/src/FbWinFrame.hh b/src/FbWinFrame.hh index 768f733..7582f2c 100644 --- a/src/FbWinFrame.hh +++ b/src/FbWinFrame.hh | |||
@@ -30,7 +30,6 @@ | |||
30 | #include "FbTk/Observer.hh" | 30 | #include "FbTk/Observer.hh" |
31 | #include "FbTk/Color.hh" | 31 | #include "FbTk/Color.hh" |
32 | #include "FbTk/FbPixmap.hh" | 32 | #include "FbTk/FbPixmap.hh" |
33 | #include "FbTk/Timer.hh" | ||
34 | 33 | ||
35 | #include <vector> | 34 | #include <vector> |
36 | #include <list> | 35 | #include <list> |
@@ -87,6 +86,11 @@ public: | |||
87 | // can elect to ignore move or resize (mainly for use of move/resize individual functions | 86 | // can elect to ignore move or resize (mainly for use of move/resize individual functions |
88 | void moveResize(int x, int y, unsigned int width, unsigned int height, bool move = true, bool resize = true, int win_gravity=ForgetGravity); | 87 | void moveResize(int x, int y, unsigned int width, unsigned int height, bool move = true, bool resize = true, int win_gravity=ForgetGravity); |
89 | 88 | ||
89 | /// some outside move/resize happened, and we need to notify all of our windows | ||
90 | /// in case of transparency | ||
91 | void notifyMoved(bool clear); | ||
92 | void clearAll(); | ||
93 | |||
90 | /// set focus/unfocus style | 94 | /// set focus/unfocus style |
91 | void setFocus(bool newvalue); | 95 | void setFocus(bool newvalue); |
92 | void setDoubleClickTime(unsigned int time); | 96 | void setDoubleClickTime(unsigned int time); |
@@ -151,8 +155,6 @@ public: | |||
151 | void reconfigure(); | 155 | void reconfigure(); |
152 | void setUseShape(bool value); | 156 | void setUseShape(bool value); |
153 | 157 | ||
154 | void setUpdateDelayTime(long t) { m_update_timer.setTimeout(t); } | ||
155 | |||
156 | /** | 158 | /** |
157 | @name accessors | 159 | @name accessors |
158 | */ | 160 | */ |
@@ -199,31 +201,43 @@ private: | |||
199 | @name render helper functions | 201 | @name render helper functions |
200 | */ | 202 | */ |
201 | //@{ | 203 | //@{ |
204 | void renderAll(); | ||
202 | void renderTitlebar(); | 205 | void renderTitlebar(); |
203 | void renderHandles(); | 206 | void renderHandles(); |
204 | void renderButtons(); | 207 | void renderLabelButtons(); |
205 | // focused => has focus | 208 | |
206 | void renderButtonFocus(FbTk::TextButton &button); | 209 | void renderButtons(); // subset of renderTitlebar - don't call directly |
207 | // unfocus => has no focus, label not the active one | 210 | |
208 | void renderButtonUnfocus(FbTk::TextButton &button); | ||
209 | // active => doesn't have keybaord focus, but is the active tab | ||
210 | void renderButtonActive(FbTk::TextButton &button); | ||
211 | void renderLabel(); | ||
212 | /// renders to pixmap or sets color | 211 | /// renders to pixmap or sets color |
213 | void render(const FbTk::Texture &tex, FbTk::Color &col, Pixmap &pm, | 212 | void render(const FbTk::Texture &tex, FbTk::Color &col, Pixmap &pm, |
214 | unsigned int width, unsigned int height); | 213 | unsigned int width, unsigned int height); |
214 | |||
215 | //@} | ||
216 | |||
217 | /** | ||
218 | @name apply pixmaps depending on focus | ||
219 | */ | ||
220 | //@{ | ||
221 | void applyAll(); | ||
222 | void applyTitlebar(); | ||
223 | void applyHandles(); | ||
224 | void applyLabelButtons(); | ||
225 | void applyFocusLabel(FbTk::TextButton &button); | ||
226 | void applyUnfocusLabel(FbTk::TextButton &button); | ||
227 | void applyActiveLabel(FbTk::TextButton &button); | ||
228 | void applyButtons(); // only called within applyTitlebar | ||
229 | |||
215 | void getActiveLabelPixmap(Pixmap &label_pm, Pixmap &title_pm, | 230 | void getActiveLabelPixmap(Pixmap &label_pm, Pixmap &title_pm, |
216 | FbTk::Color &label_color, FbTk::Color &title_color); | 231 | FbTk::Color &label_color, FbTk::Color &title_color); |
217 | void getCurrentFocusPixmap(Pixmap &label_pm, Pixmap &title_pm, | 232 | void getCurrentFocusPixmap(Pixmap &label_pm, Pixmap &title_pm, |
218 | FbTk::Color &label_color, FbTk::Color &title_color); | 233 | FbTk::Color &label_color, FbTk::Color &title_color); |
219 | void renderLabelButtons(); | 234 | |
235 | /// initiate inserted button for current theme | ||
236 | void applyButton(FbTk::Button &btn); | ||
220 | //@} | 237 | //@} |
221 | 238 | ||
222 | /// initiate some commont variables | 239 | /// initiate some commont variables |
223 | void init(); | 240 | void init(); |
224 | /// initiate inserted buttons for current theme | ||
225 | void setupButton(FbTk::Button &btn); | ||
226 | void updateTransparent(); | ||
227 | 241 | ||
228 | FbWinFrameTheme &m_theme; ///< theme to be used | 242 | FbWinFrameTheme &m_theme; ///< theme to be used |
229 | FbTk::ImageControl &m_imagectrl; ///< Image control for rendering | 243 | FbTk::ImageControl &m_imagectrl; ///< Image control for rendering |
@@ -265,8 +279,13 @@ private: | |||
265 | FbTk::Color m_label_focused_color; ///< color for focused label | 279 | FbTk::Color m_label_focused_color; ///< color for focused label |
266 | Pixmap m_label_unfocused_pm; ///< pixmap for unfocused label | 280 | Pixmap m_label_unfocused_pm; ///< pixmap for unfocused label |
267 | FbTk::Color m_label_unfocused_color; ///< color for unfocued label | 281 | FbTk::Color m_label_unfocused_color; ///< color for unfocued label |
268 | Pixmap m_label_active_pm; ///< pixmap for active label | 282 | |
269 | FbTk::Color m_label_active_color; ///< color for active label | 283 | Pixmap m_labelbutton_focused_pm; ///< pixmap for focused label |
284 | FbTk::Color m_labelbutton_focused_color; ///< color for focused label | ||
285 | Pixmap m_labelbutton_unfocused_pm; ///< pixmap for unfocused label | ||
286 | FbTk::Color m_labelbutton_unfocused_color; ///< color for unfocued label | ||
287 | Pixmap m_labelbutton_active_pm; ///< pixmap for active label | ||
288 | FbTk::Color m_labelbutton_active_color; ///< color for active label | ||
270 | 289 | ||
271 | FbTk::Color m_handle_focused_color, m_handle_unfocused_color; | 290 | FbTk::Color m_handle_focused_color, m_handle_unfocused_color; |
272 | Pixmap m_handle_focused_pm, m_handle_unfocused_pm; | 291 | Pixmap m_handle_focused_pm, m_handle_unfocused_pm; |
@@ -285,6 +304,7 @@ private: | |||
285 | FbTk::Color m_grip_unfocused_color; ///< unfocused color for grip if no pixmap is given | 304 | FbTk::Color m_grip_unfocused_color; ///< unfocused color for grip if no pixmap is given |
286 | //@} | 305 | //@} |
287 | 306 | ||
307 | bool m_need_render; | ||
288 | int m_button_size; ///< size for all titlebar buttons | 308 | int m_button_size; ///< size for all titlebar buttons |
289 | unsigned int m_width_before_shade, ///< width before shade, so we can restore it when we unshade | 309 | unsigned int m_width_before_shade, ///< width before shade, so we can restore it when we unshade |
290 | m_height_before_shade; ///< height before shade, so we can restore it when we unshade | 310 | m_height_before_shade; ///< height before shade, so we can restore it when we unshade |
@@ -309,7 +329,6 @@ private: | |||
309 | ThemeListener m_themelistener; | 329 | ThemeListener m_themelistener; |
310 | std::auto_ptr<Shape> m_shape; | 330 | std::auto_ptr<Shape> m_shape; |
311 | bool m_disable_shape; | 331 | bool m_disable_shape; |
312 | FbTk::Timer m_update_timer; | ||
313 | }; | 332 | }; |
314 | 333 | ||
315 | #endif // FBWINFRAME_HH | 334 | #endif // FBWINFRAME_HH |