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.

  • ptr

    Untyped pointer to the underlying GtkScrolledWindow instance.

    Declaration

    Swift

    var ptr: UnsafeMutableRawPointer! { get }
  • scrolled_window_ptr Default implementation

    Typed 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)

ScrolledWindow Class

  • 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 transformation

    transform_to

    ValueTransformer to use for backwards transformation

    Return 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:value:) Extension method

    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

ScrolledWindow signals

  • Connect a Swift signal handler to the given, typed ScrolledWindowSignalName signal

    Declaration

    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 by userData

    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 a C signal handler to the given, typed ScrolledWindowSignalName signal

    Declaration

    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 by userData

    signalHandler

    The C function to be called on the given signal

    Return Value

    The signal handler ID (always greater than 0 for successful connections)

  • 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 [signalGtk.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 underlying edge-overshot signal

    Declaration

    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 method

    Typed edge-overshot signal for using the connect(signal:) methods

    Declaration

    Swift

    static var edgeOvershotSignal: ScrolledWindowSignalName { get }
  • 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 [signalGtk.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 underlying edge-reached signal

    Declaration

    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 method

    Typed edge-reached signal for using the connect(signal:) methods

    Declaration

    Swift

    static var edgeReachedSignal: ScrolledWindowSignalName { get }
  • 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 and Ctrl + Shift + Tab to move backward.

    Note

    This represents the underlying move-focus-out signal

    Declaration

    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 or GTK_DIR_TAB_BACKWARD

    handler

    The signal handler to call Run the given callback whenever the moveFocusOut signal is emitted

  • moveFocusOutSignal Extension method

    Typed move-focus-out signal for using the connect(signal:) methods

    Declaration

    Swift

    static var moveFocusOutSignal: ScrolledWindowSignalName { get }
  • 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 underlying scroll-child signal

    Declaration

    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 scroll

    horizontal

    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 method

    Typed scroll-child signal for using the connect(signal:) methods

    Declaration

    Swift

    static var scrollChildSignal: ScrolledWindowSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::child signal

    Declaration

    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 method

    Typed notify::child signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyChildSignal: ScrolledWindowSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::hadjustment signal

    Declaration

    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 method

    Typed notify::hadjustment signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyHadjustmentSignal: ScrolledWindowSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::has-frame signal

    Declaration

    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 method

    Typed notify::has-frame signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyHasFrameSignal: ScrolledWindowSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::hscrollbar-policy signal

    Declaration

    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 method

    Typed notify::hscrollbar-policy signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyHscrollbarPolicySignal: ScrolledWindowSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::kinetic-scrolling signal

    Declaration

    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 method

    Typed notify::kinetic-scrolling signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyKineticScrollingSignal: ScrolledWindowSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::max-content-height signal

    Declaration

    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 method

    Typed notify::max-content-height signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyMaxContentHeightSignal: ScrolledWindowSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::max-content-width signal

    Declaration

    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 method

    Typed notify::max-content-width signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyMaxContentWidthSignal: ScrolledWindowSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::min-content-height signal

    Declaration

    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 method

    Typed notify::min-content-height signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyMinContentHeightSignal: ScrolledWindowSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::min-content-width signal

    Declaration

    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 method

    Typed notify::min-content-width signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyMinContentWidthSignal: ScrolledWindowSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::overlay-scrolling signal

    Declaration

    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 method

    Typed notify::overlay-scrolling signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyOverlayScrollingSignal: ScrolledWindowSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::propagate-natural-height signal

    Declaration

    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

  • Typed notify::propagate-natural-height signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyPropagateNaturalHeightSignal: ScrolledWindowSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::propagate-natural-width signal

    Declaration

    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

  • Typed notify::propagate-natural-width signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyPropagateNaturalWidthSignal: ScrolledWindowSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::vadjustment signal

    Declaration

    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 method

    Typed notify::vadjustment signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyVadjustmentSignal: ScrolledWindowSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::vscrollbar-policy signal

    Declaration

    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 method

    Typed notify::vscrollbar-policy signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyVscrollbarPolicySignal: ScrolledWindowSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::window-placement signal

    Declaration

    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 method

    Typed notify::window-placement signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyWindowPlacementSignal: ScrolledWindowSignalName { get }

ScrolledWindow Class: ScrolledWindowProtocol extension (methods and fields)

  • getChild() Extension method

    Gets the child widget of scrolled_window.

    Declaration

    Swift

    @inlinable
    func getChild() -> WidgetRef!
  • getHadjustment() Extension method

    Returns 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 method

    Gets whether the scrolled window draws a frame.

    Declaration

    Swift

    @inlinable
    func getHasFrame() -> Bool
  • getHscrollbar() Extension method

    Returns the horizontal scrollbar of scrolled_window.

    Declaration

    Swift

    @inlinable
    func getHscrollbar() -> WidgetRef!
  • getKineticScrolling() Extension method

    Returns the specified kinetic scrolling behavior.

    Declaration

    Swift

    @inlinable
    func getKineticScrolling() -> Bool
  • getMaxContentHeight() Extension method

    Returns the maximum content height set.

    Declaration

    Swift

    @inlinable
    func getMaxContentHeight() -> Int
  • getMaxContentWidth() Extension method

    Returns the maximum content width set.

    Declaration

    Swift

    @inlinable
    func getMaxContentWidth() -> Int
  • getMinContentHeight() Extension method

    Gets the minimal content height of scrolled_window.

    Declaration

    Swift

    @inlinable
    func getMinContentHeight() -> Int
  • getMinContentWidth() Extension method

    Gets the minimum content width of scrolled_window.

    Declaration

    Swift

    @inlinable
    func getMinContentWidth() -> Int
  • getOverlayScrolling() Extension method

    Returns whether overlay scrolling is enabled for this scrolled window.

    Declaration

    Swift

    @inlinable
    func getOverlayScrolling() -> Bool
  • getPlacement() Extension method

    Gets the placement of the contents with respect to the scrollbars.

    Declaration

    Swift

    @inlinable
    func getPlacement() -> GtkCornerType
  • Retrieves the current policy values for the horizontal and vertical scrollbars.

    See [methodGtk.ScrolledWindow.set_policy].

    Declaration

    Swift

    @inlinable
    func getPolicy(hscrollbarPolicy: UnsafeMutablePointer<GtkPolicyType>! = nil, vscrollbarPolicy: UnsafeMutablePointer<GtkPolicyType>! = nil)
  • getPropagateNaturalHeight() Extension method

    Reports 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 method

    Reports 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 method

    Returns 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 method

    Returns 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 [propertyGtk.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 [propertyGtk.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 [propertyGtk.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 [propertyGtk.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)
  • 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] are GTK_CORNER_TOP_RIGHT, GTK_CORNER_BOTTOM_LEFT, and GTK_CORNER_BOTTOM_RIGHT.

    See also [methodGtk.ScrolledWindow.get_placement] and [methodGtk.ScrolledWindow.unset_placement].

    Declaration

    Swift

    @inlinable
    func setPlacement(windowPlacement: GtkCornerType)
  • Sets the scrollbar policy for the horizontal and vertical scrollbars.

    The policy determines when the scrollbar should appear; it is a value from the [enumGtk.PolicyType] enumeration. If GTK_POLICY_ALWAYS, the scrollbar is always present; if GTK_POLICY_NEVER, the scrollbar is never present; if GTK_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)
  • 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)
  • 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 method

    Unsets 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 method

    The child widget.

    Declaration

    Swift

    @inlinable
    var child: WidgetRef! { get nonmutating set }
  • hadjustment Extension method

    Undocumented

    Declaration

    Swift

    @inlinable
    var hadjustment: AdjustmentRef! { get nonmutating set }
  • hasFrame Extension method

    Gets whether the scrolled window draws a frame.

    Declaration

    Swift

    @inlinable
    var hasFrame: Bool { get nonmutating set }
  • hscrollbar Extension method

    Returns the horizontal scrollbar of scrolled_window.

    Declaration

    Swift

    @inlinable
    var hscrollbar: WidgetRef! { get }
  • kineticScrolling Extension method

    Returns the specified kinetic scrolling behavior.

    Declaration

    Swift

    @inlinable
    var kineticScrolling: Bool { get nonmutating set }
  • maxContentHeight Extension method

    Returns the maximum content height set.

    Declaration

    Swift

    @inlinable
    var maxContentHeight: Int { get nonmutating set }
  • maxContentWidth Extension method

    Returns the maximum content width set.

    Declaration

    Swift

    @inlinable
    var maxContentWidth: Int { get nonmutating set }
  • minContentHeight Extension method

    Gets the minimal content height of scrolled_window.

    Declaration

    Swift

    @inlinable
    var minContentHeight: Int { get nonmutating set }
  • minContentWidth Extension method

    Gets the minimum content width of scrolled_window.

    Declaration

    Swift

    @inlinable
    var minContentWidth: Int { get nonmutating set }
  • overlayScrolling Extension method

    Returns whether overlay scrolling is enabled for this scrolled window.

    Declaration

    Swift

    @inlinable
    var overlayScrolling: Bool { get nonmutating set }
  • placement Extension method

    Gets the placement of the contents with respect to the scrollbars.

    Declaration

    Swift

    @inlinable
    var placement: GtkCornerType { get nonmutating set }
  • propagateNaturalHeight Extension method

    Reports 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 method

    Reports 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 method

    Undocumented

    Declaration

    Swift

    @inlinable
    var vadjustment: AdjustmentRef! { get nonmutating set }
  • vscrollbar Extension method

    Returns the vertical scrollbar of scrolled_window.

    Declaration

    Swift

    @inlinable
    var vscrollbar: WidgetRef! { get }