diff options
author | fluxgen <fluxgen> | 2003-01-07 02:10:24 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-01-07 02:10:24 (GMT) |
commit | f1bb9545d11ef6da53923ba6dc1021a900eb3340 (patch) | |
tree | bb9699d8371a759e9862cbff0f02b087d19e719f /src/FbTk | |
parent | a7f4b6edb6bcf2719df9d604da03fda331008852 (diff) | |
download | fluxbox_paul-f1bb9545d11ef6da53923ba6dc1021a900eb3340.zip fluxbox_paul-f1bb9545d11ef6da53923ba6dc1021a900eb3340.tar.bz2 |
added disable/enable title and removeAll items function
Diffstat (limited to 'src/FbTk')
-rw-r--r-- | src/FbTk/Menu.cc | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc index 87982fc..04a3433 100644 --- a/src/FbTk/Menu.cc +++ b/src/FbTk/Menu.cc | |||
@@ -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.cc,v 1.1 2002/12/25 11:46:50 fluxgen Exp $ | 25 | // $Id: Menu.cc,v 1.2 2003/01/07 02:10:24 fluxgen Exp $ |
26 | 26 | ||
27 | //use GNU extensions | 27 | //use GNU extensions |
28 | #ifndef _GNU_SOURCE | 28 | #ifndef _GNU_SOURCE |
@@ -238,6 +238,13 @@ int Menu::remove(unsigned int index) { | |||
238 | return menuitems.size(); | 238 | return menuitems.size(); |
239 | } | 239 | } |
240 | 240 | ||
241 | void Menu::removeAll() { | ||
242 | while (!menuitems.empty()) { | ||
243 | delete menuitems.back(); | ||
244 | menuitems.pop_back(); | ||
245 | } | ||
246 | } | ||
247 | |||
241 | void Menu::raise() { | 248 | void Menu::raise() { |
242 | menu.window.raise(); | 249 | menu.window.raise(); |
243 | } | 250 | } |
@@ -246,6 +253,14 @@ void Menu::lower() { | |||
246 | menu.window.lower(); | 253 | menu.window.lower(); |
247 | } | 254 | } |
248 | 255 | ||
256 | void Menu::disableTitle() { | ||
257 | setTitleVisibility(false); | ||
258 | } | ||
259 | |||
260 | void Menu::enableTitle() { | ||
261 | setTitleVisibility(true); | ||
262 | } | ||
263 | |||
249 | void Menu::update() { | 264 | void Menu::update() { |
250 | 265 | ||
251 | menu.item_h = m_theme.frameFont().height() + menu.bevel_w; | 266 | menu.item_h = m_theme.frameFont().height() + menu.bevel_w; |