package stk

  1. Overview
  2. Docs

Widgets which can contain one widget.

class bin : ?class_:string option -> ?name:string option -> ?props:Props.t option -> ?mutex: Lwt_mutex.t option -> unit -> object ... end

Widget containing one child. This widget is usually not used directly but inherited.

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

Convenient function to create a bin. See widget_arguments for arguments.

Event boxes

class event_box : ?class_:string option -> ?name:string option -> ?props:Props.t option -> unit -> object ... end

An event_box is a bin widget which differs in the way events are propagated: if an event is not handled by this widget, then it is propagated to its child. This is useful for example to catch keystrokes for keyboard shortcuts.

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

Convenient function to create a event_box. See widget_arguments for arguments.

Fixed-size widget

class fixed_size : ?class_:string option -> ?name:string option -> ?props:Props.t option -> ?w: int option -> ?h:int option -> unit -> object ... end

A fixed_size widget is a bin widget whose width and height can be fixed.

val fixed_size : ?class_:string -> ?name:string -> ?props:Props.t -> ?w:int -> ?h:int -> ?pack:(Widget.widget -> unit) -> unit -> fixed_size

Convenient function to create a fixed_size. w and h optional arguments specify width and height. See widget_arguments for other arguments.

Scrollboxes

type scrollbar_policy = [
  1. | `ALWAYS
  2. | `NEVER
  3. | `AUTOMATIC
]

Policy to display scrollbars.

  • `ALWAYS: always displays scrollbar, even when not needed.
  • `NEVER: never displays scrollbar, even when needed.
  • `AUTOMATIC: displays scrollbar only when needed, i.e. when child content is larger than the scrollbox in the considered direction (horizontal or vertical).
val scrollbar_policy_wrapper : scrollbar_policy Ocf.Wrapper.t

Ocf wrapper for scrollbar_policy.

module TScrollbar_policy : sig ... end
module PScrollbar_policy : sig ... end
val scrollbar_policy_prop : scrollbar_policy Props.mk_prop
val hscrollbar_policy : scrollbar_policy Props.prop
val vscrollbar_policy : scrollbar_policy Props.prop
val hscrollbar_covers_child : bool Props.prop
val vscrollbar_covers_child : bool Props.prop
class scrollbox : ?class_:string option -> ?name:string option -> ?props:Props.t option -> unit -> object ... end
val scrollbox : ?class_:string -> ?name:string -> ?props:Props.t -> ?hpolicy:scrollbar_policy -> ?vpolicy:scrollbar_policy -> ?pack:(Widget.widget -> unit) -> unit -> scrollbox

Convenient function to create a fixed_size. hpolicy and vpolicy optional arguments specify horizontal and vertical scrollbar policies. See widget_arguments for other arguments.

OCaml

Innovation. Community. Security.