diff options
author | markt <markt> | 2007-11-22 04:07:57 (GMT) |
---|---|---|
committer | markt <markt> | 2007-11-22 04:07:57 (GMT) |
commit | 675bc5d66aa08311e99cb00cf836d16a910a73df (patch) | |
tree | 9118f77bcc38631f944cdf4a07d2173011a29a9b /src/CurrentWindowCmd.hh | |
parent | 08ebff4b319f51b4263cded0bb9c04103bcd9c3a (diff) | |
download | fluxbox-675bc5d66aa08311e99cb00cf836d16a910a73df.zip fluxbox-675bc5d66aa08311e99cb00cf836d16a910a73df.tar.bz2 |
added conditional statements to keys file
Diffstat (limited to 'src/CurrentWindowCmd.hh')
-rw-r--r-- | src/CurrentWindowCmd.hh | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/src/CurrentWindowCmd.hh b/src/CurrentWindowCmd.hh index 53dc7b8..e7370de 100644 --- a/src/CurrentWindowCmd.hh +++ b/src/CurrentWindowCmd.hh | |||
@@ -27,22 +27,30 @@ | |||
27 | 27 | ||
28 | #include "Command.hh" | 28 | #include "Command.hh" |
29 | #include "Window.hh" | 29 | #include "Window.hh" |
30 | #include "ClientPattern.hh" | ||
30 | 31 | ||
31 | /// helper class for window commands | 32 | /// helper class for window commands |
32 | /// calls real_execute if there's a focused window or a window in button press/release window | 33 | /// calls real_execute if there's a focused window or a window in button press/release window |
33 | class WindowHelperCmd: public FbTk::Command { | 34 | class WindowHelperCmd: public FbTk::Command { |
34 | public: | 35 | public: |
35 | explicit WindowHelperCmd(FluxboxWindow *win = 0): m_win(win) { } | 36 | explicit WindowHelperCmd() { } |
36 | 37 | ||
37 | void execute(); | 38 | void execute(); |
38 | void execute(FluxboxWindow &fbwin); | ||
39 | 39 | ||
40 | protected: | 40 | protected: |
41 | FluxboxWindow &fbwindow(); | 41 | FluxboxWindow &fbwindow(); |
42 | virtual void real_execute() = 0; | 42 | virtual void real_execute() = 0; |
43 | }; | ||
43 | 44 | ||
44 | private: | 45 | class WindowHelperBoolCmd: public FbTk::BoolCommand { |
45 | FluxboxWindow *m_win; | 46 | public: |
47 | explicit WindowHelperBoolCmd() { } | ||
48 | |||
49 | bool bool_execute(); | ||
50 | |||
51 | protected: | ||
52 | FluxboxWindow &fbwindow(); | ||
53 | virtual bool real_execute() = 0; | ||
46 | }; | 54 | }; |
47 | 55 | ||
48 | /// command that calls FluxboxWindow::<the function> on execute() | 56 | /// command that calls FluxboxWindow::<the function> on execute() |
@@ -221,4 +229,14 @@ private: | |||
221 | int m_focus, m_unfocus; | 229 | int m_focus, m_unfocus; |
222 | int m_relative, m_un_relative; | 230 | int m_relative, m_un_relative; |
223 | }; | 231 | }; |
232 | |||
233 | class MatchCmd: public WindowHelperBoolCmd { | ||
234 | public: | ||
235 | MatchCmd(const std::string &pat): m_pat(pat.c_str()) { }; | ||
236 | protected: | ||
237 | bool real_execute(); | ||
238 | private: | ||
239 | ClientPattern m_pat; | ||
240 | }; | ||
241 | |||
224 | #endif // CURRENTWINDOWCMD_HH | 242 | #endif // CURRENTWINDOWCMD_HH |