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


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
Methods

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

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:
x The X coordinate.
y The Y coordinate.
coord_type Specifies 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::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:
x The return location to store the x coordinate of the component.
y The return location to store the y coordinate of the component.
width The return location for the width of the component.
height The return location for the height of the component.
coord_type Specifies whether the coordinates are relative to the screen or to the components top level 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:
x The return location to store the x coordinate of the component.
y The return location to store the y coordinate of the component.
coord_type Specifies 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:
width The return location for the width of the component.
height The return location for the height of the component.

Layer Xfc::Atk::Component::get_layer (  )  const

Gets the layer of the component.

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

int Xfc::Atk::Component::get_mdi_zorder (  )  const

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.

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:
handler The 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:
x The X coordinate.
y The Y coordinate.
coord_type Specifies 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.

bool Xfc::Atk::Component::grab_focus (  ) 

Grabs the focus for the component.

Returns:
true if successful, false otherwise.

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_id The 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:
x The X coordinate.
y The Y coordinate.
width The width to set for the component.
height The height to set for the component.
coord_type Specifies 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:
x The X coordinate.
y The Y coordinate.
coord_type Specifies 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:
width The width to set for the component.
height The 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 4.3