diff options
author | Jim Ramsay <jim.ramsay@motorola.com> | 2010-01-14 16:49:48 (GMT) |
---|---|---|
committer | Jim Ramsay <jim.ramsay@motorola.com> | 2010-01-14 20:06:40 (GMT) |
commit | 6ceb786df329045b49dc4f2a8e7ba76b772746a9 (patch) | |
tree | ed74f7dec685921c5d4a6b7a3e5d143d1098dfd6 /src/FbTk/Menu.hh | |
parent | 46261a8284730a16d664fa89423fc5728ed284b4 (diff) | |
download | fluxbox_lack-6ceb786df329045b49dc4f2a8e7ba76b772746a9.zip fluxbox_lack-6ceb786df329045b49dc4f2a8e7ba76b772746a9.tar.bz2 |
Add Menu::setActive and MenuItem::setActive API
This provides a virtual function which may be overridden by subclasses so they
are notified when a different menu item is highlight. Menu::setActive is called
first, with the index of the item that is about to be highlighted, though this
may be '-1'. MenuItem::setActive will recieve a boolean which is true if this
MenuItem is highlighted and false otherwise.
Diffstat (limited to 'src/FbTk/Menu.hh')
-rw-r--r-- | src/FbTk/Menu.hh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/FbTk/Menu.hh b/src/FbTk/Menu.hh index 09bdd8c..dfefbc0 100644 --- a/src/FbTk/Menu.hh +++ b/src/FbTk/Menu.hh | |||
@@ -188,6 +188,8 @@ protected: | |||
188 | 188 | ||
189 | virtual void update(FbTk::Subject *); | 189 | virtual void update(FbTk::Subject *); |
190 | 190 | ||
191 | virtual void setActive(int index) { m_active_index = index; } | ||
192 | |||
191 | private: | 193 | private: |
192 | 194 | ||
193 | void openSubmenu(); | 195 | void openSubmenu(); |