diff options
author | fluxgen <fluxgen> | 2002-12-03 16:54:13 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2002-12-03 16:54:13 (GMT) |
commit | d611c016c7d3dacdb557ca75f321e2f81a34e6c0 (patch) | |
tree | 20c13d35ea577c8b97888462b0df1beafbdce379 /src | |
parent | 1350945498df96e108eba29a516a315ffb895eea (diff) | |
download | fluxbox-d611c016c7d3dacdb557ca75f321e2f81a34e6c0.zip fluxbox-d611c016c7d3dacdb557ca75f321e2f81a34e6c0.tar.bz2 |
using FbTk FbWindow
Diffstat (limited to 'src')
-rw-r--r-- | src/Toolbar.hh | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/src/Toolbar.hh b/src/Toolbar.hh index e7ad311..e7888f7 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.16 2002/12/02 21:52:30 fluxgen Exp $ | 25 | // $Id: Toolbar.hh,v 1.17 2002/12/03 16:54:13 fluxgen Exp $ |
26 | 26 | ||
27 | #ifndef TOOLBAR_HH | 27 | #ifndef TOOLBAR_HH |
28 | #define TOOLBAR_HH | 28 | #define TOOLBAR_HH |
@@ -32,6 +32,7 @@ | |||
32 | #include "IconBar.hh" | 32 | #include "IconBar.hh" |
33 | #include "ToolbarTheme.hh" | 33 | #include "ToolbarTheme.hh" |
34 | #include "EventHandler.hh" | 34 | #include "EventHandler.hh" |
35 | #include "FbWindow.hh" | ||
35 | 36 | ||
36 | #include <memory> | 37 | #include <memory> |
37 | 38 | ||
@@ -97,8 +98,14 @@ public: | |||
97 | /** | 98 | /** |
98 | Toolbar placement on the screen | 99 | Toolbar placement on the screen |
99 | */ | 100 | */ |
100 | enum Placement{ TOPLEFT = 1, BOTTOMLEFT, TOPCENTER, | 101 | enum Placement{ |
101 | BOTTOMCENTER, TOPRIGHT, BOTTOMRIGHT }; | 102 | // top bottom placement |
103 | TOPLEFT = 1, BOTTOMLEFT, TOPCENTER, | ||
104 | BOTTOMCENTER, TOPRIGHT, BOTTOMRIGHT, | ||
105 | // left right placement | ||
106 | LEFTCENTER, LEFTBOTTOM, LEFTTOP, | ||
107 | RIGHTCENTER, RIGHTBOTTOM, RIGHTTOP | ||
108 | }; | ||
102 | 109 | ||
103 | explicit Toolbar(BScreen *screen, size_t width = 200); | 110 | explicit Toolbar(BScreen *screen, size_t width = 200); |
104 | virtual ~Toolbar(); | 111 | virtual ~Toolbar(); |
@@ -118,7 +125,7 @@ public: | |||
118 | /// do we auto hide the toolbar? | 125 | /// do we auto hide the toolbar? |
119 | inline bool doAutoHide() const { return do_auto_hide; } | 126 | inline bool doAutoHide() const { return do_auto_hide; } |
120 | /// @return X window of the toolbar | 127 | /// @return X window of the toolbar |
121 | inline Window getWindowID() const { return frame.window; } | 128 | inline Window getWindowID() const { return frame.window.window(); } |
122 | inline BScreen *screen() { return m_screen; } | 129 | inline BScreen *screen() { return m_screen; } |
123 | inline const BScreen *screen() const { return m_screen; } | 130 | inline const BScreen *screen() const { return m_screen; } |
124 | inline unsigned int width() const { return frame.width; } | 131 | inline unsigned int width() const { return frame.width; } |
@@ -130,6 +137,7 @@ public: | |||
130 | inline const IconBar *iconBar() const { return m_iconbar.get(); } | 137 | inline const IconBar *iconBar() const { return m_iconbar.get(); } |
131 | inline const ToolbarTheme &theme() const { return m_theme; } | 138 | inline const ToolbarTheme &theme() const { return m_theme; } |
132 | inline ToolbarTheme &theme() { return m_theme; } | 139 | inline ToolbarTheme &theme() { return m_theme; } |
140 | inline bool isVertical() const; | ||
133 | /** | 141 | /** |
134 | @name eventhandlers | 142 | @name eventhandlers |
135 | */ | 143 | */ |
@@ -158,16 +166,19 @@ public: | |||
158 | 166 | ||
159 | 167 | ||
160 | private: | 168 | private: |
169 | void drawButtonBase(FbTk::FbWindow &win, bool pressed); | ||
170 | |||
161 | bool on_top; ///< always on top | 171 | bool on_top; ///< always on top |
162 | bool editing; ///< edit workspace label mode | 172 | bool editing; ///< edit workspace label mode |
163 | bool hidden; ///< hidden state | 173 | bool hidden; ///< hidden state |
164 | bool do_auto_hide; ///< do we auto hide | 174 | bool do_auto_hide; ///< do we auto hide |
165 | Display *display; ///< display connection | 175 | Display *display; ///< display connection |
166 | 176 | ||
167 | struct frame { | 177 | struct Frame { |
168 | unsigned long button_pixel, pbutton_pixel; | 178 | Frame(FbTk::EventHandler &evh, int screen_num); |
179 | ~Frame(); | ||
169 | Pixmap base, label, wlabel, clk, button, pbutton; | 180 | Pixmap base, label, wlabel, clk, button, pbutton; |
170 | Window window, workspace_label, window_label, clock, psbutton, nsbutton, | 181 | FbTk::FbWindow window, workspace_label, window_label, clock, psbutton, nsbutton, |
171 | pwbutton, nwbutton; | 182 | pwbutton, nwbutton; |
172 | 183 | ||
173 | 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; |