From f1bb9545d11ef6da53923ba6dc1021a900eb3340 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Tue, 7 Jan 2003 02:10:24 +0000 Subject: added disable/enable title and removeAll items function --- src/FbTk/Menu.cc | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) 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 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Menu.cc,v 1.1 2002/12/25 11:46:50 fluxgen Exp $ +// $Id: Menu.cc,v 1.2 2003/01/07 02:10:24 fluxgen Exp $ //use GNU extensions #ifndef _GNU_SOURCE @@ -238,6 +238,13 @@ int Menu::remove(unsigned int index) { return menuitems.size(); } +void Menu::removeAll() { + while (!menuitems.empty()) { + delete menuitems.back(); + menuitems.pop_back(); + } +} + void Menu::raise() { menu.window.raise(); } @@ -246,6 +253,14 @@ void Menu::lower() { menu.window.lower(); } +void Menu::disableTitle() { + setTitleVisibility(false); +} + +void Menu::enableTitle() { + setTitleVisibility(true); +} + void Menu::update() { menu.item_h = m_theme.frameFont().height() + menu.bevel_w; -- cgit v0.11.2