aboutsummaryrefslogtreecommitdiff
path: root/src/CurrentWindowCmd.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/CurrentWindowCmd.hh')
-rw-r--r--src/CurrentWindowCmd.hh29
1 files changed, 13 insertions, 16 deletions
diff --git a/src/CurrentWindowCmd.hh b/src/CurrentWindowCmd.hh
index c1b9140..172f9c0 100644
--- a/src/CurrentWindowCmd.hh
+++ b/src/CurrentWindowCmd.hh
@@ -28,36 +28,33 @@
28#include "Command.hh" 28#include "Command.hh"
29 29
30class FluxboxWindow; 30class FluxboxWindow;
31class WinClient;
32
33/// command that calls FluxboxWindow::<the function> on execute()
34/// similar to FbTk::SimpleCommand<T>
35class CurrentWindowCmd: public FbTk::Command {
36public:
37 typedef void (FluxboxWindow::* Action)();
38 explicit CurrentWindowCmd(Action action);
39 void execute();
40private:
41 Action m_action;
42};
43 31
44/// helper class for window commands 32/// helper class for window commands
45/// 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
46class WindowHelperCmd: public FbTk::Command { 34class WindowHelperCmd: public FbTk::Command {
47public: 35public:
36 explicit WindowHelperCmd(FluxboxWindow *win = 0): m_win(win) { }
37
48 void execute(); 38 void execute();
39 void execute(FluxboxWindow &fbwin);
49 40
50protected: 41protected:
51
52 WinClient &winclient();
53 FluxboxWindow &fbwindow(); 42 FluxboxWindow &fbwindow();
54 virtual void real_execute() = 0; 43 virtual void real_execute() = 0;
55 44
45private:
46 FluxboxWindow *m_win;
56}; 47};
57 48
58class KillWindowCmd: public WindowHelperCmd { 49/// command that calls FluxboxWindow::<the function> on execute()
59protected: 50/// similar to FbTk::SimpleCommand<T>
51class CurrentWindowCmd: public WindowHelperCmd {
52public:
53 typedef void (FluxboxWindow::* Action)();
54 explicit CurrentWindowCmd(Action action): m_action(action) { }
60 void real_execute(); 55 void real_execute();
56private:
57 Action m_action;
61}; 58};
62 59
63class SetHeadCmd : public WindowHelperCmd { 60class SetHeadCmd : public WindowHelperCmd {