aboutsummaryrefslogtreecommitdiff
path: root/src/SendToMenu.hh
diff options
context:
space:
mode:
authorHenrik Kinnunen <fluxgen@fluxbox.org>2008-04-27 19:22:18 (GMT)
committerHenrik Kinnunen <fluxgen@fluxbox.org>2008-04-27 19:22:18 (GMT)
commit80b10f7772b91f1f4a61eace4e5235a79060e1f0 (patch)
tree27057e59c41188e7c2f724614233265fed03c9b3 /src/SendToMenu.hh
parent40e17b4d0ef1b9503f21509e697dd4dcb24d2bbf (diff)
downloadfluxbox-80b10f7772b91f1f4a61eace4e5235a79060e1f0.zip
fluxbox-80b10f7772b91f1f4a61eace4e5235a79060e1f0.tar.bz2
Added SimpleObserver class.
This class works in the same way as the SimpleCommand class. Use it with the makeObserver function. It calls the receiver's member function when the subject sends a signal.
Diffstat (limited to 'src/SendToMenu.hh')
-rw-r--r--src/SendToMenu.hh23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/SendToMenu.hh b/src/SendToMenu.hh
index 7754987..0f668a9 100644
--- a/src/SendToMenu.hh
+++ b/src/SendToMenu.hh
@@ -1,5 +1,5 @@
1// SendToMenu.hh for Fluxbox 1// SendToMenu.hh for Fluxbox
2// Copyright (c) 2003 - 2006 Henrik Kinnunen (fluxgen at fluxbox dot org) 2// Copyright (c) 2003 - 2008 Henrik Kinnunen (fluxgen at fluxbox dot org)
3// and Simon Bowden (rathnor at users.sourceforge.net) 3// and Simon Bowden (rathnor at users.sourceforge.net)
4// 4//
5// Permission is hereby granted, free of charge, to any person obtaining a 5// Permission is hereby granted, free of charge, to any person obtaining a
@@ -25,15 +25,28 @@
25 25
26#include "FbMenu.hh" 26#include "FbMenu.hh"
27 27
28namespace FbTk {
29class Observer;
30}
31
28class BScreen; 32class BScreen;
29 33
34/**
35 * Creates the "send to menu".
36 * Displays all the workspaces for which the current window can be sent to.
37 */
30class SendToMenu:public FbMenu { 38class SendToMenu:public FbMenu {
31public: 39public:
32 explicit SendToMenu(BScreen &win); 40 /// @param screen the screen on which this menu should be created on.
33 virtual ~SendToMenu() { } 41 explicit SendToMenu(BScreen &screen);
42 virtual ~SendToMenu();
43 /// @see FbTk::Menu
34 void show(); 44 void show();
35protected: 45private:
36 void update(FbTk::Subject *subj); 46 /// Rebuild the menu from scratch.
47 void rebuildMenu();
48 /// listens to signals that makes this instance need to rebuild menu
49 FbTk::Observer *m_rebuildObs;
37}; 50};
38 51
39#endif // SENDTOMENU_HH 52#endif // SENDTOMENU_HH