gtk.paned
Module for [Paned] class
Types 3
A widget with 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 widget with gtk.paned.Paned.setStartChild and gtk.paned.Paned.setEndChild. 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 inside a gtk.frame.Frame so that the gutter appears as a ridge. No separator is drawn if one of the children is missing.
Each child has two options that can be set, "resize" and "shrink". If "resize" is true then, when the gtk.paned.Paned is resized, that child will expand or shrink along with the paned widget. If "shrink" is true, then that child can be made smaller than its requisition by the user. Setting "shrink" to false allows the application to set a minimum size. If "resize" is false for both children, then this is treated as if "resize" is true for both children.
The application can set the position of the slider as if it were set by the user, by calling gtk.paned.Paned.setPosition.
CSS nodes
paned
├── <child>
├── separator[.wide]
╰── <child>gtk.paned.Paned 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 are arranged based on the text direction, so in left-to-right mode, :first-child will select the leftmost child, while it will select the rightmost child in RTL layouts.
Creating a paned widget with minimum sizes.
GtkWidget *hpaned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
GtkWidget *frame1 = gtk_frame_new (NULL);
GtkWidget *frame2 = gtk_frame_new (NULL);
gtk_widget_set_size_request (hpaned, 200, -1);
gtk_paned_set_start_child (GTK_PANED (hpaned), frame1);
gtk_paned_set_resize_start_child (GTK_PANED (hpaned), TRUE);
gtk_paned_set_shrink_start_child (GTK_PANED (hpaned), FALSE);
gtk_widget_set_size_request (frame1, 50, -1);
gtk_paned_set_end_child (GTK_PANED (hpaned), frame2);
gtk_paned_set_resize_end_child (GTK_PANED (hpaned), FALSE);
gtk_paned_set_shrink_end_child (GTK_PANED (hpaned), FALSE);
gtk_widget_set_size_request (frame2, 50, -1);PanedGidBuilder builder() static nothrowGet builder for [gtk.paned.Paned] Returns: New builder objectvoid endChild(gtk.widget.Widget propval) @property nothrowSet `endChild` property. Params: propval = The second child.int maxPosition() @property nothrowGet `maxPosition` property. Returns: The largest possible value for the [gtk.paned.Paned.position] property.int minPosition() @property nothrowGet `minPosition` property. Returns: The smallest possible value for the [gtk.paned.Paned.position] property.int position() @property nothrowGet `position` property. Returns: Position of the separator in pixels, from the left/top.void position(int propval) @property nothrowSet `position` property. Params: propval = Position of the separator in pixels, from the left/top.bool positionSet() @property nothrowGet `positionSet` property. Returns: Whether the [gtk.paned.Paned.position] property has been set.void positionSet(bool propval) @property nothrowSet `positionSet` property. Params: propval = Whether the [gtk.paned.Paned.position] property has been set.bool resizeEndChild() @property nothrowGet `resizeEndChild` property. Returns: Determines whether the second child expands and shrinks along with the paned widget.void resizeEndChild(bool propval) @property nothrowSet `resizeEndChild` property. Params: propval = Determines whether the second child expands and shrinks along with the paned widget.bool resizeStartChild() @property nothrowGet `resizeStartChild` property. Returns: Determines whether the first child expands and shrinks along with the paned widget.void resizeStartChild(bool propval) @property nothrowSet `resizeStartChild` property. Params: propval = Determines whether the first child expands and shrinks along with the paned widget.bool shrinkEndChild() @property nothrowGet `shrinkEndChild` property. Returns: Determines whether the second child can be made smaller than its requisition.void shrinkEndChild(bool propval) @property nothrowSet `shrinkEndChild` property. Params: propval = Determines whether the second child can be made smaller than its requisition.bool shrinkStartChild() @property nothrowGet `shrinkStartChild` property. Returns: Determines whether the first child can be made smaller than its requisition.void shrinkStartChild(bool propval) @property nothrowSet `shrinkStartChild` property. Params: propval = Determines whether the first child can be made smaller than its requisition.gtk.widget.Widget startChild() @property nothrowGet `startChild` property. Returns: The first child.void startChild(gtk.widget.Widget propval) @property nothrowSet `startChild` property. Params: propval = The first child.bool wideHandle() @property nothrowGet `wideHandle` property. Returns: Whether the [gtk.paned.Paned] should provide a stronger visual separation.void wideHandle(bool propval) @property nothrowSet `wideHandle` property. Params: propval = Whether the [gtk.paned.Paned] should provide a stronger visual separation.gtk.widget.Widget getEndChild() nothrowRetrieves the end child of the given [gtk.paned.Paned]. Returns: the end child widgetint getPosition() nothrowObtains the position of the divider between the two panes. Returns: the position of the divider, in pixelsbool getResizeEndChild() nothrowReturns whether the [gtk.paned.Paned.endChild] can be resized. Returns: true if the end child is resizablebool getResizeStartChild() nothrowReturns whether the [gtk.paned.Paned.startChild] can be resized. Returns: true if the start child is resizablebool getShrinkEndChild() nothrowReturns whether the [gtk.paned.Paned.endChild] can shrink. Returns: true if the end child is shrinkablebool getShrinkStartChild() nothrowReturns whether the [gtk.paned.Paned.startChild] can shrink. Returns: true if the start child is shrinkablegtk.widget.Widget getStartChild() nothrowRetrieves the start child of the given [gtk.paned.Paned]. Returns: the start child widgetbool getWideHandle() nothrowGets whether the separator should be wide. Returns: true if the paned should have a wide handlevoid setResizeEndChild(bool resize) nothrowSets whether the [gtk.paned.Paned.endChild] can be resized.void setResizeStartChild(bool resize) nothrowSets whether the [gtk.paned.Paned.startChild] can be resized.void setShrinkStartChild(bool resize) nothrowSets whether the [gtk.paned.Paned.startChild] can shrink.gulong connectAcceptPosition(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == bool)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.paned.Paned)))
&& Parameters!T.length < 2) nothrowConnect to `AcceptPosition` signal.gulong connectCancelPosition(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == bool)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.paned.Paned)))
&& Parameters!T.length < 2) nothrowConnect to `CancelPosition` signal.gulong connectCycleChildFocus(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == bool)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == bool)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gtk.paned.Paned)))
&& Parameters!T.length < 3) nothrowConnect to `CycleChildFocus` signal.gulong connectCycleHandleFocus(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == bool)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == bool)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gtk.paned.Paned)))
&& Parameters!T.length < 3) nothrowConnect to `CycleHandleFocus` signal.gulong connectMoveHandle(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == bool)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == gtk.types.ScrollType)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gtk.paned.Paned)))
&& Parameters!T.length < 3) nothrowConnect to `MoveHandle` signal.gulong connectToggleHandleFocus(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == bool)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.paned.Paned)))
&& Parameters!T.length < 2) nothrowConnect to `ToggleHandleFocus` signal.this(gtk.types.Orientation orientation)Creates a new [gtk.paned.Paned] widget.Fluent builder implementation template for gtk.paned.Paned
T endChild(gtk.widget.Widget propval) nothrowSet `endChild` property. Params: propval = The second child. Returns: Builder instance for fluent chainingT position(int propval) nothrowSet `position` property. Params: propval = Position of the separator in pixels, from the left/top. Returns: Builder instance for fluent chainingT positionSet(bool propval) nothrowSet `positionSet` property. Params: propval = Whether the [gtk.paned.Paned.position] property has been set. Returns: Builder instance for fluent chainingT resizeEndChild(bool propval) nothrowSet `resizeEndChild` property. Params: propval = Determines whether the second child expands and shrinks along with the paned widget. Returns: Builder instance for fluent chainingT resizeStartChild(bool propval) nothrowSet `resizeStartChild` property. Params: propval = Determines whether the first child expands and shrinks along with the paned widget. Returns: Builder instance for fluent chainingT shrinkEndChild(bool propval) nothrowSet `shrinkEndChild` property. Params: propval = Determines whether the second child can be made smaller than its requisition. Returns: Builder instance for fluent chainingT shrinkStartChild(bool propval) nothrowSet `shrinkStartChild` property. Params: propval = Determines whether the first child can be made smaller than its requisition. Returns: Builder instance for fluent chainingT startChild(gtk.widget.Widget propval) nothrowSet `startChild` property. Params: propval = The first child. Returns: Builder instance for fluent chainingT wideHandle(bool propval) nothrowSet `wideHandle` property. Params: propval = Whether the [gtk.paned.Paned] should provide a stronger visual separation.Fluent builder for gtk.paned.Paned