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


Public Member Functions
Xfc::Atk::Component Class Reference

An AtkComponent C++ wrapper class. More...

#include <xfc/atk/component.hh>

Inheritance diagram for Xfc::Atk::Component:
Xfc::G::TypeInterface Xfc::G::TypeInstance Xfc::Trackable

List of all members.

Public Member Functions

Accessors

Protected Member Functions

Constructors

Detailed Description

An AtkComponent C++ wrapper class.

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 Component implementations provided for their corresponding 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 Text.


Member Function Documentation

unsigned int Xfc::Atk::Component::add_focus_handler ( AtkFocusHandler  handler)

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

Parameters:
handlerThe AtkFocusHandler to be attached to the component.
Returns:
A handler id which can be used in remove_focus_handler(), or zero if the handler was already added.

If the handler is already added it is not added again.

bool Xfc::Atk::Component::contains ( int  x,
int  y,
CoordType  coord_type 
) const

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

Parameters:
xThe X coordinate.
yThe Y coordinate.
coord_typeSpecifies whether the coordinates are relative to the screen or to the components top level window.
Returns:
true if the specified point is within the extent of the component, false if not.
void Xfc::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:
xThe return location to store the x coordinate of the component.
yThe return location to store the y coordinate of the component.
widthThe return location for the width of the component.
heightThe return location for the height of the component.
coord_typeSpecifies whether the coordinates are relative to the screen or to the components top level window

Gets the layer of the component.

Returns:
A Layer which is the layer of the component.

Gets the zorder of the component.

Returns:
An integer 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.

The value G_MININT will be returned if the layer of the component is not LAYER_MDI or LAYER_WINDOW.

void Xfc::Atk::Component::get_position ( int *  x,
int *  y,
CoordType  coord_type 
) const

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

Parameters:
xThe return location to store the x coordinate of the component.
yThe return location to store the y coordinate of the component.
coord_typeSpecifies whether the coordinates are relative to the screen or to the components top level window.
void Xfc::Atk::Component::get_size ( int *  width,
int *  height 
) const

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

Parameters:
widthThe return location for the width of the component.
heightThe return location for the height of the component.

Grabs the focus for the component.

Returns:
true if successful, false otherwise.
Object* Xfc::Atk::Component::ref_accessible_at_point ( int  x,
int  y,
CoordType  coord_type 
) const

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

Parameters:
xThe X coordinate.
yThe Y coordinate.
coord_typeSpecifies whether the coordinates are relative to the screen or to the components top level window.
Returns:
A pointer to the accessible child, if one exists.
void Xfc::Atk::Component::remove_focus_handler ( unsigned int  handler_id)

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

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

Sets the extents of the component.

Parameters:
xThe X coordinate.
yThe Y coordinate.
widthThe width to set for the component.
heightThe height to set for the component.
coord_typeSpecifies whether the coordinates are relative to the screen or to the components top level window.
Returns:
true if the extents were set, false if not.
bool Xfc::Atk::Component::set_position ( int  x,
int  y,
CoordType  coord_type 
)

Sets the postition of the component.

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

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

Parameters:
widthThe width to set for the component.
heightThe height to set for the component.
Returns:
true if the size was set, false if not.

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