aboutsummaryrefslogtreecommitdiff
path: root/src/IconBar.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/IconBar.hh')
-rw-r--r--src/IconBar.hh92
1 files changed, 54 insertions, 38 deletions
diff --git a/src/IconBar.hh b/src/IconBar.hh
index f6b7509..8a30f55 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,71 @@
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.10 2003/02/23 00:50:53 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 unsigned int height() const;
37private: 44private:
38 Window m_iconwin; 45 FluxboxWindow *m_fluxboxwin;
39 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, FbTk::Font &font);
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);
56 void exposeEvent(XExposeEvent *ee); 63 IconBarObj *findIcon(FluxboxWindow * const fluxboxwin);
64 const IconBarObj *findIcon(const FluxboxWindow * const fluxboxwin) const;
65 void exposeEvent(XExposeEvent *ee);
66
67 void draw(const IconBarObj * const obj, int width) const;
68 void setVertical(bool value) { m_vertical = value; }
57private: 69private:
58 void draw(IconBarObj *obj, int width); 70 typedef std::list<IconBarObj *> IconList;
59 void loadTheme(unsigned int width, unsigned int height); 71
60 void decorate(Window win); 72// void draw(IconBarObj *obj, int width);
61 IconBarObj *findIcon(FluxboxWindow *fluxboxwin); 73 void loadTheme(unsigned int width, unsigned int height);
62 void repositionIcons(void); 74 void decorate(Window win);
63 Window createIconWindow(FluxboxWindow *fluxboxwin, Window parent); 75// IconBarObj *findIcon(FluxboxWindow *fluxboxwin);
64 BScreen *m_screen; 76 void repositionIcons();
65 Display *m_display; 77 Window createIconWindow(FluxboxWindow *fluxboxwin, Window parent);
66 Window m_parent; 78 BScreen *m_screen;
67 IconList *m_iconlist; 79 Display *m_display;
68 Pixmap m_focus_pm; 80 Window m_parent;
69 unsigned long m_focus_pixel; 81 IconList m_iconlist;
82 Pixmap m_focus_pm;
83 unsigned long m_focus_pixel;
84 bool m_vertical;
85 FbTk::Font &m_font;
70}; 86};
71 87
72#endif // _ICONBAR_HH_ 88#endif // ICONBAR_HH