atkmm
2.36.0
|
The ATK interface provided by UI components which the user can activate/interact with, This should be implemented by instances of Atk::Object classes with which the user can interact directly, i.e. More...
#include <atkmm/action.h>
Public Member Functions | |
Action (Action&& src) noexcept | |
Action& | operator= (Action&& src) noexcept |
~Action () noexcept override | |
AtkAction* | gobj () |
Provides access to the underlying C GObject. More... | |
const AtkAction* | gobj () const |
Provides access to the underlying C GObject. More... | |
bool | do_action (int i) |
Perform the specified action on the object. More... | |
int | get_n_actions () const |
Gets the number of accessible actions available on the object. More... | |
Glib::ustring | get_description (int i) const |
Returns a description of the specified action of the object. More... | |
Glib::ustring | get_name (int i) const |
Returns the name of the specified action of the object. More... | |
Glib::ustring | get_keybinding (int i) |
Returns a keybinding associated with this action, if one exists. More... | |
bool | set_description (int i, const Glib::ustring& desc) |
Sets a description of the specified action of the object. More... | |
Glib::ustring | get_localized_name (int i) |
Returns the localized name of the specified action of the object. More... | |
Public Member Functions inherited from Glib::Interface | |
Interface () | |
Interface (Interface &&src) noexcept | |
Interface & | operator= (Interface &&src) noexcept |
Interface (const Glib::Interface_Class &interface_class) | |
Interface (GObject *castitem) | |
~Interface () noexcept override | |
Interface (const Interface &)=delete | |
Interface & | operator= (const Interface &)=delete |
GObject * | gobj () |
const GObject * | gobj () const |
Public Member Functions inherited from Glib::ObjectBase | |
ObjectBase (const ObjectBase &)=delete | |
ObjectBase & | operator= (const ObjectBase &)=delete |
void | set_property_value (const Glib::ustring &property_name, const Glib::ValueBase &value) |
void | get_property_value (const Glib::ustring &property_name, Glib::ValueBase &value) const |
void | set_property (const Glib::ustring &property_name, const PropertyType &value) |
void | get_property (const Glib::ustring &property_name, PropertyType &value) const |
PropertyType | get_property (const Glib::ustring &property_name) const |
sigc::connection | connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void()> &slot) |
sigc::connection | connect_property_changed (const Glib::ustring &property_name, sigc::slot< void()> &&slot) |
void | freeze_notify () |
void | thaw_notify () |
virtual void | reference () const |
virtual void | unreference () const |
GObject * | gobj () |
const GObject * | gobj () const |
GObject * | gobj_copy () const |
Public Member Functions inherited from sigc::trackable | |
trackable () noexcept | |
trackable (const trackable &src) noexcept | |
trackable (trackable &&src) noexcept | |
~trackable () | |
void | add_destroy_notify_callback (notifiable *data, func_destroy_notify func) const |
void | notify_callbacks () |
trackable & | operator= (const trackable &src) |
trackable & | operator= (trackable &&src) noexcept |
void | remove_destroy_notify_callback (notifiable *data) const |
Static Public Member Functions | |
static void | add_interface (GType gtype_implementer) |
static GType | get_type () |
Get the GType for this class, for use with the underlying GObject type system. More... | |
Protected Member Functions | |
Action () | |
You should derive from this class to use it. More... | |
virtual bool | do_action_vfunc (int i) |
virtual int | get_n_actions_vfunc () const |
virtual const char* | get_description_vfunc (int i) const |
virtual const char* | get_name_vfunc (int i) const |
virtual const char* | get_keybinding_vfunc (int i) const |
virtual bool | set_description_vfunc (int i, const Glib::ustring& desc) |
Protected Member Functions inherited from Glib::ObjectBase | |
ObjectBase () | |
ObjectBase (const char *custom_type_name) | |
ObjectBase (const std::type_info &custom_type_info) | |
ObjectBase (ObjectBase &&src) noexcept | |
ObjectBase & | operator= (ObjectBase &&src) noexcept |
virtual | ~ObjectBase () noexcept=0 |
void | initialize (GObject *castitem) |
void | initialize_move (GObject *castitem, Glib::ObjectBase *previous_wrapper) |
Related Functions | |
(Note that these are not member functions.) | |
Glib::RefPtr< Atk::Action > | wrap (AtkAction* object, bool take_copy=false) |
A Glib::wrap() method for this object. More... | |
Additional Inherited Members | |
Public Types inherited from sigc::trackable | |
typedef internal::func_destroy_notify | func_destroy_notify |
Public Types inherited from sigc::notifiable | |
typedef internal::func_destroy_notify | func_destroy_notify |
Detailed Description
The ATK interface provided by UI components which the user can activate/interact with, This should be implemented by instances of Atk::Object classes with which the user can interact directly, i.e.
buttons, checkboxes, scrollbars, e.g. components which are not "passive" providers of UI information.
Exceptions: when the user interaction is already covered by another appropriate interface such as Atk::EditableText (insert/delete test, etc.) or Atk::Value (set value) then these actions should not be exposed by Atk::Action as well.
Also note that the Atk::Action API is limited in that parameters may not be passed to the object being activated; thus the action must be self-contained and specifiable via only a single "verb". Concrete examples include "press", "release", "click" for buttons, "drag" (meaning initiate drag) and "drop" for drag sources and drop targets, etc.
Though most UI interactions on components should be invocable via keyboard as well as mouse, there will generally be a close mapping between "mouse actions" that are possible on a component and the Atk::Actions. Where mouse and keyboard actions are redundant in effect, Atk::Action should expose only one action rather than exposing redundant actions if possible. By convention we have been using "mouse centric" terminology for Atk::Action names.
Constructor & Destructor Documentation
|
protected |
You should derive from this class to use it.
|
noexcept |
|
overridenoexcept |
Member Function Documentation
|
static |
bool Atk::Action::do_action | ( | int | i | ) |
Perform the specified action on the object.
- Parameters
-
i The action index corresponding to the action to be performed.
- Returns
true
if success,false
otherwise.
|
protectedvirtual |
Glib::ustring Atk::Action::get_description | ( | int | i | ) | const |
Returns a description of the specified action of the object.
- Parameters
-
i The action index corresponding to the action to be performed.
- Returns
- A description string, or
nullptr
if action does not implement this interface.
|
protectedvirtual |
Glib::ustring Atk::Action::get_keybinding | ( | int | i | ) |
Returns a keybinding associated with this action, if one exists.
- Parameters
-
i The action index corresponding to the action to be performed.
- Returns
- A string representing the keybinding, or an empty string if there is no keybinding for this action.
|
protectedvirtual |
Glib::ustring Atk::Action::get_localized_name | ( | int | i | ) |
Returns the localized name of the specified action of the object.
- Parameters
-
i The action index corresponding to the action to be performed.
- Returns
- A name string, or an empty string if action does not implement this interface.
int Atk::Action::get_n_actions | ( | ) | const |
Gets the number of accessible actions available on the object.
If there are more than one, the first one is considered the "default" action of the object.
- Returns
- A the number of actions, or 0 if action does not implement this interface.
|
protectedvirtual |
Glib::ustring Atk::Action::get_name | ( | int | i | ) | const |
Returns the name of the specified action of the object.
- Parameters
-
i The action index corresponding to the action to be performed.
- Returns
- A name string, or an empty string if action does not implement this interface.
|
protectedvirtual |
|
static |
Get the GType for this class, for use with the underlying GObject type system.
|
inline |
Provides access to the underlying C GObject.
|
inline |
Provides access to the underlying C GObject.
bool Atk::Action::set_description | ( | int | i, |
const Glib::ustring & | desc | ||
) |
Sets a description of the specified action of the object.
- Parameters
-
i The action index corresponding to the action to be performed. desc The description to be assigned to this action.
- Returns
- A
bool
representing if the description was successfully set;.
|
protectedvirtual |
Friends And Related Function Documentation
|
related |
A Glib::wrap() method for this object.
- Parameters
-
object The C instance. take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
- Returns
- A C++ instance that wraps this C instance.
Generated on Sat Dec 19 2020 09:14:21 for atkmm by 1.8.11