diff options
author | Mark Tiefenbruck <mark@fluxbox.org> | 2007-12-23 21:28:08 (GMT) |
---|---|---|
committer | Mark Tiefenbruck <mark@fluxbox.org> | 2007-12-23 21:28:08 (GMT) |
commit | 1b48b749b9a376c883ff4cc2ca3e807ac85cf21f (patch) | |
tree | 6ca960b0751df35295791728721bf12043c2c6c5 /src/FbWinFrame.hh | |
parent | 0676161673d4347197c9d20fe3d613527633e597 (diff) | |
download | fluxbox_pavel-1b48b749b9a376c883ff4cc2ca3e807ac85cf21f.zip fluxbox_pavel-1b48b749b9a376c883ff4cc2ca3e807ac85cf21f.tar.bz2 |
make FbWinFrame aware of the decoration state
Diffstat (limited to 'src/FbWinFrame.hh')
-rw-r--r-- | src/FbWinFrame.hh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/FbWinFrame.hh b/src/FbWinFrame.hh index 9bd29dd..5af852e 100644 --- a/src/FbWinFrame.hh +++ b/src/FbWinFrame.hh | |||
@@ -72,6 +72,34 @@ public: | |||
72 | RIGHTBOTTOM, RIGHTTOP | 72 | RIGHTBOTTOM, RIGHTTOP |
73 | }; | 73 | }; |
74 | 74 | ||
75 | /** | ||
76 | This enumeration represents individual decoration | ||
77 | attributes, they can be OR-d together to get a mask. | ||
78 | Useful for saving. | ||
79 | */ | ||
80 | enum DecorationMask { | ||
81 | DECORM_TITLEBAR = (1<<0), | ||
82 | DECORM_HANDLE = (1<<1), | ||
83 | DECORM_BORDER = (1<<2), | ||
84 | DECORM_ICONIFY = (1<<3), | ||
85 | DECORM_MAXIMIZE = (1<<4), | ||
86 | DECORM_CLOSE = (1<<5), | ||
87 | DECORM_MENU = (1<<6), | ||
88 | DECORM_STICKY = (1<<7), | ||
89 | DECORM_SHADE = (1<<8), | ||
90 | DECORM_TAB = (1<<9), | ||
91 | DECORM_ENABLED = (1<<10), | ||
92 | DECORM_LAST = (1<<11) // useful for getting "All" | ||
93 | }; | ||
94 | |||
95 | enum Decoration { | ||
96 | DECOR_NONE = 0, | ||
97 | DECOR_NORMAL = DECORM_LAST - 1, | ||
98 | DECOR_TINY = DECORM_TITLEBAR|DECORM_ICONIFY|DECORM_MENU|DECORM_TAB, | ||
99 | DECOR_TOOL = DECORM_TITLEBAR|DECORM_MENU, | ||
100 | DECOR_BORDER = DECORM_BORDER|DECORM_MENU, | ||
101 | DECOR_TAB = DECORM_BORDER|DECORM_MENU|DECORM_TAB | ||
102 | }; | ||
75 | 103 | ||
76 | /// create a top level window | 104 | /// create a top level window |
77 | FbWinFrame(BScreen &screen, FbWinFrameTheme &theme, FbTk::ImageControl &imgctrl, | 105 | FbWinFrame(BScreen &screen, FbWinFrameTheme &theme, FbTk::ImageControl &imgctrl, |
@@ -161,6 +189,7 @@ public: | |||
161 | /// remove any handler for the windows | 189 | /// remove any handler for the windows |
162 | void removeEventHandler(); | 190 | void removeEventHandler(); |
163 | 191 | ||
192 | void setDecorationMask(unsigned int mask) { m_decoration_mask = mask; } | ||
164 | // these return true/false for if something changed | 193 | // these return true/false for if something changed |
165 | bool hideTitlebar(); | 194 | bool hideTitlebar(); |
166 | bool showTitlebar(); | 195 | bool showTitlebar(); |
@@ -314,6 +343,7 @@ private: | |||
314 | typedef std::list<FbTk::TextButton *> LabelList; | 343 | typedef std::list<FbTk::TextButton *> LabelList; |
315 | IconButton *m_current_label; ///< which client button is focused at the moment | 344 | IconButton *m_current_label; ///< which client button is focused at the moment |
316 | int m_bevel; ///< bevel between titlebar items and titlebar | 345 | int m_bevel; ///< bevel between titlebar items and titlebar |
346 | unsigned int m_decoration_mask; ///< bitmask of applied decorations | ||
317 | bool m_use_titlebar; ///< if we should use titlebar | 347 | bool m_use_titlebar; ///< if we should use titlebar |
318 | bool m_use_tabs; ///< if we should use tabs (turns them off in external mode only) | 348 | bool m_use_tabs; ///< if we should use tabs (turns them off in external mode only) |
319 | bool m_use_handle; ///< if we should use handle | 349 | bool m_use_handle; ///< if we should use handle |