Module: Atk::Component

Defined in:
(unknown)

Overview

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 have Atk::Component implementations provided for their corresponding Atk::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.

Instance Method Summary collapse

Instance Method Details

#add_focus_handler(component, handler) ⇒ Integer

or zero if the handler was already added.

Parameters:

  • component (Atk::Component)

    The Atk::Component to attach the handler to

  • handler (Atk::FocusHandler)

    The Atk::FocusHandler to be attached to component

Returns:

  • (Integer)

    a handler id which can be used in atk_component_remove_focus_handler()

#alphaFloat

Returns the alpha value (i.e. the opacity) for this component, on a scale from 0 (fully transparent) to 1.0 (fully opaque).

Returns:

  • (Float)

    An alpha value from 0 to 1.0, inclusive.

#bounds_changed(component, bounds) ⇒ nil

Parameters:

Returns:

  • (nil)

#contains(component, x, y, coord_type) ⇒ TrueClass

or to the components top level window the extent of the component or not

Parameters:

  • component (Atk::Component)

    the Atk::Component

  • x (Integer)

    x coordinate

  • y (Integer)

    y coordinate

  • coord_type (Atk::CoordType)

    specifies whether the coordinates are relative to the screen

Returns:

  • (TrueClass)

    true or false indicating whether the specified point is within

#get_alpha(component) ⇒ Float

Returns An alpha value from 0 to 1.0, inclusive.

Parameters:

Returns:

  • (Float)

    An alpha value from 0 to 1.0, inclusive.

#get_extents(component, x, y, width, height, coord_type) ⇒ nil

or to the components top level window

Parameters:

  • component (Atk::Component)

    an Atk::Component

  • x (Integer)

    address of #gint to put x coordinate

  • y (Integer)

    address of #gint to put y coordinate

  • width (Integer)

    address of #gint to put width

  • height (Integer)

    address of #gint to put height

  • coord_type (Atk::CoordType)

    specifies whether the coordinates are relative to the screen

Returns:

  • (nil)

#get_layer(component) ⇒ Atk::Layer

Returns an Atk::Layer which is the layer of the component.

Parameters:

Returns:

  • (Atk::Layer)

    an Atk::Layer which is the layer of the component

#get_mdi_zorder(component) ⇒ Integer

which the component is shown in relation to other components in the same container.

Parameters:

Returns:

  • (Integer)

    a gint which is the zorder of the component, i.e. the depth at

#get_position(component, x, y, coord_type) ⇒ nil

or to the components top level window

Parameters:

  • component (Atk::Component)

    an Atk::Component

  • x (Integer)

    address of #gint to put x coordinate position

  • y (Integer)

    address of #gint to put y coordinate position

  • coord_type (Atk::CoordType)

    specifies whether the coordinates are relative to the screen

Returns:

  • (nil)

#get_size(component, width, height) ⇒ nil

Parameters:

  • component (Atk::Component)

    an Atk::Component

  • width (Integer)

    address of #gint to put width of component

  • height (Integer)

    address of #gint to put height of component

Returns:

  • (nil)

#grab_focus(component) ⇒ TrueClass

Returns true if successful, false otherwise.

Parameters:

Returns:

  • (TrueClass)

    true if successful, false otherwise.

#layerAtk::Layer

Gets the layer of the component.

Returns:

  • (Atk::Layer)

    an Atk::Layer which is the layer of the component

#mdi_zorderInteger

Gets the zorder of the component. The value G_MININT will be returned if the layer of the component is not ATK_LAYER_MDI or ATK_LAYER_WINDOW. which the component is shown in relation to other components in the same container.

Returns:

  • (Integer)

    a gint which is the zorder of the component, i.e. the depth at

#ref_accessible_at_point(component, x, y, coord_type) ⇒ Atk::Object

or to the components top level window child, if one exists

Parameters:

  • component (Atk::Component)

    the Atk::Component

  • x (Integer)

    x coordinate

  • y (Integer)

    y coordinate

  • coord_type (Atk::CoordType)

    specifies whether the coordinates are relative to the screen

Returns:

#remove_focus_handler(component, handler_id) ⇒ nil

from component

Parameters:

  • component (Atk::Component)

    the Atk::Component to remove the focus handler from

  • handler_id (Integer)

    the handler id of the focus handler to be removed

Returns:

  • (nil)

#scroll_to(component, type) ⇒ TrueClass

Returns whether scrolling was successful.

Parameters:

Returns:

  • (TrueClass)

    whether scrolling was successful.

#scroll_to_point(component, coords, x, y) ⇒ TrueClass

parent object.

Parameters:

  • component (Atk::Component)

    an Atk::Component

  • coords (Atk::CoordType)

    specify whether coordinates are relative to the screen or to the

  • x (Integer)

    x-position where to scroll to

  • y (Integer)

    y-position where to scroll to

Returns:

  • (TrueClass)

    whether scrolling was successful.

#set_extents(component, x, y, width, height, coord_type) ⇒ TrueClass

or to the components top level window

Parameters:

  • component (Atk::Component)

    an Atk::Component

  • x (Integer)

    x coordinate

  • y (Integer)

    y coordinate

  • width (Integer)

    width to set for component

  • height (Integer)

    height to set for component

  • coord_type (Atk::CoordType)

    specifies whether the coordinates are relative to the screen

Returns:

  • (TrueClass)

    true or false whether the extents were set or not

#set_position(component, x, y, coord_type) ⇒ TrueClass

or to the component’s top level window

Parameters:

  • component (Atk::Component)

    an Atk::Component

  • x (Integer)

    x coordinate

  • y (Integer)

    y coordinate

  • coord_type (Atk::CoordType)

    specifies whether the coordinates are relative to the screen

Returns:

  • (TrueClass)

    true or false whether or not the position was set or not

#set_size(component, width, height) ⇒ TrueClass

Returns true or false whether the size was set or not.

Parameters:

  • component (Atk::Component)

    an Atk::Component

  • width (Integer)

    width to set for component

  • height (Integer)

    height to set for component

Returns:

  • (TrueClass)

    true or false whether the size was set or not