Package: gtk

Class gtk:paned

Superclasses

Documented Subclasses

None

Direct Slots

end-child
The end-child property of type gtk:widget (Read / Write)
The second child widget.
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
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
position-set
The position-set property of type :boolean (Read / Write)
True if the position property should be used.
Default value: false
resize-end-child
The resize-end-child property of type :boolean (Read / Write)
Determines whether the second child expands and shrinks along with the paned widget.
Default value: true
resize-start-child
The resize-start-child property of type :boolean (Read / Write)
Determines whether the first child expands and shrinks along with the paned widget.
Default value: true
shrink-end-child
The shrink-end-child property of type :boolean (Read / Write)
Determines whether the second child can be made smaller than its requisition.
Default value: true
shrink-start-child
The shrink-start-child property of type :boolean (Read / Write)
Determines whether the first child can be made smaller than its requisition.
Default value: true
start-child
The start-child property of type gtk:widget (Read / Write)
The first child widget.
wide-handle
The wide-handle property of type :boolean (Read / Write)
Setting this property to true indicates that the paned widget needs to provide stronger visual separation, for example, 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.

Figure: GtkPaned

Child widgets are added to the panes of the paned widget with the gtk:paned-start-child and gtk:paned-end-child 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 properties that can be set, the resize and shrink properties. If the resize 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 property to false allows the application to set a minimum size. If the resize property is false for both children, then this is treated as if the resize 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.

Examples

Creating a paned widget with minimum sizes.
(let ((frame1 (make-instance 'gtk:frame
                             :width-request 50))
      (frame2 (make-instance 'gtk:frame
                             :width-request 50))
      (paned (make-instance 'gtk:paned
                            :orientation :horizontal
                            :start-child frame1
                            :end-child frame2
                            :resize-start-child t
                            :width-request 250
                            :height-request 150)))
    ... )    

Signal Details

The "accept-position" signal
lambda (widget)    :action      
widget
The gtk:paned widget that received the signal.
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.
The "cancel-position" signal
lambda (widget)    :action      
widget
The gtk:paned widget that received the signal.
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.
The "cycle-child-focus" signal
lambda (widget reversed)    :action      
widget
The gtk:paned widget that received the signal.
reversed
The boolean whether cycling backward or forward.
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.
The "cycle-handle-focus" signal
lambda (widget reversed)    :action      
widget
The gtk:paned widget that received the signal.
reversed
The boolean whether cycling backward or forward.
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.
The "move-handle" signal
lambda (widget scrolltype)    :action      
widget
The gtk:paned widget that received the signal.
scrolltype
The value of the gtk:scroll-type enumeration.
The signal is a keybinding signal which gets emitted to move the handle when the user is using key bindings to move it.
The "toggle-handle-focus" signal
lambda (widget)    :action      
widget
The gtk:paned widget that received the signal.
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.
 

Returned by

Slot Access Functions

Inherited Slot Access Functions

See also

2024-4-22