Class Revealer

All Implemented Interfaces:
PointerInterface

public class Revealer extends Widget
A `GtkRevealer` animates the transition of its child from invisible to visible.

The style of transition can be controlled with
[method@Gtk.Revealer.set_transition_type].

These animations respect the [property@Gtk.Settings: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 [property@Gtk.Revealer:reveal-child] property is set to %FALSE.

# Accessibility

`GtkRevealer` uses the %GTK_ACCESSIBLE_ROLE_GROUP role.

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

https://docs.gtk.org/gtk4/class.Revealer.html

  • Constructor Details

    • Revealer

      public Revealer(PointerContainer pointer)
    • Revealer

      public Revealer()
      Creates a new `GtkRevealer`.
  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • getChild

      public Widget getChild()
      Gets the child widget of @revealer.
      Returns:
      the child widget of @revealer
    • getChildRevealed

      public boolean getChildRevealed()
      Returns whether the child is fully revealed.

      In other words, this returns whether the transition
      to the revealed state is completed.
      Returns:
      %TRUE if the child is fully revealed
    • getRevealChild

      public boolean getRevealChild()
      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 [method@Gtk.Revealer.get_child_revealed].
      Returns:
      %TRUE if the child is revealed.
    • getTransitionDuration

      public int getTransitionDuration()
      Returns the amount of time (in milliseconds) that
      transitions will take.
      Returns:
      the transition duration
    • getTransitionType

      public int getTransitionType()
      Gets the type of animation that will be used
      for transitions in @revealer.
      Returns:
      the current transition type of @revealer
    • setChild

      public void setChild(@Nullable Widget child)
      Sets the child widget of @revealer.
      Parameters:
      child - the child widget
    • setRevealChild

      public void setRevealChild(boolean reveal_child)
      Tells the `GtkRevealer` to reveal or conceal its child.

      The transition will be animated with the current
      transition type of @revealer.
      Parameters:
      reveal_child - %TRUE to reveal the child
    • setTransitionDuration

      public void setTransitionDuration(int duration)
      Sets the duration that transitions will take.
      Parameters:
      duration - the new duration, in milliseconds
    • setTransitionType

      public void setTransitionType(int transition)
      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
    • asAccessible

      public Accessible asAccessible()
      Implements interface Accessible. Call this to get access to interface functions.
      Overrides:
      asAccessible in class Widget
      Returns:
      Accessible
    • asBuildable

      public Buildable asBuildable()
      Implements interface Buildable. Call this to get access to interface functions.
      Overrides:
      asBuildable in class Widget
      Returns:
      Buildable
    • asConstraintTarget

      public ConstraintTarget asConstraintTarget()
      Implements interface ConstraintTarget. Call this to get access to interface functions.
      Overrides:
      asConstraintTarget in class Widget
      Returns:
      ConstraintTarget
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()