Package ch.bailu.gtk.gtk
Class ConstraintGuide
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gobject.Object
ch.bailu.gtk.gtk.ConstraintGuide
- All Implemented Interfaces:
PointerInterface
A `GtkConstraintGuide` is an invisible layout element in a
`GtkConstraintLayout`.
The `GtkConstraintLayout` treats guides like widgets. They
can be used as the source or target of a `GtkConstraint`.
Guides have a minimum, maximum and natural size. Depending
on the constraints that are applied, they can act like a
guideline that widgets can be aligned to, or like *flexible
space*.
Unlike a `GtkWidget`, a `GtkConstraintGuide` will not be drawn.
`GtkConstraintLayout`.
The `GtkConstraintLayout` treats guides like widgets. They
can be used as the source or target of a `GtkConstraint`.
Guides have a minimum, maximum and natural size. Depending
on the constraints that are applied, they can act like a
guideline that widgets can be aligned to, or like *flexible
space*.
Unlike a `GtkWidget`, a `GtkConstraintGuide` will not be drawn.
-
Nested Class Summary
Nested classes/interfaces inherited from class ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Field Summary
Fields inherited from class ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Constructor Summary
ConstructorDescriptionCreates a new `GtkConstraintGuide` object.ConstraintGuide
(PointerContainer pointer) -
Method Summary
Modifier and TypeMethodDescriptionImplements interfaceConstraintTarget
.static ClassHandler
static int
void
getMaxSize
(Int width, Int height) Gets the maximum size of @guide.void
getMinSize
(Int width, Int height) Gets the minimum size of @guide.getName()
Retrieves the name set using gtk_constraint_guide_set_name().void
getNatSize
(Int width, Int height) Gets the natural size of @guide.static long
static TypeSystem.TypeSize
int
Retrieves the strength set using gtk_constraint_guide_set_strength().static long
static TypeSystem.TypeSize
void
setMaxSize
(int width, int height) Sets the maximum size of @guide.void
setMinSize
(int width, int height) Sets the minimum size of @guide.void
Sets a name for the given `GtkConstraintGuide`.void
Sets a name for the given `GtkConstraintGuide`.void
setNatSize
(int width, int height) Sets the natural size of @guide.void
setStrength
(int strength) Sets the strength of the constraint on the natural size of the
given `GtkConstraintGuide`.Methods inherited from class 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
Methods inherited from class ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Methods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Constructor Details
-
ConstraintGuide
-
ConstraintGuide
public ConstraintGuide()Creates a new `GtkConstraintGuide` object.
-
-
Method Details
-
getClassHandler
-
getMaxSize
Gets the maximum size of @guide.- Parameters:
width
- return location for the maximum widthheight
- return location for the maximum height
-
getMinSize
Gets the minimum size of @guide.- Parameters:
width
- return location for the minimum widthheight
- return location for the minimum height
-
getName
Retrieves the name set using gtk_constraint_guide_set_name().- Returns:
- the name of the guide
-
getNatSize
Gets the natural size of @guide.- Parameters:
width
- return location for the natural widthheight
- return location for the natural height
-
getStrength
public int getStrength()Retrieves the strength set using gtk_constraint_guide_set_strength().- Returns:
- the strength of the constraint on the natural size
-
setMaxSize
public void setMaxSize(int width, int height) Sets the maximum size of @guide.
If @guide is attached to a `GtkConstraintLayout`,
the constraints will be updated to reflect the new size.- Parameters:
width
- the new maximum width, or -1 to not change itheight
- the new maximum height, or -1 to not change it
-
setMinSize
public void setMinSize(int width, int height) Sets the minimum size of @guide.
If @guide is attached to a `GtkConstraintLayout`,
the constraints will be updated to reflect the new size.- Parameters:
width
- the new minimum width, or -1 to not change itheight
- the new minimum height, or -1 to not change it
-
setName
Sets a name for the given `GtkConstraintGuide`.
The name is useful for debugging purposes.- Parameters:
name
- a name for the @guide
-
setName
Sets a name for the given `GtkConstraintGuide`.
The name is useful for debugging purposes.- Parameters:
name
- a name for the @guide
-
setNatSize
public void setNatSize(int width, int height) Sets the natural size of @guide.
If @guide is attached to a `GtkConstraintLayout`,
the constraints will be updated to reflect the new size.- Parameters:
width
- the new natural width, or -1 to not change itheight
- the new natural height, or -1 to not change it
-
setStrength
public void setStrength(int strength) Sets the strength of the constraint on the natural size of the
given `GtkConstraintGuide`.- Parameters:
strength
- the strength of the constraint
-
asConstraintTarget
Implements interfaceConstraintTarget
. Call this to get access to interface functions.- Returns:
ConstraintTarget
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-