diff options
author | Pavel Labath <pavelo@centrum.sk> | 2011-06-27 17:34:51 (GMT) |
---|---|---|
committer | Paul Tagliamonte <paultag@fluxbox.org> | 2012-04-07 02:11:29 (GMT) |
commit | 1ec69a741f1e800514f27a83ad8c0628ed57adc9 (patch) | |
tree | 7198c0a9c7d0af5befdc18a885cdaa124627899b /src/FbTk | |
parent | d85bd43fe28e611eb4bb5ea5a7740dec78447b42 (diff) | |
download | fluxbox_paul-1ec69a741f1e800514f27a83ad8c0628ed57adc9.zip fluxbox_paul-1ec69a741f1e800514f27a83ad8c0628ed57adc9.tar.bz2 |
A veeeery rough implementation of lua menu parsers
Diffstat (limited to 'src/FbTk')
-rw-r--r-- | src/FbTk/Menu.cc | 2 | ||||
-rw-r--r-- | src/FbTk/Menu.hh | 2 | ||||
-rw-r--r-- | src/FbTk/MenuItem.hh | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc index a66b6c0..b6b4ec6 100644 --- a/src/FbTk/Menu.cc +++ b/src/FbTk/Menu.cc | |||
@@ -219,7 +219,7 @@ Menu::~Menu() { | |||
219 | s_focused = 0; | 219 | s_focused = 0; |
220 | } | 220 | } |
221 | 221 | ||
222 | int Menu::insert(const FbString &label, RefCount<Command<void> > &cmd, int pos) { | 222 | int Menu::insert(const FbString &label, const RefCount<Command<void> > &cmd, int pos) { |
223 | return insert(new MenuItem(label, cmd, this), pos); | 223 | return insert(new MenuItem(label, cmd, this), pos); |
224 | } | 224 | } |
225 | 225 | ||
diff --git a/src/FbTk/Menu.hh b/src/FbTk/Menu.hh index bd830b4..4096295 100644 --- a/src/FbTk/Menu.hh +++ b/src/FbTk/Menu.hh | |||
@@ -61,7 +61,7 @@ public: | |||
61 | */ | 61 | */ |
62 | //@{ | 62 | //@{ |
63 | /// add a menu item with a label and a command | 63 | /// add a menu item with a label and a command |
64 | int insert(const FbString &label, RefCount<Command<void> > &cmd, int pos=-1); | 64 | int insert(const FbString &label, const RefCount<Command<void> > &cmd, int pos=-1); |
65 | /// add empty menu item | 65 | /// add empty menu item |
66 | int insert(const FbString &label, int pos=-1); | 66 | int insert(const FbString &label, int pos=-1); |
67 | /// add submenu | 67 | /// add submenu |
diff --git a/src/FbTk/MenuItem.hh b/src/FbTk/MenuItem.hh index 2149559..cc24228 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 BiDiString &label, RefCount<Command<void> > &cmd, Menu *menu = 0) | 72 | MenuItem(const BiDiString &label, const 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<void> > &cmd) { m_command = cmd; } | 94 | void setCommand(const 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 BiDiString &label) { m_label = label; } | 97 | virtual void setLabel(const BiDiString &label) { m_label = label; } |