Handy.Leaflet

g Atk.ImplementorIface Atk.ImplementorIface Gtk.Widget Gtk.Widget Atk.ImplementorIface->Gtk.Widget GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable Gtk.Orientable Gtk.Orientable GObject.GInterface->Gtk.Orientable Handy.Swipeable Handy.Swipeable GObject.GInterface->Handy.Swipeable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Buildable->Gtk.Widget Gtk.Container Gtk.Container Handy.Leaflet Handy.Leaflet Gtk.Container->Handy.Leaflet Gtk.Orientable->Handy.Leaflet Gtk.Widget->Gtk.Container Handy.Swipeable->Handy.Leaflet

Subclasses:None

Properties

Inherited:Gtk.Container (3), Gtk.Widget (39), Gtk.Orientable (1)
Name Type Flags Short Description
can-swipe-back bool r/w/en Whether or not swipe gesture can be used to switch to the previous child
can-swipe-forward bool r/w/en Whether or not swipe gesture can be used to switch to the next child
child-transition-duration int r/w/en The child transition animation duration, in milliseconds
child-transition-running bool r Whether or not the child transition is currently running
child-transition-type Handy.LeafletChildTransitionType d/r/w/en The type of animation used to transition between children deprecated
fold Handy.Fold r/en Whether the widget is folded
folded bool r/en Whether the widget is folded
hhomogeneous-folded bool r/w/en Horizontally homogeneous sizing when the leaflet is folded
hhomogeneous-unfolded bool r/w/en Horizontally homogeneous sizing when the leaflet is unfolded
interpolate-size bool r/w/en Whether or not the size should smoothly change when changing between differently sized children
mode-transition-duration int r/w/en The mode transition animation duration, in milliseconds
mode-transition-type Handy.LeafletModeTransitionType d/r/w/en The type of animation used to transition between modes deprecated
transition-type Handy.LeafletTransitionType r/w/en The type of animation used to transition between modes and children
vhomogeneous-folded bool r/w/en Vertically homogeneous sizing when the leaflet is folded
vhomogeneous-unfolded bool r/w/en Vertically homogeneous sizing when the leaflet is unfolded
visible-child Gtk.Widget r/w/en The widget currently visible when the leaflet is folded
visible-child-name str r/w/en The name of the widget currently visible when the children are stacked

Child Properties

Name Type Default Flags Short Description
allow-visible bool True r/w Whether the child can be visible in folded mode
name str None r/w The name of the child page

Style Properties

Inherited:Gtk.Widget (17)

Fields

Inherited:Gtk.Container (4), Gtk.Widget (69), GObject.Object (1), Handy.Swipeable (4)
Name Type Access Description
parent_instance Gtk.Container r  

Class Details

class Handy.Leaflet(**kwargs)
Bases:Gtk.Container, Gtk.Orientable, Handy.Swipeable
Abstract:No
Structure:Handy.LeafletClass
classmethod new()
Return type:Gtk.Widget
get_can_swipe_back()
Returns:True if back swipe is enabled.
Return type:bool

Returns whether the Handy.Leaflet allows swiping to the previous child.

New in version 0.0.12.

get_can_swipe_forward()
Returns:True if back swipe is enabled.
Return type:bool

Returns whether the Handy.Leaflet allows swiping to the next child.

New in version 0.0.12.

get_child_transition_duration()
Returns:the mode transition duration
Return type:int

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

get_child_transition_running()
Returns:True if the transition is currently running, False otherwise.
Return type:bool

Returns whether self is currently in a transition from one page to another.

get_child_transition_type()
Returns:the current mode transition type of self
Return type:Handy.LeafletChildTransitionType

Gets the type of animation that will be used for transitions between children in self.

Deprecated since version 0.0.12: Use Handy.Leaflet.get_transition_type()

get_fold()
Returns:the fold of self.
Return type:Handy.Fold

Gets the fold of self.

get_homogeneous(fold, orientation)
Parameters:
Returns:

whether self is homogeneous for the given fold and orientation.

Return type:

bool

Gets whether self is homogeneous for the given fold and orientation. See Handy.Leaflet.set_homogeneous().

