Gnome::Gtk4::Revealer
Description
A Gnome::Gtk4::Revealer animates the transition of its child from invisible to visible.
The style of transition can be controlled with .set-transition-type()
.
These animations respect the gtk-enable-animations defined in Gnome::Gtk4::Settings setting.
CSS nodes
Gnome::Gtk4::Revealer has a single CSS node with name revealer. When styling Gnome::Gtk4::Revealer using CSS, remember that it only hides its contents, not itself. That means applied margin, padding and borders will be visible even when the reveal-child property is set to False
.
Accessibility
Gnome::Gtk4::Revealer uses the GTK_ACCESSIBLE_ROLE_GROUP
role.
The child of Gnome::Gtk4::Revealer, if set, is always available in the accessibility tree, regardless of the state of the revealer widget.
Class initialization
new
:native-object
Create an object using a native object from elsewhere. See also Gnome::N::TopLevelSupportClass.
multi method new ( N-Object :$native-object! )
new-revealer
Creates a new Gnome::Gtk4::Revealer.
method new-revealer ( --> Gnome::Gtk4::Revealer \)
Methods
get-child
Gets the child widget of $revealer
.
method get-child (--> N-Object )
Return value; the child widget of $revealer
.
get-child-revealed
Returns whether the child is fully revealed.
In other words, this returns whether the transition to the revealed state is completed.
method get-child-revealed (--> Bool )
Return value; True
if the child is fully revealed.
get-reveal-child
Returns whether the child is currently revealed.
This function returns True
as soon as the transition is to the revealed state is started. To learn whether the child is fully revealed (ie the transition is completed), use .get-child-revealed()
.
method get-reveal-child (--> Bool )
Return value; True
if the child is revealed..
get-transition-duration
Returns the amount of time (in milliseconds) that transitions will take.
method get-transition-duration (--> UInt )
Return value; the transition duration.
get-transition-type
Gets the type of animation that will be used for transitions in $revealer
.
method get-transition-type (--> GtkRevealerTransitionType )
Return value; the current transition type of $revealer
.
set-child
Sets the child widget of $revealer
.
method set-child ( N-Object() $child )
$child; the child widget.
set-reveal-child
Tells the Gnome::Gtk4::Revealer to reveal or conceal its child.
The transition will be animated with the current transition type of $revealer
.
method set-reveal-child ( Bool() $reveal-child )
$reveal-child;
True
to reveal the child.
set-transition-duration
Sets the duration that transitions will take.
method set-transition-duration ( UInt() $duration )
$duration; the new duration, in milliseconds.
set-transition-type
Sets the type of animation that will be used for transitions in $revealer
.
Available types include various kinds of fades and slides.
method set-transition-type ( GtkRevealerTransitionType $transition )
$transition; the new transition type.