package stk

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Stk.PackSource

Boxes to pack widgets.

Sourceval inter_padding : int Props.prop

Property "inter_padding" use to specify a space between packed children. Default is 0.

Stacking boxes

Sourceclass 'a box : ?class_:string option -> ?name:string option -> ?props:Props.t option -> unit -> object ... end

A box is a Container.container which stacks its children, giving each one more or less space according to its size and properties. Widgets can be stacked horizontally or vertically (depending on the Props.orientation property).

Sourceval box : orientation:Props.orientation -> ?class_:string -> ?name:string -> ?props:Props.t -> ?pack:(Widget.widget -> unit) -> unit -> 'a box

Convenient function to create a box. The class_ argument defaults to "vbox" if orientation is Vertical or "hbox" if orientation is Horizontal. See Widget arguments for other arguments.

Sourceval hbox : ?class_:string -> ?name:string -> ?props:Props.t -> ?pack:(Widget.widget -> unit) -> unit -> 'a box

Same as box but orientation is already fixed to Horizontal.

Sourceval vbox : ?class_:string -> ?name:string -> ?props:Props.t -> ?pack:(Widget.widget -> unit) -> unit -> 'a box

Same as box but orientation is already fixed to Vertical.

Paned widgets

Sourcetype handle_position = [
  1. | `Percent of float
  2. | `Absolute of int
]

A handle position, defined either as percentage or absolute position.

Sourceval handle_position_wrapper : [ `Absolute of int | `Percent of float ] Ocf.Wrapper.t
Sourceval handle_positions : handle_position option list Props.prop

Property "handle_positions", to store the positions of the handles in a paned widget.

Sourcetype user_handle_positionning = [
  1. | `Percent
  2. | `Absolute
]

How to define handle position when the user moves it: as percentage or absolute value. This changes the way handle positions are updated when the paned widget is resized: with `Percent, ratios between children will be kept, but with `Absolute the handles will remain at the same position.

Sourceval user_handle_positionning_wrapper : user_handle_positionning Ocf.wrapper
Sourceval user_handle_positionning : user_handle_positionning Props.prop

Property "user_handle_positionning".

Sourceval handle_props : Props.t Props.prop

Property "paned_handle_props" to define appearance of handles in paned widget. Default set Props.width to 2 and Props.fg_color to Color.grey.

Sourceval user_set_handle_live_update : bool Props.prop

Property "paned_user_set_handle_live_update" defines whether to update paned widget on each move of a handle by user (true), or wait for the user to end moving the handle (false). Default is true. It may be useful to set it to false when computation of children sizes may take some time.

Sourceclass paned : ?class_:string option -> ?name:string option -> ?props:Props.t option -> unit -> object ... end

Paned widget.

Sourceval paned : Props.orientation -> ?class_:string -> ?name:string -> ?user_set_handle_live_update:bool -> ?props:Props.t -> ?pack:(Widget.widget -> unit) -> unit -> paned
Sourceval hpaned : ?class_:string -> ?name:string -> ?user_set_handle_live_update:bool -> ?props:Props.t -> ?pack:(Widget.widget -> unit) -> unit -> paned
Sourceval vpaned : ?class_:string -> ?name:string -> ?user_set_handle_live_update:bool -> ?props:Props.t -> ?pack:(Widget.widget -> unit) -> unit -> paned