HandleBoxRef

public struct HandleBoxRef : HandleBoxProtocol, GWeakCapturing

The GtkHandleBox widget allows a portion of a window to be “torn off”. It is a bin widget which displays its child and a handle that the user can drag to tear off a separate window (the “float window”) containing the child widget. A thin “ghost” is drawn in the original location of the handlebox. By dragging the separate window back to its original location, it can be reattached.

When reattaching, the ghost and float window, must be aligned along one of the edges, the “snap edge”. This either can be specified by the application programmer explicitly, or GTK+ will pick a reasonable default based on the handle position.

To make detaching and reattaching the handlebox as minimally confusing as possible to the user, it is important to set the snap edge so that the snap edge does not move when the handlebox is deattached. For instance, if the handlebox is packed at the bottom of a VBox, then when the handlebox is detached, the bottom edge of the handlebox’s allocation will remain fixed as the height of the handlebox shrinks, so the snap edge should be set to GTK_POS_BOTTOM.

> GtkHandleBox has been deprecated. It is very specialized, lacks features > to make it useful and most importantly does not fit well into modern > application design. Do not use it. There is no replacement.

The HandleBoxRef type acts as a lightweight Swift reference to an underlying GtkHandleBox instance. It exposes methods that can operate on this data type through HandleBoxProtocol conformance. Use HandleBoxRef only as an unowned reference to an existing GtkHandleBox instance.

  • ptr
    Untyped pointer to the underlying `GtkHandleBox` instance.
    

    For type-safe access, use the generated, typed pointer handle_box_ptr property instead.

    Declaration

    Swift

    public let ptr: UnsafeMutableRawPointer!

HandleBox Class

  • Designated initialiser from the underlying C data type

    Declaration

    Swift

    @inlinable
    init(_ p: UnsafeMutablePointer<GtkHandleBox>)
  • Designated initialiser from a constant pointer to the underlying C data type

    Declaration

    Swift

    @inlinable
    init(_ p: UnsafePointer<GtkHandleBox>)
  • Conditional initialiser from an optional pointer to the underlying C data type

    Declaration

    Swift

    @inlinable
    init!(_ maybePointer: UnsafeMutablePointer<GtkHandleBox>?)
  • Conditional initialiser from an optional, non-mutable pointer to the underlying C data type

    Declaration

    Swift

    @inlinable
    init!(_ maybePointer: UnsafePointer<GtkHandleBox>?)
  • Conditional initialiser from an optional gpointer

    Declaration

    Swift

    @inlinable
    init!(gpointer g: gpointer?)
  • Conditional initialiser from an optional, non-mutable gconstpointer

    Declaration

    Swift

    @inlinable
    init!(gconstpointer g: gconstpointer?)
  • Reference intialiser for a related type that implements HandleBoxProtocol

    Declaration

    Swift

    @inlinable
    init<T>(_ other: T) where T : HandleBoxProtocol
  • This factory is syntactic sugar for setting weak pointers wrapped in GWeak<T>

    Declaration

    Swift

    @inlinable
    static func unowned<T>(_ other: T) -> HandleBoxRef where T : HandleBoxProtocol
  • Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to HandleBoxProtocol.

    Declaration

    Swift

    @inlinable
    init<T>(cPointer: UnsafeMutablePointer<T>)
  • Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to HandleBoxProtocol.

    Declaration

    Swift

    @inlinable
    init<T>(constPointer: UnsafePointer<T>)
  • Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to HandleBoxProtocol.

    Declaration

    Swift

    @inlinable
    init(mutating raw: UnsafeRawPointer)
  • Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to HandleBoxProtocol.

    Declaration

    Swift

    @inlinable
    init(raw: UnsafeMutableRawPointer)
  • Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to HandleBoxProtocol.

    Declaration

    Swift

    @inlinable
    init(opaquePointer: OpaquePointer)
  • Create a new handle box.
    

    new is deprecated:

    GtkHandleBox has been deprecated.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    init()