Xfce Foundation Classes
Main Page  | IndexNamespace List  |  Alphabetical List  |  Class List  |  File List


Xfc::Atk::Action Class Reference

An AtkAction C++ wrapper class. More...

#include <xfc/atk/action.hh>

Inheritance diagram for Xfc::Atk::Action:

Xfc::G::TypeInterface Xfc::G::TypeInstance Xfc::Trackable Xfc::Atk::Hyperlink List of all members.

Public Member Functions

Accessors
Methods

Detailed Description

An AtkAction C++ wrapper class.

Action should be implemented by instances of Atk::Object classes with which the user can interact directly, such as buttons, checkboxes, scrollbars, that is components which are not "passive" providers of UI information. An exception would be when the user interaction is already covered by another appropriate interface such as EditableText (insert/delete test, etc.) or Value (set value). In that case these actions should not be exposed by AtkAction as well.

Also note that the 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 Actions. Where mouse and keyboard actions are redundant in effect, Action should expose only one action rather than exposing redundant actions if possible. By convention we have been using "mouse centric" terminology for Action names.


Member Function Documentation

int Xfc::Atk::Action::get_n_actions (  )  const

Gets the number of accessible actions available on the object.

Returns:
The number of actions, or 0 if action does not implement this interface.
If there are more than one, the first one is considered the "default" action of the object.

String Xfc::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 a null String if the action object does not implement this interface.

String Xfc::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 a null String if the action object does not implement this interface.

String Xfc::Atk::Action::get_keybinding ( int  i  )  const

Returns a keybinding associated with the specified action, if one exists.

Parameters:
i The action index corresponding to the action to be performed.
Returns:
A string representing the keybinding, or a null String if there is no keybinding for this action.

String Xfc::Atk::Action::get_localized_name ( int  i  )  const

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 a null String if the action object does not implement this interface.

bool Xfc::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.

bool Xfc::Atk::Action::set_description ( int  i,
const char *  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:
true if the description was successfully set.


The documentation for this class was generated from the following file: Xfce Foundation Classes
Copyright © 2004-2005 The XFC Development Team XFC 4.3