Class ConstraintGuide
- All Implemented Interfaces:
Proxy
,ConstraintTarget
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.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
ConstraintGuide.Builder<B extends ConstraintGuide.Builder<B>>
Inner class implementing a builder pattern to construct a GObject with properties.static class
Nested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback, GObject.ObjectClass
Nested classes/interfaces inherited from interface org.gnome.gtk.ConstraintTarget
ConstraintTarget.ConstraintTargetImpl, ConstraintTarget.ConstraintTargetInterface
-
Constructor Summary
ConstructorDescriptionCreates a newGtkConstraintGuide
object.ConstraintGuide
(MemorySegment address) Create a ConstraintGuide proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected ConstraintGuide
asParent()
Returns this instance as if it were its parent type.static ConstraintGuide.Builder
<? extends ConstraintGuide.Builder> builder()
AConstraintGuide.Builder
object constructs aConstraintGuide
with the specified properties.void
getMaxSize
(@Nullable Out<Integer> width, @Nullable Out<Integer> height) Gets the maximum size of this ConstraintGuide.void
getMinSize
(@Nullable Out<Integer> width, @Nullable Out<Integer> height) Gets the minimum size of this ConstraintGuide.getName()
Retrieves the name set using gtk_constraint_guide_set_name().void
getNatSize
(@Nullable Out<Integer> width, @Nullable Out<Integer> height) Gets the natural size of this ConstraintGuide.Retrieves the strength set using gtk_constraint_guide_set_strength().static Type
getType()
Get the GType of the ConstraintGuide classvoid
setMaxSize
(int width, int height) Sets the maximum size of this ConstraintGuide.void
setMinSize
(int width, int height) Sets the minimum size of this ConstraintGuide.void
Sets a name for the givenGtkConstraintGuide
.void
setNatSize
(int width, int height) Sets the natural size of this ConstraintGuide.void
setStrength
(ConstraintStrength strength) Sets the strength of the constraint on the natural size of the givenGtkConstraintGuide
.Methods inherited from class org.gnome.gobject.GObject
addToggleRef, addWeakPointer, bindProperty, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, connect, constructed, disconnect, dispatchPropertiesChanged, dispose, dupData, dupQdata, emit, emitNotify, finalize_, forceFloating, freezeNotify, get, getData, getMemoryLayout, getProperty, getProperty, getProperty, getQdata, getv, interfaceFindProperty, interfaceInstallProperty, interfaceListProperties, isFloating, newInstance, newInstance, newInstance, newInstance, newv, notify_, notify_, notifyByPspec, onNotify, ref, refSink, removeToggleRef, removeWeakPointer, replaceData, replaceQdata, runDispose, set, setData, setDataFull, setProperty, setProperty, setProperty, setQdata, setQdataFull, setv, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref, withProperties
Methods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, getPrivate, readGClass, writeGClass
Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
ConstraintGuide
Create a ConstraintGuide proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
ConstraintGuide
public ConstraintGuide()Creates a newGtkConstraintGuide
object.
-
-
Method Details
-
getType
-
asParent
Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuper
keyword, but will set the native typeclass function pointers to the parent type. When overriding a native virtual method in Java, "chaining up" withsuper.methodName()
doesn't work, because it invokes the overridden function pointer again. To chain up, callasParent().methodName()
. This will call the native function pointer of this virtual method in the typeclass of the parent type. -
getMaxSize
-
getMinSize
-
getName
Retrieves the name set using gtk_constraint_guide_set_name().- Returns:
- the name of the guide
-
getNatSize
-
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 this ConstraintGuide.If this ConstraintGuide 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 this ConstraintGuide.If this ConstraintGuide 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 givenGtkConstraintGuide
.The name is useful for debugging purposes.
- Parameters:
name
- a name for the this ConstraintGuide
-
setNatSize
public void setNatSize(int width, int height) Sets the natural size of this ConstraintGuide.If this ConstraintGuide 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
Sets the strength of the constraint on the natural size of the givenGtkConstraintGuide
.- Parameters:
strength
- the strength of the constraint
-
builder
AConstraintGuide.Builder
object constructs aConstraintGuide
with the specified properties. Use the variousset...()
methods to set properties, and finish construction withConstraintGuide.Builder.build()
.
-