[−][src]Trait atk::ComponentExt
Required methods
fn contains(&self, x: i32, y: i32, coord_type: CoordType) -> bool
Checks whether the specified point is within the extent of the self
.
Toolkit implementor note: ATK provides a default implementation for this virtual method. In general there are little reason to re-implement it.
x
x coordinate
y
y coordinate
coord_type
specifies 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 self
or not
fn get_alpha(&self) -> f64
Returns the alpha value (i.e. the opacity) for this
self
, on a scale from 0 (fully transparent) to 1.0
(fully opaque).
Returns
An alpha value from 0 to 1.0, inclusive.
fn get_extents(&self, coord_type: CoordType) -> (i32, i32, i32, i32)
Gets the rectangle which gives the extent of the self
.
x
address of gint
to put x coordinate
y
address of gint
to put y coordinate
width
address of gint
to put width
height
address of gint
to put height
coord_type
specifies whether the coordinates are relative to the screen or to the components top level window
fn get_layer(&self) -> Layer
fn get_mdi_zorder(&self) -> i32
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 gint 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.
fn get_position(&self, coord_type: CoordType) -> (i32, i32)
Gets the position of self
in the form of
a point specifying self
's top-left corner.
Deprecated
Since 2.12. Use Component::get_extents
instead.
x
address of gint
to put x coordinate position
y
address of gint
to put y coordinate position
coord_type
specifies whether the coordinates are relative to the screen or to the components top level window
fn get_size(&self) -> (i32, i32)
Gets the size of the self
in terms of width and height.
Deprecated
Since 2.12. Use Component::get_extents
instead.
width
address of gint
to put width of self
height
address of gint
to put height of self
fn grab_focus(&self) -> bool
fn ref_accessible_at_point(
&self,
x: i32,
y: i32,
coord_type: CoordType
) -> Option<Object>
&self,
x: i32,
y: i32,
coord_type: CoordType
) -> Option<Object>
Gets a reference to the accessible child, if one exists, at the
coordinate point specified by x
and y
.
x
x coordinate
y
y coordinate
coord_type
specifies 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
fn scroll_to(&self, type_: ScrollType) -> bool
Makes self
visible on the screen by scrolling all necessary parents.
Contrary to atk_component_set_position, this does not actually move
self
in its parent, this only makes the parents scroll so that the
object shows up on the screen, given its current position within the parents.
Feature: v2_30
type_
specify where the object should be made visible.
Returns
whether scrolling was successful.
fn scroll_to_point(&self, coords: CoordType, x: i32, y: i32) -> bool
Makes an object visible on the screen at a given position by scrolling all necessary parents.
Feature: v2_30
coords
specify whether coordinates are relative to the screen or to the parent object.
x
x-position where to scroll to
y
y-position where to scroll to
Returns
whether scrolling was successful.
fn set_extents(
&self,
x: i32,
y: i32,
width: i32,
height: i32,
coord_type: CoordType
) -> bool
&self,
x: i32,
y: i32,
width: i32,
height: i32,
coord_type: CoordType
) -> bool
Sets the extents of self
.
x
x coordinate
y
y coordinate
width
width to set for self
height
height to set for self
coord_type
specifies 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
fn set_position(&self, x: i32, y: i32, coord_type: CoordType) -> bool
Sets the position of self
.
Contrary to atk_component_scroll_to, this does not trigger any scrolling,
this just moves self
in its parent.
x
x coordinate
y
y coordinate
coord_type
specifies 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
fn set_size(&self, width: i32, height: i32) -> bool
Set the size of the self
in terms of width and height.
width
width to set for self
height
height to set for self
Returns
true
or false
whether the size was set or not
fn connect_bounds_changed<F: Fn(&Self, &Rectangle) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The 'bounds-changed" signal is emitted when the bposition or size of the component changes.
arg1
The AtkRectangle giving the new position and size.
Implementors
impl<O: IsA<Component>> ComponentExt for O
[src]
fn contains(&self, x: i32, y: i32, coord_type: CoordType) -> bool
[src]
fn get_alpha(&self) -> f64
[src]
fn get_extents(&self, coord_type: CoordType) -> (i32, i32, i32, i32)
[src]
fn get_layer(&self) -> Layer
[src]
fn get_mdi_zorder(&self) -> i32
[src]
fn get_position(&self, coord_type: CoordType) -> (i32, i32)
[src]
fn get_size(&self) -> (i32, i32)
[src]
fn grab_focus(&self) -> bool
[src]
fn ref_accessible_at_point(
&self,
x: i32,
y: i32,
coord_type: CoordType
) -> Option<Object>
[src]
&self,
x: i32,
y: i32,
coord_type: CoordType
) -> Option<Object>
fn scroll_to(&self, type_: ScrollType) -> bool
[src]
fn scroll_to_point(&self, coords: CoordType, x: i32, y: i32) -> bool
[src]
fn set_extents(
&self,
x: i32,
y: i32,
width: i32,
height: i32,
coord_type: CoordType
) -> bool
[src]
&self,
x: i32,
y: i32,
width: i32,
height: i32,
coord_type: CoordType
) -> bool
fn set_position(&self, x: i32, y: i32, coord_type: CoordType) -> bool
[src]
fn set_size(&self, width: i32, height: i32) -> bool
[src]
fn connect_bounds_changed<F: Fn(&Self, &Rectangle) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId