Top | ![]() |
![]() |
![]() |
![]() |
GtkWidget * | content | Read / Write |
GtkWidget * | flap | Read / Write |
GtkPackType | flap-position | Read / Write |
guint | fold-duration | Read / Write |
AdwFlapFoldPolicy | fold-policy | Read / Write |
gboolean | folded | Read |
gboolean | locked | Read / Write |
gboolean | modal | Read / Write |
guint | reveal-duration | Read / Write |
gboolean | reveal-flap | Read / Write |
double | reveal-progress | Read |
GtkWidget * | separator | Read / Write |
gboolean | swipe-to-close | Read / Write |
gboolean | swipe-to-open | Read / Write |
AdwFlapTransitionType | transition-type | Read / Write |
AdwFlap implements GtkAccessible, GtkBuildable, GtkConstraintTarget, GtkOrientable and AdwSwipeable.
GtkWidget *
adw_flap_get_content (AdwFlap *self
);
Gets the content widget for self
Since: 1.0
void adw_flap_set_content (AdwFlap *self
,GtkWidget *content
);
Sets the content widget for self
, always displayed when unfolded, and
partially visible when folded.
Since: 1.0
GtkWidget *
adw_flap_get_flap (AdwFlap *self
);
Gets the flap widget for self
Since: 1.0
void adw_flap_set_flap (AdwFlap *self
,GtkWidget *flap
);
Sets the flap widget for self
, only visible when “reveal-progress” is
greater than 0.
Since: 1.0
GtkWidget *
adw_flap_get_separator (AdwFlap *self
);
Gets the separator widget for self
.
Since: 1.0
void adw_flap_set_separator (AdwFlap *self
,GtkWidget *separator
);
Sets the separator widget for self
, displayed between content and flap when
there's no shadow to display. When exactly it's visible depends on the
“transition-type” value. If NULL
, no separator will be used.
Since: 1.0
GtkPackType
adw_flap_get_flap_position (AdwFlap *self
);
Gets the flap position for self
.
Since: 1.0
void adw_flap_set_flap_position (AdwFlap *self
,GtkPackType position
);
Sets the flap position for self
. If GTK_PACK_START
, the flap is displayed
before the content, if GTK_PACK_END
, it's displayed after the content.
Since: 1.0
gboolean
adw_flap_get_reveal_flap (AdwFlap *self
);
Gets whether the flap widget is revealed for self
.
Since: 1.0
void adw_flap_set_reveal_flap (AdwFlap *self
,gboolean reveal_flap
);
Sets whether the flap widget is revealed for self
.
Since: 1.0
guint
adw_flap_get_reveal_duration (AdwFlap *self
);
Returns the amount of time (in milliseconds) that reveal transitions in self
will take.
Since: 1.0
void adw_flap_set_reveal_duration (AdwFlap *self
,guint duration
);
Sets the duration that reveal transitions in self
will take.
Since: 1.0
double
adw_flap_get_reveal_progress (AdwFlap *self
);
Gets the current reveal transition progress for self
. 0 means fully hidden,
1 means fully revealed. See “reveal-flap”.
Since: 1.0
AdwFlapFoldPolicy
adw_flap_get_fold_policy (AdwFlap *self
);
Gets the current fold policy of self
. See adw_flap_set_fold_policy()
.
Since: 1.0
void adw_flap_set_fold_policy (AdwFlap *self
,AdwFlapFoldPolicy policy
);
Sets the current fold policy for self
. See AdwFlapFoldPolicy for available
policies.
Since: 1.0
guint
adw_flap_get_fold_duration (AdwFlap *self
);
Returns the amount of time (in milliseconds) that fold transitions in self
will take.
Since: 1.0
void adw_flap_set_fold_duration (AdwFlap *self
,guint duration
);
Sets the duration that fold transitions in self
will take.
Since: 1.0
gboolean
adw_flap_get_folded (AdwFlap *self
);
Gets whether self
is currently folded.
See “fold-policy”.
Since: 1.0
gboolean
adw_flap_get_locked (AdwFlap *self
);
Gets whether self
is locked.
Since: 1.0
void adw_flap_set_locked (AdwFlap *self
,gboolean locked
);
Sets whether self
is locked.
If FALSE
, folding self
when the flap is revealed automatically closes it,
and unfolding it when the flap is not revealed opens it. If TRUE
,
“reveal-flap” value never changes on its own.
Since: 1.0
AdwFlapTransitionType
adw_flap_get_transition_type (AdwFlap *self
);
Gets the type of animation that will be used for reveal and fold transitions
in self
.
Since: 1.0
void adw_flap_set_transition_type (AdwFlap *self
,AdwFlapTransitionType transition_type
);
Sets the type of animation that will be used for reveal and fold transitions
in self
.
“flap” is transparent by default, which means the content will be seen
through it with ADW_FLAP_TRANSITION_TYPE_OVER
transitions; add the
.background style class to it if this is unwanted.
Since: 1.0
gboolean
adw_flap_get_modal (AdwFlap *self
);
Gets whether the self
is modal. See adw_flap_set_modal()
.
Since: 1.0
void adw_flap_set_modal (AdwFlap *self
,gboolean modal
);
Sets whether the self
can be closed with a click.
If modal
is TRUE
, clicking the content widget while flap is revealed, or
pressing Escape key, will close the flap. If FALSE
, clicks are passed
through to the content widget.
Since: 1.0
gboolean
adw_flap_get_swipe_to_open (AdwFlap *self
);
Gets whether self
can be opened with a swipe gesture.
Since: 1.0
void adw_flap_set_swipe_to_open (AdwFlap *self
,gboolean swipe_to_open
);
Sets whether self
can be opened with a swipe gesture.
The area that can be swiped depends on the “transition-type” value.
Since: 1.0
gboolean
adw_flap_get_swipe_to_close (AdwFlap *self
);
Gets whether self
can be closed with a swipe gesture.
Since: 1.0
void adw_flap_set_swipe_to_close (AdwFlap *self
,gboolean swipe_to_close
);
Sets whether self
can be closed with a swipe gesture.
The area that can be swiped depends on the “transition-type” value.
Since: 1.0
These enumeration values describe the possible folding behavior in a AdwFlap widget.
Since: 1.0
These enumeration values describe the possible transitions between children in a AdwFlap widget, as well as which areas can be swiped via “swipe-to-open” and “swipe-to-close”.
New values may be added to this enum over time.
The flap slides over the content, which is dimmed. When folded, only the flap can be swiped. |
||
The content slides over the flap. Only the content can be swiped. |
||
The flap slides offscreen when hidden, neither the flap nor content overlap each other. Both widgets can be swiped. |
Since: 1.0
“content”
property “content” GtkWidget *
The content widget, always displayed when unfolded, and partially visible when folded.
Owner: AdwFlap
Flags: Read / Write
Since: 1.0
“flap”
property “flap” GtkWidget *
The flap widget, only visible when “reveal-progress” is greater than 0.
Owner: AdwFlap
Flags: Read / Write
Since: 1.0
“flap-position”
property “flap-position” GtkPackType
The flap position for self
. If GTK_PACK_START
, the flap is displayed
before the content, if GTK_PACK_END
, it's displayed after the content.
Owner: AdwFlap
Flags: Read / Write
Default value: GTK_PACK_START
Since: 1.0
“fold-duration”
property “fold-duration” guint
The fold transition animation duration, in milliseconds.
Owner: AdwFlap
Flags: Read / Write
Allowed values: <= G_MAXINT
Default value: 250
Since: 1.0
“fold-policy”
property“fold-policy” AdwFlapFoldPolicy
The current fold policy. See AdwFlapFoldPolicy for available policies.
Owner: AdwFlap
Flags: Read / Write
Default value: ADW_FLAP_FOLD_POLICY_AUTO
Since: 1.0
“folded”
property “folded” gboolean
Whether the flap is currently folded.
See “fold-policy”.
Owner: AdwFlap
Flags: Read
Default value: FALSE
Since: 1.0
“locked”
property “locked” gboolean
Whether the flap is locked.
If FALSE
, folding when the flap is revealed automatically closes it, and
unfolding it when the flap is not revealed opens it. If TRUE
,
“reveal-flap” value never changes on its own.
Owner: AdwFlap
Flags: Read / Write
Default value: FALSE
Since: 1.0
“modal”
property “modal” gboolean
Whether the flap is modal.
If TRUE
, clicking the content widget while flap is revealed, as well as
pressing Escape key, will close the flap. If FALSE
, clicks are passed
through to the content widget.
Owner: AdwFlap
Flags: Read / Write
Default value: TRUE
Since: 1.0
“reveal-duration”
property “reveal-duration” guint
The reveal transition animation duration, in milliseconds.
Owner: AdwFlap
Flags: Read / Write
Allowed values: <= G_MAXINT
Default value: 250
Since: 1.0
“reveal-flap”
property “reveal-flap” gboolean
Whether the flap widget is revealed.
Owner: AdwFlap
Flags: Read / Write
Default value: TRUE
Since: 1.0
“reveal-progress”
property “reveal-progress” double
The current reveal transition progress. 0 means fully hidden, 1 means fully revealed See “reveal-flap”.
Owner: AdwFlap
Flags: Read
Allowed values: [0,1]
Default value: 1
Since: 1.0
“separator”
property “separator” GtkWidget *
The separator widget, displayed between content and flap when there's no
shadow to display. When exactly it's visible depends on the
“transition-type” value. If NULL
, no separator will be used.
Owner: AdwFlap
Flags: Read / Write
Since: 1.0
“swipe-to-close”
property “swipe-to-close” gboolean
Whether the flap can be closed with a swipe gesture.
The area that can be swiped depends on the “transition-type” value.
Owner: AdwFlap
Flags: Read / Write
Default value: TRUE
Since: 1.0
“swipe-to-open”
property “swipe-to-open” gboolean
Whether the flap can be opened with a swipe gesture.
The area that can be swiped depends on the “transition-type” value.
Owner: AdwFlap
Flags: Read / Write
Default value: TRUE
Since: 1.0
“transition-type”
property“transition-type” AdwFlapTransitionType
The type of animation that will be used for reveal and fold transitions
in self
.
“flap” is transparent by default, which means the content will be
seen through it with ADW_FLAP_TRANSITION_TYPE_OVER
transitions; add the
.background style class to it if this is unwanted.
Owner: AdwFlap
Flags: Read / Write
Default value: ADW_FLAP_TRANSITION_TYPE_OVER
Since: 1.0