aboutsummaryrefslogtreecommitdiff
path: root/src/Toolbar.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/Toolbar.hh')
-rw-r--r--src/Toolbar.hh32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/Toolbar.hh b/src/Toolbar.hh
index e7888f7..069c8a1 100644
--- a/src/Toolbar.hh
+++ b/src/Toolbar.hh
@@ -1,5 +1,5 @@
1// Toolbar.hh for Fluxbox 1// Toolbar.hh for Fluxbox
2// Copyright (c) 2002 Henrik Kinnunen (fluxgen@linuxmail.org) 2// Copyright (c) 2002 Henrik Kinnunen (fluxgen at users.sourceforge.net)
3// 3//
4// Toolbar.hh for Blackbox - an X11 Window manager 4// Toolbar.hh for Blackbox - an X11 Window manager
5// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net) 5// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
@@ -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.17 2002/12/03 16:54:13 fluxgen Exp $ 25// $Id: Toolbar.hh,v 1.18 2002/12/13 20:36:36 fluxgen Exp $
26 26
27#ifndef TOOLBAR_HH 27#ifndef TOOLBAR_HH
28#define TOOLBAR_HH 28#define TOOLBAR_HH
@@ -33,6 +33,7 @@
33#include "ToolbarTheme.hh" 33#include "ToolbarTheme.hh"
34#include "EventHandler.hh" 34#include "EventHandler.hh"
35#include "FbWindow.hh" 35#include "FbWindow.hh"
36#include "ArrowButton.hh"
36 37
37#include <memory> 38#include <memory>
38 39
@@ -90,24 +91,27 @@ private:
90}; 91};
91 92
92 93
94
95/// The toolbar.
93/** 96/**
94 the toolbar. 97 Handles iconbar, workspace name view and clock view
95*/ 98 */
96class Toolbar : public TimeoutHandler, public FbTk::EventHandler { 99class Toolbar : public TimeoutHandler, public FbTk::EventHandler {
97public: 100public:
98 /** 101
99 Toolbar placement on the screen 102 ///Toolbar placement on the screen
100 */
101 enum Placement{ 103 enum Placement{
102 // top bottom placement 104 // top and bottom placement
103 TOPLEFT = 1, BOTTOMLEFT, TOPCENTER, 105 TOPLEFT = 1, BOTTOMLEFT, TOPCENTER,
104 BOTTOMCENTER, TOPRIGHT, BOTTOMRIGHT, 106 BOTTOMCENTER, TOPRIGHT, BOTTOMRIGHT,
105 // left right placement 107 // left and right placement
106 LEFTCENTER, LEFTBOTTOM, LEFTTOP, 108 LEFTCENTER, LEFTBOTTOM, LEFTTOP,
107 RIGHTCENTER, RIGHTBOTTOM, RIGHTTOP 109 RIGHTCENTER, RIGHTBOTTOM, RIGHTTOP
108 }; 110 };
109 111
112 /// create a toolbar on the screen with specific width
110 explicit Toolbar(BScreen *screen, size_t width = 200); 113 explicit Toolbar(BScreen *screen, size_t width = 200);
114 /// destructor
111 virtual ~Toolbar(); 115 virtual ~Toolbar();
112 116
113 /// add icon to iconbar 117 /// add icon to iconbar
@@ -152,10 +156,6 @@ public:
152 156
153 void redrawWindowLabel(bool redraw= false); 157 void redrawWindowLabel(bool redraw= false);
154 void redrawWorkspaceLabel(bool redraw= false); 158 void redrawWorkspaceLabel(bool redraw= false);
155 void redrawPrevWorkspaceButton(bool pressed = false, bool redraw = false);
156 void redrawNextWorkspaceButton(bool pressed = false, bool redraw = false);
157 void redrawPrevWindowButton(bool pressed = false, bool redraw = false);
158 void redrawNextWindowButton(bool pressed = false, bool redraw = false);
159 /// enter edit mode on workspace label 159 /// enter edit mode on workspace label
160 void edit(); 160 void edit();
161 void reconfigure(); 161 void reconfigure();
@@ -166,7 +166,6 @@ public:
166 166
167 167
168private: 168private:
169 void drawButtonBase(FbTk::FbWindow &win, bool pressed);
170 169
171 bool on_top; ///< always on top 170 bool on_top; ///< always on top
172 bool editing; ///< edit workspace label mode 171 bool editing; ///< edit workspace label mode
@@ -174,12 +173,13 @@ private:
174 bool do_auto_hide; ///< do we auto hide 173 bool do_auto_hide; ///< do we auto hide
175 Display *display; ///< display connection 174 Display *display; ///< display connection
176 175
176 /// Toolbar frame
177 struct Frame { 177 struct Frame {
178 Frame(FbTk::EventHandler &evh, int screen_num); 178 Frame(FbTk::EventHandler &evh, int screen_num);
179 ~Frame(); 179 ~Frame();
180 Pixmap base, label, wlabel, clk, button, pbutton; 180 Pixmap base, label, wlabel, clk, button, pbutton;
181 FbTk::FbWindow window, workspace_label, window_label, clock, psbutton, nsbutton, 181 FbTk::FbWindow window, workspace_label, window_label, clock;
182 pwbutton, nwbutton; 182 ArrowButton psbutton, nsbutton, pwbutton, nwbutton;
183 183
184 int x, y, x_hidden, y_hidden, hour, minute, grab_x, grab_y; 184 int x, y, x_hidden, y_hidden, hour, minute, grab_x, grab_y;
185 unsigned int width, height, window_label_w, workspace_label_w, clock_w, 185 unsigned int width, height, window_label_w, workspace_label_w, clock_w,