aboutsummaryrefslogtreecommitdiff
path: root/src/Toolbar.hh
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-06-23 13:17:57 (GMT)
committerfluxgen <fluxgen>2003-06-23 13:17:57 (GMT)
commit150db600ffa7395cdfa1460820f87930ebdb2715 (patch)
tree054538d855457b899b876d94c008ed918f16a754 /src/Toolbar.hh
parent429c59cf5992a3a30cdbde3b3a856eede13004e6 (diff)
downloadfluxbox_pavel-150db600ffa7395cdfa1460820f87930ebdb2715.zip
fluxbox_pavel-150db600ffa7395cdfa1460820f87930ebdb2715.tar.bz2
moved toolbar resources from screen to Toolbar
Diffstat (limited to 'src/Toolbar.hh')
-rw-r--r--src/Toolbar.hh38
1 files changed, 23 insertions, 15 deletions
diff --git a/src/Toolbar.hh b/src/Toolbar.hh
index 6dd7860..87cd223 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.34 2003/06/22 19:38:38 fluxgen Exp $ 25// $Id: Toolbar.hh,v 1.35 2003/06/23 13:16:50 fluxgen Exp $
26 26
27#ifndef TOOLBAR_HH 27#ifndef TOOLBAR_HH
28#define TOOLBAR_HH 28#define TOOLBAR_HH
@@ -73,11 +73,11 @@ public:
73 void delIcon(FluxboxWindow *w); 73 void delIcon(FluxboxWindow *w);
74 /// remove all icons 74 /// remove all icons
75 void delAllIcons(); 75 void delAllIcons();
76
77 void enableIconBar(); 76 void enableIconBar();
78 void disableIconBar(); 77 void disableIconBar();
78 void raise();
79 void lower();
79 80
80 bool containsIcon(const FluxboxWindow &win) const;
81 inline const FbTk::Menu &menu() const { return m_toolbarmenu; } 81 inline const FbTk::Menu &menu() const { return m_toolbarmenu; }
82 inline FbTk::Menu &menu() { return m_toolbarmenu; } 82 inline FbTk::Menu &menu() { return m_toolbarmenu; }
83 inline FbTk::Menu &placementMenu() { return m_placementmenu; } 83 inline FbTk::Menu &placementMenu() { return m_placementmenu; }
@@ -91,25 +91,28 @@ public:
91 FbTk::XLayerItem &layerItem() { return m_layeritem; } 91 FbTk::XLayerItem &layerItem() { return m_layeritem; }
92 92
93 /// are we in workspacename editing? 93 /// are we in workspacename editing?
94 inline bool isEditing() const { return editing; } 94 inline bool isEditing() const { return m_editing; }
95 /// are we hidden? 95 /// are we hidden?
96 inline bool isHidden() const { return hidden; } 96 inline bool isHidden() const { return m_hidden; }
97 /// do we auto hide the toolbar? 97 /// do we auto hide the toolbar?
98 inline bool doAutoHide() const { return do_auto_hide; } 98 inline bool doAutoHide() const { return *m_rc_auto_hide; }
99 /// @return X window of the toolbar 99 /// @return X window of the toolbar
100 inline const FbTk::FbWindow &window() const { return frame.window; } 100 inline const FbTk::FbWindow &window() const { return frame.window; }
101 inline BScreen &screen() { return m_screen; } 101 inline BScreen &screen() { return m_screen; }
102 inline const BScreen &screen() const { return m_screen; } 102 inline const BScreen &screen() const { return m_screen; }
103 inline unsigned int width() const { return frame.width; } 103 inline unsigned int width() const { return frame.width; }
104 inline unsigned int height() const { return frame.height; } 104 inline unsigned int height() const { return frame.height; }
105 inline unsigned int exposedHeight() const { return ((do_auto_hide) ? frame.bevel_w : frame.height); } 105 inline unsigned int exposedHeight() const { return doAutoHide() ? frame.bevel_w : frame.height; }
106 inline int x() const { return ((hidden) ? frame.x_hidden : frame.x); } 106 inline int x() const { return isHidden() ? frame.x_hidden : frame.x; }
107 inline int y() const { return ((hidden) ? frame.y_hidden : frame.y); } 107 inline int y() const { return isHidden() ? frame.y_hidden : frame.y; }
108 inline Placement placement() const { return *m_rc_placement; }
108 /// @return pointer to iconbar if it got one, else 0 109 /// @return pointer to iconbar if it got one, else 0
109 inline const IconBar *iconBar() const { return m_iconbar.get(); } 110 inline const IconBar *iconBar() const { return m_iconbar.get(); }
110 inline const ToolbarTheme &theme() const { return m_theme; } 111 inline const ToolbarTheme &theme() const { return m_theme; }
111 inline ToolbarTheme &theme() { return m_theme; } 112 inline ToolbarTheme &theme() { return m_theme; }
112 bool isVertical() const; 113 bool isVertical() const;
114 bool containsIcon(const FluxboxWindow &win) const;
115
113 /** 116 /**
114 @name eventhandlers 117 @name eventhandlers
115 */ 118 */
@@ -134,13 +137,12 @@ public:
134 137
135 138
136private: 139private:
140 void setupMenus();
137 void clearStrut(); 141 void clearStrut();
138 void updateStrut(); 142 void updateStrut();
139 143
140 bool editing; ///< edit workspace label mode 144 bool m_editing; ///< edit workspace label mode
141 bool hidden; ///< hidden state 145 bool m_hidden; ///< hidden state
142 bool do_auto_hide; ///< do we auto hide
143 Display *display; ///< display connection
144 146
145 /// Toolbar frame 147 /// Toolbar frame
146 struct Frame { 148 struct Frame {
@@ -174,10 +176,10 @@ private:
174 LayerMenu<Toolbar> m_layermenu; 176 LayerMenu<Toolbar> m_layermenu;
175 std::auto_ptr<IconBar> m_iconbar; 177 std::auto_ptr<IconBar> m_iconbar;
176 178
177 std::string new_workspace_name; ///< temp variable in edit workspace name mode 179 std::string m_new_workspace_name; ///< temp variable in edit workspace name mode
178 180
179 ToolbarTheme m_theme; 181 ToolbarTheme m_theme;
180 Placement m_place; 182
181 //!! TODO this is just temporary 183 //!! TODO this is just temporary
182 class ThemeListener: public FbTk::Observer { 184 class ThemeListener: public FbTk::Observer {
183 public: 185 public:
@@ -194,6 +196,12 @@ private:
194 FbTk::XLayerItem m_layeritem; 196 FbTk::XLayerItem m_layeritem;
195 197
196 Strut *m_strut; ///< created and destroyed by BScreen 198 Strut *m_strut; ///< created and destroyed by BScreen
199 // resources
200 FbTk::Resource<bool> m_rc_auto_hide;
201 FbTk::Resource<int> m_rc_width_percent;
202 FbTk::Resource<Fluxbox::Layer> m_rc_layernum;
203 FbTk::Resource<int> m_rc_on_head;
204 FbTk::Resource<Placement> m_rc_placement;
197}; 205};
198 206
199 207