diff options
author | Arnon Gilboa <agilboa@redhat.com> | 2010-10-17 11:44:13 +0200 |
---|---|---|
committer | Arnon Gilboa <agilboa@redhat.com> | 2010-10-17 11:44:13 +0200 |
commit | 793dd31cad280ed331e174b52829aa82c5281fad (patch) | |
tree | 670fcb024bcfc1c68638bca6ad76bde336ca6794 /client/menu.h | |
parent | 21f586762f96f9b0c3237b2b7ea21fbc9022435c (diff) | |
download | spice-793dd31cad280ed331e174b52829aa82c5281fad.tar.gz spice-793dd31cad280ed331e174b52829aa82c5281fad.tar.xz spice-793dd31cad280ed331e174b52829aa82c5281fad.zip |
spicec: add menu id & find_sub()
Diffstat (limited to 'client/menu.h')
-rw-r--r-- | client/menu.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/client/menu.h b/client/menu.h index 809e798f..6e3d2f1b 100644 --- a/client/menu.h +++ b/client/menu.h @@ -26,7 +26,7 @@ public: class Menu { public: - Menu(CommandTarget& target, const std::string& name); + Menu(CommandTarget& target, const std::string& name, int id = 0); enum ItemType { MENU_ITEM_TYPE_INVALID, @@ -46,6 +46,7 @@ public: void set_name(const std::string& name) { _name = name;} const std::string& get_name() { return _name;} CommandTarget& get_target() { return _target;} + int get_id() { return _id;} void add_command(const std::string& name, int cmd_id, int state = 0); void add_separator(); @@ -57,6 +58,7 @@ public: ItemType item_type_at(int pos); void command_at(int pos, std::string& name, int& cmd_id, int& state); Menu* sub_at(int pos); + Menu* find_sub(int id); void clear(); @@ -94,6 +96,7 @@ private: CommandTarget& _target; std::string _name; std::vector<MenuItem> _items; + int _id; }; #endif |