diff options
Diffstat (limited to 'src/FbWinFrame.hh')
-rw-r--r-- | src/FbWinFrame.hh | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/src/FbWinFrame.hh b/src/FbWinFrame.hh index 643fc49..e24612e 100644 --- a/src/FbWinFrame.hh +++ b/src/FbWinFrame.hh | |||
@@ -25,7 +25,7 @@ | |||
25 | #include "FbTk/FbWindow.hh" | 25 | #include "FbTk/FbWindow.hh" |
26 | #include "FbTk/EventHandler.hh" | 26 | #include "FbTk/EventHandler.hh" |
27 | #include "FbTk/RefCount.hh" | 27 | #include "FbTk/RefCount.hh" |
28 | #include "FbTk/Observer.hh" | 28 | #include "FbTk/Subject.hh" |
29 | #include "FbTk/Color.hh" | 29 | #include "FbTk/Color.hh" |
30 | #include "FbTk/XLayerItem.hh" | 30 | #include "FbTk/XLayerItem.hh" |
31 | #include "FbTk/TextButton.hh" | 31 | #include "FbTk/TextButton.hh" |
@@ -186,21 +186,12 @@ public: | |||
186 | void removeEventHandler(); | 186 | void removeEventHandler(); |
187 | 187 | ||
188 | void setDecorationMask(unsigned int mask) { m_decoration_mask = mask; } | 188 | void setDecorationMask(unsigned int mask) { m_decoration_mask = mask; } |
189 | // these return true/false for if something changed | 189 | void applyDecorations(); |
190 | bool hideTitlebar(); | ||
191 | bool showTitlebar(); | ||
192 | bool hideTabs(); | ||
193 | bool showTabs(); | ||
194 | bool hideHandle(); | ||
195 | bool showHandle(); | ||
196 | bool hideAllDecorations(); | ||
197 | bool showAllDecorations(); | ||
198 | 190 | ||
199 | // this function translates its arguments according to win_gravity | 191 | // this function translates its arguments according to win_gravity |
200 | // if win_gravity is negative, it does an inverse translation | 192 | // if win_gravity is negative, it does an inverse translation |
201 | void gravityTranslate(int &x, int &y, int win_gravity, unsigned int client_bw, bool move_frame = false); | 193 | void gravityTranslate(int &x, int &y, int win_gravity, unsigned int client_bw, bool move_frame = false); |
202 | void setActiveGravity(int gravity, unsigned int orig_client_bw) { m_active_gravity = gravity; m_active_orig_client_bw = orig_client_bw; } | 194 | void setActiveGravity(int gravity, unsigned int orig_client_bw) { m_active_gravity = gravity; m_active_orig_client_bw = orig_client_bw; } |
203 | void setBorderWidth(unsigned int borderW); | ||
204 | 195 | ||
205 | /** | 196 | /** |
206 | @name Event handlers | 197 | @name Event handlers |
@@ -257,8 +248,8 @@ public: | |||
257 | bool isShaded() const { return m_shaded; } | 248 | bool isShaded() const { return m_shaded; } |
258 | FocusableTheme<FbWinFrameTheme> &theme() const { return m_theme; } | 249 | FocusableTheme<FbWinFrameTheme> &theme() const { return m_theme; } |
259 | /// @return titlebar height | 250 | /// @return titlebar height |
260 | unsigned int titlebarHeight() const { return (m_use_titlebar?m_titlebar.height()+m_window.borderWidth():0); } | 251 | unsigned int titlebarHeight() const { return (m_use_titlebar?m_titlebar.height()+m_titlebar.borderWidth():0); } |
261 | unsigned int handleHeight() const { return (m_use_handle?m_handle.height()+m_window.borderWidth():0); } | 252 | unsigned int handleHeight() const { return (m_use_handle?m_handle.height()+m_handle.borderWidth():0); } |
262 | /// @return size of button | 253 | /// @return size of button |
263 | unsigned int buttonHeight() const; | 254 | unsigned int buttonHeight() const; |
264 | bool externalTabMode() const { return m_tabmode == EXTERNAL && m_use_tabs; } | 255 | bool externalTabMode() const { return m_tabmode == EXTERNAL && m_use_tabs; } |
@@ -266,6 +257,9 @@ public: | |||
266 | const FbTk::XLayerItem &layerItem() const { return m_layeritem; } | 257 | const FbTk::XLayerItem &layerItem() const { return m_layeritem; } |
267 | FbTk::XLayerItem &layerItem() { return m_layeritem; } | 258 | FbTk::XLayerItem &layerItem() { return m_layeritem; } |
268 | 259 | ||
260 | const FbTk::Subject &frameExtentSig() const { return m_frame_extent_sig; } | ||
261 | FbTk::Subject &frameExtentSig() { return m_frame_extent_sig; } | ||
262 | |||
269 | //@} | 263 | //@} |
270 | 264 | ||
271 | private: | 265 | private: |
@@ -290,6 +284,15 @@ private: | |||
290 | 284 | ||
291 | //@} | 285 | //@} |
292 | 286 | ||
287 | // these return true/false for if something changed | ||
288 | bool hideTitlebar(); | ||
289 | bool showTitlebar(); | ||
290 | bool hideTabs(); | ||
291 | bool showTabs(); | ||
292 | bool hideHandle(); | ||
293 | bool showHandle(); | ||
294 | bool setBorderWidth(bool do_move = true); | ||
295 | |||
293 | /** | 296 | /** |
294 | @name apply pixmaps depending on focus | 297 | @name apply pixmaps depending on focus |
295 | */ | 298 | */ |
@@ -332,6 +335,9 @@ private: | |||
332 | m_grip_left; ///< left grip | 335 | m_grip_left; ///< left grip |
333 | FbTk::FbWindow m_clientarea; ///< window that sits behind client window to fill gaps @see setClientWindow | 336 | FbTk::FbWindow m_clientarea; ///< window that sits behind client window to fill gaps @see setClientWindow |
334 | //@} | 337 | //@} |
338 | |||
339 | FbTk::Subject m_frame_extent_sig; | ||
340 | |||
335 | typedef std::vector<FbTk::Button *> ButtonList; | 341 | typedef std::vector<FbTk::Button *> ButtonList; |
336 | ButtonList m_buttons_left, ///< buttons to the left | 342 | ButtonList m_buttons_left, ///< buttons to the left |
337 | m_buttons_right; ///< buttons to the right | 343 | m_buttons_right; ///< buttons to the right |