Fcitx
Public Member Functions | Friends | List of all members
fcitx::Action Class Referenceabstract

The Action class provides an abstraction for user commands that can be added to user interfaces. More...

#include <fcitx/action.h>

Inheritance diagram for fcitx::Action:
Inheritance graph
[legend]
Collaboration diagram for fcitx::Action:
Collaboration graph
[legend]

Public Member Functions

bool isSeparator () const
 Whether the action is a separator action.
 
ActionsetSeparator (bool separator)
 Set whether this action is a separator. More...
 
bool isCheckable () const
 Whether the action is a checkable action.
 
ActionsetCheckable (bool checkable)
 Set whether this action is a checkable action. More...
 
const std::string & name () const
 The action name when this action is registered.
 
bool registerAction (const std::string &name, UserInterfaceManager *uiManager)
 Register an action to UserInterfaceManager. More...
 
virtual std::string shortText (InputContext *) const =0
 Short description for this action of given input context.
 
virtual std::string icon (InputContext *) const =0
 Icon name of this action of given input context.
 
virtual bool isChecked (InputContext *) const
 Return if this action is checked. More...
 
virtual std::string longText (InputContext *) const
 Return a long description for this action. More...
 
void setMenu (Menu *menu)
 Set the sub menu of this action. More...
 
Menumenu ()
 Return the sub menu of this action.
 
int id ()
 Return the unique integer id of action. More...
 
virtual void activate (InputContext *)
 Activate this action. More...
 
void update (InputContext *ic)
 Notify that this action is required to be updated of given input context. More...
 
 FCITX_DECLARE_SIGNAL (Action, Update, void(InputContext *))
 
const KeyList & hotkey () const
 Hotkey bound to the action. More...
 
void setHotkey (const KeyList &hotkey)
 Set associated hotkey for display. More...
 
- Public Member Functions inherited from fcitx::Element
bool isChild (const Element *element) const
 Enable query between different elements.
 
bool isParent (const Element *element) const
 Enable query between different elements.
 
- Public Member Functions inherited from fcitx::ConnectableObject
template<typename SignalType , typename F >
Connection connect (F &&func)
 
template<typename SignalType >
void disconnectAll ()
 

Friends

class UserInterfaceManager
 
class UserInterfaceManagerPrivate
 

Additional Inherited Members

- Protected Member Functions inherited from fcitx::Element
const std::list< Element * > & parents () const
 List all parents. More...
 
const std::list< Element * > & childs () const
 List all childs. More...
 
void addChild (Element *child)
 
void addParent (Element *parent)
 
void insertChild (Element *before, Element *child)
 
void insertParent (Element *before, Element *parent)
 
void removeParent (Element *parent)
 
void removeChild (Element *child)
 
void removeAllChild ()
 
void removeAllParent ()
 
- Protected Member Functions inherited from fcitx::ConnectableObject
void destroy ()
 Allow user to notify the destroy event earlier. More...
 
template<typename SignalType , typename... Args>
auto emit (Args &&...args)
 
template<typename SignalType , typename... Args>
auto emit (Args &&...args) const
 
template<typename SignalType , typename Combiner = LastValue<typename std::function< typename SignalType::signalType>::result_type>>
void registerSignal ()
 
template<typename SignalType >
void unregisterSignal ()
 
- Static Protected Member Functions inherited from fcitx::Element
static void addEdge (Element *parent, Element *child, Element *beforeChild, Element *beforeParent)
 
static void removeEdge (Element *parent, Element *child)
 

Detailed Description

The Action class provides an abstraction for user commands that can be added to user interfaces.

Definition at line 34 of file action.h.


The documentation for this class was generated from the following files: