aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Menu.hh
diff options
context:
space:
mode:
authormarkt <markt>2007-02-28 19:13:59 (GMT)
committermarkt <markt>2007-02-28 19:13:59 (GMT)
commitec9cd21ddaf53b836e9a92d5c329feb18f12ba22 (patch)
treec80ea65f9db6a2f75eb0b121c6746dc3d754b43b /src/FbTk/Menu.hh
parentd07fd13f3b553aecab22e86866f1efb9b4df5cd6 (diff)
downloadfluxbox_pavel-ec9cd21ddaf53b836e9a92d5c329feb18f12ba22.zip
fluxbox_pavel-ec9cd21ddaf53b836e9a92d5c329feb18f12ba22.tar.bz2
some code simplification and bug fixes
mainly, using a non-zero menuDelayClose allowed you to have multiple submenus open
Diffstat (limited to 'src/FbTk/Menu.hh')
-rw-r--r--src/FbTk/Menu.hh11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/FbTk/Menu.hh b/src/FbTk/Menu.hh
index 94a1e6f..43b77a1 100644
--- a/src/FbTk/Menu.hh
+++ b/src/FbTk/Menu.hh
@@ -88,9 +88,9 @@ public:
88 /// lower this window 88 /// lower this window
89 virtual void lower(); 89 virtual void lower();
90 /// select next item 90 /// select next item
91 void nextItem(); 91 void nextItem(int failsafe = -1);
92 /// select previous item 92 /// select previous item
93 void prevItem(); 93 void prevItem(int failsafe = -1);
94 void enterSubmenu(); 94 void enterSubmenu();
95 void enterParent(); 95 void enterParent();
96 96
@@ -152,9 +152,7 @@ public:
152 inline unsigned int height() const { return menu.window.height(); } 152 inline unsigned int height() const { return menu.window.height(); }
153 inline size_t numberOfItems() const { return menuitems.size(); } 153 inline size_t numberOfItems() const { return menuitems.size(); }
154 inline int currentSubmenu() const { return m_which_sub; } 154 inline int currentSubmenu() const { return m_which_sub; }
155#ifdef NOT_USED 155
156 bool hasSubmenu(unsigned int index) const;
157#endif
158 bool isItemSelected(unsigned int index) const; 156 bool isItemSelected(unsigned int index) const;
159 bool isItemEnabled(unsigned int index) const; 157 bool isItemEnabled(unsigned int index) const;
160 bool isItemSelectable(unsigned int index) const; 158 bool isItemSelectable(unsigned int index) const;
@@ -184,7 +182,6 @@ protected:
184 titleWindow().raise(); 182 titleWindow().raise();
185 } 183 }
186 184
187 virtual void itemSelected(int button, unsigned int index) { }
188 // renders item onto pm 185 // renders item onto pm
189 int drawItem(FbDrawable &pm, unsigned int index, 186 int drawItem(FbDrawable &pm, unsigned int index,
190 bool highlight = false, 187 bool highlight = false,
@@ -220,7 +217,7 @@ private:
220 bool m_internal_menu; ///< whether we should destroy this menu or if it's managed somewhere else 217 bool m_internal_menu; ///< whether we should destroy this menu or if it's managed somewhere else
221 bool m_title_vis; ///< title visibility 218 bool m_title_vis; ///< title visibility
222 219
223 int m_which_sub, m_which_press, m_which_sbl; 220 int m_which_sub;
224 Alignment m_alignment; 221 Alignment m_alignment;
225 222
226 struct _menu { 223 struct _menu {