package stk

  1. Overview
  2. Docs
SDL-based GUI toolkit

Install

Dune Dependency

Authors

Maintainers

Sources

ocaml-stk-0.5.0.tar.bz2
md5=beeed5752ff67b3abeb1bcf8fb6b9098
sha512=c1603ae66956a674864ad875212fdbfc8d8016983202108d492b0d8722106b1e982e9fdc04b20d1b7adf5013343252fc5173851751906271731bc81d70dc789c

doc/stk/Stk/Theme/index.html

Module Stk.ThemeSource

Theming widgets.

A theme has a name and is defined by a preamble and a body, both being Css statement lists. Extensions are like themes but their content is contatenated to the the current theme (i.e. preambles of each extension is appended to the theme preamble, same for body).

Sourcetype t

A theme or extension

The space of css properties used for theming.

Sourcetype computed_props = Css.C.t
Sourceval rules : t -> string Css.S.rule_ list
Sourceval statements : t -> string Css.S.statement list
Sourceval preamble_statements : t -> string Css.S.statement list
Sourceval body_statements : t -> string Css.S.statement list
Sourceval get_or_create_theme : string -> t

get_or_create_theme name returns the theme with the given name if it exists, else creates it.

Sourceval remove_extension : string -> unit

remove_extension name removes extension with given name.

Sourceval get_or_create_extension : string -> t

get_or_create_extension name returns the extension with the given name if it exists, else creates it.

Sourceval set_current_theme : string -> unit

set_curent_theme name sets current theme to name. It will be used by newly created widgets.

Sourceval current_theme : unit -> string * t

current () returns the current theme name and definition, including extensions.

Sourceval themes : unit -> string list

themes () returns the names of registered themes.

Sourceval extensions : unit -> string list

extensions () returns the names of the registered extensions.

Sourceval add_css_to_theme : ?fname:string -> ?preamble:string -> ?body:string -> string -> unit

add_css_to_theme ?preamble ?body name creates or modifies theme name by adding the given preamble and body css codes. Optional parameter fname can be specified to indicate that str comes from a file, to include filename in locations in case of error.

Sourceval add_css_to_extension : ?fname:string -> ?preamble:string -> ?body:string -> string -> unit

Same as add_css_to_theme but for an extension.

Sourceval add_css_file_to_theme : ?preamble:string -> ?body:string -> string -> unit Lwt.t

add_css_file_to_theme ?preamble ?body name creates or modifies theme name by adding the content of the given preamble and body files.

Sourceval add_css_file_to_extension : ?preamble:string -> ?body:string -> string -> unit Lwt.t

Same as add_css_file_to_theme but for an extension.

Sourcetype path = (string * string Smap.t * string option) list
Sourceval pp_path : Format.formatter -> path -> unit
Sourceval string_of_path : path -> string
Sourceval selector_matches : string Css.S.selector -> path -> bool
Sourceval to_props : computed_props -> Props.t
Sourceval mk_prop : ('a -> string) -> (Css.T.ctx -> 'a Angstrom.t) -> 'a -> ?inherited:bool -> ?def:'a -> 'a Props.prop -> 'a Css.P.prop
Sourceval int_prop : ?inherited:bool -> ?def:int -> int Props.prop -> int Css.P.prop
Sourceval uchar_prop : ?inherited:bool -> ?def:Uchar.t -> Uchar.t Props.prop -> Uchar.t Css.P.prop
Sourceval float_prop : ?inherited:bool -> ?def:float -> float Props.prop -> float Css.P.prop
Sourceval color_prop : ?inherited:bool -> ?def:Color.t -> Color.t Props.prop -> Color.t Css.P.prop
Sourceval bool_prop : ?inherited:bool -> ?def:bool -> bool Props.prop -> bool Css.P.prop
Sourceval string_prop : ?inherited:bool -> ?def:string -> string Props.prop -> string Css.P.prop
Sourceval font_desc_prop : ?inherited:bool -> ?def:Font.font_desc -> Font.font_desc Props.prop -> Font.font_desc Css.P.prop
Sourceval keyword_prop : ('a -> string) -> (string -> 'a option) -> 'a -> ?inherited:bool -> ?def:'a -> 'a Props.prop -> 'a Css.P.prop

Utilities to build options for other types.

Sourcemodule Vp : sig ... end
Sourceval string_of_bool : bool -> string
Sourceval string_of_color : Color.t -> string
Sourceval string_of_list : ('a -> string) -> 'a list -> string
Sourceval string_of_option : ('a -> string) -> 'a option -> string
Sourceval string_of_option_explicit : ('a -> string) -> 'a option -> string
OCaml

Innovation. Community. Security.