aboutsummaryrefslogtreecommitdiff
path: root/src/WorkspaceCmd.hh
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-01-11 07:41:22 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-01-11 07:41:22 (GMT)
commit9f2f65a698c4cc71373a7fe9d73a0889e0d3487b (patch)
tree4ad67db771d73ea3c48f80a1244037fc9754edd2 /src/WorkspaceCmd.hh
parent1f01d84c080d607a91eb417efcaf5e500b5f1d7e (diff)
downloadfluxbox-9f2f65a698c4cc71373a7fe9d73a0889e0d3487b.zip
fluxbox-9f2f65a698c4cc71373a7fe9d73a0889e0d3487b.tar.bz2
make FbTk::Command a template class, split parsing information out of ObjectRegistry
Diffstat (limited to 'src/WorkspaceCmd.hh')
-rw-r--r--src/WorkspaceCmd.hh64
1 files changed, 32 insertions, 32 deletions
diff --git a/src/WorkspaceCmd.hh b/src/WorkspaceCmd.hh
index f094894..d50c0bf 100644
--- a/src/WorkspaceCmd.hh
+++ b/src/WorkspaceCmd.hh
@@ -28,45 +28,45 @@
28#include "ClientPattern.hh" 28#include "ClientPattern.hh"
29#include "FocusControl.hh" 29#include "FocusControl.hh"
30 30
31class WindowListCmd: public FbTk::Command { 31class WindowListCmd: public FbTk::Command<void> {
32public: 32public:
33 WindowListCmd(FbTk::RefCount<FbTk::Command> cmd, int opts, 33 WindowListCmd(FbTk::RefCount<FbTk::Command<void> > cmd, int opts,
34 FbTk::RefCount<FbTk::BoolCommand> filter): 34 FbTk::RefCount<FbTk::Command<bool> > filter):
35 m_cmd(cmd), m_opts(opts), m_filter(filter) { } 35 m_cmd(cmd), m_opts(opts), m_filter(filter) { }
36 36
37 void execute(); 37 void execute();
38 static FbTk::Command *parse(const std::string &command, 38 static FbTk::Command<void> *parse(const std::string &command,
39 const std::string &args, bool trusted); 39 const std::string &args, bool trusted);
40 40
41private: 41private:
42 FbTk::RefCount<FbTk::Command> m_cmd; 42 FbTk::RefCount<FbTk::Command<void> > m_cmd;
43 int m_opts; 43 int m_opts;
44 FbTk::RefCount<FbTk::BoolCommand> m_filter; 44 FbTk::RefCount<FbTk::Command<bool> > m_filter;
45}; 45};
46 46
47class SomeCmd: public FbTk::BoolCommand { 47class SomeCmd: public FbTk::Command<bool> {
48public: 48public:
49 SomeCmd(FbTk::RefCount<FbTk::BoolCommand> cmd): m_cmd(cmd) { } 49 SomeCmd(FbTk::RefCount<FbTk::Command<bool> > cmd): m_cmd(cmd) { }
50 50
51 bool bool_execute(); 51 bool execute();
52 static FbTk::BoolCommand *parse(const std::string &command, 52 static FbTk::Command<bool> *parse(const std::string &command,
53 const std::string &args, bool trusted); 53 const std::string &args, bool trusted);
54 54
55private: 55private:
56 FbTk::RefCount<FbTk::BoolCommand> m_cmd; 56 FbTk::RefCount<FbTk::Command<bool> > m_cmd;
57}; 57};
58 58
59class EveryCmd: public FbTk::BoolCommand { 59class EveryCmd: public FbTk::Command<bool> {
60public: 60public:
61 EveryCmd(FbTk::RefCount<FbTk::BoolCommand> cmd): m_cmd(cmd) { } 61 EveryCmd(FbTk::RefCount<FbTk::Command<bool> > cmd): m_cmd(cmd) { }
62 62
63 bool bool_execute(); 63 bool execute();
64 64
65private: 65private:
66 FbTk::RefCount<FbTk::BoolCommand> m_cmd; 66 FbTk::RefCount<FbTk::Command<bool> > m_cmd;
67}; 67};
68 68
69class AttachCmd: public FbTk::Command { 69class AttachCmd: public FbTk::Command<void> {
70public: 70public:
71 explicit AttachCmd(const std::string &pat): m_pat(pat.c_str()) { } 71 explicit AttachCmd(const std::string &pat): m_pat(pat.c_str()) { }
72 void execute(); 72 void execute();
@@ -74,7 +74,7 @@ private:
74 const ClientPattern m_pat; 74 const ClientPattern m_pat;
75}; 75};
76 76
77class NextWindowCmd: public FbTk::Command { 77class NextWindowCmd: public FbTk::Command<void> {
78public: 78public:
79 explicit NextWindowCmd(int option, std::string &pat): 79 explicit NextWindowCmd(int option, std::string &pat):
80 m_option(option), m_pat(pat.c_str()) { } 80 m_option(option), m_pat(pat.c_str()) { }
@@ -84,7 +84,7 @@ private:
84 const ClientPattern m_pat; 84 const ClientPattern m_pat;
85}; 85};
86 86
87class PrevWindowCmd: public FbTk::Command { 87class PrevWindowCmd: public FbTk::Command<void> {
88public: 88public:
89 explicit PrevWindowCmd(int option, std::string &pat): 89 explicit PrevWindowCmd(int option, std::string &pat):
90 m_option(option), m_pat(pat.c_str()) { } 90 m_option(option), m_pat(pat.c_str()) { }
@@ -94,12 +94,12 @@ private:
94 const ClientPattern m_pat; 94 const ClientPattern m_pat;
95}; 95};
96 96
97class GoToWindowCmd: public FbTk::Command { 97class GoToWindowCmd: public FbTk::Command<void> {
98public: 98public:
99 GoToWindowCmd(int num, int option, std::string &pat): 99 GoToWindowCmd(int num, int option, std::string &pat):
100 m_num(num), m_option(option), m_pat(pat.c_str()) { } 100 m_num(num), m_option(option), m_pat(pat.c_str()) { }
101 void execute(); 101 void execute();
102 static FbTk::Command *parse(const std::string &command, 102 static FbTk::Command<void> *parse(const std::string &command,
103 const std::string &args, bool trusted); 103 const std::string &args, bool trusted);
104private: 104private:
105 const int m_num; 105 const int m_num;
@@ -107,27 +107,27 @@ private:
107 const ClientPattern m_pat; 107 const ClientPattern m_pat;
108}; 108};
109 109
110class DirFocusCmd: public FbTk::Command { 110class DirFocusCmd: public FbTk::Command<void> {
111public: 111public:
112 explicit DirFocusCmd(const FocusControl::FocusDir dir): m_dir(dir) { } 112 explicit DirFocusCmd(const FocusControl::FocusDir dir): m_dir(dir) { }
113 void execute(); 113 void execute();
114 static FbTk::Command *parse(const std::string &command, 114 static FbTk::Command<void> *parse(const std::string &command,
115 const std::string &args, bool trusted); 115 const std::string &args, bool trusted);
116private: 116private:
117 const FocusControl::FocusDir m_dir; 117 const FocusControl::FocusDir m_dir;
118}; 118};
119 119
120class AddWorkspaceCmd: public FbTk::Command { 120class AddWorkspaceCmd: public FbTk::Command<void> {
121public: 121public:
122 void execute(); 122 void execute();
123}; 123};
124 124
125class RemoveLastWorkspaceCmd: public FbTk::Command { 125class RemoveLastWorkspaceCmd: public FbTk::Command<void> {
126public: 126public:
127 void execute(); 127 void execute();
128}; 128};
129 129
130class NextWorkspaceCmd: public FbTk::Command { 130class NextWorkspaceCmd: public FbTk::Command<void> {
131public: 131public:
132 explicit NextWorkspaceCmd(int option):m_option(option) { } 132 explicit NextWorkspaceCmd(int option):m_option(option) { }
133 void execute(); 133 void execute();
@@ -135,7 +135,7 @@ private:
135 const int m_option; 135 const int m_option;
136}; 136};
137 137
138class PrevWorkspaceCmd: public FbTk::Command { 138class PrevWorkspaceCmd: public FbTk::Command<void> {
139public: 139public:
140 explicit PrevWorkspaceCmd(int option):m_option(option) { } 140 explicit PrevWorkspaceCmd(int option):m_option(option) { }
141 void execute(); 141 void execute();
@@ -143,7 +143,7 @@ private:
143 const int m_option; 143 const int m_option;
144}; 144};
145 145
146class LeftWorkspaceCmd: public FbTk::Command { 146class LeftWorkspaceCmd: public FbTk::Command<void> {
147public: 147public:
148 explicit LeftWorkspaceCmd(int num=1):m_param(num == 0 ? 1 : num) { } 148 explicit LeftWorkspaceCmd(int num=1):m_param(num == 0 ? 1 : num) { }
149 void execute(); 149 void execute();
@@ -151,7 +151,7 @@ private:
151 const int m_param; 151 const int m_param;
152}; 152};
153 153
154class RightWorkspaceCmd: public FbTk::Command { 154class RightWorkspaceCmd: public FbTk::Command<void> {
155public: 155public:
156 explicit RightWorkspaceCmd(int num=1):m_param(num == 0 ? 1 : num) { } 156 explicit RightWorkspaceCmd(int num=1):m_param(num == 0 ? 1 : num) { }
157 void execute(); 157 void execute();
@@ -159,7 +159,7 @@ private:
159 const int m_param; 159 const int m_param;
160}; 160};
161 161
162class JumpToWorkspaceCmd: public FbTk::Command { 162class JumpToWorkspaceCmd: public FbTk::Command<void> {
163public: 163public:
164 explicit JumpToWorkspaceCmd(int workspace_num); 164 explicit JumpToWorkspaceCmd(int workspace_num);
165 void execute(); 165 void execute();
@@ -168,17 +168,17 @@ private:
168}; 168};
169 169
170/// arranges windows in current workspace to rows and columns 170/// arranges windows in current workspace to rows and columns
171class ArrangeWindowsCmd: public FbTk::Command { 171class ArrangeWindowsCmd: public FbTk::Command<void> {
172public: 172public:
173 void execute(); 173 void execute();
174}; 174};
175 175
176class ShowDesktopCmd: public FbTk::Command { 176class ShowDesktopCmd: public FbTk::Command<void> {
177public: 177public:
178 void execute(); 178 void execute();
179}; 179};
180 180
181class CloseAllWindowsCmd: public FbTk::Command { 181class CloseAllWindowsCmd: public FbTk::Command<void> {
182public: 182public:
183 void execute(); 183 void execute();
184}; 184};