Changes in src/UIElements/Menu/Menu.hpp [56f73b:163110]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/Menu/Menu.hpp
r56f73b r163110 61 61 62 62 protected: 63 // Unique name of the menu for identification.63 //!> Unique name of the menu for identification. 64 64 const std::string name; 65 65 66 // populater function that adds all menu items 66 /** populater function that adds all menu items. 67 * 68 */ 67 69 void populate(); 70 71 /** Populater function for all Actions in this menu. 72 * 73 */ 68 74 void populateActions(); 69 75 70 76 private: 71 void addAction(const std::string &ActionName); 77 /** Adds an action to this menu. 78 * 79 * @param ActionName name of action 80 * @param ActionDescription of the action (e.g. for tooltips) 81 */ 82 void addAction(const std::string &ActionName, const std::string &ActionDescription); 83 84 /** Adds a separator (e.g. horizontal line) to menu. 85 * 86 */ 72 87 void addSeparator(); 88 89 /** Adds a submenu to this menu. 90 * 91 * @param MenuName name of submenu 92 * @param MenuPosition position in sequence of items of submenu 93 */ 73 94 void addSubmenu(const std::string &MenuName, const int MenuPosition); 95 96 /** Checks whether an item named \a token exists in this menu. 97 * 98 * @param token name of action of submenu 99 * @return true - item exists, false - item does not exist in this menu 100 */ 74 101 bool isPresent(const std::string &token); 75 102 103 //!> enumeration of all valid item types 76 104 enum ItemType {ActionItem, MenuItem, SeparatorItem, NoItem}; 77 105 78 int TopPosition; // current position to add 79 enum ItemType LastItem; // check whether separator followed separator 80 std::set <std::string> DuplicatesList; // is used to check for duplicates 106 //!> current position to add 107 int TopPosition; 108 //!> check whether separator followed separator 109 enum ItemType LastItem; 110 //!> is used to check for duplicates 111 std::set <std::string> DuplicatesList; 81 112 }; 82 113
Note:
See TracChangeset
for help on using the changeset viewer.