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
GtkScrolledWindow
instance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get }
-
scrolled_window_ptr
Default implementationTyped pointer to the underlying
GtkScrolledWindow
instance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkScrolledWindow
instance.Declaration
Swift
var scrolled_window_ptr: UnsafeMutablePointer<GtkScrolledWindow>! { get }
-
Required Initialiser for types conforming to
ScrolledWindowProtocol
Declaration
Swift
init(raw: UnsafeMutableRawPointer)
-
bind(property:
Extension methodto: _: flags: transformFrom: transformTo: ) Bind a
ScrolledWindowPropertyName
source 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 : 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 ScrolledWindow property
Declaration
Swift
@inlinable func get(property: ScrolledWindowPropertyName) -> 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 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
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
ScrolledWindowSignalName
signalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: ScrolledWindowSignalName, 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
ScrolledWindowSignalName
signalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: ScrolledWindowSignalName, 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)
-
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
pos
argument is LTR/RTL aware, so callers should be aware too if intending to provide behavior on horizontal edges.Note
This represents the underlyingedge-overshot
signalDeclaration
Swift
@discardableResult @inlinable func onEdgeOvershot(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ScrolledWindowRef, _ pos: PositionType) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pos
edge side that was hit
handler
The signal handler to call Run the given callback whenever the
edgeOvershot
signal is emitted -
edgeOvershotSignal
Extension methodTyped
edge-overshot
signal 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
pos
argument is LTR/RTL aware, so callers should be aware too if intending to provide behavior on horizontal edges.Note
This represents the underlyingedge-reached
signalDeclaration
Swift
@discardableResult @inlinable func onEdgeReached(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ScrolledWindowRef, _ pos: PositionType) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pos
edge side that was reached
handler
The signal handler to call Run the given callback whenever the
edgeReached
signal is emitted -
edgeReachedSignal
Extension methodTyped
edge-reached
signal 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 + Tab
to move forward andCtrl + Shift + Tab
to move backward.Note
This represents the underlyingmove-focus-out
signalDeclaration
Swift
@discardableResult @inlinable func onMoveFocusOut(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ScrolledWindowRef, _ directionType: DirectionType) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
directionType
either
GTK_DIR_TAB_FORWARD
orGTK_DIR_TAB_BACKWARD
handler
The signal handler to call Run the given callback whenever the
moveFocusOut
signal is emitted -
moveFocusOutSignal
Extension methodTyped
move-focus-out
signal 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-child
signalDeclaration
Swift
@discardableResult @inlinable func onScrollChild(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ScrolledWindowRef, _ scroll: ScrollType, _ horizontal: Bool) -> Bool) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
scroll
a
GtkScrollType
describing how much to scrollhorizontal
whether the keybinding scrolls the child horizontally or not
handler
The signal handler to call Run the given callback whenever the
scrollChild
signal is emitted -
scrollChildSignal
Extension methodTyped
scroll-child
signal 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 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::child
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyChild(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ScrolledWindowRef, _ 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
notifyChild
signal is emitted -
notifyChildSignal
Extension methodTyped
notify::child
signal 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 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::hadjustment
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyHadjustment(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ScrolledWindowRef, _ 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
notifyHadjustment
signal is emitted -
notifyHadjustmentSignal
Extension methodTyped
notify::hadjustment
signal 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 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::has-frame
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyHasFrame(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ScrolledWindowRef, _ 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
notifyHasFrame
signal is emitted -
notifyHasFrameSignal
Extension methodTyped
notify::has-frame
signal 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 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::hscrollbar-policy
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyHscrollbarPolicy(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ScrolledWindowRef, _ 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
notifyHscrollbarPolicy
signal is emitted -
notifyHscrollbarPolicySignal
Extension methodTyped
notify::hscrollbar-policy
signal 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 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::kinetic-scrolling
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyKineticScrolling(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ScrolledWindowRef, _ 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
notifyKineticScrolling
signal is emitted -
notifyKineticScrollingSignal
Extension methodTyped
notify::kinetic-scrolling
signal 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 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::max-content-height
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyMaxContentHeight(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ScrolledWindowRef, _ 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
notifyMaxContentHeight
signal is emitted -
notifyMaxContentHeightSignal
Extension methodTyped
notify::max-content-height
signal 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 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::max-content-width
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyMaxContentWidth(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ScrolledWindowRef, _ 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
notifyMaxContentWidth
signal is emitted -
notifyMaxContentWidthSignal
Extension methodTyped
notify::max-content-width
signal 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 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::min-content-height
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyMinContentHeight(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ScrolledWindowRef, _ 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
notifyMinContentHeight
signal is emitted -
notifyMinContentHeightSignal
Extension methodTyped
notify::min-content-height
signal 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 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::min-content-width
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyMinContentWidth(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ScrolledWindowRef, _ 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
notifyMinContentWidth
signal is emitted -
notifyMinContentWidthSignal
Extension methodTyped
notify::min-content-width
signal 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 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::overlay-scrolling
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyOverlayScrolling(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ScrolledWindowRef, _ 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
notifyOverlayScrolling
signal is emitted -
notifyOverlayScrollingSignal
Extension methodTyped
notify::overlay-scrolling
signal 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 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::propagate-natural-height
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyPropagateNaturalHeight(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ScrolledWindowRef, _ 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
notifyPropagateNaturalHeight
signal is emitted -
notifyPropagateNaturalHeightSignal
Extension methodTyped
notify::propagate-natural-height
signal 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 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::propagate-natural-width
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyPropagateNaturalWidth(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ScrolledWindowRef, _ 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
notifyPropagateNaturalWidth
signal is emitted -
notifyPropagateNaturalWidthSignal
Extension methodTyped
notify::propagate-natural-width
signal 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 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::vadjustment
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyVadjustment(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ScrolledWindowRef, _ 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
notifyVadjustment
signal is emitted -
notifyVadjustmentSignal
Extension methodTyped
notify::vadjustment
signal 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 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::vscrollbar-policy
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyVscrollbarPolicy(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ScrolledWindowRef, _ 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
notifyVscrollbarPolicy
signal is emitted -
notifyVscrollbarPolicySignal
Extension methodTyped
notify::vscrollbar-policy
signal 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 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::window-placement
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyWindowPlacement(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ScrolledWindowRef, _ 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
notifyWindowPlacement
signal is emitted -
notifyWindowPlacementSignal
Extension methodTyped
notify::window-placement
signal 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
GtkAdjustment
for the horizontal scrollbar.Declaration
Swift
@inlinable func set(hadjustment: AdjustmentRef? = nil)
-
set(hadjustment:
Extension method) Sets the
GtkAdjustment
for 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_window
should keep visible.The
scrolled_window
will 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_window
should keep visible.The
scrolled_window
will 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_window
should 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_window
should 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
GtkAdjustment
for the vertical scrollbar.Declaration
Swift
@inlinable func set(vadjustment: AdjustmentRef? = nil)
-
set(vadjustment:
Extension method) Sets the
GtkAdjustment
for 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()
-
child
Extension methodThe child widget.
Declaration
Swift
@inlinable var child: WidgetRef! { get nonmutating set }
-
hadjustment
Extension methodUndocumented
Declaration
Swift
@inlinable var hadjustment: AdjustmentRef! { get nonmutating set }
-
hasFrame
Extension methodGets whether the scrolled window draws a frame.
Declaration
Swift
@inlinable var hasFrame: Bool { get nonmutating set }
-
hscrollbar
Extension methodReturns the horizontal scrollbar of
scrolled_window
.Declaration
Swift
@inlinable var hscrollbar: WidgetRef! { get }
-
kineticScrolling
Extension methodReturns the specified kinetic scrolling behavior.
Declaration
Swift
@inlinable var kineticScrolling: Bool { get nonmutating set }
-
maxContentHeight
Extension methodReturns the maximum content height set.
Declaration
Swift
@inlinable var maxContentHeight: Int { get nonmutating set }
-
maxContentWidth
Extension methodReturns the maximum content width set.
Declaration
Swift
@inlinable var maxContentWidth: Int { get nonmutating set }
-
minContentHeight
Extension methodGets the minimal content height of
scrolled_window
.Declaration
Swift
@inlinable var minContentHeight: Int { get nonmutating set }
-
minContentWidth
Extension methodGets the minimum content width of
scrolled_window
.Declaration
Swift
@inlinable var minContentWidth: Int { get nonmutating set }
-
overlayScrolling
Extension methodReturns whether overlay scrolling is enabled for this scrolled window.
Declaration
Swift
@inlinable var overlayScrolling: Bool { get nonmutating set }
-
placement
Extension methodGets the placement of the contents with respect to the scrollbars.
Declaration
Swift
@inlinable var placement: GtkCornerType { get nonmutating set }
-
propagateNaturalHeight
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 var propagateNaturalHeight: Bool { get nonmutating set }
-
propagateNaturalWidth
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 var propagateNaturalWidth: Bool { get nonmutating set }
-
vadjustment
Extension methodUndocumented
Declaration
Swift
@inlinable var vadjustment: AdjustmentRef! { get nonmutating set }
-
vscrollbar
Extension methodReturns the vertical scrollbar of
scrolled_window
.Declaration
Swift
@inlinable var vscrollbar: WidgetRef! { get }