aboutsummaryrefslogtreecommitdiff
path: root/src/Toolbar.hh
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-12-02 21:54:30 (GMT)
committerfluxgen <fluxgen>2002-12-02 21:54:30 (GMT)
commitaf7c6a7c6b637edc2649d8f2d565b53c5f4c84fa (patch)
tree7295ee24e6121d6cd7e6ddf6b7a19e578a883f55 /src/Toolbar.hh
parentfdb116cec505d9f48ac38a659756b473ae96813f (diff)
downloadfluxbox-af7c6a7c6b637edc2649d8f2d565b53c5f4c84fa.zip
fluxbox-af7c6a7c6b637edc2649d8f2d565b53c5f4c84fa.tar.bz2
using new toolbartheme, fixed placement function and changed to FbTk EventHandler
Diffstat (limited to 'src/Toolbar.hh')
-rw-r--r--src/Toolbar.hh30
1 files changed, 19 insertions, 11 deletions
diff --git a/src/Toolbar.hh b/src/Toolbar.hh
index 259e23d..e7ad311 100644
--- a/src/Toolbar.hh
+++ b/src/Toolbar.hh
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Toolbar.hh,v 1.15 2002/12/01 13:42:02 rathnor Exp $ 25// $Id: Toolbar.hh,v 1.16 2002/12/02 21:52:30 fluxgen Exp $
26 26
27#ifndef TOOLBAR_HH 27#ifndef TOOLBAR_HH
28#define TOOLBAR_HH 28#define TOOLBAR_HH
@@ -30,6 +30,8 @@
30#include "Basemenu.hh" 30#include "Basemenu.hh"
31#include "Timer.hh" 31#include "Timer.hh"
32#include "IconBar.hh" 32#include "IconBar.hh"
33#include "ToolbarTheme.hh"
34#include "EventHandler.hh"
33 35
34#include <memory> 36#include <memory>
35 37
@@ -86,10 +88,11 @@ private:
86 88
87}; 89};
88 90
91
89/** 92/**
90 the toolbar. 93 the toolbar.
91*/ 94*/
92class Toolbar : public TimeoutHandler { 95class Toolbar : public TimeoutHandler, public FbTk::EventHandler {
93public: 96public:
94 /** 97 /**
95 Toolbar placement on the screen 98 Toolbar placement on the screen
@@ -97,7 +100,7 @@ public:
97 enum Placement{ TOPLEFT = 1, BOTTOMLEFT, TOPCENTER, 100 enum Placement{ TOPLEFT = 1, BOTTOMLEFT, TOPCENTER,
98 BOTTOMCENTER, TOPRIGHT, BOTTOMRIGHT }; 101 BOTTOMCENTER, TOPRIGHT, BOTTOMRIGHT };
99 102
100 explicit Toolbar(BScreen *screen); 103 explicit Toolbar(BScreen *screen, size_t width = 200);
101 virtual ~Toolbar(); 104 virtual ~Toolbar();
102 105
103 /// add icon to iconbar 106 /// add icon to iconbar
@@ -125,16 +128,18 @@ public:
125 inline int y() const { return ((hidden) ? frame.y_hidden : frame.y); } 128 inline int y() const { return ((hidden) ? frame.y_hidden : frame.y); }
126 /// @return pointer to iconbar if it got one, else 0 129 /// @return pointer to iconbar if it got one, else 0
127 inline const IconBar *iconBar() const { return m_iconbar.get(); } 130 inline const IconBar *iconBar() const { return m_iconbar.get(); }
131 inline const ToolbarTheme &theme() const { return m_theme; }
132 inline ToolbarTheme &theme() { return m_theme; }
128 /** 133 /**
129 @name eventhandlers 134 @name eventhandlers
130 */ 135 */
131 //@{ 136 //@{
132 void buttonPressEvent(XButtonEvent *be); 137 void buttonPressEvent(XButtonEvent &be);
133 void buttonReleaseEvent(XButtonEvent *be); 138 void buttonReleaseEvent(XButtonEvent &be);
134 void enterNotifyEvent(XCrossingEvent *ce); 139 void enterNotifyEvent(XCrossingEvent &ce);
135 void leaveNotifyEvent(XCrossingEvent *ce); 140 void leaveNotifyEvent(XCrossingEvent &ce);
136 void exposeEvent(XExposeEvent *ee); 141 void exposeEvent(XExposeEvent &ee);
137 void keyPressEvent(XKeyEvent *ke); 142 void keyPressEvent(XKeyEvent &ke);
138 //@} 143 //@}
139 144
140 void redrawWindowLabel(bool redraw= false); 145 void redrawWindowLabel(bool redraw= false);
@@ -146,7 +151,7 @@ public:
146 /// enter edit mode on workspace label 151 /// enter edit mode on workspace label
147 void edit(); 152 void edit();
148 void reconfigure(); 153 void reconfigure();
149 154 void setPlacement(Placement where);
150 void checkClock(bool redraw = false, bool date = false); 155 void checkClock(bool redraw = false, bool date = false);
151 156
152 virtual void timeout(); 157 virtual void timeout();
@@ -178,7 +183,7 @@ private:
178 } hide_handler; 183 } hide_handler;
179 184
180 BScreen *m_screen; 185 BScreen *m_screen;
181 BImageControl *image_ctrl; 186 BImageControl &image_ctrl;
182 BTimer clock_timer; ///< timer to update clock 187 BTimer clock_timer; ///< timer to update clock
183 BTimer hide_timer; ///< timer to for auto hide toolbar 188 BTimer hide_timer; ///< timer to for auto hide toolbar
184 Toolbarmenu m_toolbarmenu; 189 Toolbarmenu m_toolbarmenu;
@@ -186,6 +191,9 @@ private:
186 191
187 std::string new_workspace_name; ///< temp variable in edit workspace name mode 192 std::string new_workspace_name; ///< temp variable in edit workspace name mode
188 193
194 ToolbarTheme m_theme;
195 Placement m_place;
196
189 friend class HideHandler; 197 friend class HideHandler;
190 friend class Toolbarmenu; 198 friend class Toolbarmenu;
191 friend class Toolbarmenu::Placementmenu; 199 friend class Toolbarmenu::Placementmenu;