package stk
Install
dune-project
Dependency
Authors
Maintainers
Sources
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).
A theme or extension
The space of css properties used for theming.
get_or_create_theme name returns the theme with the given name if it exists, else creates it.
remove_extension name removes extension with given name.
get_or_create_extension name returns the extension with the given name if it exists, else creates it.
set_curent_theme name sets current theme to name. It will be used by newly created widgets.
current () returns the current theme name and definition, including extensions.
themes () returns the names of registered themes.
extensions () returns the names of the registered extensions.
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.
val add_css_to_extension :
?fname:string ->
?preamble:string ->
?body:string ->
string ->
unitSame as add_css_to_theme but for an extension.
add_css_file_to_theme ?preamble ?body name creates or modifies theme name by adding the content of the given preamble and body files.
Same as add_css_file_to_theme but for an extension.
val mk_prop :
('a -> string) ->
(Css.T.ctx -> 'a Angstrom.t) ->
'a ->
?inherited:bool ->
?def:'a ->
'a Props.prop ->
'a Css.P.propval font_desc_prop :
?inherited:bool ->
?def:Font.font_desc ->
Font.font_desc Props.prop ->
Font.font_desc Css.P.propval keyword_prop :
('a -> string) ->
(string -> 'a option) ->
'a ->
?inherited:bool ->
?def:'a ->
'a Props.prop ->
'a Css.P.propUtilities to build options for other types.