Package ch.bailu.gtk.gtk
Klasse Adjustment
- Alle implementierten Schnittstellen:
PointerInterface
A model for a numeric value.
The `GtkAdjustment` has an associated lower and upper bound.
It also contains step and page increments, and a page size.
Adjustments are used within several GTK widgets, including
[class@Gtk.SpinButton], [class@Gtk.Viewport], [class@Gtk.Scrollbar]
and [class@Gtk.Scale].
The `GtkAdjustment` object does not update the value itself. Instead
it is left up to the owner of the `GtkAdjustment` to control the value.
The `GtkAdjustment` has an associated lower and upper bound.
It also contains step and page increments, and a page size.
Adjustments are used within several GTK widgets, including
[class@Gtk.SpinButton], [class@Gtk.Viewport], [class@Gtk.Scrollbar]
and [class@Gtk.Scale].
The `GtkAdjustment` object does not update the value itself. Instead
it is left up to the owner of the `GtkAdjustment` to control the value.
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic interface
static interface
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
FelderVon Klasse geerbte Felder ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungAdjustment
(double value, double lower, double upper, double step_increment, double page_increment, double page_size) Creates a new `GtkAdjustment`.Adjustment
(PointerContainer pointer) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
clampPage
(double lower, double upper) Updates the value of the adjustment to ensure that the
given range is contained in the current page.void
configure
(double value, double lower, double upper, double step_increment, double page_increment, double page_size) Sets all properties of the adjustment at once.static ClassHandler
static int
double
getLower()
Retrieves the minimum value of the adjustment.double
Gets the smaller of step increment and page increment.double
Retrieves the page increment of the adjustment.double
Retrieves the page size of the adjustment.static long
static TypeSystem.TypeSize
double
Retrieves the step increment of the adjustment.static long
static TypeSystem.TypeSize
double
getUpper()
Retrieves the maximum value of the adjustment.double
getValue()
Gets the current value of the adjustment.onChanged
(Adjustment.OnChanged signal) Connect to signal "changed".Connect to signal "value-changed".void
setLower
(double lower) Sets the minimum value of the adjustment.void
setPageIncrement
(double page_increment) Sets the page increment of the adjustment.void
setPageSize
(double page_size) Sets the page size of the adjustment.void
setStepIncrement
(double step_increment) Sets the step increment of the adjustment.void
setUpper
(double upper) Sets the maximum value of the adjustment.void
setValue
(double value) Sets the `GtkAdjustment` value.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
-
Felddetails
-
SIGNAL_ON_CHANGED
- Siehe auch:
-
SIGNAL_ON_VALUE_CHANGED
- Siehe auch:
-
-
Konstruktordetails
-
Adjustment
-
Adjustment
public Adjustment(double value, double lower, double upper, double step_increment, double page_increment, double page_size) Creates a new `GtkAdjustment`.- Parameter:
value
- the initial valuelower
- the minimum valueupper
- the maximum valuestep_increment
- the step incrementpage_increment
- the page incrementpage_size
- the page size
-
-
Methodendetails
-
getClassHandler
-
clampPage
public void clampPage(double lower, double upper) Updates the value of the adjustment to ensure that the
given range is contained in the current page.
The current page goes from `value` to `value` + `page-size`.
If the range is larger than the page size, then only the
start of it will be in the current page.
A [signal@Gtk.Adjustment::value-changed] signal will be emitted
if the value is changed.- Parameter:
lower
- the lower valueupper
- the upper value
-
configure
public void configure(double value, double lower, double upper, double step_increment, double page_increment, double page_size) Sets all properties of the adjustment at once.
Use this function to avoid multiple emissions of the
[signal@Gtk.Adjustment::changed] signal. See
[method@Gtk.Adjustment.set_lower] for an alternative
way of compressing multiple emissions of
[signal@Gtk.Adjustment::changed] into one.- Parameter:
value
- the new valuelower
- the new minimum valueupper
- the new maximum valuestep_increment
- the new step incrementpage_increment
- the new page incrementpage_size
- the new page size
-
getLower
public double getLower()Retrieves the minimum value of the adjustment.- Gibt zurück:
- the minimum value
-
getMinimumIncrement
public double getMinimumIncrement()Gets the smaller of step increment and page increment.- Gibt zurück:
- the minimum increment
-
getPageIncrement
public double getPageIncrement()Retrieves the page increment of the adjustment.- Gibt zurück:
- the page increment
-
getPageSize
public double getPageSize()Retrieves the page size of the adjustment.- Gibt zurück:
- the page size
-
getStepIncrement
public double getStepIncrement()Retrieves the step increment of the adjustment.- Gibt zurück:
- the step increment
-
getUpper
public double getUpper()Retrieves the maximum value of the adjustment.- Gibt zurück:
- the maximum value
-
getValue
public double getValue()Gets the current value of the adjustment.- Gibt zurück:
- the current value
-
setLower
public void setLower(double lower) Sets the minimum value of the adjustment.
When setting multiple adjustment properties via their individual
setters, multiple [signal@Gtk.Adjustment::changed] signals will
be emitted. However, since the emission of the
[signal@Gtk.Adjustment::changed] signal is tied to the emission
of the ::notify signals of the changed properties, it’s possible
to compress the [signal@Gtk.Adjustment::changed] signals into one
by calling g_object_freeze_notify() and g_object_thaw_notify()
around the calls to the individual setters.
Alternatively, using a single g_object_set() for all the properties
to change, or using [method@Gtk.Adjustment.configure] has the same effect.- Parameter:
lower
- the new minimum value
-
setPageIncrement
public void setPageIncrement(double page_increment) Sets the page increment of the adjustment.
See [method@Gtk.Adjustment.set_lower] about how to compress
multiple emissions of the [signal@Gtk.Adjustment::changed]
signal when setting multiple adjustment properties.- Parameter:
page_increment
- the new page increment
-
setPageSize
public void setPageSize(double page_size) Sets the page size of the adjustment.
See [method@Gtk.Adjustment.set_lower] about how to compress
multiple emissions of the [signal@Gtk.Adjustment::changed]
signal when setting multiple adjustment properties.- Parameter:
page_size
- the new page size
-
setStepIncrement
public void setStepIncrement(double step_increment) Sets the step increment of the adjustment.
See [method@Gtk.Adjustment.set_lower] about how to compress
multiple emissions of the [signal@Gtk.Adjustment::changed]
signal when setting multiple adjustment properties.- Parameter:
step_increment
- the new step increment
-
setUpper
public void setUpper(double upper) Sets the maximum value of the adjustment.
Note that values will be restricted by `upper - page-size`
if the page-size property is nonzero.
See [method@Gtk.Adjustment.set_lower] about how to compress
multiple emissions of the [signal@Gtk.Adjustment::changed]
signal when setting multiple adjustment properties.- Parameter:
upper
- the new maximum value
-
setValue
public void setValue(double value) Sets the `GtkAdjustment` value.
The value is clamped to lie between [property@Gtk.Adjustment:lower]
and [property@Gtk.Adjustment:upper].
Note that for adjustments which are used in a `GtkScrollbar`,
the effective range of allowed values goes from
[property@Gtk.Adjustment:lower] to
[property@Gtk.Adjustment:upper] - [property@Gtk.Adjustment:page-size].- Parameter:
value
- the new value
-
onChanged
Connect to signal "changed".
SeeAdjustment.OnChanged.onChanged()
for signal description.
FieldSIGNAL_ON_CHANGED
contains original signal name and can be used as resource reference.- Parameter:
signal
- callback function (lambda).- Gibt zurück:
SignalHandler
. Can be used to disconnect signal and to release callback function.
-
onValueChanged
Connect to signal "value-changed".
SeeAdjustment.OnValueChanged.onValueChanged()
for signal description.
FieldSIGNAL_ON_VALUE_CHANGED
contains original signal name and can be used as resource reference.- Parameter:
signal
- callback function (lambda).- Gibt zurück:
SignalHandler
. Can be used to disconnect signal and to release callback function.
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-