package stk

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

Module Stk.ButtonSource

Buttons.

Sourceval active : bool Props.prop

Property used to indicate whether a toggle or option button is activate.

Simple buttons

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

Simple button.

Sourceval button : ?class_:string -> ?name:string -> ?props:Props.t -> ?pack:(Widget.widget -> unit) -> unit -> button

Convenient function to create a button. See Widget arguments for arguments.

Sourceval text_button : ?class_:string -> ?name:string -> ?props:Props.t -> ?text:string -> ?pack:(Widget.widget -> unit) -> unit -> button * Text.label

Convenient function to create a button with a Text.label as child. text optional argument is passed to Text.label. See Widget arguments for other arguments.

Toggle buttons

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

A toggle button. State is represented by the active property. Activating the widget toggles the state.

Sourceval togglebutton : ?class_:string -> ?name:string -> ?props:Props.t -> ?active:bool -> ?pack:(Widget.widget -> unit) -> unit -> togglebutton

Convenient function to create a togglebutton. Initial state can be specifier with the active argument (default is false). See Widget arguments for other arguments.

Sourceval text_togglebutton : ?class_:string -> ?name:string -> ?props:Props.t -> ?active:bool -> ?text:string -> ?pack:(Widget.widget -> unit) -> unit -> togglebutton * Text.label

Convenient function to create a togglebutton with a Text.label as child. Initial state can be specifier with the active argument (default is false). text optional argument is passed to Text.label. See Widget arguments for other arguments.

Check and radio buttons

Sourceclass group : object ... end

A group is used to share a state among several checkbuttons, so they act as radio buttons (only one can be active at the same time).

Sourceval group : unit -> group

Convenient function to create a group.

The following properties are used to tune the appearance of checkbuttons: a font and active and inactive characters.

Sourceval check_indicator_font : Font.font_desc Props.prop
Sourceval check_indicator_active_char : Uchar.t Props.prop
Sourceval check_indicator_inactive_char : Uchar.t Props.prop
Sourceclass checkbutton : ?class_:string option -> ?name:string option -> ?props:Props.t option -> unit -> object ... end

The checkbutton widget.

Sourceval checkbutton : ?class_:string -> ?name:string -> ?props:Props.t -> ?group:group -> ?active:bool -> ?pack:(Widget.widget -> unit) -> unit -> checkbutton

Convenient function to create a checkbutton. Initial state can be specifier with the active argument (default is false). See Widget arguments for other arguments.

Sourceval radiobutton : ?class_:string -> ?name:string -> ?props:Props.t -> ?group:group -> ?active:bool -> ?pack:(Widget.widget -> unit) -> unit -> checkbutton

Convenient function to create a checkbutton acting as a radio button (default class_ is "radiobutton"). Initial state can be specifier with the active argument (default is false). group can be used to set the group the radio button belongs to. See Widget arguments for other arguments.

Sourceval text_checkbutton : ?class_:string -> ?name:string -> ?props:Props.t -> ?group:group -> ?active:bool -> ?text:string -> ?pack:(Widget.widget -> unit) -> unit -> checkbutton * Text.label

Convenient function to create a checkbutton with a Text.label as child. Initial state can be specifier with the active argument (default is false). text optional argument is passed to Text.label. See Widget arguments for other arguments.

Sourceval text_radiobutton : ?class_:string -> ?name:string -> ?props:Props.t -> ?group:group -> ?active:bool -> ?text:string -> ?pack:(Widget.widget -> unit) -> unit -> checkbutton * Text.label

Convenient function to create a checkbutton acting as a radio button (default class_ is "radiobutton") with a Text.label as child. Initial state can be specifier with the active argument (default is false). group can be used to set the group the radio button belongs to. text optional argument is passed to Text.label. See Widget arguments for other arguments.

OCaml

Innovation. Community. Security.