Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/UIElements/Menu/TextMenu/TextMenu.hpp

    r670cd1 rb59da6  
    1212#include <string>
    1313
    14 #include "Helpers/MemDebug.hpp"
    15 
    1614#include "Helpers/Log.hpp"
    1715#include "Helpers/Verbose.hpp"
     
    2119#include "Actions/ActionRegistry.hpp"
    2220#include "Actions/ActionTraits.hpp"
    23 #include "Menu/TextMenu/TxMenuLeaveAction.hpp"
     21#include "Menu/TextMenu/TxMenu.hpp"
    2422#include "Menu/TextMenu/ActionMenuItem.hpp"
    25 #include "Menu/TextMenu/SeparatorMenuItem.hpp"
     23#include "Menu/TextMenu/SeperatorItem.hpp"
    2624#include "Menu/TextMenu/SubMenuItem.hpp"
    2725
    2826/** TextMenu is a specialization of MenuInterface to access TxMenu-like menus.
    29  *
    30  * Basically, this class is to be used in the MainWindow class of the TextUI.
    31  * There, we simply instantiate the class and call init() in order to add all
    32  * MenuItem's from MenuDescriptions and Action's ActionRegistry.
    33  *
    3427 * \sa QtMenu.
    3528 */
     
    3831{
    3932public:
    40   /** Constructor for class TextMenu.
    41    * Initializes outputter and token and takes note whether to delete the
    42    * MenuInstance or not.
    43    */
    4433  TextMenu(std::ostream &_outputter, const std::string &_token) :
    4534    MenuInterface(_token),
     
    5746  {}
    5847
    59   /** Destructor of MenuInstance.
    60    *
    61    */
    6248  virtual ~TextMenu()
    6349  {
     
    6652  }
    6753
    68   /** Display this MenuInstance.
    69    *
    70    */
    7154  void display()
    7255  {
     
    7457  }
    7558
    76   /** Returns a pointer to the contained/wrapped MenuInstance.
    77    * \return pointer to template class pointer
    78    */
    7959  T * const getMenuInstance()
    8060  {
     
    8262  }
    8363
    84   /** Reserves a specific trigger key such that it is not used during init().
    85    * \param trigger trigger key
    86    * \param &name token given for reference.
    87    */
    8864  void reserveShortcut(char trigger, const std::string &name)
    8965  {
     
    10278  MenuShortcutMap ShortcutMap;
    10379
    104   /** Adds an ActionItem by simply creating a new one.
    105    * \param &token token of Action (token in ActionRegistry)
    106    * \param &description descriptive text to be shown
    107    */
    10880  virtual void addActionItem(const std::string &token, const std::string &description)
    10981  {
     
    11183  }
    11284
    113   /** Adds a (dead) separator item.
    114    *
    115    */
    11685  virtual void addSeparatorItem()
    11786  {
    118     new SeparatorMenuItem(MenuInstance);
     87    new SeperatorItem(MenuInstance);
    11988  }
    12089
    121   /** Adds a Menu to this current Menu.
    122    * We also create here a leave action for this submenu to be able to return
    123    * to the current one again
    124    * \param &token token of the menu
    125    * \param &description descriptive text
    126    */
    12790  virtual void addSubmenuItem(const std::string &token, const std::string &description)
    12891  {
     
    139102  }
    140103
    141   /** Return the next available trigger key suitable to this name.
    142    * This function is used internally to make sure that each key is unique to
    143    * each Action/Menu. The chosen trigger key is also stored in an internal ShortcutMap.
    144    * \param &name text shown in menu
    145    * \return trigger key
    146    */
    147104  char getSuitableShortForm(const std::string &name)
    148105  {
Note: See TracChangeset for help on using the changeset viewer.