Revealer#

class Revealer(**properties: Any)#

Superclasses: Widget, InitiallyUnowned, Object

Implemented Interfaces: Accessible, Buildable, ConstraintTarget

A GtkRevealer 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 setting.

CSS nodes#

GtkRevealer has a single CSS node with name revealer. When styling GtkRevealer 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#

GtkRevealer uses the GROUP role.

The child of GtkRevealer, if set, is always available in the accessibility tree, regardless of the state of the revealer widget.

Constructors#

class Revealer
classmethod new() Widget#

Creates a new GtkRevealer.

Methods#

class Revealer
get_child() Widget | None#

Gets the child widget of revealer.

get_child_revealed() bool#

Returns whether the child is fully revealed.

In other words, this returns whether the transition to the revealed state is completed.

get_reveal_child() bool#

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.

get_transition_duration() int#

Returns the amount of time (in milliseconds) that transitions will take.

get_transition_type() RevealerTransitionType#

Gets the type of animation that will be used for transitions in revealer.

set_child(child: Widget | None = None) None#

Sets the child widget of revealer.

Parameters:

child – the child widget

set_reveal_child(reveal_child: bool) None#

Tells the GtkRevealer to reveal or conceal its child.

The transition will be animated with the current transition type of revealer.

Parameters:

reveal_childTrue to reveal the child

set_transition_duration(duration: int) None#

Sets the duration that transitions will take.

Parameters:

duration – the new duration, in milliseconds

set_transition_type(transition: RevealerTransitionType) None#

Sets the type of animation that will be used for transitions in revealer.

Available types include various kinds of fades and slides.

Parameters:

transition – the new transition type

Properties#

class Revealer
props.child: Widget#

The type of the None singleton.

props.child_revealed: bool#

The type of the None singleton.

props.reveal_child: bool#

The type of the None singleton.

props.transition_duration: int#

The type of the None singleton.

props.transition_type: RevealerTransitionType#

The type of the None singleton.