Top |
gboolean | homogeneous | Read / Write |
gboolean | interpolate-size | Read / Write |
guint | transition-duration | Read / Write |
gboolean | transition-running | Read |
HdySqueezerTransitionType | transition-type | Read / Write |
GtkWidget * | visible-child | Read |
#define | HDY_TYPE_SQUEEZER |
enum | HdySqueezerTransitionType |
struct | HdySqueezerClass |
HdySqueezer |
GEnum ╰── HdySqueezerTransitionType GObject ╰── GInitiallyUnowned ╰── GtkWidget ╰── GtkContainer ╰── HdySqueezer
The HdySqueezer widget is a container which only shows the first of its children that fits in the available size. It is convenient to offer different widgets to represent the same data with different levels of detail, making the widget seem to squeeze itself to fit in the available space.
Transitions between children can be animated as fades. This can be controlled
with hdy_squeezer_set_transition_type()
.
gboolean
hdy_squeezer_get_homogeneous (HdySqueezer *self
);
Gets whether self
is homogeneous.
See hdy_squeezer_set_homogeneous()
.
Since: 0.0.10
void hdy_squeezer_set_homogeneous (HdySqueezer *self
,gboolean homogeneous
);
Sets self
to be homogeneous or not. If it is homogeneous, self
will request
the same size for all its children for its opposite orientation, e.g. if
self
is oriented horizontally and is homogeneous, it will request the same
height for all its children. If it isn't, self
may change size when a
different child becomes visible.
Since: 0.0.10
guint
hdy_squeezer_get_transition_duration (HdySqueezer *self
);
Gets the amount of time (in milliseconds) that transitions between children
in self
will take.
void hdy_squeezer_set_transition_duration (HdySqueezer *self
,guint duration
);
Sets the duration that transitions between children in self
will take.
HdySqueezerTransitionType
hdy_squeezer_get_transition_type (HdySqueezer *self
);
Gets the type of animation that will be used for transitions between children
in self
.
void hdy_squeezer_set_transition_type (HdySqueezer *self
,HdySqueezerTransitionType transition
);
Sets the type of animation that will be used for transitions between children
in self
. Available types include various kinds of fades and slides.
The transition type can be changed without problems at runtime, so it is possible to change the animation based on the child that is about to become current.
gboolean
hdy_squeezer_get_transition_running (HdySqueezer *self
);
Gets whether self
is currently in a transition from one child to another.
gboolean
hdy_squeezer_get_interpolate_size (HdySqueezer *self
);
Gets wether self
should interpolate its size on visible child change.
See hdy_squeezer_set_interpolate_size()
.
Since: 0.0.10
void hdy_squeezer_set_interpolate_size (HdySqueezer *self
,gboolean interpolate_size
);
Sets whether or not self
will interpolate the size of its opposing
orientation when changing the visible child. If TRUE
, self
will interpolate
its size between the one of the previous visible child and the one of the new
visible child, according to the set transition duration and the orientation,
e.g. if self
is horizontal, it will interpolate the its height.
Since: 0.0.10
GtkWidget *
hdy_squeezer_get_visible_child (HdySqueezer *self
);
Gets the currently visible child of self
, or NULL
if there are no visible
children.
gboolean hdy_squeezer_get_child_enabled (HdySqueezer *self
,GtkWidget *child
);
Gets whether child
is enabled.
void hdy_squeezer_set_child_enabled (HdySqueezer *self
,GtkWidget *child
,gboolean enabled
);
Make self
enable or disable child
. If a child is disabled, it will be
ignored when looking for the child fitting the available size best. This
allows to programmatically and prematurely hide a child of self
even if it
fits in the available space.
This can be used e.g. to ensure a certain child is hidden below a certain window width, or any other constraint you find suitable.
These enumeration values describe the possible transitions between children in a HdySqueezer widget.
“homogeneous”
property“homogeneous” gboolean
Homogeneous sizing.
Flags: Read / Write
Default value: FALSE
“interpolate-size”
property“interpolate-size” gboolean
Whether or not the size should smoothly change when changing between differently sized children.
Flags: Read / Write
Default value: FALSE
“transition-duration”
property“transition-duration” guint
The animation duration, in milliseconds.
Flags: Read / Write
Default value: 200
“transition-running”
property“transition-running” gboolean
Whether or not the transition is currently running.
Flags: Read
Default value: FALSE
“transition-type”
property“transition-type” HdySqueezerTransitionType
The type of animation used to transition.
Flags: Read / Write
Default value: HDY_SQUEEZER_TRANSITION_TYPE_NONE
“visible-child”
property“visible-child” GtkWidget *
The widget currently visible in the squeezer.
Flags: Read