7 #ifndef _FCITX_ACTION_H_ 8 #define _FCITX_ACTION_H_ 15 #include <fcitx-utils/macros.h> 16 #include <fcitx/fcitxcore_export.h> 20 class SimpleActionPrivate;
22 class UserInterfaceManager;
45 bool isSeparator()
const;
53 Action &setSeparator(
bool separator);
58 bool isCheckable()
const;
65 Action &setCheckable(
bool checkable);
70 const std::string &name()
const;
79 bool registerAction(
const std::string &name,
114 void setMenu(
Menu *menu);
153 const KeyList &hotkey()
const;
161 void setHotkey(
const KeyList &hotkey);
164 void setName(
const std::string &name);
167 std::unique_ptr<ActionPrivate> d_ptr;
168 FCITX_DECLARE_PRIVATE(
Action);
176 void setIcon(
const std::string &icon);
177 void setChecked(
bool checked);
178 void setShortText(
const std::string &text);
179 void setLongText(
const std::string &text);
191 std::unique_ptr<SimpleActionPrivate> d_ptr;
196 #endif // _FCITX_ACTION_H_ Utility class that provides a hierarchy between multiple objects.
virtual void activate(InputContext *)
Activate this action.
virtual std::string longText(InputContext *) const
Return a long description for this action.
#define FCITX_DECLARE_SIGNAL(CLASS_NAME, NAME,...)
Declare signal by type.
The Action class provides an abstraction for user commands that can be added to user interfaces...
Utilities to enable use object with signal.
virtual bool isChecked(InputContext *) const
Return if this action is checked.
An input context represents a client of Fcitx.
Class to represent a key.
Base class that can be used for UI composition or graph.