aboutsummaryrefslogtreecommitdiff
path: root/src/IconbarTool.hh
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-09-08 17:52:34 (GMT)
committerfluxgen <fluxgen>2003-09-08 17:52:34 (GMT)
commit925f968a6af7765f3a37e54eb80483fb87e74449 (patch)
treebf32cb609c4d11184d298f3586f919b30dcb5c6e /src/IconbarTool.hh
parent935616cab63bae8a380bcc03510c1f9263640778 (diff)
downloadfluxbox-925f968a6af7765f3a37e54eb80483fb87e74449.zip
fluxbox-925f968a6af7765f3a37e54eb80483fb87e74449.tar.bz2
add iconbar mode
Diffstat (limited to 'src/IconbarTool.hh')
-rw-r--r--src/IconbarTool.hh34
1 files changed, 30 insertions, 4 deletions
diff --git a/src/IconbarTool.hh b/src/IconbarTool.hh
index 6dc7bfa..a4cbdf2 100644
--- a/src/IconbarTool.hh
+++ b/src/IconbarTool.hh
@@ -20,7 +20,7 @@
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21// DEALINGS IN THE SOFTWARE. 21// DEALINGS IN THE SOFTWARE.
22 22
23// $Id: IconbarTool.hh,v 1.6 2003/08/18 11:13:32 fluxgen Exp $ 23// $Id: IconbarTool.hh,v 1.7 2003/09/08 17:52:34 fluxgen Exp $
24 24
25#ifndef ICONBARTOOL_HH 25#ifndef ICONBARTOOL_HH
26#define ICONBARTOOL_HH 26#define ICONBARTOOL_HH
@@ -29,6 +29,8 @@
29#include "Container.hh" 29#include "Container.hh"
30 30
31#include "FbTk/Observer.hh" 31#include "FbTk/Observer.hh"
32#include "FbTk/Resource.hh"
33#include "FbTk/Menu.hh"
32 34
33#include <X11/Xlib.h> 35#include <X11/Xlib.h>
34 36
@@ -41,7 +43,12 @@ class FluxboxWindow;
41 43
42class IconbarTool: public ToolbarItem, public FbTk::Observer { 44class IconbarTool: public ToolbarItem, public FbTk::Observer {
43public: 45public:
44 IconbarTool(const FbTk::FbWindow &parent, IconbarTheme &theme, BScreen &screen); 46 typedef std::list<IconButton *> IconList;
47
48 enum Mode {NONE, ICONS, WORKSPACEICONS, WORKSPACE, ALLWINDOWS};
49
50 IconbarTool(const FbTk::FbWindow &parent, IconbarTheme &theme,
51 BScreen &screen, FbTk::Menu &menu);
45 ~IconbarTool(); 52 ~IconbarTool();
46 53
47 void move(int x, int y); 54 void move(int x, int y);
@@ -52,11 +59,17 @@ public:
52 void update(FbTk::Subject *subj); 59 void update(FbTk::Subject *subj);
53 void show(); 60 void show();
54 void hide(); 61 void hide();
62
63 void setMode(Mode mode);
64
55 unsigned int width() const; 65 unsigned int width() const;
56 unsigned int height() const; 66 unsigned int height() const;
57 unsigned int borderWidth() const; 67 unsigned int borderWidth() const;
58 68
69 Mode mode() const { return *m_rc_mode; }
70
59private: 71private:
72
60 /// render single button that holds win 73 /// render single button that holds win
61 void renderWindow(FluxboxWindow &win); 74 void renderWindow(FluxboxWindow &win);
62 /// render single button 75 /// render single button
@@ -65,8 +78,18 @@ private:
65 void renderTheme(); 78 void renderTheme();
66 /// destroy all icons 79 /// destroy all icons
67 void deleteIcons(); 80 void deleteIcons();
68 /// remove a single window an render theme again 81 /// remove a single window
69 void removeWindow(FluxboxWindow &win); 82 void removeWindow(FluxboxWindow &win);
83 /// add a single window
84 void addWindow(FluxboxWindow &win);
85 /// add icons to the list
86 void updateIcons();
87 /// add normal windows to the list
88 void updateWorkspace();
89 /// add all windows to the list
90 void updateAllWindows();
91 /// add a list of windows
92 void addList(std::list<FluxboxWindow *> &winlist);
70 93
71 BScreen &m_screen; 94 BScreen &m_screen;
72 Container m_icon_container; 95 Container m_icon_container;
@@ -75,8 +98,11 @@ private:
75 Pixmap m_focused_pm, m_unfocused_pm; 98 Pixmap m_focused_pm, m_unfocused_pm;
76 Pixmap m_empty_pm; ///< pixmap for empty container 99 Pixmap m_empty_pm; ///< pixmap for empty container
77 100
78 typedef std::list<IconButton *> IconList; 101
79 IconList m_icon_list; 102 IconList m_icon_list;
103 FbTk::Resource<Mode> m_rc_mode;
104
105 FbTk::Menu m_menu;
80}; 106};
81 107
82#endif // ICONBARTOOL_HH 108#endif // ICONBARTOOL_HH