Top | Description | Object Hierarchy | Implemented Interfaces | Properties | ![]() |
![]() |
![]() |
![]() |
#include <gtk/gtk.h> struct GtkRevealer; GtkWidget * gtk_revealer_new (void
); gboolean gtk_revealer_get_reveal_child (GtkRevealer *revealer
); void gtk_revealer_set_reveal_child (GtkRevealer *revealer
,gboolean reveal_child
); gboolean gtk_revealer_get_child_revealed (GtkRevealer *revealer
); guint gtk_revealer_get_transition_duration (GtkRevealer *revealer
); void gtk_revealer_set_transition_duration (GtkRevealer *revealer
,guint duration
); enum GtkRevealerTransitionType; GtkRevealerTransitionType gtk_revealer_get_transition_type (GtkRevealer *revealer
); void gtk_revealer_set_transition_type (GtkRevealer *revealer
,GtkRevealerTransitionType transition
);
GObject +----GInitiallyUnowned +----GtkWidget +----GtkContainer +----GtkBin +----GtkRevealer
"child-revealed" gboolean : Read "reveal-child" gboolean : Read / Write / Construct "transition-duration" guint : Read / Write / Construct "transition-type" GtkRevealerTransitionType : Read / Write / Construct
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.
The GtkRevealer widget was added in GTK+ 3.10.
GtkWidget * gtk_revealer_new (void
);
Creates a new GtkRevealer.
Returns : |
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()
.
|
a GtkRevealer |
Returns : |
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
.
|
a GtkRevealer |
|
TRUE to reveal the child |
Since 3.10
gboolean gtk_revealer_get_child_revealed (GtkRevealer *revealer
);
Returns whether the child is fully revealed, ie wether the transition to the revealed state is completed.
|
a GtkRevealer |
Returns : |
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.
|
a GtkRevealer |
Returns : |
the transition duration |
Since 3.10
void gtk_revealer_set_transition_duration (GtkRevealer *revealer
,guint duration
);
Sets the duration that transitions will take.
|
a GtkRevealer |
|
the new duration, in milliseconds |
Since 3.10
typedef enum { GTK_REVEALER_TRANSITION_TYPE_NONE, GTK_REVEALER_TRANSITION_TYPE_CROSSFADE, GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT, GTK_REVEALER_TRANSITION_TYPE_SLIDE_LEFT, GTK_REVEALER_TRANSITION_TYPE_SLIDE_UP, GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN } GtkRevealerTransitionType;
These enumeration values describe the possible transitions when the child of a GtkRevealer widget is shown or hidden.
No transition | |
Fade in | |
Slide in from the left | |
Slide in from the right | |
Slide in from the bottom | |
Slide in from the top |
GtkRevealerTransitionType gtk_revealer_get_transition_type
(GtkRevealer *revealer
);
Gets the type of animation that will be used
for transitions in revealer
.
|
a GtkRevealer |
Returns : |
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.
|
a GtkRevealer |
|
the new transition type |
Since 3.10
"child-revealed"
property "child-revealed" gboolean : Read
Whether the child is revealed and the animation target reached.
Default value: FALSE
"reveal-child"
property "reveal-child" gboolean : Read / Write / Construct
Whether the container should reveal the child.
Default value: FALSE
"transition-duration"
property "transition-duration" guint : Read / Write / Construct
The animation duration, in milliseconds.
Default value: 250
"transition-type"
property"transition-type" GtkRevealerTransitionType : Read / Write / Construct
The type of animation used to transition.
Default value: GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN