GFC Logo GFC Title Logo
Reference Manual
Main Page  |  Namespace List  |  Alphabetical List  |  Class List  |  File List

GFC::Atk::Component Class Reference

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

#include <gfc/atk/component.hh>

Inheritance diagram for GFC::Atk::Component:

GFC::G::TypeInterface GFC::G::TypeInstance GFC::Trackable List of all members.

Public Member Functions

Accessors
Methods

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 GFC::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 GFC::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.

void GFC::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

Layer GFC::Atk::Component::get_layer  )  const
 

Gets the layer of the component.

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

int GFC::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.

void GFC::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 GFC::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.

bool GFC::Atk::Component::grab_focus  ) 
 

Grabs the focus for the component.

Returns:
true if successful, false otherwise.

Object* GFC::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 GFC::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 GFC::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 GFC::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 GFC::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:
Generated on Tue Aug 24 00:34:34 2004 for GFC-UI by doxygen 1.3.8