get_interpolate_size()
Returns:True if child sizes are interpolated
Return type:bool

Returns wether the Handy.Leaflet is set up to interpolate between the sizes of children on page switch.

get_mode_transition_duration()
Returns:the mode transition duration
Return type:int

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

get_mode_transition_type()
Returns:the current mode transition type of self
Return type:Handy.LeafletModeTransitionType

Gets the type of animation that will be used for transitions between modes in self.

Deprecated since version 0.0.12: Use Handy.Leaflet.get_transition_type()

get_transition_type()
Returns:the current transition type of self
Return type:Handy.LeafletTransitionType

Gets the type of animation that will be used for transitions between modes and children in self.

New in version 0.0.12.

get_visible_child()
Returns:the visible child widget
Return type:Gtk.Widget

Get the visible child widget.

get_visible_child_name()
Return type:str
set_can_swipe_back(can_swipe_back)
Parameters:can_swipe_back (bool) – the new value

Sets whether or not self allows switching to the previous child that has ‘allow-visible’ child property set to True via a swipe gesture

New in version 0.0.12.

set_can_swipe_forward(can_swipe_forward)
Parameters:can_swipe_forward (bool) – the new value

Sets whether or not self allows switching to the next child that has ‘allow-visible’ child property set to True via a swipe gesture.

New in version 0.0.12.

set_child_transition_duration(duration)
Parameters:duration (int) – the new duration, in milliseconds

Sets the duration that transitions between children in self will take.

set_child_transition_type(transition)
Parameters:transition (Handy.LeafletChildTransitionType) – the new transition type

Sets the type of animation that will be used for transitions between children in self.

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.

Deprecated since version 0.0.12: Use Handy.Leaflet.set_transition_type()

set_homogeneous(fold, orientation, homogeneous)
Parameters:

Sets the Handy.Leaflet to be homogeneous or not for the given fold and orientation. If it is homogeneous, the Handy.Leaflet will request the same width or height for all its children depending on the orientation. If it isn’t and it is folded, the leaflet may change width or height when a different child becomes visible.

set_interpolate_size(interpolate_size)
Parameters:interpolate_size (bool) – the new value

Sets whether or not self will interpolate its size when changing the visible child. If the Handy.Leaflet :interpolate-size property is set to True, stack will interpolate its size between the current one and the one it’ll take after changing the visible child, according to the set transition duration.

set_mode_transition_duration(duration)
Parameters:duration (int) – the new duration, in milliseconds

Sets the duration that transitions between modes in self will take.

set_mode_transition_type(transition)
Parameters:transition (Handy.LeafletModeTransitionType) – the new transition type

Sets the type of animation that will be used for transitions between modes in self.

The transition type can be changed without problems at runtime, so it is possible to change the animation based on the mode that is about to become current.

Deprecated since version 0.0.12: Use Handy.Leaflet.set_transition_type()

set_transition_type(transition)
Parameters:transition (Handy.LeafletTransitionType) – the new transition type

Sets the type of animation that will be used for transitions between modes and children in self.

The transition type can be changed without problems at runtime, so it is possible to change the animation based on the mode or child that is about to become current.

New in version 0.0.12.

set_visible_child(visible_child)
Parameters:visible_child (Gtk.Widget) –
set_visible_child_name(name)
Parameters:name (str) –
do_todo() virtual

Property Details

Handy.Leaflet.props.can_swipe_back
Name:can-swipe-back
Type:bool
Default Value:False
Flags:READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether or not self allows switching to the previous child that has ‘allow-visible’ child property set to True via a swipe gesture.

New in version 0.0.12.

Handy.Leaflet.props.can_swipe_forward
Name:can-swipe-forward
Type:bool
Default Value:False
Flags:READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether or not self allows switching to the next child that has ‘allow-visible’ child property set to True via a swipe gesture.

New in version 0.0.12.

Handy.Leaflet.props.child_transition_duration
Name:child-transition-duration
Type:int
Default Value:200
Flags:READABLE, WRITABLE, EXPLICIT_NOTIFY

The child transition animation duration, in milliseconds

