From 14de2dd0b2e4a9c9f8904995811f3fe8c41b36fb Mon Sep 17 00:00:00 2001 From: Aleksander Date: Sun, 17 Aug 2025 22:00:19 +0200 Subject: [PATCH] Update documentation --- wgui/doc/widgets.md | 302 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 263 insertions(+), 39 deletions(-) diff --git a/wgui/doc/widgets.md b/wgui/doc/widgets.md index b6682cf..a8cf138 100644 --- a/wgui/doc/widgets.md +++ b/wgui/doc/widgets.md @@ -1,79 +1,115 @@ +# Quick jump + +## [Widgets](#widgets) + +[div](#div-widget), [label](#label-widget), [rectangle](#rectangle-widget), [sprite](#sprite-widget) + +## [Built-in components](#components) + +[Button](#button-component), [Slider](#slider-component), [CheckBox](#checkbox-component) + +## [Examples](#examples) + +[Simple layout](#simple-layout) + +[Value substitution (themes)](#value-substitution-themes) + +[File inclusion](#file-inclusion) + +[Macros](#macros) + +[Templates](#templates) + # Universal widget attributes -`display`: flex | block | grid +### They can be used in any widget/component -`position`: absolute | relative +`display`: "flex" | "block" | "grid" -`flex_grow`: units (3) +`position`: "absolute" | "relative" -`flex_shrink`: units (3) +`flex_grow`: **float** -`gap`: units (42) or percent (42%) +`flex_shrink`: **float** -`flex_basis`: units (42) or percent (42%) +`gap`: **float** | **percent** -`justify_self`: center | end | flex_end | flex_start | start | stretch +`flex_basis`: **float** | **percent** -`justify_content`: center | end | flex_start | flex_end | space_around | space_between | space_evenly | start | stretch +`justify_self`: "center" | "end" | "flex_end" | "flex_start" | "start" | "stretch" -`flex_wrap`: wrap | no_wrap | wrap_reverse +`justify_content`: "center" | "end" | "flex_start" | "flex_end" | "space_around" | "space_between" | "space_evenly" | "start" | "stretch" -`flex_direction`: row | column | column_reverse | row_reverse, +`flex_wrap`: "wrap" | "no_wrap" | "wrap_reverse" -`align_items`, `align_self`: baseline | center | end | flex_start | flex_end | start | stretch +`flex_direction`: "row" | "column" | "column_reverse" | "row_reverse" -`box_sizing`: border_box | content_box +`align_items`, `align_self`: "baseline" | "center" | "end" | "flex_start" | "flex_end" | "start" | "stretch" -`margin`, `margin_left`, `margin_right`, `margin_top`, `margin_bottom`: units (42) or percent (42%) +`box_sizing`: "border_box" | "content_box" -`padding`, `padding_left`, `padding_right`, `padding_top`, `padding_bottom`: units (42) or percent (42%) +`margin`, `margin_left`, `margin_right`, `margin_top`, `margin_bottom`: **float** | **percent** -`overflow`, `overflow_x`, `overflow_y`: hidden | visible | clip | scroll +`padding`, `padding_left`, `padding_right`, `padding_top`, `padding_bottom`: **float** | **percent** -`min_width`, `min_height`: units (42) or percent (42%) +`overflow`, `overflow_x`, `overflow_y`: "hidden" | "visible" | "clip" | "scroll" -`max_width`, `max_height`: units (42) or percent (42%) +`min_width`, `min_height`: **float** | **percent** -`width`, `height`: units (42) or percent (42%) +`max_width`, `max_height`: **float** | **percent** + +`width`, `height`: **float** | **percent** # Widgets -### `div` +## div widget -The most simple element +`
` + +### The most simple element #### Parameters -None +_None_ --- -### `label` +## label widget -Text element +`