aboutsummaryrefslogtreecommitdiff
path: root/src/CurrentWindowCmd.hh
diff options
context:
space:
mode:
authormarkt <markt>2007-11-22 04:07:57 (GMT)
committermarkt <markt>2007-11-22 04:07:57 (GMT)
commit675bc5d66aa08311e99cb00cf836d16a910a73df (patch)
tree9118f77bcc38631f944cdf4a07d2173011a29a9b /src/CurrentWindowCmd.hh
parent08ebff4b319f51b4263cded0bb9c04103bcd9c3a (diff)
downloadfluxbox-675bc5d66aa08311e99cb00cf836d16a910a73df.zip
fluxbox-675bc5d66aa08311e99cb00cf836d16a910a73df.tar.bz2
added conditional statements to keys file
Diffstat (limited to 'src/CurrentWindowCmd.hh')
-rw-r--r--src/CurrentWindowCmd.hh26
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
33class WindowHelperCmd: public FbTk::Command { 34class WindowHelperCmd: public FbTk::Command {
34public: 35public:
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
40protected: 40protected:
41 FluxboxWindow &fbwindow(); 41 FluxboxWindow &fbwindow();
42 virtual void real_execute() = 0; 42 virtual void real_execute() = 0;
43};
43 44
44private: 45class WindowHelperBoolCmd: public FbTk::BoolCommand {
45 FluxboxWindow *m_win; 46public:
47 explicit WindowHelperBoolCmd() { }
48
49 bool bool_execute();
50
51protected:
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
233class MatchCmd: public WindowHelperBoolCmd {
234public:
235 MatchCmd(const std::string &pat): m_pat(pat.c_str()) { };
236protected:
237 bool real_execute();
238private:
239 ClientPattern m_pat;
240};
241
224#endif // CURRENTWINDOWCMD_HH 242#endif // CURRENTWINDOWCMD_HH