Handy.Leaflet.props.child_transition_running
Name:child-transition-running
Type:bool
Default Value:False
Flags:READABLE

Whether or not the child transition is currently running

Handy.Leaflet.props.child_transition_type
Name:child-transition-type
Type:Handy.LeafletChildTransitionType
Default Value:Handy.LeafletChildTransitionType.NONE
Flags:DEPRECATED, READABLE, WRITABLE, EXPLICIT_NOTIFY

The type of animation used to transition between children

Deprecated since version 0.0.12: Use Handy.Leaflet :transition-type instead

Handy.Leaflet.props.fold
Name:fold
Type:Handy.Fold
Default Value:Handy.Fold.UNFOLDED
Flags:READABLE, EXPLICIT_NOTIFY

The fold of the leaflet.

The leaflet will be folded if the size allocated to it is smaller than the sum of the natural size of its children, it will be unfolded otherwise.

See also: Handy.Leaflet :folded.

Handy.Leaflet.props.folded
Name:folded
Type:bool
Default Value:False
Flags:READABLE, EXPLICIT_NOTIFY

True if the leaflet is folded.

This is similar to the Handy.Leaflet :fold property but expressed as a bool rather than a #GEnum. This makes it convenient to bind the Handy.Leaflet :fold of a leaflet to any other bool property of other GObject.Object’s using GObject.Object.bind_property().

Handy.Leaflet.props.hhomogeneous_folded
Name:hhomogeneous-folded
Type:bool
Default Value:True
Flags:READABLE, WRITABLE, EXPLICIT_NOTIFY

Horizontally homogeneous sizing when the leaflet is folded

Handy.Leaflet.props.hhomogeneous_unfolded
Name:hhomogeneous-unfolded
Type:bool
Default Value:False
Flags:READABLE, WRITABLE, EXPLICIT_NOTIFY

Horizontally homogeneous sizing when the leaflet is unfolded

Handy.Leaflet.props.interpolate_size
Name:interpolate-size
Type:bool
Default Value:False
Flags:READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether or not the size should smoothly change when changing between differently sized children

Handy.Leaflet.props.mode_transition_duration
Name:mode-transition-duration
Type:int
Default Value:250
Flags:READABLE, WRITABLE, EXPLICIT_NOTIFY

The mode transition animation duration, in milliseconds

Handy.Leaflet.props.mode_transition_type
Name:mode-transition-type
Type:Handy.LeafletModeTransitionType
Default Value:Handy.LeafletModeTransitionType.NONE
Flags:DEPRECATED, READABLE, WRITABLE, EXPLICIT_NOTIFY

The type of animation used to transition between mode

Deprecated since version 0.0.12: Use Handy.Leaflet :transition-type instead

Handy.Leaflet.props.transition_type
Name:transition-type
Type:Handy.LeafletTransitionType
Default Value:Handy.LeafletTransitionType.NONE
Flags:READABLE, WRITABLE, EXPLICIT_NOTIFY

The type of animation that will be used for transitions between modes and children.

The transition type can be changed without problems at runtime, so it is possible to change the animation based on the mode or child that is about to become current.

New in version 0.0.12.

Handy.Leaflet.props.vhomogeneous_folded
Name:vhomogeneous-folded
Type:bool
Default Value:True
Flags:READABLE, WRITABLE, EXPLICIT_NOTIFY

Vertically homogeneous sizing when the leaflet is folded

Handy.Leaflet.props.vhomogeneous_unfolded
Name:vhomogeneous-unfolded
Type:bool
Default Value:False
Flags:READABLE, WRITABLE, EXPLICIT_NOTIFY

Vertically homogeneous sizing when the leaflet is unfolded

Handy.Leaflet.props.visible_child
Name:visible-child
Type:Gtk.Widget
Default Value:None
Flags:READABLE, WRITABLE, EXPLICIT_NOTIFY

The widget currently visible when the leaflet is folded

Handy.Leaflet.props.visible_child_name
Name:visible-child-name
Type:str
Default Value:None
Flags:READABLE, WRITABLE, EXPLICIT_NOTIFY

The name of the widget currently visible when the children are stacked