summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/FbTk/Menu.hh17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/FbTk/Menu.hh b/src/FbTk/Menu.hh
index 98684de..29c79ea 100644
--- a/src/FbTk/Menu.hh
+++ b/src/FbTk/Menu.hh
@@ -1,5 +1,5 @@
1// Menu.hh for FbTk - Fluxbox Toolkit 1// Menu.hh for FbTk - Fluxbox Toolkit
2// Copyright (c) 2001 - 2002 Henrik Kinnunen (fluxgen at users.sourceforge.net) 2// Copyright (c) 2001 - 2003 Henrik Kinnunen (fluxgen at users.sourceforge.net)
3// 3//
4// Basemenu.hh for Blackbox - an X11 Window manager 4// Basemenu.hh for Blackbox - an X11 Window manager
5// Copyright (c) 1997 - 2000 Brad Hughes (bhughes at tcac.net) 5// Copyright (c) 1997 - 2000 Brad Hughes (bhughes at tcac.net)
@@ -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.1 2002/12/25 11:46:50 fluxgen Exp $ 25// $Id: Menu.hh,v 1.2 2003/01/07 02:09:43 fluxgen Exp $
26 26
27#ifndef FBTK_MENU_HH 27#ifndef FBTK_MENU_HH
28#define FBTK_MENU_HH 28#define FBTK_MENU_HH
@@ -43,9 +43,8 @@ namespace FbTk {
43class MenuItem; 43class MenuItem;
44class MenuTheme; 44class MenuTheme;
45 45
46/** 46
47 Base class for menus 47/// Base class for menus
48*/
49class Menu: public FbTk::EventHandler { 48class Menu: public FbTk::EventHandler {
50public: 49public:
51 enum Alignment{ ALIGNDONTCARE = 1, ALIGNTOP, ALIGNBOTTOM }; 50 enum Alignment{ ALIGNDONTCARE = 1, ALIGNTOP, ALIGNBOTTOM };
@@ -69,8 +68,10 @@ public:
69 int insert(const char *label, int function= 0, const char *exec = 0, int pos = -1); 68 int insert(const char *label, int function= 0, const char *exec = 0, int pos = -1);
70 /// add submenu 69 /// add submenu
71 int insert(const char *label, Menu *submenu, int pos= -1); 70 int insert(const char *label, Menu *submenu, int pos= -1);
72 /// remove item 71 /// remove an item
73 int remove(unsigned int item); 72 int remove(unsigned int item);
73 /// remove all items
74 void removeAll();
74 inline void setInternalMenu() { internal_menu = true; } 75 inline void setInternalMenu() { internal_menu = true; }
75 inline void setAlignment(Alignment a) { m_alignment = a; } 76 inline void setAlignment(Alignment a) { m_alignment = a; }
76 inline void setTorn() { torn = true; } 77 inline void setTorn() { torn = true; }
@@ -79,6 +80,8 @@ public:
79 void raise(); 80 void raise();
80 /// lower this window 81 /// lower this window
81 void lower(); 82 void lower();
83 void disableTitle();
84 void enableTitle();
82 /** 85 /**
83 @name event handlers 86 @name event handlers
84 */ 87 */
@@ -135,7 +138,7 @@ protected:
135 inline void setHideTree(bool h) { hide_tree = h; } 138 inline void setHideTree(bool h) { hide_tree = h; }
136 inline void setMinimumSublevels(int m) { menu.minsub = m; } 139 inline void setMinimumSublevels(int m) { menu.minsub = m; }
137 140
138 virtual void itemSelected(int button, unsigned int index) = 0; 141 virtual void itemSelected(int button, unsigned int index) { }
139 virtual void drawItem(unsigned int index, bool highlight = false, 142 virtual void drawItem(unsigned int index, bool highlight = false,
140 bool clear= false, 143 bool clear= false,
141 int x= -1, int y= -1, 144 int x= -1, int y= -1,