diff options
author | markt <markt> | 2007-12-13 05:48:00 (GMT) |
---|---|---|
committer | markt <markt> | 2007-12-13 05:48:00 (GMT) |
commit | 8b7464046cea5e521ac46811591b0fce0c45aca1 (patch) | |
tree | 09df752f426a249ae15375a626a98436c8727593 /src/WorkspaceCmd.hh | |
parent | daca07edafc2e75eb9ee04d35fe80759308a8583 (diff) | |
download | fluxbox-8b7464046cea5e521ac46811591b0fce0c45aca1.zip fluxbox-8b7464046cea5e521ac46811591b0fce0c45aca1.tar.bz2 |
added FbTk::CommandRegistry, decentralized command parsing, and made them auto-register
Diffstat (limited to 'src/WorkspaceCmd.hh')
-rw-r--r-- | src/WorkspaceCmd.hh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/WorkspaceCmd.hh b/src/WorkspaceCmd.hh index eeacc16..fa8cb58 100644 --- a/src/WorkspaceCmd.hh +++ b/src/WorkspaceCmd.hh | |||
@@ -32,6 +32,8 @@ | |||
32 | 32 | ||
33 | #include "FbTk/RefCount.hh" | 33 | #include "FbTk/RefCount.hh" |
34 | 34 | ||
35 | #include <string> | ||
36 | |||
35 | class WindowListCmd: public FbTk::Command { | 37 | class WindowListCmd: public FbTk::Command { |
36 | public: | 38 | public: |
37 | WindowListCmd(FbTk::RefCount<FbTk::Command> cmd, const std::string &pat): | 39 | WindowListCmd(FbTk::RefCount<FbTk::Command> cmd, const std::string &pat): |
@@ -49,6 +51,8 @@ public: | |||
49 | SomeCmd(FbTk::RefCount<FbTk::BoolCommand> cmd): m_cmd(cmd) { } | 51 | SomeCmd(FbTk::RefCount<FbTk::BoolCommand> cmd): m_cmd(cmd) { } |
50 | 52 | ||
51 | bool bool_execute(); | 53 | bool bool_execute(); |
54 | static FbTk::BoolCommand *parse(const std::string &command, | ||
55 | const std::string &args, bool trusted); | ||
52 | 56 | ||
53 | private: | 57 | private: |
54 | FbTk::RefCount<FbTk::BoolCommand> m_cmd; | 58 | FbTk::RefCount<FbTk::BoolCommand> m_cmd; |
@@ -97,6 +101,8 @@ public: | |||
97 | GoToWindowCmd(int num, int option, std::string &pat): | 101 | GoToWindowCmd(int num, int option, std::string &pat): |
98 | m_num(num), m_option(option), m_pat(pat.c_str()) { } | 102 | m_num(num), m_option(option), m_pat(pat.c_str()) { } |
99 | void execute(); | 103 | void execute(); |
104 | static FbTk::Command *parse(const std::string &command, | ||
105 | const std::string &args, bool trusted); | ||
100 | private: | 106 | private: |
101 | const int m_num; | 107 | const int m_num; |
102 | const int m_option; | 108 | const int m_option; |
@@ -107,6 +113,8 @@ class DirFocusCmd: public FbTk::Command { | |||
107 | public: | 113 | public: |
108 | explicit DirFocusCmd(const FocusControl::FocusDir dir): m_dir(dir) { } | 114 | explicit DirFocusCmd(const FocusControl::FocusDir dir): m_dir(dir) { } |
109 | void execute(); | 115 | void execute(); |
116 | static FbTk::Command *parse(const std::string &command, | ||
117 | const std::string &args, bool trusted); | ||
110 | private: | 118 | private: |
111 | const FocusControl::FocusDir m_dir; | 119 | const FocusControl::FocusDir m_dir; |
112 | }; | 120 | }; |