aboutsummaryrefslogtreecommitdiff
path: root/src/FbCommandFactory.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-09-06 15:43:27 (GMT)
committerfluxgen <fluxgen>2003-09-06 15:43:27 (GMT)
commit39abccae4af9d290de33c7f7877f4f4af92c6db8 (patch)
tree4d313b4f1629ce3a668a24dccdcd28ae439b2af2 /src/FbCommandFactory.cc
parentd75ac0afcc21375081000cbcb3bee763c90c8d08 (diff)
downloadfluxbox_pavel-39abccae4af9d290de33c7f7877f4f4af92c6db8.zip
fluxbox_pavel-39abccae4af9d290de33c7f7877f4f4af92c6db8.tar.bz2
resize command
Diffstat (limited to 'src/FbCommandFactory.cc')
-rw-r--r--src/FbCommandFactory.cc15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/FbCommandFactory.cc b/src/FbCommandFactory.cc
index bdbe305..f9e22ce 100644
--- a/src/FbCommandFactory.cc
+++ b/src/FbCommandFactory.cc
@@ -20,7 +20,7 @@
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21// DEALINGS IN THE SOFTWARE. 21// DEALINGS IN THE SOFTWARE.
22 22
23// $Id: FbCommandFactory.cc,v 1.14 2003/08/30 11:59:29 fluxgen Exp $ 23// $Id: FbCommandFactory.cc,v 1.15 2003/09/06 15:43:27 fluxgen Exp $
24 24
25#include "FbCommandFactory.hh" 25#include "FbCommandFactory.hh"
26 26
@@ -32,6 +32,8 @@
32#include "SimpleCommand.hh" 32#include "SimpleCommand.hh"
33#include "Screen.hh" 33#include "Screen.hh"
34 34
35#include <sstream>
36
35// autoregister this module to command parser 37// autoregister this module to command parser
36FbCommandFactory FbCommandFactory::s_autoreg; 38FbCommandFactory FbCommandFactory::s_autoreg;
37 39
@@ -72,6 +74,7 @@ FbCommandFactory::FbCommandFactory() {
72 "quit", 74 "quit",
73 "raise", 75 "raise",
74 "reconfigure", 76 "reconfigure",
77 "resize",
75 "resizehorizontal", 78 "resizehorizontal",
76 "resizevertical", 79 "resizevertical",
77 "restart", 80 "restart",
@@ -129,10 +132,16 @@ FbTk::Command *FbCommandFactory::stringToCommand(const std::string &command,
129 return new CurrentWindowCmd(&FluxboxWindow::maximizeVertical); 132 return new CurrentWindowCmd(&FluxboxWindow::maximizeVertical);
130 else if (command == "maximizehorizontal") 133 else if (command == "maximizehorizontal")
131 return new CurrentWindowCmd(&FluxboxWindow::maximizeHorizontal); 134 return new CurrentWindowCmd(&FluxboxWindow::maximizeHorizontal);
135 else if (command == "resize") {
136 std::istringstream is(arguments);
137 int dx = 0, dy = 0;
138 is >> dx >> dy;
139 return new ResizeCmd(dx, dy);
140 }
132 else if (command == "resizehorizontal") 141 else if (command == "resizehorizontal")
133 return new ResizeHorizontalCmd(atoi(arguments.c_str())); 142 return new ResizeCmd(atoi(arguments.c_str()),0);
134 else if (command == "resizevertical") 143 else if (command == "resizevertical")
135 return new ResizeVerticalCmd(atoi(arguments.c_str())); 144 return new ResizeCmd(0,atoi(arguments.c_str()));
136 else if (command == "moveright") 145 else if (command == "moveright")
137 return new MoveRightCmd(atoi(arguments.c_str())); 146 return new MoveRightCmd(atoi(arguments.c_str()));
138 else if (command == "moveleft") 147 else if (command == "moveleft")