X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FFuncStatus.h;h=b632db547185e8e3133de9229e286ba5b043c120;hb=368f6a53a87eb5997433ecd0f51e854c99360d28;hp=c9629112de4b76f7cbc6671779190e5de40077e3;hpb=b634b3eb3b5cc1c47fd3bc63294e16536d4f7664;p=lyx.git diff --git a/src/FuncStatus.h b/src/FuncStatus.h index c9629112de..b632db5471 100644 --- a/src/FuncStatus.h +++ b/src/FuncStatus.h @@ -12,6 +12,8 @@ #ifndef FUNC_STATUS_H #define FUNC_STATUS_H +#include "support/docstring.h" + /// The status of a function. class FuncStatus @@ -19,24 +21,32 @@ class FuncStatus private: enum StatusCodes { - /// + /// Command can be executed OK = 0, - /// + /// This command does not exist, possibly because it is not + /// compiled in (e.g. LFUN_THESAURUS) or the user mistyped + /// it in the minibuffer. UNKNOWN commands have no menu entry. UNKNOWN = 1, - /// - DISABLED = 2, // Command cannot be executed - /// + /// Command cannot be executed + DISABLED = 2, + /// Command is on (i. e. the menu item has a checkmark + /// and the toolbar icon is pushed). + /// Not all commands use this ON = 4, - /// + /// Command is off (i. e. the menu item has no checkmark + /// and the toolbar icon is not pushed). + /// Not all commands use this OFF = 8 }; unsigned int v_; + lyx::docstring message_; + public: /// FuncStatus(); - // + /// void clear(); /// void operator|=(FuncStatus const & f); @@ -47,13 +57,19 @@ public: /// void enabled(bool b); - /// + /// tells whether it can be invoked (otherwise it will be grayed-out). bool enabled() const; /// void setOnOff(bool b); - /// + /// tells whether the menu item should have a check mark + /// (or the toolbar icon should be pushed). bool onoff(bool b) const; + + /// + void message(lyx::docstring const & m); + /// + lyx::docstring const & message() const; }; #endif