|
class atk.Action(gobject.GInterface): |
atk.Action
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
AtkActions. 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.
def do_action(i
)
| the action index corresponding to the action to be performed |
Returns : | True if success,
False otherwise |
Perform the specified action on the object.
def get_n_actions()
Returns : | a the number of actions, or 0 if
action does not implement this
interface. |
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.
def get_description(i
)
| the action index corresponding to the action to be performed |
Returns : | a description string, or
None if action does not
implement this interface. |
Returns a description of the specified action of the object.
def get_name(i
)
| the action index corresponding to the action to be performed |
Returns : | a name string, or None if
action does not implement this
interface. |
Returns the name of the specified action of the object.
def get_keybinding(i
)
| the action index corresponding to the action to be performed |
Returns : | a string representing the keybinding, or
None if there is no keybinding for this
action. |
Returns a keybinding associated with this action, if one exists.
© manpagez.com 2000-2024 Individual documents may contain additional copyright information.