Package ch.bailu.gtk.adw
Klasse ClampLayout
- Alle implementierten Schnittstellen:
PointerInterface
A layout manager constraining its children to a given size.
<picture>
<source srcset="clamp-wide-dark.png" media="(prefers-color-scheme: dark)">
<img src="clamp-wide.png" alt="clamp-wide">
</picture>
<picture>
<source srcset="clamp-narrow-dark.png" media="(prefers-color-scheme: dark)">
<img src="clamp-narrow.png" alt="clamp-narrow">
</picture>
`AdwClampLayout` constraints the size of the widgets it contains to a given
maximum size. It will constrain the width if it is horizontal, or the height
if it is vertical. The expansion of the children from their minimum to their
maximum size is eased out for a smooth transition.
If a child requires more than the requested maximum size, it will be
allocated the minimum size it can fit in instead.
`AdwClampLayout` can scale with the text scale factor, use the
[property@ClampLayout:unit] property to enable that behavior.
See also: [class@Clamp], [class@ClampScrollable].
<picture>
<source srcset="clamp-wide-dark.png" media="(prefers-color-scheme: dark)">
<img src="clamp-wide.png" alt="clamp-wide">
</picture>
<picture>
<source srcset="clamp-narrow-dark.png" media="(prefers-color-scheme: dark)">
<img src="clamp-narrow.png" alt="clamp-narrow">
</picture>
`AdwClampLayout` constraints the size of the widgets it contains to a given
maximum size. It will constrain the width if it is horizontal, or the height
if it is vertical. The expansion of the children from their minimum to their
maximum size is eased out for a smooth transition.
If a child requires more than the requested maximum size, it will be
allocated the minimum size it can fit in instead.
`AdwClampLayout` can scale with the text scale factor, use the
[property@ClampLayout:unit] property to enable that behavior.
See also: [class@Clamp], [class@ClampScrollable].
https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ClampLayout.html
-
Verschachtelte Klassen - Übersicht
Von Klasse geerbte verschachtelte Klassen/Schnittstellen ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Feldübersicht
Von Klasse geerbte Felder ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungImplements interfaceOrientable
.static ClassHandler
static int
int
Gets the maximum size allocated to the children.static long
static TypeSystem.TypeSize
int
Gets the size above which the children are clamped.static long
static TypeSystem.TypeSize
int
getUnit()
Gets the length unit for maximum size and tightening threshold.void
setMaximumSize
(int maximum_size) Sets the maximum size allocated to the children.void
setTighteningThreshold
(int tightening_threshold) Sets the size above which the children are clamped.void
setUnit
(int unit) Sets the length unit for maximum size and tightening threshold.Von Klasse geerbte Methoden ch.bailu.gtk.gtk.LayoutManager
allocate, getLayoutChild, getRequestMode, getWidget, layoutChanged, measure
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
-
ClampLayout
-
ClampLayout
public ClampLayout()Creates a new `AdwClampLayout`.
-
-
Methodendetails
-
getClassHandler
-
getMaximumSize
public int getMaximumSize()Gets the maximum size allocated to the children.- Gibt zurück:
- the maximum size to allocate to the children
-
getTighteningThreshold
public int getTighteningThreshold()Gets the size above which the children are clamped.- Gibt zurück:
- the size above which the children are clamped
-
getUnit
public int getUnit()Gets the length unit for maximum size and tightening threshold.- Gibt zurück:
- the length unit
-
setMaximumSize
public void setMaximumSize(int maximum_size) Sets the maximum size allocated to the children.
It is the width if the layout is horizontal, or the height if it is vertical.- Parameter:
maximum_size
- the maximum size
-
setTighteningThreshold
public void setTighteningThreshold(int tightening_threshold) Sets the size above which the children are clamped.
Starting from this size, the layout will tighten its grip on the children,
slowly allocating less and less of the available size up to the maximum
allocated size. Below that threshold and below the maximum size, the children
will be allocated all the available size.
If the threshold is greater than the maximum size to allocate to the
children, they will be allocated the whole size up to the maximum. If the
threshold is lower than the minimum size to allocate to the children, that
size will be used as the tightening threshold.
Effectively, tightening the grip on a child before it reaches its maximum
size makes transitions to and from the maximum size smoother when resizing.- Parameter:
tightening_threshold
- the tightening threshold
-
setUnit
public void setUnit(int unit) Sets the length unit for maximum size and tightening threshold.
Allows the sizes to vary depending on the text scale factor.- Parameter:
unit
- the length unit
-
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()
-