aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Menu.hh
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2004-06-13 10:58:34 (GMT)
committerfluxgen <fluxgen>2004-06-13 10:58:34 (GMT)
commit825c02ccb0690e7867d7ed92549a17050de6a7e5 (patch)
tree39e7396fca8fbe439304ec19a9e0392d67aba81c /src/FbTk/Menu.hh
parent57dd6d16f9c0551b67fb28a8da692052c34dd8d2 (diff)
downloadfluxbox-825c02ccb0690e7867d7ed92549a17050de6a7e5.zip
fluxbox-825c02ccb0690e7867d7ed92549a17050de6a7e5.tar.bz2
more cleaning
Diffstat (limited to 'src/FbTk/Menu.hh')
-rw-r--r--src/FbTk/Menu.hh18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/FbTk/Menu.hh b/src/FbTk/Menu.hh
index 6227c07..2d2d62d 100644
--- a/src/FbTk/Menu.hh
+++ b/src/FbTk/Menu.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: Menu.hh,v 1.34 2004/06/13 00:31:29 fluxgen Exp $ 25// $Id: Menu.hh,v 1.35 2004/06/13 10:58:34 fluxgen Exp $
26 26
27#ifndef FBTK_MENU_HH 27#ifndef FBTK_MENU_HH
28#define FBTK_MENU_HH 28#define FBTK_MENU_HH
@@ -146,7 +146,6 @@ public:
146 inline unsigned int height() const { return menu.window.height(); } 146 inline unsigned int height() const { return menu.window.height(); }
147 inline unsigned int numberOfItems() const { return menuitems.size(); } 147 inline unsigned int numberOfItems() const { return menuitems.size(); }
148 inline int currentSubmenu() const { return which_sub; } 148 inline int currentSubmenu() const { return which_sub; }
149 inline unsigned int titleHeight() const { return menu.title_h; }
150 bool hasSubmenu(unsigned int index) const; 149 bool hasSubmenu(unsigned int index) const;
151 bool isItemSelected(unsigned int index) const; 150 bool isItemSelected(unsigned int index) const;
152 bool isItemEnabled(unsigned int index) const; 151 bool isItemEnabled(unsigned int index) const;
@@ -161,8 +160,6 @@ public:
161protected: 160protected:
162 161
163 inline void setTitleVisibility(bool b) { title_vis = b; m_need_update = true; } 162 inline void setTitleVisibility(bool b) { title_vis = b; m_need_update = true; }
164 inline void setMovable(bool b) { movable = b; }
165 inline void setHideTree(bool h) { hide_tree = h; }
166 163
167 virtual void itemSelected(int button, unsigned int index) { } 164 virtual void itemSelected(int button, unsigned int index) { }
168 virtual int drawItem(unsigned int index, bool highlight = false, 165 virtual int drawItem(unsigned int index, bool highlight = false,
@@ -192,12 +189,16 @@ private:
192 Menuitems menuitems; 189 Menuitems menuitems;
193 190
194 const unsigned int m_screen_width, m_screen_height; 191 const unsigned int m_screen_width, m_screen_height;
195 bool moving, visible, movable, torn, internal_menu, title_vis, shifted, 192 bool moving; ///< if we're moving/draging or not
196 hide_tree; 193 bool visible; ///< menu visibility
194 bool torn; ///< torn from parent
195 bool internal_menu; ///< whether we should destroy this menu or if it's managed somewhere else
196 bool title_vis; ///< title visibility
197 bool shifted; ///< if the menu is shifted to the other side of the parent
197 198
198 int which_sub, which_press, which_sbl; 199 int which_sub, which_press, which_sbl;
199 Alignment m_alignment; 200 Alignment m_alignment;
200 int m_border_width; 201
201 struct _menu { 202 struct _menu {
202 Pixmap frame_pixmap, title_pixmap, hilite_pixmap, sel_pixmap; 203 Pixmap frame_pixmap, title_pixmap, hilite_pixmap, sel_pixmap;
203 FbTk::FbWindow window, frame, title; 204 FbTk::FbWindow window, frame, title;
@@ -205,7 +206,8 @@ private:
205 std::string label; 206 std::string label;
206 int x_move, y_move, x_shift, y_shift, sublevels, persub, minsub, 207 int x_move, y_move, x_shift, y_shift, sublevels, persub, minsub,
207 grab_x, grab_y; 208 grab_x, grab_y;
208 unsigned int title_h, frame_h, item_w, item_h, bevel_w; 209
210 unsigned int frame_h, item_w;
209 } menu; 211 } menu;
210 212
211 Drawable m_root_pm; 213 Drawable m_root_pm;