Atk.Component¶
- Implementations:
Methods¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Properties¶
None
Signals¶
Name |
Short Description |
---|---|
The ‘bounds-changed” signal is emitted when the position or size of the component changes. |
Fields¶
None
Class Details¶
- class Atk.Component¶
- Bases:
- Structure:
The ATK interface provided by UI components which occupy a physical area on the screen. which the user can activate/interact with.
Atk.Component
should be implemented by most if not all UI elements with an actual on-screen presence, i.e. components which can be said to have a screen-coordinate bounding box. Virtually all widgets will need to haveAtk.Component
implementations provided for their correspondingAtk.Object
class. In short, only UI elements which are *not* GUI elements will omit this ATK interface.A possible exception might be textual information with a transparent background, in which case text glyph bounding box information is provided by
Atk.Text
.- contains(x, y, coord_type)[source]¶
- Parameters:
x (
int
) – x coordinatey (
int
) – y coordinatecoord_type (
Atk.CoordType
) – specifies whether the coordinates are relative to the screen or to the components top level window
- Returns:
True
orFalse
indicating whether the specified point is within the extent of the self or not- Return type:
Checks whether the specified point is within the extent of the self.
Toolkit implementor note: ATK provides a default implementation for this virtual method. In general there are little reason to re-implement it.
- get_alpha()[source]¶
- Returns:
An alpha value from 0 to 1.0, inclusive.
- Return type:
Returns the alpha value (i.e. the opacity) for this self, on a scale from 0 (fully transparent) to 1.0 (fully opaque).
New in version 1.12.
- get_extents(coord_type)[source]¶
- Parameters:
coord_type (
Atk.CoordType
) – specifies whether the coordinates are relative to the screen or to the components top level window- Returns:
- Return type:
Gets the rectangle which gives the extent of the self.
If the extent can not be obtained (e.g. a non-embedded plug or missing support), all of x, y, width, height are set to -1.
- get_mdi_zorder()[source]¶
- Returns:
a
int
which is the zorder of the component, i.e. the depth at which the component is shown in relation to other components in the same container.- Return type:
Gets the zorder of the component. The value
GObject.G_MININT
will be returned if the layer of the component is notAtk.Layer.MDI
orAtk.Layer.WINDOW
.
- get_position(coord_type)[source]¶
- Parameters:
coord_type (
Atk.CoordType
) – specifies whether the coordinates are relative to the screen or to the components top level window- Returns:
- Return type:
Gets the position of self in the form of a point specifying self's top-left corner.
If the position can not be obtained (e.g. a non-embedded plug or missing support), x and y are set to -1.
Deprecated since version 2.12: Use
Atk.Component.get_extents
() instead.
- get_size()[source]¶
- Returns:
- Return type:
Gets the size of the self in terms of width and height.
If the size can not be obtained (e.g. a non-embedded plug or missing support), width and height are set to -1.
Deprecated since version 2.12: Use
Atk.Component.get_extents
() instead.
- ref_accessible_at_point(x, y, coord_type)[source]¶
- Parameters:
x (
int
) – x coordinatey (
int
) – y coordinatecoord_type (
Atk.CoordType
) – specifies whether the coordinates are relative to the screen or to the components top level window
- Returns:
a reference to the accessible child, if one exists
- Return type:
Atk.Object
orNone
Gets a reference to the accessible child, if one exists, at the coordinate point specified by x and y.
- remove_focus_handler(handler_id)[source]¶
- Parameters:
handler_id (
int
) – the handler id of the focus handler to be removed from self
Remove the handler specified by handler_id from the list of functions to be executed when this object receives focus events (in or out).
Deprecated since version 2.9.4: If you need to track when an object gains or lose the focus, use the
Atk.Object
::state-change
“focused” notification instead.
- scroll_to(type)[source]¶
- Parameters:
type (
Atk.ScrollType
) – specify where the object should be made visible.- Returns:
whether scrolling was successful.
- Return type:
Makes self visible on the screen by scrolling all necessary parents.
Contrary to
Atk.Component.set_position
, this does not actually move self in its parent, this only makes the parents scroll so that the object shows up on the screen, given its current position within the parents.New in version 2.30.
- scroll_to_point(coords, x, y)[source]¶
- Parameters:
coords (
Atk.CoordType
) – specify whether coordinates are relative to the screen or to the parent object.x (
int
) – x-position where to scroll toy (
int
) – y-position where to scroll to
- Returns:
whether scrolling was successful.
- Return type:
Move the top-left of self to a given position of the screen by scrolling all necessary parents.
New in version 2.30.
- set_extents(x, y, width, height, coord_type)[source]¶
- Parameters:
x (
int
) – x coordinatey (
int
) – y coordinatewidth (
int
) – width to set for selfheight (
int
) – height to set for selfcoord_type (
Atk.CoordType
) – specifies whether the coordinates are relative to the screen or to the components top level window
- Returns:
- Return type:
Sets the extents of self.
- set_position(x, y, coord_type)[source]¶
- Parameters:
x (
int
) – x coordinatey (
int
) – y coordinatecoord_type (
Atk.CoordType
) – specifies whether the coordinates are relative to the screen or to the component’s top level window
- Returns:
- Return type:
Sets the position of self.
Contrary to
Atk.Component.scroll_to
, this does not trigger any scrolling, this just moves self in its parent.
- set_size(width, height)[source]¶
- Parameters:
- Returns:
- Return type:
Set the size of the self in terms of width and height.
- do_bounds_changed(bounds) virtual¶
- Parameters:
bounds (
Atk.Rectangle
) –
- do_contains(x, y, coord_type) virtual¶
- Parameters:
x (
int
) – x coordinatey (
int
) – y coordinatecoord_type (
Atk.CoordType
) – specifies whether the coordinates are relative to the screen or to the components top level window
- Returns:
True
orFalse
indicating whether the specified point is within the extent of the component or not- Return type:
Checks whether the specified point is within the extent of the component.
Toolkit implementor note: ATK provides a default implementation for this virtual method. In general there are little reason to re-implement it.
- do_get_alpha() virtual¶
- Returns:
An alpha value from 0 to 1.0, inclusive.
- Return type:
Returns the alpha value (i.e. the opacity) for this component, on a scale from 0 (fully transparent) to 1.0 (fully opaque).
New in version 1.12.
- do_get_extents(coord_type) virtual¶
- Parameters:
coord_type (
Atk.CoordType
) – specifies whether the coordinates are relative to the screen or to the components top level window- Returns:
- Return type:
Gets the rectangle which gives the extent of the component.
If the extent can not be obtained (e.g. a non-embedded plug or missing support), all of x, y, width, height are set to -1.
- do_get_layer() virtual¶
-
Gets the layer of the component.
- do_get_mdi_zorder() virtual¶
- Returns:
a
int
which is the zorder of the component, i.e. the depth at which the component is shown in relation to other components in the same container.- Return type:
Gets the zorder of the component. The value
GObject.G_MININT
will be returned if the layer of the component is notAtk.Layer.MDI
orAtk.Layer.WINDOW
.
- do_get_position(coord_type) virtual¶
- Parameters:
coord_type (
Atk.CoordType
) – specifies whether the coordinates are relative to the screen or to the components top level window- Returns:
- Return type:
Gets the position of component in the form of a point specifying component's top-left corner.
If the position can not be obtained (e.g. a non-embedded plug or missing support), x and y are set to -1.
Deprecated since version 2.12: Use
Atk.Component.get_extents
() instead.
- do_get_size() virtual¶
- Returns:
- Return type:
Gets the size of the component in terms of width and height.
If the size can not be obtained (e.g. a non-embedded plug or missing support), width and height are set to -1.
Deprecated since version 2.12: Use
Atk.Component.get_extents
() instead.
- do_grab_focus() virtual¶
-
Grabs focus for this component.
- do_ref_accessible_at_point(x, y, coord_type) virtual¶
- Parameters:
x (
int
) – x coordinatey (
int
) – y coordinatecoord_type (
Atk.CoordType
) – specifies whether the coordinates are relative to the screen or to the components top level window
- Returns:
a reference to the accessible child, if one exists
- Return type:
Atk.Object
orNone
Gets a reference to the accessible child, if one exists, at the coordinate point specified by x and y.
- do_remove_focus_handler(handler_id) virtual¶
- Parameters:
handler_id (
int
) – the handler id of the focus handler to be removed from component
Remove the handler specified by handler_id from the list of functions to be executed when this object receives focus events (in or out).
Deprecated since version 2.9.4: If you need to track when an object gains or lose the focus, use the
Atk.Object
::state-change
“focused” notification instead.
- do_scroll_to(type) virtual¶
- Parameters:
type (
Atk.ScrollType
) – specify where the object should be made visible.- Returns:
whether scrolling was successful.
- Return type:
Makes component visible on the screen by scrolling all necessary parents.
Contrary to
Atk.Component.set_position
, this does not actually move component in its parent, this only makes the parents scroll so that the object shows up on the screen, given its current position within the parents.New in version 2.30.
- do_scroll_to_point(coords, x, y) virtual¶
- Parameters:
coords (
Atk.CoordType
) – specify whether coordinates are relative to the screen or to the parent object.x (
int
) – x-position where to scroll toy (
int
) – y-position where to scroll to
- Returns:
whether scrolling was successful.
- Return type:
Move the top-left of component to a given position of the screen by scrolling all necessary parents.
New in version 2.30.
- do_set_extents(x, y, width, height, coord_type) virtual¶
- Parameters:
x (
int
) – x coordinatey (
int
) – y coordinatewidth (
int
) – width to set for componentheight (
int
) – height to set for componentcoord_type (
Atk.CoordType
) – specifies whether the coordinates are relative to the screen or to the components top level window
- Returns:
- Return type:
Sets the extents of component.
- do_set_position(x, y, coord_type) virtual¶
- Parameters:
x (
int
) – x coordinatey (
int
) – y coordinatecoord_type (
Atk.CoordType
) – specifies whether the coordinates are relative to the screen or to the component’s top level window
- Returns:
- Return type:
Sets the position of component.
Contrary to
Atk.Component.scroll_to
, this does not trigger any scrolling, this just moves component in its parent.
Signal Details¶
- Atk.Component.signals.bounds_changed(component, arg1)¶
- Signal Name:
bounds-changed
- Flags:
- Parameters:
component (
Atk.Component
) – The object which received the signalarg1 (
Atk.Rectangle
) – TheAtk.Rectangle
giving the new position and size.
The ‘bounds-changed” signal is emitted when the position or size of the component changes.