aboutsummaryrefslogtreecommitdiff
path: root/src/FbCommandFactory.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-10-25 22:11:22 (GMT)
committerfluxgen <fluxgen>2003-10-25 22:11:22 (GMT)
commit9c35bbdd40ada59658feb9b98535f77a473bbaa5 (patch)
tree7e01708e15e011a4a45547f1e1552866498dafd8 /src/FbCommandFactory.cc
parent4d161094576b29ca1a41e807fabb80d672fc1852 (diff)
downloadfluxbox_pavel-9c35bbdd40ada59658feb9b98535f77a473bbaa5.zip
fluxbox_pavel-9c35bbdd40ada59658feb9b98535f77a473bbaa5.tar.bz2
added resizeto and moveto commands
Diffstat (limited to 'src/FbCommandFactory.cc')
-rw-r--r--src/FbCommandFactory.cc16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/FbCommandFactory.cc b/src/FbCommandFactory.cc
index 8e0a1fd..b0b5976 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.18 2003/09/29 14:22:07 fluxgen Exp $ 23// $Id: FbCommandFactory.cc,v 1.19 2003/10/25 22:11:22 fluxgen Exp $
24 24
25#include "FbCommandFactory.hh" 25#include "FbCommandFactory.hh"
26 26
@@ -62,6 +62,7 @@ FbCommandFactory::FbCommandFactory() {
62 "maximizewindow", 62 "maximizewindow",
63 "minimize", 63 "minimize",
64 "minimizewindow", 64 "minimizewindow",
65 "moveto",
65 "move", 66 "move",
66 "movedown", 67 "movedown",
67 "moveleft", 68 "moveleft",
@@ -80,6 +81,7 @@ FbCommandFactory::FbCommandFactory() {
80 "quit", 81 "quit",
81 "raise", 82 "raise",
82 "reconfigure", 83 "reconfigure",
84 "resizeto",
83 "resize", 85 "resize",
84 "resizehorizontal", 86 "resizehorizontal",
85 "resizevertical", 87 "resizevertical",
@@ -144,10 +146,22 @@ FbTk::Command *FbCommandFactory::stringToCommand(const std::string &command,
144 is >> dx >> dy; 146 is >> dx >> dy;
145 return new ResizeCmd(dx, dy); 147 return new ResizeCmd(dx, dy);
146 } 148 }
149 else if (command == "resizeto") {
150 std::istringstream is(arguments);
151 int dx = 0, dy = 0;
152 is >> dx >> dy;
153 return new ResizeToCmd(dx, dy);
154 }
147 else if (command == "resizehorizontal") 155 else if (command == "resizehorizontal")
148 return new ResizeCmd(atoi(arguments.c_str()),0); 156 return new ResizeCmd(atoi(arguments.c_str()),0);
149 else if (command == "resizevertical") 157 else if (command == "resizevertical")
150 return new ResizeCmd(0,atoi(arguments.c_str())); 158 return new ResizeCmd(0,atoi(arguments.c_str()));
159 else if (command == "moveto") {
160 std::istringstream is(arguments);
161 int dx = 0, dy = 0;
162 is >> dx >> dy;
163 return new MoveToCmd(dx,dy);
164 }
151 else if (command == "move") { 165 else if (command == "move") {
152 std::istringstream is(arguments); 166 std::istringstream is(arguments);
153 int dx = 0, dy = 0; 167 int dx = 0, dy = 0;