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.

Sourceval css_inter_padding : int Css.P.prop

Stacking boxes

Sourceclass 'a box : ?classes:string list option -> ?name:string option -> ?props:Props.t option -> ?wdata: Widget.wdata 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). The widget has class "vertical" or "horizontal" depending on orientation.

Sourceval box : orientation:Props.orientation -> ?classes:string list -> ?name:string -> ?props:Props.t -> ?wdata:Widget.wdata -> ?inter_padding:int -> ?pack:(Widget.widget -> unit) -> unit -> 'a box

Convenient function to create a box. See Widget arguments for other arguments.

Sourceval hbox : ?classes:string list -> ?name:string -> ?props:Props.t -> ?wdata:Widget.wdata -> ?inter_padding:int -> ?pack:(Widget.widget -> unit) -> unit -> 'a box

Same as box but orientation is already fixed to Horizontal.

Sourceval vbox : ?classes:string list -> ?name:string -> ?props:Props.t -> ?wdata:Widget.wdata -> ?inter_padding:int -> ?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.

Sourceval css_handle_positions_prop : ?inherited:bool -> ?def:[ `Absolute of int | `Percent of float ] option list -> [ `Absolute of int | `Percent of float ] option list Props.prop -> [ `Absolute of int | `Percent of float ] option list Css.P.prop
Sourceval css_handle_positions : handle_position option list Css.P.prop
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_positionnings : [> `Absolute | `Percent ] list
Sourceval string_of_user_handle_positionning : [< `Absolute | `Percent ] -> string
Sourceval user_handle_positionning_of_string : string -> [ `Absolute | `Percent ] option
Sourceval user_handle_positionning_wrapper : user_handle_positionning Ocf.wrapper
Sourceval user_handle_positionning : user_handle_positionning Props.prop

Property "user_handle_positionning".

Sourceval css_user_handle_positioning_prop : ?inherited:bool -> ?def:[ `Absolute | `Percent ] -> [ `Absolute | `Percent ] Props.prop -> [ `Absolute | `Percent ] Css.P.prop
Sourceval css_user_handle_positioning : user_handle_positionning Css.P.prop
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.

Sourceval css_user_set_handle_live_update : bool Css.P.prop
Sourceclass paned : ?classes:string list option -> ?name:string option -> ?props:Props.t option -> ?wdata: Widget.wdata option -> unit -> object ... end

Paned widget.

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

Innovation. Community. Security.