RangeProtocol
public protocol RangeProtocol : OrientableProtocol, WidgetProtocol
GtkRange
is the common base class for widgets which visualize an
adjustment, e.g GtkScale
or GtkScrollbar
.
Apart from signals for monitoring the parameters of the adjustment,
GtkRange
provides properties and methods for influencing the sensitivity
of the “steppers”. It also provides properties and methods for setting a
“fill level” on range widgets. See gtk_range_set_fill_level()
.
The RangeProtocol
protocol exposes the methods and properties of an underlying GtkRange
instance.
The default implementation of these can be found in the protocol extension below.
For a concrete class that implements these methods and properties, see Range
.
Alternatively, use RangeRef
as a lighweight, unowned
reference if you already have an instance you just want to use.
-
Untyped pointer to the underlying
GtkRange
instance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get }
-
range_ptr
Default implementationTyped pointer to the underlying
GtkRange
instance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkRange
instance.Declaration
Swift
var range_ptr: UnsafeMutablePointer<GtkRange>! { get }
-
Required Initialiser for types conforming to
RangeProtocol
Declaration
Swift
init(raw: UnsafeMutableRawPointer)
-
bind(property:
Extension methodto: _: flags: transformFrom: transformTo: ) Bind a
RangePropertyName
source property to a given target object.Declaration
Swift
@discardableResult @inlinable func bind<Q, T>(property source_property: RangePropertyName, to target: T, _ target_property: Q, flags f: BindingFlags = .default, transformFrom transform_from: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }, transformTo transform_to: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }) -> BindingRef! where Q : PropertyNameProtocol, T : ObjectProtocol
Parameters
source_property
the source property to bind
target
the target object to bind to
target_property
the target property to bind to
flags
the flags to pass to the
Binding
transform_from
ValueTransformer
to use for forward transformationtransform_to
ValueTransformer
to use for backwards transformationReturn Value
binding reference or
nil
in case of an error -
get(property:
Extension method) Get the value of a Range property
Declaration
Swift
@inlinable func get(property: RangePropertyName) -> GLibObject.Value
Parameters
property
the property to get the value for
Return Value
the value of the named property
-
set(property:
Extension methodvalue: ) Set the value of a Range property. Note that this will only have an effect on properties that are writable and not construct-only!
Declaration
Swift
@inlinable func set(property: RangePropertyName, value v: GLibObject.Value)
Parameters
property
the property to get the value for
Return Value
the value of the named property
-
connect(signal:
Extension methodflags: handler: ) Connect a Swift signal handler to the given, typed
RangeSignalName
signalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: RangeSignalName, flags f: ConnectFlags = ConnectFlags(0), handler h: @escaping SignalHandler) -> Int
Parameters
signal
The signal to connect
flags
The connection flags to use
data
A pointer to user data to provide to the callback
destroyData
A
GClosureNotify
C function to destroy the data pointed to byuserData
handler
The Swift signal handler (function or callback) to invoke on the given signal
Return Value
The signal handler ID (always greater than 0 for successful connections)
-
connect(signal:
Extension methodflags: data: destroyData: signalHandler: ) Connect a C signal handler to the given, typed
RangeSignalName
signalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: RangeSignalName, flags f: ConnectFlags = ConnectFlags(0), data userData: gpointer!, destroyData destructor: GClosureNotify? = nil, signalHandler h: @escaping GCallback) -> Int
Parameters
signal
The signal to connect
flags
The connection flags to use
data
A pointer to user data to provide to the callback
destroyData
A
GClosureNotify
C function to destroy the data pointed to byuserData
signalHandler
The C function to be called on the given signal
Return Value
The signal handler ID (always greater than 0 for successful connections)
-
onAdjustBounds(flags:
Extension methodhandler: ) Emitted before clamping a value, to give the application a chance to adjust the bounds.
Note
This represents the underlyingadjust-bounds
signalDeclaration
Swift
@discardableResult @inlinable func onAdjustBounds(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: RangeRef, _ value: Double) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
value
the value before we clamp
handler
The signal handler to call Run the given callback whenever the
adjustBounds
signal is emitted -
adjustBoundsSignal
Extension methodTyped
adjust-bounds
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var adjustBoundsSignal: RangeSignalName { get }
-
onChangeValue(flags:
Extension methodhandler: ) The
GtkRange::change-value
signal is emitted when a scroll action is performed on a range. It allows an application to determine the type of scroll event that occurred and the resultant new value. The application can handle the event itself and returntrue
to prevent further processing. Or, by returningfalse
, it can pass the event to other handlers until the default GTK+ handler is reached.The value parameter is unrounded. An application that overrides the GtkRange
change-value
signal is responsible for clamping the value to the desired number of decimal digits; the default GTK+ handler clamps the value based onGtkRange:round-digits
.Note
This represents the underlyingchange-value
signalDeclaration
Swift
@discardableResult @inlinable func onChangeValue(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: RangeRef, _ scroll: ScrollType, _ value: Double) -> Bool) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
scroll
the type of scroll action that was performed
value
the new value resulting from the scroll action
handler
true
to prevent other handlers from being invoked for the signal,false
to propagate the signal further Run the given callback whenever thechangeValue
signal is emitted -
changeValueSignal
Extension methodTyped
change-value
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var changeValueSignal: RangeSignalName { get }
-
onMoveSlider(flags:
Extension methodhandler: ) Virtual function that moves the slider. Used for keybindings.
Note
This represents the underlyingmove-slider
signalDeclaration
Swift
@discardableResult @inlinable func onMoveSlider(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: RangeRef, _ step: ScrollType) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
step
how to move the slider
handler
The signal handler to call Run the given callback whenever the
moveSlider
signal is emitted -
moveSliderSignal
Extension methodTyped
move-slider
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var moveSliderSignal: RangeSignalName { get }
-
onValueChanged(flags:
Extension methodhandler: ) Emitted when the range value changes.
Note
This represents the underlyingvalue-changed
signalDeclaration
Swift
@discardableResult @inlinable func onValueChanged(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: RangeRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
handler
The signal handler to call Run the given callback whenever the
valueChanged
signal is emitted -
valueChangedSignal
Extension methodTyped
value-changed
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var valueChangedSignal: RangeSignalName { get }
-
onNotifyAdjustment(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::adjustment
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyAdjustment(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: RangeRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyAdjustment
signal is emitted -
notifyAdjustmentSignal
Extension methodTyped
notify::adjustment
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyAdjustmentSignal: RangeSignalName { get }
-
onNotifyFillLevel(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::fill-level
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyFillLevel(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: RangeRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyFillLevel
signal is emitted -
notifyFillLevelSignal
Extension methodTyped
notify::fill-level
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyFillLevelSignal: RangeSignalName { get }
-
onNotifyInverted(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::inverted
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyInverted(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: RangeRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyInverted
signal is emitted -
notifyInvertedSignal
Extension methodTyped
notify::inverted
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyInvertedSignal: RangeSignalName { get }
-
onNotifyLowerStepperSensitivity(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::lower-stepper-sensitivity
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyLowerStepperSensitivity(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: RangeRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyLowerStepperSensitivity
signal is emitted -
notifyLowerStepperSensitivitySignal
Extension methodTyped
notify::lower-stepper-sensitivity
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyLowerStepperSensitivitySignal: RangeSignalName { get }
-
onNotifyRestrictToFillLevel(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::restrict-to-fill-level
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyRestrictToFillLevel(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: RangeRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyRestrictToFillLevel
signal is emitted -
notifyRestrictToFillLevelSignal
Extension methodTyped
notify::restrict-to-fill-level
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyRestrictToFillLevelSignal: RangeSignalName { get }
-
onNotifyRoundDigits(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::round-digits
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyRoundDigits(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: RangeRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyRoundDigits
signal is emitted -
notifyRoundDigitsSignal
Extension methodTyped
notify::round-digits
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyRoundDigitsSignal: RangeSignalName { get }
-
onNotifyShowFillLevel(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::show-fill-level
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyShowFillLevel(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: RangeRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyShowFillLevel
signal is emitted -
notifyShowFillLevelSignal
Extension methodTyped
notify::show-fill-level
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyShowFillLevelSignal: RangeSignalName { get }
-
onNotifyUpperStepperSensitivity(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::upper-stepper-sensitivity
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyUpperStepperSensitivity(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: RangeRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyUpperStepperSensitivity
signal is emitted -
notifyUpperStepperSensitivitySignal
Extension methodTyped
notify::upper-stepper-sensitivity
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyUpperStepperSensitivitySignal: RangeSignalName { get }
-
getAdjustment()
Extension methodGet the
GtkAdjustment
which is the “model” object forGtkRange
. Seegtk_range_set_adjustment()
for details. The return value does not have a reference added, so should not be unreferenced.Declaration
Swift
@inlinable func getAdjustment() -> AdjustmentRef!
-
getFillLevel()
Extension methodGets the current position of the fill level indicator.
Declaration
Swift
@inlinable func getFillLevel() -> Double
-
getFlippable()
Extension methodGets the value set by
gtk_range_set_flippable()
.Declaration
Swift
@inlinable func getFlippable() -> Bool
-
getInverted()
Extension methodGets the value set by
gtk_range_set_inverted()
.Declaration
Swift
@inlinable func getInverted() -> Bool
-
getLowerStepperSensitivity()
Extension methodGets the sensitivity policy for the stepper that points to the ‘lower’ end of the GtkRange’s adjustment.
Declaration
Swift
@inlinable func getLowerStepperSensitivity() -> GtkSensitivityType
-
getMinSliderSize()
Extension methodThis function is useful mainly for
GtkRange
subclasses.See
gtk_range_set_min_slider_size()
.get_min_slider_size is deprecated: Use the min-height/min-width CSS properties on the slider node.
Declaration
Swift
@available(*, deprecated) @inlinable func getMinSliderSize() -> Int
-
get(rangeRect:
Extension method) This function returns the area that contains the range’s trough and its steppers, in widget->window coordinates.
This function is useful mainly for
GtkRange
subclasses.Declaration
Swift
@inlinable func get<RectangleT>(rangeRect: RectangleT) where RectangleT : RectangleProtocol
-
getRestrictToFillLevel()
Extension methodGets whether the range is restricted to the fill level.
Declaration
Swift
@inlinable func getRestrictToFillLevel() -> Bool
-
getRoundDigits()
Extension methodGets the number of digits to round the value to when it changes. See
GtkRange::change-value
.Declaration
Swift
@inlinable func getRoundDigits() -> Int
-
getShowFillLevel()
Extension methodGets whether the range displays the fill level graphically.
Declaration
Swift
@inlinable func getShowFillLevel() -> Bool
-
getSliderRange(sliderStart:
Extension methodsliderEnd: ) This function returns sliders range along the long dimension, in widget->window coordinates.
This function is useful mainly for
GtkRange
subclasses.Declaration
Swift
@inlinable func getSliderRange(sliderStart: UnsafeMutablePointer<gint>! = nil, sliderEnd: UnsafeMutablePointer<gint>! = nil)
-
getSliderSizeFixed()
Extension methodThis function is useful mainly for
GtkRange
subclasses.See
gtk_range_set_slider_size_fixed()
.Declaration
Swift
@inlinable func getSliderSizeFixed() -> Bool
-
getUpperStepperSensitivity()
Extension methodGets the sensitivity policy for the stepper that points to the ‘upper’ end of the GtkRange’s adjustment.
Declaration
Swift
@inlinable func getUpperStepperSensitivity() -> GtkSensitivityType
-
getValue()
Extension methodGets the current value of the range.
Declaration
Swift
@inlinable func getValue() -> Double
-
set(adjustment:
Extension method) Sets the adjustment to be used as the “model” object for this range widget. The adjustment indicates the current range value, the minimum and maximum range values, the step/page increments used for keybindings and scrolling, and the page size. The page size is normally 0 for
GtkScale
and nonzero forGtkScrollbar
, and indicates the size of the visible area of the widget being scrolled. The page size affects the size of the scrollbar slider.Declaration
Swift
@inlinable func set<AdjustmentT>(adjustment: AdjustmentT) where AdjustmentT : AdjustmentProtocol
-
set(fillLevel:
Extension method) Set the new position of the fill level indicator.
The “fill level” is probably best described by its most prominent use case, which is an indicator for the amount of pre-buffering in a streaming media player. In that use case, the value of the range would indicate the current play position, and the fill level would be the position up to which the file/stream has been downloaded.
This amount of prebuffering can be displayed on the range’s trough and is themeable separately from the trough. To enable fill level display, use
gtk_range_set_show_fill_level()
. The range defaults to not showing the fill level.Additionally, it’s possible to restrict the range’s slider position to values which are smaller than the fill level. This is controller by
gtk_range_set_restrict_to_fill_level()
and is by default enabled.Declaration
Swift
@inlinable func set(fillLevel: Double)
-
set(flippable:
Extension method) If a range is flippable, it will switch its direction if it is horizontal and its direction is
GTK_TEXT_DIR_RTL
.See
gtk_widget_get_direction()
.Declaration
Swift
@inlinable func set(flippable: Bool)
-
setIncrements(step:
Extension methodpage: ) Sets the step and page sizes for the range. The step size is used when the user clicks the
GtkScrollbar
arrows or movesGtkScale
via arrow keys. The page size is used for example when moving via Page Up or Page Down keys.Declaration
Swift
@inlinable func setIncrements(step: Double, page: Double)
-
setInverted(setting:
Extension method) Ranges normally move from lower to higher values as the slider moves from top to bottom or left to right. Inverted ranges have higher values at the top or on the right rather than on the bottom or left.
Declaration
Swift
@inlinable func setInverted(setting: Bool)
-
setLowerStepper(sensitivity:
Extension method) Sets the sensitivity policy for the stepper that points to the ‘lower’ end of the GtkRange’s adjustment.
Declaration
Swift
@inlinable func setLowerStepper(sensitivity: GtkSensitivityType)
-
setMinSliderSize(minSize:
Extension method) Sets the minimum size of the range’s slider.
This function is useful mainly for
GtkRange
subclasses.set_min_slider_size is deprecated: Use the min-height/min-width CSS properties on the slider node.
Declaration
Swift
@available(*, deprecated) @inlinable func setMinSliderSize(minSize: Int)
-
setRange(min:
Extension methodmax: ) Sets the allowable values in the
GtkRange
, and clamps the range value to be betweenmin
andmax
. (If the range has a non-zero page size, it is clamped betweenmin
andmax
- page-size.)Declaration
Swift
@inlinable func setRange(min: Double, max: Double)
-
set(restrictToFillLevel:
Extension method) Sets whether the slider is restricted to the fill level. See
gtk_range_set_fill_level()
for a general description of the fill level concept.Declaration
Swift
@inlinable func set(restrictToFillLevel: Bool)
-
set(roundDigits:
Extension method) Sets the number of digits to round the value to when it changes. See
GtkRange::change-value
.Declaration
Swift
@inlinable func set(roundDigits: Int)
-
set(showFillLevel:
Extension method) Sets whether a graphical fill level is show on the trough. See
gtk_range_set_fill_level()
for a general description of the fill level concept.Declaration
Swift
@inlinable func set(showFillLevel: Bool)
-
setSlider(sizeFixed:
Extension method) Sets whether the range’s slider has a fixed size, or a size that depends on its adjustment’s page size.
This function is useful mainly for
GtkRange
subclasses.Declaration
Swift
@inlinable func setSlider(sizeFixed: Bool)
-
setUpperStepper(sensitivity:
Extension method) Sets the sensitivity policy for the stepper that points to the ‘upper’ end of the GtkRange’s adjustment.
Declaration
Swift
@inlinable func setUpperStepper(sensitivity: GtkSensitivityType)
-
set(value:
Extension method) Sets the current value of the range; if the value is outside the minimum or maximum range values, it will be clamped to fit inside them. The range emits the
GtkRange::value-changed
signal if the value changes.Declaration
Swift
@inlinable func set(value: Double)
-
adjustment
Extension methodUndocumented
Declaration
Swift
@inlinable var adjustment: AdjustmentRef! { get nonmutating set }
-
fillLevel
Extension methodGets the current position of the fill level indicator.
Declaration
Swift
@inlinable var fillLevel: Double { get nonmutating set }
-
flippable
Extension methodGets the value set by
gtk_range_set_flippable()
.Declaration
Swift
@inlinable var flippable: Bool { get nonmutating set }
-
inverted
Extension methodUndocumented
Declaration
Swift
@inlinable var inverted: Bool { get nonmutating set }
-
lowerStepperSensitivity
Extension methodGets the sensitivity policy for the stepper that points to the ‘lower’ end of the GtkRange’s adjustment.
Declaration
Swift
@inlinable var lowerStepperSensitivity: GtkSensitivityType { get nonmutating set }
-
minSliderSize
Extension methodThis function is useful mainly for
GtkRange
subclasses.See
gtk_range_set_min_slider_size()
.get_min_slider_size is deprecated: Use the min-height/min-width CSS properties on the slider node.
Declaration
Swift
@inlinable var minSliderSize: Int { get nonmutating set }
-
restrictToFillLevel
Extension methodGets whether the range is restricted to the fill level.
Declaration
Swift
@inlinable var restrictToFillLevel: Bool { get nonmutating set }
-
roundDigits
Extension methodGets the number of digits to round the value to when it changes. See
GtkRange::change-value
.Declaration
Swift
@inlinable var roundDigits: Int { get nonmutating set }
-
showFillLevel
Extension methodGets whether the range displays the fill level graphically.
Declaration
Swift
@inlinable var showFillLevel: Bool { get nonmutating set }
-
sliderSizeFixed
Extension methodThis function is useful mainly for
GtkRange
subclasses.See
gtk_range_set_slider_size_fixed()
.Declaration
Swift
@inlinable var sliderSizeFixed: Bool { get nonmutating set }
-
upperStepperSensitivity
Extension methodGets the sensitivity policy for the stepper that points to the ‘upper’ end of the GtkRange’s adjustment.
Declaration
Swift
@inlinable var upperStepperSensitivity: GtkSensitivityType { get nonmutating set }
-
value
Extension methodGets the current value of the range.
Declaration
Swift
@inlinable var value: Double { get nonmutating set }
-
widget
Extension methodUndocumented
Declaration
Swift
@inlinable var widget: GtkWidget { get }