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:

Public Member Functions

 Component (Component&& src) noexcept
 
Componentoperator= (Component&& src) noexcept
 
 ~Component () noexcept override
 
AtkComponent* gobj ()
 Provides access to the underlying C GObject. More...

 
const AtkComponent* gobj () const
 Provides access to the underlying C GObject. 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...

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

 
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 position of component. More...

 
bool set_size (int width, int height)
 Set the size of the component in terms of width and height. More...

 
- Public Member Functions inherited from Glib::Interface
 Interface ()
 
 Interface (Interface &&src) noexcept
 
Interfaceoperator= (Interface &&src) noexcept
 
 Interface (const Glib::Interface_Class &interface_class)
 
 Interface (GObject *castitem)
 
 ~Interface () noexcept override
 
 Interface (const Interface &)=delete
 
Interfaceoperator= (const Interface &)=delete
 
GObject * gobj ()
 
const GObject * gobj () const
 
- Public Member Functions inherited from Glib::ObjectBase
 ObjectBase (const ObjectBase &)=delete
 
ObjectBaseoperator= (const ObjectBase &)=delete
 
void set_property_value (const Glib::ustring &property_name, const Glib::ValueBase &value)
 
void get_property_value (const Glib::ustring &property_name, Glib::ValueBase &value) const
 
void set_property (const Glib::ustring &property_name, const PropertyType &value)
 
void get_property (const Glib::ustring &property_name, PropertyType &value) const
 
PropertyType get_property (const Glib::ustring &property_name) const
 
sigc::connection connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void()> &slot)
 
sigc::connection connect_property_changed (const Glib::ustring &property_name, sigc::slot< void()> &&slot)
 
void freeze_notify ()
 
void thaw_notify ()
 
virtual void reference () const
 
virtual void unreference () const
 
GObject * gobj ()
 
const GObject * gobj () const
 
GObject * gobj_copy () const
 
- Public Member Functions inherited from sigc::trackable
 trackable () noexcept
 
 trackable (const trackable &src) noexcept
 
 trackable (trackable &&src) noexcept
 
 ~trackable ()
 
void add_destroy_notify_callback (notifiable *data, func_destroy_notify func) const
 
void notify_callbacks ()
 
trackableoperator= (const trackable &src)
 
trackableoperator= (trackable &&src) noexcept
 
void remove_destroy_notify_callback (notifiable *data) const
 

Static Public Member Functions

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

 

Protected Member Functions

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

 
virtual guint add_focus_handler_vfunc (AtkFocusHandler handler)
 
virtual bool contains_vfunc (int x, int y, CoordType coord_type) const
 
virtual Glib::RefPtr< Atk::Objectget_accessible_at_point_vfunc (int x, int y, CoordType coord_type)
 
virtual void get_extents_vfunc (int& x, int& y, int& width, int& height, CoordType coord_type) const
 
virtual Layer get_layer_vfunc () const
 
virtual int get_mdi_zorder_vfunc () const
 
virtual bool grab_focus_vfunc ()
 
virtual bool set_extents_vfunc (int x, int y, int width, int height, CoordType coord_type)
 
virtual bool set_position_vfunc (int x, int y, CoordType coord_type)
 
virtual bool set_size_vfunc (int width, int height)
 
- Protected Member Functions inherited from Glib::ObjectBase
 ObjectBase ()
 
 ObjectBase (const char *custom_type_name)
 
 ObjectBase (const std::type_info &custom_type_info)
 
 ObjectBase (ObjectBase &&src) noexcept
 
ObjectBaseoperator= (ObjectBase &&src) noexcept
 
virtual ~ObjectBase () noexcept=0
 
void initialize (GObject *castitem)
 
void initialize_move (GObject *castitem, Glib::ObjectBase *previous_wrapper)
 

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

 

Additional Inherited Members

- Public Types inherited from sigc::trackable
typedef internal::func_destroy_notify func_destroy_notify
 
- Public Types inherited from sigc::notifiable
typedef internal::func_destroy_notify func_destroy_notify
 

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.

Constructor & Destructor Documentation

Atk::Component::Component ( )
protected

You should derive from this class to use it.

Atk::Component::Component ( Component&&  src)
noexcept
Atk::Component::~Component ( )
overridenoexcept

Member Function Documentation

virtual guint Atk::Component::add_focus_handler_vfunc ( AtkFocusHandler  handler)
protectedvirtual
static void Atk::Component::add_interface ( GType  gtype_implementer)
static
bool Atk::Component::contains ( int  x,
int  y,
CoordType  coord_type 
) const

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

Toolkit implementor note: ATK provides a default implementation for this virtual method. In general there are little reason to re-implement it.

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.
virtual bool Atk::Component::contains_vfunc ( int  x,
int  y,
CoordType  coord_type 
) const
protectedvirtual
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.
virtual Glib::RefPtr<Atk::Object> Atk::Component::get_accessible_at_point_vfunc ( int  x,
int  y,
CoordType  coord_type 
)
protectedvirtual
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.

If the extent can not be obtained (e.g. a non-embedded plug or missing support), all of x, y, width, height are set to -1.

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.
virtual void Atk::Component::get_extents_vfunc ( int &  x,
int &  y,
int &  width,
int &  height,
CoordType  coord_type 
) const
protectedvirtual
Layer Atk::Component::get_layer ( ) const

Gets the layer of the component.

Returns
An Atk::Layer which is the layer of the component.
virtual Layer Atk::Component::get_layer_vfunc ( ) const
protectedvirtual
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.
virtual int Atk::Component::get_mdi_zorder_vfunc ( ) const
protectedvirtual
static GType Atk::Component::get_type ( )
static

Get the GType for this class, for use with the underlying GObject type system.

AtkComponent* Atk::Component::gobj ( )
inline

Provides access to the underlying C GObject.

const AtkComponent* Atk::Component::gobj ( ) const
inline

Provides access to the underlying C GObject.

bool Atk::Component::grab_focus ( )

Grabs focus for this component.

Returns
true if successful, false otherwise.
virtual bool Atk::Component::grab_focus_vfunc ( )
protectedvirtual
Component& Atk::Component::operator= ( Component&&  src)
noexcept
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.
virtual bool Atk::Component::set_extents_vfunc ( int  x,
int  y,
int  width,
int  height,
CoordType  coord_type 
)
protectedvirtual
bool Atk::Component::set_position ( int  x,
int  y,
CoordType  coord_type 
)

Sets the position of component.

Contrary to atk_component_scroll_to, this does not trigger any scrolling, this just moves component in its parent.

Parameters
xX coordinate.
yY coordinate.
coord_typeSpecifies whether the coordinates are relative to the screen or to the component's top level window.
Returns
true or false whether or not the position was set or not.
virtual bool Atk::Component::set_position_vfunc ( int  x,
int  y,
CoordType  coord_type 
)
protectedvirtual
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.
virtual bool Atk::Component::set_size_vfunc ( int  width,
int  height 
)
protectedvirtual

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.