X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FMenuBackend.h;h=07c115a2727d052cc42e978e9a084d38c3634c89;hb=ca339eb1991efcab02a5f1b7f33387b35df2a416;hp=c72546c7f8670ec13454add5ca789a1f24bd83da;hpb=eaa33dca6def75e9bf48582073c75b256821fd25;p=lyx.git diff --git a/src/MenuBackend.h b/src/MenuBackend.h index c72546c7f8..07c115a272 100644 --- a/src/MenuBackend.h +++ b/src/MenuBackend.h @@ -14,7 +14,7 @@ #define MENUBACKEND_H #include "FuncStatus.h" -#include "funcrequest.h" +#include "FuncRequest.h" #include @@ -23,7 +23,7 @@ namespace lyx { -class LyXLex; +class Lexer; class Buffer; class Menu; @@ -110,8 +110,11 @@ public: FuncStatus & status() { return status_; } /// returns the status of the lfun associated with this entry void status(FuncStatus const & status) { status_ = status; } - /// returns the binding associated to this action - docstring const binding() const; + /** + * returns the binding associated to this action. + * Use the native UI format when \c forgui is true. + */ + docstring const binding(bool forgui) const; /// the description of the submenu (if relevant) docstring const & submenuname() const { return submenuname_; } /// set the description of the submenu @@ -158,7 +161,7 @@ public: /// menu item. Menu & addWithStatusCheck(MenuItem const &); /// - Menu & read(LyXLex &); + Menu & read(Lexer &); /// docstring const & name() const { return name_; } /// @@ -202,9 +205,9 @@ public: /// typedef MenuList::iterator iterator; /// - MenuBackend() : specialmenu_(0) {} + MenuBackend() {} /// - void read(LyXLex &); + void read(Lexer &); /// void add(Menu const &); /// @@ -218,10 +221,13 @@ public: /// bool empty() const { return menulist_.empty(); } /** This defines a menu whose entries list the FuncRequests - will be removed by expand() in other menus. This is used by - the Qt/Mac code + that will be removed by expand() in other menus. This is + used by the Qt/Mac code */ - void specialMenu(docstring const &); + void specialMenu(Menu const &); + /// + Menu const & specialMenu() { return specialmenu_; } + /// Expands some special entries of the menu /** The entries with the following kind are expanded to a sequence of Command MenuItems: Lastfiles, Documents, @@ -251,7 +257,7 @@ private: /// Menu menubar_; /// - Menu * specialmenu_; + Menu specialmenu_; }; ///