GtkRevealer — Hide and show with animation
GtkWidget * | gtk_revealer_new () |
gboolean | gtk_revealer_get_reveal_child () |
void | gtk_revealer_set_reveal_child () |
gboolean | gtk_revealer_get_child_revealed () |
guint | gtk_revealer_get_transition_duration () |
void | gtk_revealer_set_transition_duration () |
GtkRevealerTransitionType | gtk_revealer_get_transition_type () |
void | gtk_revealer_set_transition_type () |
gboolean | child-revealed | Read |
gboolean | reveal-child | Read / Write / Construct |
guint | transition-duration | Read / Write / Construct |
GtkRevealerTransitionType | transition-type | Read / Write / Construct |
struct | GtkRevealer |
struct | GtkRevealerClass |
enum | GtkRevealerTransitionType |
GObject ╰── GInitiallyUnowned ╰── GtkWidget ╰── GtkContainer ╰── GtkBin ╰── GtkRevealer
GtkRevealer implements AtkImplementorIface and GtkBuildable.
#include <gtk/gtk.h>
The GtkRevealer widget is a container which animates the transition of its child from invisible to visible.
The style of transition can be controlled with gtk_revealer_set_transition_type()
.
These animations respect the “gtk-enable-animations” setting.
GtkRevealer has a single CSS node with name revealer.
The GtkRevealer widget was added in GTK+ 3.10.
GtkWidget *
gtk_revealer_new (void
);
Creates a new GtkRevealer.
a newly created GtkRevealer
Since: 3.10
gboolean
gtk_revealer_get_reveal_child (GtkRevealer *revealer
);
Returns whether the child is currently revealed. See gtk_revealer_set_reveal_child()
.
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 gtk_revealer_get_child_revealed()
.
revealer |
TRUE
if the child is revealed.
Since: 3.10
void gtk_revealer_set_reveal_child (GtkRevealer *revealer
,gboolean reveal_child
);
Tells the GtkRevealer to reveal or conceal its child.
The transition will be animated with the current transition type of revealer
.
revealer | ||
reveal_child |
|
Since: 3.10
gboolean
gtk_revealer_get_child_revealed (GtkRevealer *revealer
);
Returns whether the child is fully revealed, in other words whether the transition to the revealed state is completed.
revealer |
TRUE
if the child is fully revealed
Since: 3.10
guint
gtk_revealer_get_transition_duration (GtkRevealer *revealer
);
Returns the amount of time (in milliseconds) that transitions will take.
revealer |
the transition duration
Since: 3.10
void gtk_revealer_set_transition_duration (GtkRevealer *revealer
,guint duration
);
Sets the duration that transitions will take.
revealer | ||
duration | the new duration, in milliseconds |
Since: 3.10
GtkRevealerTransitionType
gtk_revealer_get_transition_type (GtkRevealer *revealer
);
Gets the type of animation that will be used for transitions in revealer
.
revealer |
the current transition type of revealer
Since: 3.10
void gtk_revealer_set_transition_type (GtkRevealer *revealer
,GtkRevealerTransitionType transition
);
Sets the type of animation that will be used for transitions in revealer
. Available types include various kinds of fades and slides.
revealer | ||
transition | the new transition type |
Since: 3.10
struct GtkRevealer;
struct GtkRevealerClass { GtkBinClass parent_class; };
These enumeration values describe the possible transitions when the child of a GtkRevealer widget is shown or hidden.
GTK_REVEALER_TRANSITION_TYPE_NONE | No transition | |
GTK_REVEALER_TRANSITION_TYPE_CROSSFADE | Fade in | |
GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT | Slide in from the left | |
GTK_REVEALER_TRANSITION_TYPE_SLIDE_LEFT | Slide in from the right | |
GTK_REVEALER_TRANSITION_TYPE_SLIDE_UP | Slide in from the bottom | |
GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN | Slide in from the top |
“child-revealed”
property“child-revealed” gboolean
Whether the child is revealed and the animation target reached.
Owner: GtkRevealer
Flags: Read
Default value: FALSE
“reveal-child”
property“reveal-child” gboolean
Whether the container should reveal the child.
Owner: GtkRevealer
Flags: Read / Write / Construct
Default value: FALSE
“transition-duration”
property“transition-duration” guint
The animation duration, in milliseconds.
Owner: GtkRevealer
Flags: Read / Write / Construct
Default value: 250
“transition-type”
property“transition-type” GtkRevealerTransitionType
The type of animation used to transition.
Owner: GtkRevealer
Flags: Read / Write / Construct
Default value: GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN
© 2005–2020 The GNOME Project
Licensed under the GNU Lesser General Public License version 2.1 or later.
https://developer.gnome.org/gtk3/3.24/GtkRevealer.html