aboutsummaryrefslogtreecommitdiff
path: root/src/Toolbar.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/Toolbar.hh')
-rw-r--r--src/Toolbar.hh23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/Toolbar.hh b/src/Toolbar.hh
index cfebedd..21faadb 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.23 2003/02/16 00:08:29 fluxgen Exp $ 25// $Id: Toolbar.hh,v 1.24 2003/02/18 15:11:10 rathnor Exp $
26 26
27#ifndef TOOLBAR_HH 27#ifndef TOOLBAR_HH
28#define TOOLBAR_HH 28#define TOOLBAR_HH
@@ -34,11 +34,12 @@
34#include "FbWindow.hh" 34#include "FbWindow.hh"
35#include "ArrowButton.hh" 35#include "ArrowButton.hh"
36#include "Observer.hh" 36#include "Observer.hh"
37#include "XLayer.hh"
38#include "XLayerItem.hh"
39#include "LayerMenu.hh"
37 40
38#include <memory> 41#include <memory>
39 42
40class Toolbar;
41
42namespace FbTk { 43namespace FbTk {
43class ImageControl; 44class ImageControl;
44}; 45};
@@ -61,7 +62,7 @@ public:
61 }; 62 };
62 63
63 /// create a toolbar on the screen with specific width 64 /// create a toolbar on the screen with specific width
64 explicit Toolbar(BScreen &screen, size_t width = 200); 65 explicit Toolbar(BScreen &screen, FbTk::XLayer &layer, size_t width = 200);
65 /// destructor 66 /// destructor
66 virtual ~Toolbar(); 67 virtual ~Toolbar();
67 68
@@ -73,10 +74,15 @@ public:
73 inline const FbTk::Menu &menu() const { return m_toolbarmenu; } 74 inline const FbTk::Menu &menu() const { return m_toolbarmenu; }
74 inline FbTk::Menu &menu() { return m_toolbarmenu; } 75 inline FbTk::Menu &menu() { return m_toolbarmenu; }
75 76
77 inline FbTk::Menu *layermenu() { return m_layermenu; }
78 inline const FbTk::Menu *layermenu() const { return m_layermenu; }
79
80 void moveToLayer(int layernum) { m_layeritem->moveToLayer(layernum); }
81
82 FbTk::XLayerItem &getLayerItem() { return *m_layeritem; }
83
76 /// are we in workspacename editing? 84 /// are we in workspacename editing?
77 inline bool isEditing() const { return editing; } 85 inline bool isEditing() const { return editing; }
78 /// always on top?
79 inline bool isOnTop() const { return on_top; }
80 /// are we hidden? 86 /// are we hidden?
81 inline bool isHidden() const { return hidden; } 87 inline bool isHidden() const { return hidden; }
82 /// do we auto hide the toolbar? 88 /// do we auto hide the toolbar?
@@ -120,7 +126,6 @@ public:
120 126
121private: 127private:
122 128
123 bool on_top; ///< always on top
124 bool editing; ///< edit workspace label mode 129 bool editing; ///< edit workspace label mode
125 bool hidden; ///< hidden state 130 bool hidden; ///< hidden state
126 bool do_auto_hide; ///< do we auto hide 131 bool do_auto_hide; ///< do we auto hide
@@ -130,6 +135,7 @@ private:
130 struct Frame { 135 struct Frame {
131 Frame(FbTk::EventHandler &evh, int screen_num); 136 Frame(FbTk::EventHandler &evh, int screen_num);
132 ~Frame(); 137 ~Frame();
138
133 Pixmap base, label, wlabel, clk, button, pbutton; 139 Pixmap base, label, wlabel, clk, button, pbutton;
134 FbTk::FbWindow window, workspace_label, window_label, clock; 140 FbTk::FbWindow window, workspace_label, window_label, clock;
135 ArrowButton psbutton, nsbutton, pwbutton, nwbutton; 141 ArrowButton psbutton, nsbutton, pwbutton, nwbutton;
@@ -152,6 +158,7 @@ private:
152 FbTk::Timer clock_timer; ///< timer to update clock 158 FbTk::Timer clock_timer; ///< timer to update clock
153 FbTk::Timer hide_timer; ///< timer to for auto hide toolbar 159 FbTk::Timer hide_timer; ///< timer to for auto hide toolbar
154 FbTk::Menu m_toolbarmenu; 160 FbTk::Menu m_toolbarmenu;
161 LayerMenu<Toolbar> *m_layermenu;
155 std::auto_ptr<IconBar> m_iconbar; 162 std::auto_ptr<IconBar> m_iconbar;
156 163
157 std::string new_workspace_name; ///< temp variable in edit workspace name mode 164 std::string new_workspace_name; ///< temp variable in edit workspace name mode
@@ -170,6 +177,8 @@ private:
170 }; 177 };
171 178
172 ThemeListener m_themelistener; 179 ThemeListener m_themelistener;
180
181 FbTk::XLayerItem *m_layeritem;
173}; 182};
174 183
175 184