ScrolledWindowProtocol
public protocol ScrolledWindowProtocol : WidgetProtocol
GtkScrolledWindow is a container that makes its child scrollable.
It does so using either internally added scrollbars or externally associated adjustments, and optionally draws a frame around the child.
Widgets with native scrolling support, i.e. those whose classes implement
the [ifaceGtk.Scrollable] interface, are added directly. For other types
of widget, the class [classGtk.Viewport] acts as an adaptor, giving
scrollability to other widgets. [methodGtk.ScrolledWindow.set_child]
intelligently accounts for whether or not the added child is a GtkScrollable.
If it isn’t, then it wraps the child in a GtkViewport. Therefore, you can
just add any child widget and not worry about the details.
If [methodGtk.ScrolledWindow.set_child] has added a GtkViewport for you,
you can remove both your added child widget from the GtkViewport, and the
GtkViewport from the GtkScrolledWindow, like this:
GtkWidget *scrolled_window = gtk_scrolled_window_new ();
GtkWidget *child_widget = gtk_button_new ();
// GtkButton is not a GtkScrollable, so GtkScrolledWindow will automatically
// add a GtkViewport.
gtk_box_append (GTK_BOX (scrolled_window), child_widget);
// Either of these will result in child_widget being unparented:
gtk_box_remove (GTK_BOX (scrolled_window), child_widget);
// or
gtk_box_remove (GTK_BOX (scrolled_window),
gtk_bin_get_child (GTK_BIN (scrolled_window)));
Unless [propertyGtk.ScrolledWindow:hscrollbar-policy] and
[propertyGtk.ScrolledWindow:vscrollbar-policy] are GTK_POLICY_NEVER or
GTK_POLICY_EXTERNAL, GtkScrolledWindow adds internal GtkScrollbar widgets
around its child. The scroll position of the child, and if applicable the
scrollbars, is controlled by the [propertyGtk.ScrolledWindow:hadjustment]
and [propertyGtk.ScrolledWindow:vadjustment] that are associated with the
GtkScrolledWindow. See the docs on [classGtk.Scrollbar] for the details,
but note that the “step_increment” and “page_increment” fields are only
effective if the policy causes scrollbars to be present.
If a GtkScrolledWindow doesn’t behave quite as you would like, or
doesn’t have exactly the right layout, it’s very possible to set up
your own scrolling with GtkScrollbar and for example a GtkGrid.
Touch support
GtkScrolledWindow has built-in support for touch devices. When a
touchscreen is used, swiping will move the scrolled window, and will
expose ‘kinetic’ behavior. This can be turned off with the
[propertyGtk.ScrolledWindow:kinetic-scrolling] property if it is undesired.
GtkScrolledWindow also displays visual ‘overshoot’ indication when
the content is pulled beyond the end, and this situation can be
captured with the [signalGtk.ScrolledWindow::edge-overshot] signal.
If no mouse device is present, the scrollbars will overlaid as
narrow, auto-hiding indicators over the content. If traditional
scrollbars are desired although no mouse is present, this behaviour
can be turned off with the [propertyGtk.ScrolledWindow:overlay-scrolling]
property.
CSS nodes
GtkScrolledWindow has a main CSS node with name scrolledwindow.
It gets a .frame style class added when [propertyGtk.ScrolledWindow:has-frame]
is true.
It uses subnodes with names overshoot and undershoot to draw the overflow and underflow indications. These nodes get the .left, .right, .top or .bottom style class added depending on where the indication is drawn.
GtkScrolledWindow also sets the positional style classes (.left, .right,
.top, .bottom) and style classes related to overlay scrolling
(.overlay-indicator, .dragging, .hovering) on its scrollbars.
If both scrollbars are visible, the area where they meet is drawn with a subnode named junction.
Accessibility
GtkScrolledWindow uses the GTK_ACCESSIBLE_ROLE_GROUP role.
The ScrolledWindowProtocol protocol exposes the methods and properties of an underlying GtkScrolledWindow 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 ScrolledWindow.
Alternatively, use ScrolledWindowRef as a lighweight, unowned reference if you already have an instance you just want to use.
-
Untyped pointer to the underlying
GtkScrolledWindowinstance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get } -
scrolled_window_ptrDefault implementationTyped pointer to the underlying
GtkScrolledWindowinstance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkScrolledWindowinstance.Declaration
Swift
var scrolled_window_ptr: UnsafeMutablePointer<GtkScrolledWindow>! { get } -
Required Initialiser for types conforming to
ScrolledWindowProtocolDeclaration
Swift
init(raw: UnsafeMutableRawPointer)
-
bind(property:Extension methodto: _: flags: transformFrom: transformTo: ) Bind a
ScrolledWindowPropertyNamesource property to a given target object.Declaration
Swift
@discardableResult @inlinable func bind<Q, T>(property source_property: ScrolledWindowPropertyName, 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 : ObjectProtocolParameters
source_propertythe source property to bind
targetthe target object to bind to
target_propertythe target property to bind to
flagsthe flags to pass to the
Bindingtransform_fromValueTransformerto use for forward transformationtransform_toValueTransformerto use for backwards transformationReturn Value
binding reference or
nilin case of an error -
get(property:Extension method) Get the value of a ScrolledWindow property
Declaration
Swift
@inlinable func get(property: ScrolledWindowPropertyName) -> GLibObject.ValueParameters
propertythe property to get the value for
Return Value
the value of the named property
-
set(property:Extension methodvalue: ) Set the value of a ScrolledWindow property. Note that this will only have an effect on properties that are writable and not construct-only!
Declaration
Swift
@inlinable func set(property: ScrolledWindowPropertyName, value v: GLibObject.Value)Parameters
propertythe 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
ScrolledWindowSignalNamesignalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: ScrolledWindowSignalName, flags f: ConnectFlags = ConnectFlags(0), handler h: @escaping SignalHandler) -> IntParameters
signalThe signal to connect
flagsThe connection flags to use
dataA pointer to user data to provide to the callback
destroyDataA
GClosureNotifyC function to destroy the data pointed to byuserDatahandlerThe 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
ScrolledWindowSignalNamesignalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: ScrolledWindowSignalName, flags f: ConnectFlags = ConnectFlags(0), data userData: gpointer!, destroyData destructor: GClosureNotify? = nil, signalHandler h: @escaping GCallback) -> IntParameters
signalThe signal to connect
flagsThe connection flags to use
dataA pointer to user data to provide to the callback
destroyDataA
GClosureNotifyC function to destroy the data pointed to byuserDatasignalHandlerThe C function to be called on the given signal
Return Value
The signal handler ID (always greater than 0 for successful connections)
-
onEdgeOvershot(flags:Extension methodhandler: ) Emitted whenever user initiated scrolling makes the scrolled window firmly surpass the limits defined by the adjustment in that orientation.
A similar behavior without edge resistance is provided by the [signal
Gtk.ScrolledWindow::edge-reached] signal.Note: The
posargument is LTR/RTL aware, so callers should be aware too if intending to provide behavior on horizontal edges.Note
This represents the underlyingedge-overshotsignalDeclaration
Swift
@discardableResult @inlinable func onEdgeOvershot(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ScrolledWindowRef, _ pos: PositionType) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
posedge side that was hit
handlerThe signal handler to call Run the given callback whenever the
edgeOvershotsignal is emitted -
edgeOvershotSignalExtension methodTyped
edge-overshotsignal for using theconnect(signal:)methodsDeclaration
Swift
static var edgeOvershotSignal: ScrolledWindowSignalName { get } -
onEdgeReached(flags:Extension methodhandler: ) Emitted whenever user-initiated scrolling makes the scrolled window exactly reach the lower or upper limits defined by the adjustment in that orientation.
A similar behavior with edge resistance is provided by the [signal
Gtk.ScrolledWindow::edge-overshot] signal.Note: The
posargument is LTR/RTL aware, so callers should be aware too if intending to provide behavior on horizontal edges.Note
This represents the underlyingedge-reachedsignalDeclaration
Swift
@discardableResult @inlinable func onEdgeReached(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ScrolledWindowRef, _ pos: PositionType) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
posedge side that was reached
handlerThe signal handler to call Run the given callback whenever the
edgeReachedsignal is emitted -
edgeReachedSignalExtension methodTyped
edge-reachedsignal for using theconnect(signal:)methodsDeclaration
Swift
static var edgeReachedSignal: ScrolledWindowSignalName { get } -
onMoveFocusOut(flags:Extension methodhandler: ) Emitted when focus is moved away from the scrolled window by a keybinding.
This is a keybinding signal.
The default bindings for this signal are
Ctrl + Tabto move forward andCtrl + Shift + Tabto move backward.Note
This represents the underlyingmove-focus-outsignalDeclaration
Swift
@discardableResult @inlinable func onMoveFocusOut(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ScrolledWindowRef, _ directionType: DirectionType) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
directionTypeeither
GTK_DIR_TAB_FORWARDorGTK_DIR_TAB_BACKWARDhandlerThe signal handler to call Run the given callback whenever the
moveFocusOutsignal is emitted -
moveFocusOutSignalExtension methodTyped
move-focus-outsignal for using theconnect(signal:)methodsDeclaration
Swift
static var moveFocusOutSignal: ScrolledWindowSignalName { get } -
onScrollChild(flags:Extension methodhandler: ) Emitted when a keybinding that scrolls is pressed.
This is a keybinding signal.
The horizontal or vertical adjustment is updated which triggers a signal that the scrolled window’s child may listen to and scroll itself.
Note
This represents the underlyingscroll-childsignalDeclaration
Swift
@discardableResult @inlinable func onScrollChild(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ScrolledWindowRef, _ scroll: ScrollType, _ horizontal: Bool) -> Bool) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
scrolla
GtkScrollTypedescribing how much to scrollhorizontalwhether the keybinding scrolls the child horizontally or not
handlerThe signal handler to call Run the given callback whenever the
scrollChildsignal is emitted -
scrollChildSignalExtension methodTyped
scroll-childsignal for using theconnect(signal:)methodsDeclaration
Swift
static var scrollChildSignal: ScrolledWindowSignalName { get } -
onNotifyChild(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 innotifybeing 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::childsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyChild(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ScrolledWindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyChildsignal is emitted -
notifyChildSignalExtension methodTyped
notify::childsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyChildSignal: ScrolledWindowSignalName { get } -
onNotifyHadjustment(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 innotifybeing 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::hadjustmentsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyHadjustment(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ScrolledWindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyHadjustmentsignal is emitted -
notifyHadjustmentSignalExtension methodTyped
notify::hadjustmentsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyHadjustmentSignal: ScrolledWindowSignalName { get } -
onNotifyHasFrame(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 innotifybeing 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::has-framesignalDeclaration
Swift
@discardableResult @inlinable func onNotifyHasFrame(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ScrolledWindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyHasFramesignal is emitted -
notifyHasFrameSignalExtension methodTyped
notify::has-framesignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyHasFrameSignal: ScrolledWindowSignalName { get } -
onNotifyHscrollbarPolicy(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 innotifybeing 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::hscrollbar-policysignalDeclaration
Swift
@discardableResult @inlinable func onNotifyHscrollbarPolicy(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ScrolledWindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyHscrollbarPolicysignal is emitted -
notifyHscrollbarPolicySignalExtension methodTyped
notify::hscrollbar-policysignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyHscrollbarPolicySignal: ScrolledWindowSignalName { get } -
onNotifyKineticScrolling(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 innotifybeing 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::kinetic-scrollingsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyKineticScrolling(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ScrolledWindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyKineticScrollingsignal is emitted -
notifyKineticScrollingSignalExtension methodTyped
notify::kinetic-scrollingsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyKineticScrollingSignal: ScrolledWindowSignalName { get } -
onNotifyMaxContentHeight(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 innotifybeing 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::max-content-heightsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyMaxContentHeight(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ScrolledWindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyMaxContentHeightsignal is emitted -
notifyMaxContentHeightSignalExtension methodTyped
notify::max-content-heightsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyMaxContentHeightSignal: ScrolledWindowSignalName { get } -
onNotifyMaxContentWidth(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 innotifybeing 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::max-content-widthsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyMaxContentWidth(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ScrolledWindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyMaxContentWidthsignal is emitted -
notifyMaxContentWidthSignalExtension methodTyped
notify::max-content-widthsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyMaxContentWidthSignal: ScrolledWindowSignalName { get } -
onNotifyMinContentHeight(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 innotifybeing 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::min-content-heightsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyMinContentHeight(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ScrolledWindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyMinContentHeightsignal is emitted -
notifyMinContentHeightSignalExtension methodTyped
notify::min-content-heightsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyMinContentHeightSignal: ScrolledWindowSignalName { get } -
onNotifyMinContentWidth(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 innotifybeing 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::min-content-widthsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyMinContentWidth(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ScrolledWindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyMinContentWidthsignal is emitted -
notifyMinContentWidthSignalExtension methodTyped
notify::min-content-widthsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyMinContentWidthSignal: ScrolledWindowSignalName { get } -
onNotifyOverlayScrolling(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 innotifybeing 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::overlay-scrollingsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyOverlayScrolling(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ScrolledWindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyOverlayScrollingsignal is emitted -
notifyOverlayScrollingSignalExtension methodTyped
notify::overlay-scrollingsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyOverlayScrollingSignal: ScrolledWindowSignalName { get } -
onNotifyPropagateNaturalHeight(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 innotifybeing 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::propagate-natural-heightsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyPropagateNaturalHeight(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ScrolledWindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyPropagateNaturalHeightsignal is emitted -
notifyPropagateNaturalHeightSignalExtension methodTyped
notify::propagate-natural-heightsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyPropagateNaturalHeightSignal: ScrolledWindowSignalName { get } -
onNotifyPropagateNaturalWidth(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 innotifybeing 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::propagate-natural-widthsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyPropagateNaturalWidth(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ScrolledWindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyPropagateNaturalWidthsignal is emitted -
notifyPropagateNaturalWidthSignalExtension methodTyped
notify::propagate-natural-widthsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyPropagateNaturalWidthSignal: ScrolledWindowSignalName { get } -
onNotifyVadjustment(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 innotifybeing 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::vadjustmentsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyVadjustment(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ScrolledWindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyVadjustmentsignal is emitted -
notifyVadjustmentSignalExtension methodTyped
notify::vadjustmentsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyVadjustmentSignal: ScrolledWindowSignalName { get } -
onNotifyVscrollbarPolicy(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 innotifybeing 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::vscrollbar-policysignalDeclaration
Swift
@discardableResult @inlinable func onNotifyVscrollbarPolicy(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ScrolledWindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyVscrollbarPolicysignal is emitted -
notifyVscrollbarPolicySignalExtension methodTyped
notify::vscrollbar-policysignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyVscrollbarPolicySignal: ScrolledWindowSignalName { get } -
onNotifyWindowPlacement(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 innotifybeing 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::window-placementsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyWindowPlacement(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ScrolledWindowRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyWindowPlacementsignal is emitted -
notifyWindowPlacementSignalExtension methodTyped
notify::window-placementsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyWindowPlacementSignal: ScrolledWindowSignalName { get }
-
getChild()Extension methodGets the child widget of
scrolled_window.Declaration
Swift
@inlinable func getChild() -> WidgetRef! -
getHadjustment()Extension methodReturns the horizontal scrollbar’s adjustment.
This is the adjustment used to connect the horizontal scrollbar to the child widget’s horizontal scroll functionality.
Declaration
Swift
@inlinable func getHadjustment() -> AdjustmentRef! -
getHasFrame()Extension methodGets whether the scrolled window draws a frame.
Declaration
Swift
@inlinable func getHasFrame() -> Bool -
getHscrollbar()Extension methodReturns the horizontal scrollbar of
scrolled_window.Declaration
Swift
@inlinable func getHscrollbar() -> WidgetRef! -
getKineticScrolling()Extension methodReturns the specified kinetic scrolling behavior.
Declaration
Swift
@inlinable func getKineticScrolling() -> Bool -
getMaxContentHeight()Extension methodReturns the maximum content height set.
Declaration
Swift
@inlinable func getMaxContentHeight() -> Int -
getMaxContentWidth()Extension methodReturns the maximum content width set.
Declaration
Swift
@inlinable func getMaxContentWidth() -> Int -
getMinContentHeight()Extension methodGets the minimal content height of
scrolled_window.Declaration
Swift
@inlinable func getMinContentHeight() -> Int -
getMinContentWidth()Extension methodGets the minimum content width of
scrolled_window.Declaration
Swift
@inlinable func getMinContentWidth() -> Int -
getOverlayScrolling()Extension methodReturns whether overlay scrolling is enabled for this scrolled window.
Declaration
Swift
@inlinable func getOverlayScrolling() -> Bool -
getPlacement()Extension methodGets the placement of the contents with respect to the scrollbars.
Declaration
Swift
@inlinable func getPlacement() -> GtkCornerType -
getPolicy(hscrollbarPolicy:Extension methodvscrollbarPolicy: ) Retrieves the current policy values for the horizontal and vertical scrollbars.
See [method
Gtk.ScrolledWindow.set_policy].Declaration
Swift
@inlinable func getPolicy(hscrollbarPolicy: UnsafeMutablePointer<GtkPolicyType>! = nil, vscrollbarPolicy: UnsafeMutablePointer<GtkPolicyType>! = nil) -
getPropagateNaturalHeight()Extension methodReports whether the natural height of the child will be calculated and propagated through the scrolled window’s requested natural height.
Declaration
Swift
@inlinable func getPropagateNaturalHeight() -> Bool -
getPropagateNaturalWidth()Extension methodReports whether the natural width of the child will be calculated and propagated through the scrolled window’s requested natural width.
Declaration
Swift
@inlinable func getPropagateNaturalWidth() -> Bool -
getVadjustment()Extension methodReturns the vertical scrollbar’s adjustment.
This is the adjustment used to connect the vertical scrollbar to the child widget’s vertical scroll functionality.
Declaration
Swift
@inlinable func getVadjustment() -> AdjustmentRef! -
getVscrollbar()Extension methodReturns the vertical scrollbar of
scrolled_window.Declaration
Swift
@inlinable func getVscrollbar() -> WidgetRef! -
set(child:Extension method) Sets the child widget of
scrolled_window.Declaration
Swift
@inlinable func set(child: WidgetRef? = nil) -
set(child:Extension method) Sets the child widget of
scrolled_window.Declaration
Swift
@inlinable func set<WidgetT>(child: WidgetT?) where WidgetT : WidgetProtocol -
set(hadjustment:Extension method) Sets the
GtkAdjustmentfor the horizontal scrollbar.Declaration
Swift
@inlinable func set(hadjustment: AdjustmentRef? = nil) -
set(hadjustment:Extension method) Sets the
GtkAdjustmentfor the horizontal scrollbar.Declaration
Swift
@inlinable func set<AdjustmentT>(hadjustment: AdjustmentT?) where AdjustmentT : AdjustmentProtocol -
set(hasFrame:Extension method) Changes the frame drawn around the contents of
scrolled_window.Declaration
Swift
@inlinable func set(hasFrame: Bool) -
set(kineticScrolling:Extension method) Turns kinetic scrolling on or off.
Kinetic scrolling only applies to devices with source
GDK_SOURCE_TOUCHSCREEN.Declaration
Swift
@inlinable func set(kineticScrolling: Bool) -
setMaxContent(height:Extension method) Sets the maximum height that
scrolled_windowshould keep visible.The
scrolled_windowwill grow up to this height before it starts scrolling the content.It is a programming error to set the maximum content height to a value smaller than [property
Gtk.ScrolledWindow:min-content-height].Declaration
Swift
@inlinable func setMaxContent(height: Int) -
setMaxContent(width:Extension method) Sets the maximum width that
scrolled_windowshould keep visible.The
scrolled_windowwill grow up to this width before it starts scrolling the content.It is a programming error to set the maximum content width to a value smaller than [property
Gtk.ScrolledWindow:min-content-width].Declaration
Swift
@inlinable func setMaxContent(width: Int) -
setMinContent(height:Extension method) Sets the minimum height that
scrolled_windowshould keep visible.Note that this can and (usually will) be smaller than the minimum size of the content.
It is a programming error to set the minimum content height to a value greater than [property
Gtk.ScrolledWindow:max-content-height].Declaration
Swift
@inlinable func setMinContent(height: Int) -
setMinContent(width:Extension method) Sets the minimum width that
scrolled_windowshould keep visible.Note that this can and (usually will) be smaller than the minimum size of the content.
It is a programming error to set the minimum content width to a value greater than [property
Gtk.ScrolledWindow:max-content-width].Declaration
Swift
@inlinable func setMinContent(width: Int) -
set(overlayScrolling:Extension method) Enables or disables overlay scrolling for this scrolled window.
Declaration
Swift
@inlinable func set(overlayScrolling: Bool) -
setPlacement(windowPlacement:Extension method) Sets the placement of the contents with respect to the scrollbars for the scrolled window.
The default is
GTK_CORNER_TOP_LEFT, meaning the child is in the top left, with the scrollbars underneath and to the right. Other values in [enumGtk.CornerType] areGTK_CORNER_TOP_RIGHT,GTK_CORNER_BOTTOM_LEFT, andGTK_CORNER_BOTTOM_RIGHT.See also [method
Gtk.ScrolledWindow.get_placement] and [methodGtk.ScrolledWindow.unset_placement].Declaration
Swift
@inlinable func setPlacement(windowPlacement: GtkCornerType) -
setPolicy(hscrollbarPolicy:Extension methodvscrollbarPolicy: ) Sets the scrollbar policy for the horizontal and vertical scrollbars.
The policy determines when the scrollbar should appear; it is a value from the [enum
Gtk.PolicyType] enumeration. IfGTK_POLICY_ALWAYS, the scrollbar is always present; ifGTK_POLICY_NEVER, the scrollbar is never present; ifGTK_POLICY_AUTOMATIC, the scrollbar is present only if needed (that is, if the slider part of the bar would be smaller than the trough — the display is larger than the page size).Declaration
Swift
@inlinable func setPolicy(hscrollbarPolicy: GtkPolicyType, vscrollbarPolicy: GtkPolicyType) -
setPropagateNaturalHeight(propagate:Extension method) Sets whether the natural height of the child should be calculated and propagated through the scrolled window’s requested natural height.
Declaration
Swift
@inlinable func setPropagateNaturalHeight(propagate: Bool) -
setPropagateNaturalWidth(propagate:Extension method) Sets whether the natural width of the child should be calculated and propagated through the scrolled window’s requested natural width.
Declaration
Swift
@inlinable func setPropagateNaturalWidth(propagate: Bool) -
set(vadjustment:Extension method) Sets the
GtkAdjustmentfor the vertical scrollbar.Declaration
Swift
@inlinable func set(vadjustment: AdjustmentRef? = nil) -
set(vadjustment:Extension method) Sets the
GtkAdjustmentfor the vertical scrollbar.Declaration
Swift
@inlinable func set<AdjustmentT>(vadjustment: AdjustmentT?) where AdjustmentT : AdjustmentProtocol -
unsetPlacement()Extension methodUnsets the placement of the contents with respect to the scrollbars.
If no window placement is set for a scrolled window, it defaults to
GTK_CORNER_TOP_LEFT.Declaration
Swift
@inlinable func unsetPlacement() -
childExtension methodThe child widget.
Declaration
Swift
@inlinable var child: WidgetRef! { get nonmutating set } -
hadjustmentExtension methodUndocumented
Declaration
Swift
@inlinable var hadjustment: AdjustmentRef! { get nonmutating set } -
hasFrameExtension methodGets whether the scrolled window draws a frame.
Declaration
Swift
@inlinable var hasFrame: Bool { get nonmutating set } -
hscrollbarExtension methodReturns the horizontal scrollbar of
scrolled_window.Declaration
Swift
@inlinable var hscrollbar: WidgetRef! { get } -
kineticScrollingExtension methodReturns the specified kinetic scrolling behavior.
Declaration
Swift
@inlinable var kineticScrolling: Bool { get nonmutating set } -
maxContentHeightExtension methodReturns the maximum content height set.
Declaration
Swift
@inlinable var maxContentHeight: Int { get nonmutating set } -
maxContentWidthExtension methodReturns the maximum content width set.
Declaration
Swift
@inlinable var maxContentWidth: Int { get nonmutating set } -
minContentHeightExtension methodGets the minimal content height of
scrolled_window.Declaration
Swift
@inlinable var minContentHeight: Int { get nonmutating set } -
minContentWidthExtension methodGets the minimum content width of
scrolled_window.Declaration
Swift
@inlinable var minContentWidth: Int { get nonmutating set } -
overlayScrollingExtension methodReturns whether overlay scrolling is enabled for this scrolled window.
Declaration
Swift
@inlinable var overlayScrolling: Bool { get nonmutating set } -
placementExtension methodGets the placement of the contents with respect to the scrollbars.
Declaration
Swift
@inlinable var placement: GtkCornerType { get nonmutating set } -
propagateNaturalHeightExtension methodReports whether the natural height of the child will be calculated and propagated through the scrolled window’s requested natural height.
Declaration
Swift
@inlinable var propagateNaturalHeight: Bool { get nonmutating set } -
propagateNaturalWidthExtension methodReports whether the natural width of the child will be calculated and propagated through the scrolled window’s requested natural width.
Declaration
Swift
@inlinable var propagateNaturalWidth: Bool { get nonmutating set } -
vadjustmentExtension methodUndocumented
Declaration
Swift
@inlinable var vadjustment: AdjustmentRef! { get nonmutating set } -
vscrollbarExtension methodReturns the vertical scrollbar of
scrolled_window.Declaration
Swift
@inlinable var vscrollbar: WidgetRef! { get }
View on GitHub
Install in Dash
ScrolledWindowProtocol Protocol Reference