aboutsummaryrefslogtreecommitdiff
path: root/src/Toolbar.hh
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-08-11 20:22:38 (GMT)
committerfluxgen <fluxgen>2003-08-11 20:22:38 (GMT)
commit57b41ae42f1ca701dc768e71c03e6dae5fd8df04 (patch)
treef435fe67daf067522bdf20a6ce08f18c1a63c282 /src/Toolbar.hh
parent7d778ce8aca8ab0cd52809f6626892f61c318dca (diff)
downloadfluxbox_pavel-57b41ae42f1ca701dc768e71c03e6dae5fd8df04.zip
fluxbox_pavel-57b41ae42f1ca701dc768e71c03e6dae5fd8df04.tar.bz2
cleaning
Diffstat (limited to 'src/Toolbar.hh')
-rw-r--r--src/Toolbar.hh40
1 files changed, 8 insertions, 32 deletions
diff --git a/src/Toolbar.hh b/src/Toolbar.hh
index f18afad..0073ab0 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.40 2003/08/11 15:54:24 fluxgen Exp $ 25// $Id: Toolbar.hh,v 1.41 2003/08/11 20:22:38 fluxgen Exp $
26 26
27#ifndef TOOLBAR_HH 27#ifndef TOOLBAR_HH
28#define TOOLBAR_HH 28#define TOOLBAR_HH
@@ -30,6 +30,7 @@
30#include "Timer.hh" 30#include "Timer.hh"
31#include "ToolbarTheme.hh" 31#include "ToolbarTheme.hh"
32#include "ToolTheme.hh" 32#include "ToolTheme.hh"
33#include "IconbarTheme.hh"
33 34
34#include "EventHandler.hh" 35#include "EventHandler.hh"
35#include "FbWindow.hh" 36#include "FbWindow.hh"
@@ -74,22 +75,10 @@ public:
74 75
75 virtual ~Toolbar(); 76 virtual ~Toolbar();
76 77
77 /// add icon to iconbar
78 void addIcon(FluxboxWindow *w);
79 /// remove icon from iconbar
80 void delIcon(FluxboxWindow *w);
81 bool containsIcon(const FluxboxWindow &win) const;
82 /// remove all icons
83 void delAllIcons(bool ignore_stuck = false);
84 void enableIconBar();
85 void disableIconBar();
86 void raise(); 78 void raise();
87 void lower(); 79 void lower();
88 void toggleHidden(); 80 void toggleHidden();
89 81
90 void enableUpdates();
91 void disableUpdates();
92
93 82
94 void moveToLayer(int layernum); 83 void moveToLayer(int layernum);
95 84
@@ -107,13 +96,10 @@ public:
107 void keyPressEvent(XKeyEvent &ke); 96 void keyPressEvent(XKeyEvent &ke);
108 //@} 97 //@}
109 98
110 void redrawWindowLabel(bool redraw= false);
111 void redrawWorkspaceLabel(bool redraw= false);
112 /// enter edit mode on workspace label 99 /// enter edit mode on workspace label
113 void edit(); 100 void edit();
114 void reconfigure(); 101 void reconfigure();
115 void setPlacement(Placement where); 102 void setPlacement(Placement where);
116 void checkClock(bool redraw = false, bool date = false);
117 103
118 void update(FbTk::Subject *subj); 104 void update(FbTk::Subject *subj);
119 105
@@ -137,14 +123,13 @@ public:
137 inline const FbTk::FbWindow &window() const { return frame.window; } 123 inline const FbTk::FbWindow &window() const { return frame.window; }
138 inline BScreen &screen() { return m_screen; } 124 inline BScreen &screen() { return m_screen; }
139 inline const BScreen &screen() const { return m_screen; } 125 inline const BScreen &screen() const { return m_screen; }
140 inline unsigned int width() const { return frame.width; } 126 inline unsigned int width() const { return frame.window.width(); }
141 inline unsigned int height() const { return frame.height; } 127 inline unsigned int height() const { return frame.window.height(); }
142 inline unsigned int exposedHeight() const { return doAutoHide() ? frame.bevel_w : frame.height; } 128 inline unsigned int exposedHeight() const { return doAutoHide() ? frame.bevel_w : frame.height; }
143 inline int x() const { return isHidden() ? frame.x_hidden : frame.x; } 129 inline int x() const { return isHidden() ? frame.x_hidden : frame.x; }
144 inline int y() const { return isHidden() ? frame.y_hidden : frame.y; } 130 inline int y() const { return isHidden() ? frame.y_hidden : frame.y; }
145 inline Placement placement() const { return *m_rc_placement; } 131 inline Placement placement() const { return *m_rc_placement; }
146 /// @return pointer to iconbar if it got one, else 0 132 /// @return pointer to iconbar if it got one, else 0
147 inline const IconBar *iconBar() const { return m_iconbar.get(); }
148 inline const ToolbarTheme &theme() const { return m_theme; } 133 inline const ToolbarTheme &theme() const { return m_theme; }
149 inline ToolbarTheme &theme() { return m_theme; } 134 inline ToolbarTheme &theme() { return m_theme; }
150 bool isVertical() const; 135 bool isVertical() const;
@@ -165,16 +150,12 @@ private:
165 Frame(FbTk::EventHandler &evh, int screen_num); 150 Frame(FbTk::EventHandler &evh, int screen_num);
166 ~Frame(); 151 ~Frame();
167 152
168 Pixmap base, label; 153 FbTk::FbWindow window;
169 FbTk::FbWindow window, window_label;
170 154
171 int x, y, x_hidden, y_hidden, grab_x, grab_y; 155 int x, y, x_hidden, y_hidden, grab_x, grab_y;
172 unsigned int width, height, window_label_w, bevel_w, label_h; 156 unsigned int width, height, bevel_w;
173 } frame; 157 } frame;
174 158
175 Pixmap m_icon_focused_pm, m_icon_unfocused_pm;
176 FbTk::Color m_icon_focused_color, m_icon_unfocused_color;
177
178 BScreen &m_screen; ///< screen connection 159 BScreen &m_screen; ///< screen connection
179 160
180 FbTk::Timer m_hide_timer; ///< timer to for auto hide toolbar 161 FbTk::Timer m_hide_timer; ///< timer to for auto hide toolbar
@@ -182,13 +163,7 @@ private:
182 FbTk::Menu m_placementmenu; 163 FbTk::Menu m_placementmenu;
183 LayerMenu<Toolbar> m_layermenu; 164 LayerMenu<Toolbar> m_layermenu;
184 165
185 // icon stuff
186 std::auto_ptr<Container> m_iconbar;
187 typedef std::map<FluxboxWindow *, IconButton *> Icon2WinMap;
188 Icon2WinMap m_icon2winmap;
189 166
190 std::string m_new_workspace_name; ///< temp variable in edit workspace name mode
191
192 ToolbarTheme m_theme; 167 ToolbarTheme m_theme;
193 168
194 FbTk::XLayerItem m_layeritem; 169 FbTk::XLayerItem m_layeritem;
@@ -204,7 +179,8 @@ private:
204 FbTk::Resource<Placement> m_rc_placement; 179 FbTk::Resource<Placement> m_rc_placement;
205 std::auto_ptr<Shape> m_shape; 180 std::auto_ptr<Shape> m_shape;
206 181
207 ToolTheme m_tool_theme; 182 ToolTheme m_clock_theme, m_workspace_theme;
183 IconbarTheme m_iconbar_theme;
208 184
209}; 185};
210 186