diff options
author | Lajos Koszti <ajnasz@ajnasz.hu> | 2012-04-06 12:10:24 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2012-04-06 12:11:16 (GMT) |
commit | 7b6dc2ad72a4c4ecd20eddbfb6f1b4c3bd2a7024 (patch) | |
tree | c2a8f4aa658783c6454b7643ce2717acaa744101 /src/CurrentWindowCmd.hh | |
parent | 5d56046b68635cea2c187e59a9d8c514e2d6bdb2 (diff) | |
download | fluxbox-7b6dc2ad72a4c4ecd20eddbfb6f1b4c3bd2a7024.zip fluxbox-7b6dc2ad72a4c4ecd20eddbfb6f1b4c3bd2a7024.tar.bz2 |
Allow percentage values for some Window commands
Diffstat (limited to 'src/CurrentWindowCmd.hh')
-rw-r--r-- | src/CurrentWindowCmd.hh | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/CurrentWindowCmd.hh b/src/CurrentWindowCmd.hh index edf00fa..f406796 100644 --- a/src/CurrentWindowCmd.hh +++ b/src/CurrentWindowCmd.hh | |||
@@ -158,24 +158,26 @@ private: | |||
158 | // resize cmd, relative size | 158 | // resize cmd, relative size |
159 | class ResizeCmd: public WindowHelperCmd{ | 159 | class ResizeCmd: public WindowHelperCmd{ |
160 | public: | 160 | public: |
161 | explicit ResizeCmd(int step_size_x, int step_size_y); | 161 | explicit ResizeCmd(int step_size_x, int step_size_y, bool is_relative_x, bool is_relative_y); |
162 | static FbTk::Command<void> *parse(const std::string &command, | 162 | static FbTk::Command<void> *parse(const std::string &command, |
163 | const std::string &args, bool trusted); | 163 | const std::string &args, bool trusted); |
164 | protected: | 164 | protected: |
165 | void real_execute(); | 165 | void real_execute(); |
166 | 166 | ||
167 | private: | 167 | private: |
168 | 168 | const int m_step_size_x; | |
169 | const int m_step_size_x; | 169 | const int m_step_size_y; |
170 | const int m_step_size_y; | 170 | const bool m_is_relative_x; |
171 | const bool m_is_relative_y; | ||
171 | }; | 172 | }; |
172 | 173 | ||
173 | class MoveToCmd: public WindowHelperCmd { | 174 | class MoveToCmd: public WindowHelperCmd { |
174 | public: | 175 | public: |
175 | explicit MoveToCmd(int pos_x, int pos_y, bool ignore_x, bool ignore_y, | 176 | explicit MoveToCmd(int pos_x, int pos_y, bool ignore_x, bool ignore_y, bool is_relative_x, bool is_relative_y, |
176 | FluxboxWindow::ReferenceCorner refc): | 177 | FluxboxWindow::ReferenceCorner refc): |
177 | m_pos_x(pos_x), m_pos_y(pos_y), | 178 | m_pos_x(pos_x), m_pos_y(pos_y), |
178 | m_ignore_x(ignore_x), m_ignore_y(ignore_y), | 179 | m_ignore_x(ignore_x), m_ignore_y(ignore_y), |
180 | m_is_relative_x(is_relative_x), m_is_relative_y(is_relative_y), | ||
179 | m_corner(refc) { } | 181 | m_corner(refc) { } |
180 | 182 | ||
181 | static FbTk::Command<void> *parse(const std::string &command, | 183 | static FbTk::Command<void> *parse(const std::string &command, |
@@ -185,19 +187,21 @@ protected: | |||
185 | 187 | ||
186 | private: | 188 | private: |
187 | int m_pos_x, m_pos_y; | 189 | int m_pos_x, m_pos_y; |
188 | bool m_ignore_x, m_ignore_y; | 190 | bool m_ignore_x, m_ignore_y, m_is_relative_x, m_is_relative_y; |
189 | FluxboxWindow::ReferenceCorner m_corner; | 191 | FluxboxWindow::ReferenceCorner m_corner; |
190 | }; | 192 | }; |
191 | 193 | ||
192 | // resize cmd | 194 | // resize cmd |
193 | class ResizeToCmd: public WindowHelperCmd{ | 195 | class ResizeToCmd: public WindowHelperCmd{ |
194 | public: | 196 | public: |
195 | explicit ResizeToCmd(int step_size_x, int step_size_y); | 197 | explicit ResizeToCmd(int step_size_x, int step_size_y, bool is_relative_x, bool is_relative_y); |
196 | protected: | 198 | protected: |
197 | void real_execute(); | 199 | void real_execute(); |
198 | private: | 200 | private: |
199 | const int m_step_size_x; | 201 | const int m_step_size_x; |
200 | const int m_step_size_y; | 202 | const int m_step_size_y; |
203 | const bool m_is_relative_x; | ||
204 | const bool m_is_relative_y; | ||
201 | }; | 205 | }; |
202 | 206 | ||
203 | class FullscreenCmd: public WindowHelperCmd{ | 207 | class FullscreenCmd: public WindowHelperCmd{ |