diff options
author | Mark Tiefenbruck <mark@fluxbox.org> | 2008-08-22 12:52:23 (GMT) |
---|---|---|
committer | Mark Tiefenbruck <mark@fluxbox.org> | 2008-08-22 12:52:23 (GMT) |
commit | 0ae3ca9e8a2a3398cf07789e0d141887d40dcb6f (patch) | |
tree | 4e4d66fc15fea3956106affb772ea28f3bc909dd /src/FbWinFrame.hh | |
parent | 8681220f5361fef500d7eda28d9f22bbf0a006e4 (diff) | |
download | fluxbox-0ae3ca9e8a2a3398cf07789e0d141887d40dcb6f.zip fluxbox-0ae3ca9e8a2a3398cf07789e0d141887d40dcb6f.tar.bz2 |
move fullscreen and maximization handling to FbWinFrame
Diffstat (limited to 'src/FbWinFrame.hh')
-rw-r--r-- | src/FbWinFrame.hh | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/FbWinFrame.hh b/src/FbWinFrame.hh index 5756c8e..d2f7a1f 100644 --- a/src/FbWinFrame.hh +++ b/src/FbWinFrame.hh | |||
@@ -69,6 +69,16 @@ public: | |||
69 | }; | 69 | }; |
70 | 70 | ||
71 | /** | 71 | /** |
72 | * Types of maximization | ||
73 | */ | ||
74 | enum MaximizeMode { | ||
75 | MAX_NONE = 0, ///< normal state | ||
76 | MAX_HORZ = 1, ///< maximize horizontal | ||
77 | MAX_VERT = 2, ///< maximize vertical | ||
78 | MAX_FULL = 3 ///< maximize full | ||
79 | }; | ||
80 | |||
81 | /** | ||
72 | This enumeration represents individual decoration | 82 | This enumeration represents individual decoration |
73 | attributes, they can be OR-d together to get a mask. | 83 | attributes, they can be OR-d together to get a mask. |
74 | Useful for saving. | 84 | Useful for saving. |
@@ -126,12 +136,15 @@ public: | |||
126 | size_hints(), | 136 | size_hints(), |
127 | deco_mask(DECOR_NORMAL), | 137 | deco_mask(DECOR_NORMAL), |
128 | focused(false), | 138 | focused(false), |
129 | shaded(false), fullscreen(false), maximized(0) { } | 139 | shaded(false), fullscreen(false), maximized(0), |
140 | x(0), y(0), width(1), height(1) { } | ||
130 | 141 | ||
131 | SizeHints size_hints; | 142 | SizeHints size_hints; |
132 | unsigned int deco_mask; | 143 | unsigned int deco_mask; |
133 | bool focused, shaded, fullscreen; | 144 | bool focused, shaded, fullscreen; |
134 | int maximized; | 145 | int maximized; |
146 | int x, y; | ||
147 | unsigned int width, height; | ||
135 | }; | 148 | }; |
136 | 149 | ||
137 | /// create a top level window | 150 | /// create a top level window |
@@ -182,7 +195,7 @@ public: | |||
182 | /// set focus/unfocus style | 195 | /// set focus/unfocus style |
183 | void setFocus(bool newvalue); | 196 | void setFocus(bool newvalue); |
184 | void setFullscreen(bool value); | 197 | void setFullscreen(bool value); |
185 | void setMaximized(int value) { m_state.maximized = value; } | 198 | void setMaximized(int value); |
186 | 199 | ||
187 | void setFocusTitle(const std::string &str) { m_label.setText(str); } | 200 | void setFocusTitle(const std::string &str) { m_label.setText(str); } |
188 | bool setTabMode(TabMode tabmode); | 201 | bool setTabMode(TabMode tabmode); |
@@ -237,6 +250,8 @@ public: | |||
237 | static int getDecoMaskFromString(const std::string &str); | 250 | static int getDecoMaskFromString(const std::string &str); |
238 | void setDecorationMask(unsigned int mask) { m_state.deco_mask = mask; } | 251 | void setDecorationMask(unsigned int mask) { m_state.deco_mask = mask; } |
239 | void applyDecorations(); | 252 | void applyDecorations(); |
253 | void applyState(); | ||
254 | void saveGeometry(); | ||
240 | 255 | ||
241 | /// determine if the given decoration should be shown in current state | 256 | /// determine if the given decoration should be shown in current state |
242 | bool useBorder() const; | 257 | bool useBorder() const; |
@@ -271,6 +286,10 @@ public: | |||
271 | int y() const { return m_window.y(); } | 286 | int y() const { return m_window.y(); } |
272 | unsigned int width() const { return m_window.width(); } | 287 | unsigned int width() const { return m_window.width(); } |
273 | unsigned int height() const { return m_window.height(); } | 288 | unsigned int height() const { return m_window.height(); } |
289 | |||
290 | int normalX() const; | ||
291 | int normalY() const; | ||
292 | unsigned int normalWidth() const; | ||
274 | unsigned int normalHeight() const; | 293 | unsigned int normalHeight() const; |
275 | 294 | ||
276 | // extra bits for tabs | 295 | // extra bits for tabs |