aboutsummaryrefslogtreecommitdiff
path: root/src/IconBar.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/IconBar.hh')
-rw-r--r--src/IconBar.hh50
1 files changed, 31 insertions, 19 deletions
diff --git a/src/IconBar.hh b/src/IconBar.hh
index f6b7509..428fbf0 100644
--- a/src/IconBar.hh
+++ b/src/IconBar.hh
@@ -1,5 +1,5 @@
1// IconBar.hh 1// IconBar.hh for Fluxbox Window Manager
2// Copyright (c) 2001 Henrik Kinnunen (fluxgen@linuxmail.org) 2// Copyright (c) 2001 - 2002 Henrik Kinnunen (fluxgen@linuxmail.org)
3// 3//
4// Permission is hereby granted, free of charge, to any person obtaining a 4// Permission is hereby granted, free of charge, to any person obtaining a
5// copy of this software and associated documentation files (the "Software"), 5// copy of this software and associated documentation files (the "Software"),
@@ -18,55 +18,67 @@
18// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21#ifndef _ICONBAR_HH_
22#define _ICONBAR_HH_
23 21
24#include <vector> 22// $Id: IconBar.hh,v 1.7 2002/08/04 15:55:13 fluxgen Exp $
23
24#ifndef ICONBAR_HH
25#define ICONBAR_HH
26
25#include "Window.hh" 27#include "Window.hh"
26#include "LinkedList.hh"
27 28
28class Fluxbox; 29#include <list>
29 30
31/**
32 Icon object in IconBar
33*/
30class IconBarObj 34class IconBarObj
31{ 35{
32public: 36public:
33 IconBarObj(FluxboxWindow *fluxboxwin, Window iconwin); 37 IconBarObj(FluxboxWindow *fluxboxwin, Window iconwin);
34 ~IconBarObj(); 38 ~IconBarObj();
35 inline Window getIconWin(void) { return m_iconwin; } 39 Window getIconWin() const { return m_iconwin; }
36 inline FluxboxWindow *getFluxboxWin(void) { return m_fluxboxwin; } 40 FluxboxWindow *getFluxboxWin() { return m_fluxboxwin; }
41 const FluxboxWindow *getFluxboxWin() const { return m_fluxboxwin; }
42 unsigned int width() const;
43
37private: 44private:
38 Window m_iconwin;
39 FluxboxWindow *m_fluxboxwin; 45 FluxboxWindow *m_fluxboxwin;
46 Window m_iconwin;
40}; 47};
41 48
42typedef LinkedList<IconBarObj> IconList; 49/**
43typedef LinkedListIterator<IconBarObj> IconListIterator; 50 Icon container
44 51*/
45class IconBar 52class IconBar
46{ 53{
47public: 54public:
48 IconBar(BScreen *scrn, Window parent); 55 IconBar(BScreen *scrn, Window parent);
49 ~IconBar(); 56 ~IconBar();
50 void draw(); 57 void draw(); //TODO
51 void reconfigure(); 58 void reconfigure();
52 Window addIcon(FluxboxWindow *fluxboxwin); 59 Window addIcon(FluxboxWindow *fluxboxwin);
53 Window delIcon(FluxboxWindow *fluxboxwin); 60 Window delIcon(FluxboxWindow *fluxboxwin);
54 void buttonPressEvent(XButtonEvent *be); 61 void buttonPressEvent(XButtonEvent *be);
55 FluxboxWindow *findWindow(Window w); 62 FluxboxWindow *findWindow(Window w);
63 IconBarObj *findIcon(FluxboxWindow *fluxboxwin);
56 void exposeEvent(XExposeEvent *ee); 64 void exposeEvent(XExposeEvent *ee);
57private: 65
58 void draw(IconBarObj *obj, int width); 66 void draw(IconBarObj *obj, int width);
67private:
68 typedef std::list<IconBarObj *> IconList;
69
70// void draw(IconBarObj *obj, int width);
59 void loadTheme(unsigned int width, unsigned int height); 71 void loadTheme(unsigned int width, unsigned int height);
60 void decorate(Window win); 72 void decorate(Window win);
61 IconBarObj *findIcon(FluxboxWindow *fluxboxwin); 73// IconBarObj *findIcon(FluxboxWindow *fluxboxwin);
62 void repositionIcons(void); 74 void repositionIcons();
63 Window createIconWindow(FluxboxWindow *fluxboxwin, Window parent); 75 Window createIconWindow(FluxboxWindow *fluxboxwin, Window parent);
64 BScreen *m_screen; 76 BScreen *m_screen;
65 Display *m_display; 77 Display *m_display;
66 Window m_parent; 78 Window m_parent;
67 IconList *m_iconlist; 79 IconList m_iconlist;
68 Pixmap m_focus_pm; 80 Pixmap m_focus_pm;
69 unsigned long m_focus_pixel; 81 unsigned long m_focus_pixel;
70}; 82};
71 83
72#endif // _ICONBAR_HH_ 84#endif // ICONBAR_HH