Top | ![]() |
![]() |
![]() |
![]() |
GtkWidget * | adw_squeezer_page_get_child () |
gboolean | adw_squeezer_page_get_enabled () |
void | adw_squeezer_page_set_enabled () |
GtkWidget * | adw_squeezer_new () |
AdwSqueezerPage * | adw_squeezer_add () |
void | adw_squeezer_remove () |
AdwSqueezerPage * | adw_squeezer_get_page () |
gboolean | adw_squeezer_get_homogeneous () |
void | adw_squeezer_set_homogeneous () |
guint | adw_squeezer_get_transition_duration () |
void | adw_squeezer_set_transition_duration () |
AdwSqueezerTransitionType | adw_squeezer_get_transition_type () |
void | adw_squeezer_set_transition_type () |
gboolean | adw_squeezer_get_transition_running () |
gboolean | adw_squeezer_get_interpolate_size () |
void | adw_squeezer_set_interpolate_size () |
GtkWidget * | adw_squeezer_get_visible_child () |
float | adw_squeezer_get_xalign () |
void | adw_squeezer_set_xalign () |
float | adw_squeezer_get_yalign () |
void | adw_squeezer_set_yalign () |
GtkSelectionModel * | adw_squeezer_get_pages () |
gboolean | homogeneous | Read / Write |
gboolean | interpolate-size | Read / Write |
GtkSelectionModel * | pages | Read |
guint | transition-duration | Read / Write |
gboolean | transition-running | Read |
AdwSqueezerTransitionType | transition-type | Read / Write |
GtkWidget * | visible-child | Read |
float | xalign | Read / Write |
float | yalign | Read / Write |
GtkWidget * | child | Read / Write / Construct Only |
gboolean | enabled | Read / Write |
#define | ADW_TYPE_SQUEEZER_PAGE |
#define | ADW_TYPE_SQUEEZER |
enum | AdwSqueezerTransitionType |
AdwSqueezer | |
AdwSqueezerPage |
AdwSqueezer implements GtkAccessible, GtkBuildable, GtkConstraintTarget and GtkOrientable.
GtkWidget *
adw_squeezer_page_get_child (AdwSqueezerPage *self
);
Returns the squeezer child to which self
belongs.
Since: 1.0
gboolean
adw_squeezer_page_get_enabled (AdwSqueezerPage *self
);
Returns whether self
is enabled in its AdwSqueezer. This is independent
from the “visible” value of its GtkWidget.
See adw_squeezer_page_set_enabled()
.
Since: 1.0
void adw_squeezer_page_set_enabled (AdwSqueezerPage *self
,gboolean enabled
);
Make the squeezer 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 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.
Sets the new value of the “enabled” property to enabled
.
Since: 1.0
GtkWidget *
adw_squeezer_new (void
);
Creates a new AdwSqueezer container.
Since: 1.0
AdwSqueezerPage * adw_squeezer_add (AdwSqueezer *self
,GtkWidget *child
);
Adds a child to self
.
Since: 1.0
void adw_squeezer_remove (AdwSqueezer *self
,GtkWidget *child
);
Removes a child widget from self
.
Since: 1.0
AdwSqueezerPage * adw_squeezer_get_page (AdwSqueezer *self
,GtkWidget *child
);
Returns the AdwSqueezerPage object for child
.
Since: 1.0
gboolean
adw_squeezer_get_homogeneous (AdwSqueezer *self
);
Gets whether self
is homogeneous.
See adw_squeezer_set_homogeneous()
.
Since: 1.0
void adw_squeezer_set_homogeneous (AdwSqueezer *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: 1.0
guint
adw_squeezer_get_transition_duration (AdwSqueezer *self
);
Gets the amount of time (in milliseconds) that transitions between children
in self
will take.
Since: 1.0
void adw_squeezer_set_transition_duration (AdwSqueezer *self
,guint duration
);
Sets the duration that transitions between children in self
will take.
Since: 1.0
AdwSqueezerTransitionType
adw_squeezer_get_transition_type (AdwSqueezer *self
);
Gets the type of animation that will be used for transitions between children
in self
.
Since: 1.0
void adw_squeezer_set_transition_type (AdwSqueezer *self
,AdwSqueezerTransitionType 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.
Since: 1.0
gboolean
adw_squeezer_get_transition_running (AdwSqueezer *self
);
Gets whether self
is currently in a transition from one child to another.
Since: 1.0
gboolean
adw_squeezer_get_interpolate_size (AdwSqueezer *self
);
Gets whether self
should interpolate its size on visible child change.
See adw_squeezer_set_interpolate_size()
.
Since: 1.0
void adw_squeezer_set_interpolate_size (AdwSqueezer *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: 1.0
GtkWidget *
adw_squeezer_get_visible_child (AdwSqueezer *self
);
Gets the currently visible child of self
, or NULL
if there are no visible
children.
Since: 1.0
float
adw_squeezer_get_xalign (AdwSqueezer *self
);
Gets the “xalign” property for self
.
Since: 1.0
void adw_squeezer_set_xalign (AdwSqueezer *self
,float xalign
);
Sets the “xalign” property for self
.
Since: 1.0
float
adw_squeezer_get_yalign (AdwSqueezer *self
);
Gets the “yalign” property for self
.
Since: 1.0
void adw_squeezer_set_yalign (AdwSqueezer *self
,float yalign
);
Sets the “yalign” property for self
.
Since: 1.0
GtkSelectionModel *
adw_squeezer_get_pages (AdwSqueezer *self
);
Returns a GListModel that contains the pages of the squeezer, and can be used to keep an up-to-date view. The model also implements GtkSelectionModel and can be used to track the visible page.
Since: 1.0
These enumeration values describe the possible transitions between children in a AdwSqueezer widget.
Since: 1.0
“homogeneous”
property “homogeneous” gboolean
Homogeneous sizing.
Owner: AdwSqueezer
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.
Owner: AdwSqueezer
Flags: Read / Write
Default value: FALSE
“pages”
property “pages” GtkSelectionModel *
A selection model with the squeezer's pages.
Owner: AdwSqueezer
Flags: Read
“transition-duration”
property “transition-duration” guint
The animation duration, in milliseconds.
Owner: AdwSqueezer
Flags: Read / Write
Default value: 200
“transition-running”
property “transition-running” gboolean
Whether or not the transition is currently running.
Owner: AdwSqueezer
Flags: Read
Default value: FALSE
“transition-type”
property“transition-type” AdwSqueezerTransitionType
The type of animation used to transition.
Owner: AdwSqueezer
Flags: Read / Write
Default value: ADW_SQUEEZER_TRANSITION_TYPE_NONE
“visible-child”
property “visible-child” GtkWidget *
The widget currently visible in the squeezer.
Owner: AdwSqueezer
Flags: Read
“xalign”
property “xalign” float
The xalign property determines the horizontal alignment of the children inside the squeezer's size allocation. Compare this to “halign”, which determines how the squeezer's size allocation is positioned in the space available for the squeezer. The range goes from 0 (start) to 1 (end).
This will affect the position of children too wide to fit in the squeezer as they are fading out.
Owner: AdwSqueezer
Flags: Read / Write
Allowed values: [0,1]
Default value: 0.5
Since: 1.0
“yalign”
property “yalign” float
The yalign property determines the vertical alignment of the children inside the squeezer's size allocation. Compare this to “valign”, which determines how the squeezer's size allocation is positioned in the space available for the squeezer. The range goes from 0 (top) to 1 (bottom).
This will affect the position of children too tall to fit in the squeezer as they are fading out.
Owner: AdwSqueezer
Flags: Read / Write
Allowed values: [0,1]
Default value: 0.5
Since: 1.0
“child”
property “child” GtkWidget *
The child of the page.
Owner: AdwSqueezerPage
Flags: Read / Write / Construct Only