aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/MenuItem.hh
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-01-11 07:41:22 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-01-11 07:41:22 (GMT)
commit9f2f65a698c4cc71373a7fe9d73a0889e0d3487b (patch)
tree4ad67db771d73ea3c48f80a1244037fc9754edd2 /src/FbTk/MenuItem.hh
parent1f01d84c080d607a91eb417efcaf5e500b5f1d7e (diff)
downloadfluxbox_pavel-9f2f65a698c4cc71373a7fe9d73a0889e0d3487b.zip
fluxbox_pavel-9f2f65a698c4cc71373a7fe9d73a0889e0d3487b.tar.bz2
make FbTk::Command a template class, split parsing information out of ObjectRegistry
Diffstat (limited to 'src/FbTk/MenuItem.hh')
-rw-r--r--src/FbTk/MenuItem.hh10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/FbTk/MenuItem.hh b/src/FbTk/MenuItem.hh
index 8c73036..9150849 100644
--- a/src/FbTk/MenuItem.hh
+++ b/src/FbTk/MenuItem.hh
@@ -69,7 +69,7 @@ public:
69 m_toggle_item(false) 69 m_toggle_item(false)
70 { } 70 { }
71 /// create a menu item with a specific command to be executed on click 71 /// create a menu item with a specific command to be executed on click
72 MenuItem(const FbString &label, RefCount<Command> &cmd, Menu *menu = 0) 72 MenuItem(const FbString &label, RefCount<Command<void> > &cmd, Menu *menu = 0)
73 : m_label(label), 73 : m_label(label),
74 m_menu(menu), 74 m_menu(menu),
75 m_submenu(0), 75 m_submenu(0),
@@ -91,7 +91,7 @@ public:
91 { } 91 { }
92 virtual ~MenuItem() { } 92 virtual ~MenuItem() { }
93 93
94 void setCommand(RefCount<Command> &cmd) { m_command = cmd; } 94 void setCommand(RefCount<Command<void> > &cmd) { m_command = cmd; }
95 virtual void setSelected(bool selected) { m_selected = selected; } 95 virtual void setSelected(bool selected) { m_selected = selected; }
96 virtual void setEnabled(bool enabled) { m_enabled = enabled; } 96 virtual void setEnabled(bool enabled) { m_enabled = enabled; }
97 virtual void setLabel(const FbString &label) { m_label = label; } 97 virtual void setLabel(const FbString &label) { m_label = label; }
@@ -140,8 +140,8 @@ public:
140 virtual void click(int button, int time, unsigned int mods); 140 virtual void click(int button, int time, unsigned int mods);
141 /// must use this to show submenu to ensure consistency for object like window menu in ClientMenu (see Workspace.cc) 141 /// must use this to show submenu to ensure consistency for object like window menu in ClientMenu (see Workspace.cc)
142 virtual void showSubmenu(); 142 virtual void showSubmenu();
143 RefCount<Command> &command() { return m_command; } 143 RefCount<Command<void> > &command() { return m_command; }
144 const RefCount<Command> &command() const { return m_command; } 144 const RefCount<Command<void> > &command() const { return m_command; }
145 //@} 145 //@}
146 146
147 void setMenu(Menu &menu) { m_menu = &menu; } 147 void setMenu(Menu &menu) { m_menu = &menu; }
@@ -151,7 +151,7 @@ private:
151 FbString m_label; ///< label of this item 151 FbString m_label; ///< label of this item
152 Menu *m_menu; ///< the menu we live in 152 Menu *m_menu; ///< the menu we live in
153 Menu *m_submenu; ///< a submenu, 0 if we don't have one 153 Menu *m_submenu; ///< a submenu, 0 if we don't have one
154 RefCount<Command> m_command; ///< command to be executed 154 RefCount<Command<void> > m_command; ///< command to be executed
155 bool m_enabled, m_selected; 155 bool m_enabled, m_selected;
156 bool m_close_on_click, m_toggle_item; 156 bool m_close_on_click, m_toggle_item;
157 int m_index; 157 int m_index;