aboutsummaryrefslogtreecommitdiff
path: root/src/CurrentWindowCmd.hh
diff options
context:
space:
mode:
authorLajos Koszti <ajnasz@ajnasz.hu>2012-04-06 12:10:24 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2012-04-06 12:11:16 (GMT)
commit7b6dc2ad72a4c4ecd20eddbfb6f1b4c3bd2a7024 (patch)
treec2a8f4aa658783c6454b7643ce2717acaa744101 /src/CurrentWindowCmd.hh
parent5d56046b68635cea2c187e59a9d8c514e2d6bdb2 (diff)
downloadfluxbox-7b6dc2ad72a4c4ecd20eddbfb6f1b4c3bd2a7024.zip
fluxbox-7b6dc2ad72a4c4ecd20eddbfb6f1b4c3bd2a7024.tar.bz2
Allow percentage values for some Window commands
Diffstat (limited to 'src/CurrentWindowCmd.hh')
-rw-r--r--src/CurrentWindowCmd.hh20
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
159class ResizeCmd: public WindowHelperCmd{ 159class ResizeCmd: public WindowHelperCmd{
160public: 160public:
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);
164protected: 164protected:
165 void real_execute(); 165 void real_execute();
166 166
167private: 167private:
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
173class MoveToCmd: public WindowHelperCmd { 174class MoveToCmd: public WindowHelperCmd {
174public: 175public:
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
186private: 188private:
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
193class ResizeToCmd: public WindowHelperCmd{ 195class ResizeToCmd: public WindowHelperCmd{
194public: 196public:
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);
196protected: 198protected:
197 void real_execute(); 199 void real_execute();
198private: 200private:
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
203class FullscreenCmd: public WindowHelperCmd{ 207class FullscreenCmd: public WindowHelperCmd{