Package ch.bailu.gtk.adw
Klasse Leaflet
- Alle implementierten Schnittstellen:
PointerInterface
An adaptive container acting like a box or a stack.
<picture>
<source srcset="leaflet-wide-dark.png" media="(prefers-color-scheme: dark)">
<img src="leaflet-wide.png" alt="leaflet-wide">
</picture>
<picture>
<source srcset="leaflet-narrow-dark.png" media="(prefers-color-scheme: dark)">
<img src="leaflet-narrow.png" alt="leaflet-narrow">
</picture>
The `AdwLeaflet` widget can display its children like a [class@Gtk.Box] does
or like a [class@Gtk.Stack] does, adapting to size changes by switching
between the two modes.
When there is enough space the children are displayed side by side, otherwise
only one is displayed and the leaflet is said to be “folded”.
The threshold is dictated by the preferred minimum sizes of the children.
When a leaflet is folded, the children can be navigated using swipe gestures.
The “over” and “under” transition types stack the children one on top of the
other, while the “slide” transition puts the children side by side. While
navigating to a child on the side or below can be performed by swiping the
current child away, navigating to an upper child requires dragging it from
the edge where it resides. This doesn't affect non-dragging swipes.
## CSS nodes
`AdwLeaflet` has a single CSS node with name `leaflet`. The node will get the
style classes `.folded` when it is folded, `.unfolded` when it's not, or none
if it hasn't computed its fold yet.
<picture>
<source srcset="leaflet-wide-dark.png" media="(prefers-color-scheme: dark)">
<img src="leaflet-wide.png" alt="leaflet-wide">
</picture>
<picture>
<source srcset="leaflet-narrow-dark.png" media="(prefers-color-scheme: dark)">
<img src="leaflet-narrow.png" alt="leaflet-narrow">
</picture>
The `AdwLeaflet` widget can display its children like a [class@Gtk.Box] does
or like a [class@Gtk.Stack] does, adapting to size changes by switching
between the two modes.
When there is enough space the children are displayed side by side, otherwise
only one is displayed and the leaflet is said to be “folded”.
The threshold is dictated by the preferred minimum sizes of the children.
When a leaflet is folded, the children can be navigated using swipe gestures.
The “over” and “under” transition types stack the children one on top of the
other, while the “slide” transition puts the children side by side. While
navigating to a child on the side or below can be performed by swiping the
current child away, navigating to an upper child requires dragging it from
the edge where it resides. This doesn't affect non-dragging swipes.
## CSS nodes
`AdwLeaflet` has a single CSS node with name `leaflet`. The node will get the
style classes `.folded` when it is folded, `.unfolded` when it's not, or none
if it hasn't computed its fold yet.
https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Leaflet.html
-
Verschachtelte Klassen - Übersicht
Von Klasse geerbte verschachtelte Klassen/Schnittstellen ch.bailu.gtk.gtk.Widget
Widget.OnDestroy, Widget.OnDestroyNotify, Widget.OnDirectionChanged, Widget.OnHide, Widget.OnKeynavFailed, Widget.OnMap, Widget.OnMnemonicActivate, Widget.OnMoveFocus, Widget.OnQueryTooltip, Widget.OnRealize, Widget.OnShow, Widget.OnStateFlagsChanged, Widget.OnTickCallback, Widget.OnUnmap, Widget.OnUnrealize
Von Klasse geerbte verschachtelte Klassen/Schnittstellen ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Feldübersicht
Von Klasse geerbte Felder ch.bailu.gtk.gtk.Widget
SIGNAL_ON_DESTROY, SIGNAL_ON_DIRECTION_CHANGED, SIGNAL_ON_HIDE, SIGNAL_ON_KEYNAV_FAILED, SIGNAL_ON_MAP, SIGNAL_ON_MNEMONIC_ACTIVATE, SIGNAL_ON_MOVE_FOCUS, SIGNAL_ON_QUERY_TOOLTIP, SIGNAL_ON_REALIZE, SIGNAL_ON_SHOW, SIGNAL_ON_STATE_FLAGS_CHANGED, SIGNAL_ON_UNMAP, SIGNAL_ON_UNREALIZE
Von Klasse geerbte Felder ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungVeraltet.Implements interfaceAccessible
.Implements interfaceBuildable
.Implements interfaceConstraintTarget
.Implements interfaceOrientable
.Implements interfaceSwipeable
.getAdjacentChild
(int direction) Veraltet.boolean
Veraltet.boolean
Veraltet.boolean
Veraltet.getChildByName
(Str name) Veraltet.getChildByName
(String name) Veraltet.Veraltet.boolean
Veraltet.static ClassHandler
boolean
Veraltet.int
Veraltet.boolean
Veraltet.static int
int
Veraltet.Veraltet.getPages()
Veraltet.static long
static TypeSystem.TypeSize
int
Veraltet.static long
static TypeSystem.TypeSize
Veraltet.Veraltet.insertChildAfter
(Widget child, Widget sibling) Veraltet.boolean
navigate
(int direction) Veraltet.Veraltet.void
Veraltet.void
reorderChildAfter
(Widget child, Widget sibling) Veraltet.void
setCanNavigateBack
(boolean can_navigate_back) Veraltet.void
setCanNavigateForward
(boolean can_navigate_forward) Veraltet.void
setCanUnfold
(boolean can_unfold) Veraltet.void
setChildTransitionParams
(SpringParams params) Veraltet.void
setFoldThresholdPolicy
(int policy) Veraltet.void
setHomogeneous
(boolean homogeneous) Veraltet.void
setModeTransitionDuration
(int duration) Veraltet.void
setTransitionType
(int transition) Veraltet.void
setVisibleChild
(Widget visible_child) Veraltet.void
setVisibleChildName
(Str name) Veraltet.void
setVisibleChildName
(String name) Veraltet.Von Klasse geerbte Methoden ch.bailu.gtk.gtk.Widget
actionSetEnabled, actionSetEnabled, activate, activateAction, activateAction, activateActionVariant, activateActionVariant, activateDefault, addController, addCssClass, addCssClass, addMnemonicLabel, addTickCallback, allocate, childFocus, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, createPangoLayout, disposeTemplate, dragCheckThreshold, errorBell, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getBaseline, getCanFocus, getCanTarget, getChildVisible, getClipboard, getColor, getCssClasses, getCssName, getCursor, getDefaultDirection, getDirection, getDisplay, getFirstChild, getFocusable, getFocusChild, getFocusOnClick, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, getLastChild, getLayoutManager, getLimitEvents, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getName, getNative, getNextSibling, getOpacity, getOverflow, getPangoContext, getParent, getPreferredSize, getPrevSibling, getPrimaryClipboard, getRealized, getReceivesDefault, getRequestMode, getRoot, getScaleFactor, getSensitive, getSettings, getSize, getSizeRequest, getStateFlags, getStyleContext, getTemplateChild, getTemplateChild, getTooltipMarkup, getTooltipText, getValign, getVexpand, getVexpandSet, getVisible, getWidth, grabFocus, hasCssClass, hasCssClass, hasDefault, hasFocus, hasVisibleFocus, hide, inDestruction, initTemplate, insertActionGroup, insertActionGroup, insertAfter, insertBefore, isAncestor, isDrawable, isFocus, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, measure, mnemonicActivate, observeChildren, observeControllers, onDestroy, onDirectionChanged, onHide, onKeynavFailed, onMap, onMnemonicActivate, onMoveFocus, onQueryTooltip, onRealize, onShow, onStateFlagsChanged, onUnmap, onUnrealize, pick, queueAllocate, queueDraw, queueResize, realize, removeController, removeCssClass, removeCssClass, removeMnemonicLabel, removeTickCallback, setCanFocus, setCanTarget, setChildVisible, setCssClasses, setCursor, setCursorFromName, setCursorFromName, setDefaultDirection, setDirection, setFocusable, setFocusChild, setFocusOnClick, setFontMap, setFontOptions, setHalign, setHasTooltip, setHexpand, setHexpandSet, setLayoutManager, setLimitEvents, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setName, setOpacity, setOverflow, setParent, setReceivesDefault, setSensitive, setSizeRequest, setStateFlags, setTooltipMarkup, setTooltipMarkup, setTooltipText, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible, shouldLayout, show, sizeAllocate, snapshotChild, triggerTooltipQuery, unmap, unparent, unrealize, unsetStateFlags
Von Klasse geerbte Methoden ch.bailu.gtk.type.PropertyHolder
getBooleanProperty, getIntProperty, getObjectProperty, getStringProperty, getStrProperty, setBooleanProperty, setIntProperty, setObjectProperty, setStringProperty, setStrProperty
Von Klasse geerbte Methoden ch.bailu.gtk.gobject.Object
addToggleRef, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, disconnect, disconnect, dupData, dupData, dupQdata, forceFloating, freezeNotify, get, get, getData, getData, getProperty, getProperty, getQdata, interfaceFindProperty, interfaceInstallProperty, isFloating, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, replaceData, replaceData, replaceQdata, runDispose, set, set, setData, setData, setDataFull, setDataFull, setProperty, setProperty, setQdata, setQdataFull, stealData, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref
Von Klasse geerbte Methoden ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Von Klasse geerbte Methoden ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Konstruktordetails
-
Leaflet
-
Leaflet
Veraltet.Creates a new `AdwLeaflet`.
-
-
Methodendetails
-
getClassHandler
-
append
Veraltet.Adds a child to @self.- Parameter:
child
- the widget to add- Gibt zurück:
- the [class@LeafletPage] for @child
-
getAdjacentChild
Veraltet.Finds the previous or next navigatable child.
This will be the same child [method@Leaflet.navigate] or swipe gestures will
navigate to.
If there's no child to navigate to, `NULL` will be returned instead.
See [property@LeafletPage:navigatable].- Parameter:
direction
- the direction- Gibt zurück:
- the previous or next child
-
getCanUnfold
Veraltet.Gets whether @self can unfold.- Gibt zurück:
- whether @self can unfold
-
getChildByName
Veraltet.Finds the child of @self with @name.
Returns `NULL` if there is no child with this name.
See [property@LeafletPage:name].- Parameter:
name
- the name of the child to find- Gibt zurück:
- the requested child of @self
-
getChildByName
Veraltet.Finds the child of @self with @name.
Returns `NULL` if there is no child with this name.
See [property@LeafletPage:name].- Parameter:
name
- the name of the child to find- Gibt zurück:
- the requested child of @self
-
getChildTransitionParams
Veraltet.Gets the child transition spring parameters for @self.- Gibt zurück:
- the child transition parameters
-
getChildTransitionRunning
Veraltet.Gets whether a child transition is currently running for @self.- Gibt zurück:
- whether a transition is currently running
-
getFoldThresholdPolicy
Veraltet.Gets the fold threshold policy for @self.- Gibt zurück:
- the fold threshold policy
-
getFolded
Veraltet.Gets whether @self is folded.
The leaflet will be folded if the size allocated to it is smaller than the
sum of the minimum or natural sizes of the children (see
[property@Leaflet:fold-threshold-policy]), it will be unfolded otherwise.- Gibt zurück:
- whether @self is folded.
-
getHomogeneous
Veraltet.Gets whether @self is homogeneous.- Gibt zurück:
- whether @self is homogeneous
-
getModeTransitionDuration
Veraltet.Gets the mode transition animation duration for @self.- Gibt zurück:
- the mode transition duration, in milliseconds.
-
getPage
Veraltet.Returns the [class@LeafletPage] object for @child.- Parameter:
child
- a child of @self- Gibt zurück:
- the page object for @child
-
getPages
Veraltet.Returns a [iface@Gio.ListModel] that contains the pages of the leaflet.
This can be used to keep an up-to-date view. The model also implements
[iface@Gtk.SelectionModel] and can be used to track and change the visible
page.- Gibt zurück:
- a `GtkSelectionModel` for the leaflet's children
-
getTransitionType
Veraltet.Gets the type of animation used for transitions between modes and children.- Gibt zurück:
- the current transition type of @self
-
getVisibleChild
Veraltet.Gets the widget currently visible when the leaflet is folded.- Gibt zurück:
- the visible child
-
getVisibleChildName
Veraltet.Gets the name of the currently visible child widget.- Gibt zurück:
- the name of the visible child
-
insertChildAfter
Veraltet.Inserts @child in the position after @sibling in the list of children.
If @sibling is `NULL`, inserts @child at the first position.- Parameter:
child
- the widget to insertsibling
- the sibling after which to insert @child- Gibt zurück:
- the [class@LeafletPage] for @child
-
prepend
Veraltet.Inserts @child at the first position in @self.- Parameter:
child
- the widget to prepend- Gibt zurück:
- the [class@LeafletPage] for @child
-
remove
Veraltet.Removes a child widget from @self.- Parameter:
child
- the child to remove
-
reorderChildAfter
Veraltet.Moves @child to the position after @sibling in the list of children.
If @sibling is `NULL`, moves @child to the first position.- Parameter:
child
- the widget to move, must be a child of @selfsibling
- the sibling to move @child after
-
setCanUnfold
Veraltet.Sets whether @self can unfold.- Parameter:
can_unfold
- whether @self can unfold
-
setChildTransitionParams
Veraltet.Sets the child transition spring parameters for @self.
The default value is equivalent to:
```c
adw_spring_params_new (1, 0.5, 500)
```- Parameter:
params
- the new parameters
-
setFoldThresholdPolicy
Veraltet.Sets the fold threshold policy for @self.
If set to `ADW_FOLD_THRESHOLD_POLICY_MINIMUM`, it will only fold when the
children cannot fit anymore. With `ADW_FOLD_THRESHOLD_POLICY_NATURAL`, it
will fold as soon as children don't get their natural size.
This can be useful if you have a long ellipsizing label and want to let it
ellipsize instead of immediately folding.- Parameter:
policy
- the policy to use
-
setHomogeneous
Veraltet.Sets @self to be homogeneous or not.
If set to `FALSE`, different children can have different size along the
opposite orientation.- Parameter:
homogeneous
- whether to make @self homogeneous
-
setModeTransitionDuration
Veraltet.Sets the mode transition animation duration for @self.- Parameter:
duration
- the new duration, in milliseconds
-
setTransitionType
Veraltet.Sets the type of animation 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.- Parameter:
transition
- the new transition type
-
setVisibleChild
Veraltet.Sets the widget currently visible when the leaflet is folded.
The transition is determined by [property@Leaflet:transition-type] and
[property@Leaflet:child-transition-params]. The transition can be cancelled
by the user, in which case visible child will change back to the previously
visible child.- Parameter:
visible_child
- the new child
-
setVisibleChildName
Veraltet.Makes the child with the name @name visible.
See [property@Leaflet:visible-child].- Parameter:
name
- the name of a child
-
setVisibleChildName
Veraltet.Makes the child with the name @name visible.
See [property@Leaflet:visible-child].- Parameter:
name
- the name of a child
-
asSwipeable
Implements interfaceSwipeable
. Call this to get access to interface functions.- Gibt zurück:
Swipeable
-
asAccessible
Implements interfaceAccessible
. Call this to get access to interface functions.- Setzt außer Kraft:
asAccessible
in KlasseWidget
- Gibt zurück:
Accessible
-
asBuildable
Implements interfaceBuildable
. Call this to get access to interface functions.- Setzt außer Kraft:
asBuildable
in KlasseWidget
- Gibt zurück:
Buildable
-
asConstraintTarget
Implements interfaceConstraintTarget
. Call this to get access to interface functions.- Setzt außer Kraft:
asConstraintTarget
in KlasseWidget
- Gibt zurück:
ConstraintTarget
-
asOrientable
Implements interfaceOrientable
. Call this to get access to interface functions.- Gibt zurück:
Orientable
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-