atkmm  2.22.7
Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Functions | List of all members
Atk::Component Class Reference

The ATK interface provided by UI components which occupy a physical area on the screen. More...

#include <atkmm/component.h>

Inheritance diagram for Atk::Component:
Inheritance graph
[legend]

Public Member Functions

AtkComponent* gobj ()
 Provides access to the underlying C GObject.
 
const AtkComponent* gobj () const
 Provides access to the underlying C GObject.
 
guint add_focus_handler (AtkFocusHandler handler)
 Add the specified handler to the set of functions to be called when this object receives focus events (in or out). More...
 
bool contains (int x, int y, CoordType coord_type) const
 Checks whether the specified point is within the extent of the component. More...
 
Glib::RefPtr< Atk::Objectget_accessible_at_point (int x, int y, CoordType coord_type)
 Gets a reference to the accessible child, if one exists, at the coordinate point specified by x and y. More...
 
void get_extents (int& x, int& y, int& width, int& height, CoordType coord_type) const
 Gets the rectangle which gives the extent of the component. More...
 
void get_position (int& x, int& y, CoordType coord_type) const
 Gets the position of component in the form of a point specifying component's top-left corner. More...
 
void get_size (int& width, int& height) const
 Gets the size of the component in terms of width and height. More...
 
Layer get_layer () const
 Gets the layer of the component. More...
 
int get_mdi_zorder () const
 Gets the zorder of the component. More...
 
bool grab_focus ()
 Grabs focus for this component. More...
 
void remove_focus_handler (guint handler_id)
 Remove the handler specified by handler_id from the list of functions to be executed when this object receives focus events (in or out). More...
 
bool set_extents (int x, int y, int width, int height, CoordType coord_type)
 Sets the extents of component. More...
 
bool set_position (int x, int y, CoordType coord_type)
 Sets the postition of component. More...
 
bool set_size (int width, int height)
 Set the size of the component in terms of width and height. More...
 

Static Public Member Functions

static GType get_type ()
 Get the GType for this class, for use with the underlying GObject type system.
 

Protected Member Functions

 Component ()
 You should derive from this class to use it.
 

Related Functions

(Note that these are not member functions.)

Glib::RefPtr< Atk::Componentwrap (AtkComponent* object, bool take_copy=false)
 A Glib::wrap() method for this object. More...
 

Detailed Description

The ATK interface provided by UI components which occupy a physical area on the screen.

This 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.

Member Function Documentation

guint Atk::Component::add_focus_handler ( AtkFocusHandler  handler)

Add the specified handler to the set of functions to be called when this object receives focus events (in or out).

If the handler is already added it is not added again

Parameters
handlerThe Atk::FocusHandler to be attached to component.
Returns
A handler id which can be used in atk_component_remove_focus_handler or zero if the handler was already added.
bool Atk::Component::contains ( int  x,
int  y,
CoordType  coord_type 
) const

Checks whether the specified point is within the extent of the component.

Parameters
xX coordinate.
yY coordinate.
coord_typeSpecifies whether the coordinates are relative to the screen or to the components top level window.
Returns
true or false indicating whether the specified point is within the extent of the component or not.
Glib::RefPtr<Atk::Object> Atk::Component::get_accessible_at_point ( int  x,
int  y,
CoordType  coord_type 
)

Gets a reference to the accessible child, if one exists, at the coordinate point specified by x and y.

Parameters
xX coordinate.
yY coordinate.
coord_typeSpecifies 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.
void Atk::Component::get_extents ( int &  x,
int &  y,
int &  width,
int &  height,
CoordType  coord_type 
) const

Gets the rectangle which gives the extent of the component.

Parameters
xAddress of int to put x coordinate.
yAddress of int to put y coordinate.
widthAddress of int to put width.
heightAddress of int to put height.
coord_typeSpecifies whether the coordinates are relative to the screen or to the components top level window.
Layer Atk::Component::get_layer ( ) const

Gets the layer of the component.

Returns
An Atk::Layer which is the layer of the component.
int Atk::Component::get_mdi_zorder ( ) const

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.

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.
void Atk::Component::get_position ( int &  x,
int &  y,
CoordType  coord_type 
) const

Gets the position of component in the form of a point specifying component's top-left corner.

Parameters
xAddress of int to put x coordinate position.
yAddress of int to put y coordinate position.
coord_typeSpecifies whether the coordinates are relative to the screen or to the components top level window.
void Atk::Component::get_size ( int &  width,
int &  height 
) const

Gets the size of the component in terms of width and height.

Parameters
widthAddress of int to put width of component.
heightAddress of int to put height of component.
bool Atk::Component::grab_focus ( )

Grabs focus for this component.

Returns
true if successful, false otherwise.
void Atk::Component::remove_focus_handler ( guint  handler_id)

Remove the handler specified by handler_id from the list of functions to be executed when this object receives focus events (in or out).

Parameters
handler_idThe handler id of the focus handler to be removed from component.
bool Atk::Component::set_extents ( int  x,
int  y,
int  width,
int  height,
CoordType  coord_type 
)

Sets the extents of component.

Parameters
xX coordinate.
yY coordinate.
widthWidth to set for component.
heightHeight to set for component.
coord_typeSpecifies whether the coordinates are relative to the screen or to the components top level window.
Returns
true or false whether the extents were set or not.
bool Atk::Component::set_position ( int  x,
int  y,
CoordType  coord_type 
)

Sets the postition of component.

Parameters
xX coordinate.
yY coordinate.
coord_typeSpecifies whether the coordinates are relative to the screen or to the components top level window.
Returns
true or false whether or not the position was set or not.
bool Atk::Component::set_size ( int  width,
int  height 
)

Set the size of the component in terms of width and height.

Parameters
widthWidth to set for component.
heightHeight to set for component.
Returns
true or false whether the size was set or not.

Friends And Related Function Documentation

Glib::RefPtr< Atk::Component > wrap ( AtkComponent *  object,
bool  take_copy = false 
)
related

A Glib::wrap() method for this object.

Parameters
objectThe C instance.
take_copyFalse 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.