aboutsummaryrefslogtreecommitdiff
path: root/src/IconBar.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/IconBar.hh')
-rw-r--r--src/IconBar.hh51
1 files changed, 32 insertions, 19 deletions
diff --git a/src/IconBar.hh b/src/IconBar.hh
index f6b7509..e89d498 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,68 @@
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.8 2002/10/29 15:52:44 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 * const fluxboxwin);
64 const IconBarObj *findIcon(const FluxboxWindow * const fluxboxwin) const;
56 void exposeEvent(XExposeEvent *ee); 65 void exposeEvent(XExposeEvent *ee);
66
67 void draw(const IconBarObj * const obj, int width) const;
57private: 68private:
58 void draw(IconBarObj *obj, int width); 69 typedef std::list<IconBarObj *> IconList;
70
71// void draw(IconBarObj *obj, int width);
59 void loadTheme(unsigned int width, unsigned int height); 72 void loadTheme(unsigned int width, unsigned int height);
60 void decorate(Window win); 73 void decorate(Window win);
61 IconBarObj *findIcon(FluxboxWindow *fluxboxwin); 74// IconBarObj *findIcon(FluxboxWindow *fluxboxwin);
62 void repositionIcons(void); 75 void repositionIcons();
63 Window createIconWindow(FluxboxWindow *fluxboxwin, Window parent); 76 Window createIconWindow(FluxboxWindow *fluxboxwin, Window parent);
64 BScreen *m_screen; 77 BScreen *m_screen;
65 Display *m_display; 78 Display *m_display;
66 Window m_parent; 79 Window m_parent;
67 IconList *m_iconlist; 80 IconList m_iconlist;
68 Pixmap m_focus_pm; 81 Pixmap m_focus_pm;
69 unsigned long m_focus_pixel; 82 unsigned long m_focus_pixel;
70}; 83};
71 84
72#endif // _ICONBAR_HH_ 85#endif // ICONBAR_HH