Package: gtk

Class gtk-paned

Superclasses

gtk-container, gtk-widget, gtk-buildable, gtk-orientable, g-object, common-lisp:standard-object, common-lisp:t

Documented Subclasses

None

Direct Slots

position
The position property of type :int (Read / Write)
Position of the paned separator in pixels, 0 means all the way to the left/top.
Allowed values: >= 0
Default value: 0
max-position
The max-position property of type :int (Read)
The largest possible value for the position property. This property is derived from the size and shrinkability of the children of the paned widget.
Allowed values: >= 0
Default value: 2147483647
min-position
The min-position property of type :int (Read)
The smallest possible value for the position property. This property is derived from the size and shrinkability of the children of the paned widget.
Allowed values: >= 0
Default value: 0
position-set
The position-set property of type :boolean (Read / Write)
True if the position property should be used.
Default value: false
wide-handle
The wide-handled property of type :boolean (Read / Write)
Setting this property to true indicates that the paned widget needs to provide stronger visual separation, e.g. because it separates between two notebooks, whose tab rows would otherwise merge visually.
Default value: false

Details

The gtk-paned widget has two panes, arranged either horizontally or vertically. The division between the two panes is adjustable by the user by dragging a handle.



Child widgets are added to the panes of the paned widget with the gtk-paned-pack1 and gtk-paned-pack2 functions. The division between the two children is set by default from the size requests of the children, but it can be adjusted by the user.

A paned widget draws a separator between the two child widgets and a small handle that the user can drag to adjust the division. It does not draw any relief around the children or around the separator. The space in which the separator is called the gutter. Often, it is useful to put each child widget inside a gtk-frame widget with the shadow type set to the :in value so that the gutter appears as a ridge. No separator is drawn if one of the children is missing.

Each child widget has two child properties that can be set, the resize and shrink child properties. If the resize child property is true, then when the gtk-paned widget is resized, that child widget will expand or shrink along with the paned widget. If the shrink property is true, then that child widget can be made smaller than its requisition by the user. Setting the shrink child property to false allows the application to set a minimum size. If the resize child property is false for both children, then this is treated as if the resize child property is true for both children.

The application can set the position of the slider as if it were set by the user, by calling the gtk-paned-position function.

CSS nodes

 paned
 ├── <child>
 ├── separator[.wide]
 ╰── <child>    
The gtk-paned implementation has a main CSS node with name paned, and a subnode for the separator with name separator. The subnode gets a .wide style class when the paned is supposed to be wide. In horizontal orientation, the nodes of the children are always arranged from left to right. So :first-child will always select the leftmost child widget, regardless of text direction.

Example

Creating a paned widget with minimum sizes.
(let ((paned (make-instance 'gtk-paned
                            :orientation :horizontal
                            :width-request 250
                            :height-request 150))
      (frame1 (make-instance 'gtk-frame :shadow-type :in
                                        :width-request 100))
      (frame2 (make-instance 'gtk-frame :shadow-type :in
                                        :width-request 50)))
    (gtk-paned-pack1 paned frame1 :resize t :shrink nil)
    (gtk-paned-pack2 paned frame2 :resize nil :shrink nil)
    ... )    

Child Property Details

resize
The resize child property of type :boolean (Read / Write)
Determines whether the child widget expands and shrinks along with the paned widget.
Default value: true
shrink
The shrink child property of type :boolean (Read / Write)
Determines whether the child widget can be made smaller than its requisition.
Default value: true

Style Property Details

handle-size
The handle-size style property of type :int (Read)
Width of the handle.
Allowed values: >= 0
Default value: 5

Signal Details

The "accept-position" signal
 lambda (widget)    :action      
The signal is a keybinding signal which gets emitted to accept the current position of the handle when moving it using key bindings. The default binding for this signal is the Return or Space key.
widget
The gtk-paned widget that received the signal.
The "cancel-position" signal
 lambda (widget)    :action      
The signal is a keybinding signal which gets emitted to cancel moving the position of the handle using key bindings. The position of the handle will be reset to the value prior to moving it. The default binding for this signal is the Escape key.
widget
The gtk-paned widget that received the signal.
The "cycle-child-focus" signal
 lambda (widget reversed)    :action      
The signal is a keybinding signal which gets emitted to cycle the focus between the children of the paned widget. The default binding is the F6 key.
widget
The gtk-paned widget that received the signal.
reversed
A boolean whether cycling backward or forward.
The "cycle-handle-focus" signal
 lambda (widget reversed)    :action      
The signal is a keybinding signal which gets emitted to cycle whether the paned widget should grab focus to allow the user to change position of the handle by using key bindings. The default binding for this signal is the F8 key.
widget
The gtk-paned widget that received the signal.
reversed
A boolean whether cycling backward or forward.
The "move-handle" signal
 lambda (widget scrolltype)    :action      
The signal is a keybinding signal which gets emitted to move the handle when the user is using key bindings to move it.
widget
The gtk-paned widget that received the signal.
scrolltype
A value of the gtk-scroll-type enumeration.
The "toggle-handle-focus" signal
 lambda (widget)    :action      
The signal is a keybinding signal which gets emitted to accept the current position of the handle and then move focus to the next widget in the focus chain. The default binding is the Tab key.
widget
The gtk-paned widget that received the signal.
 

Slot Access Functions

Inherited Slot Access Functions

See also

*2021-12-1