From bf091fa4bfa45b56a6158cf07641f5a59025772d Mon Sep 17 00:00:00 2001 From: djowel Date: Sun, 4 Aug 2024 12:57:12 +0800 Subject: [PATCH] - Button doc update - Use unordered list for Semantics --- .../ROOT/pages/elements/button_stylers.adoc | 783 +++++++++++++++--- docs/modules/ROOT/pages/elements/buttons.adoc | 184 ++-- docs/modules/ROOT/pages/layout/alignment.adoc | 78 +- docs/modules/ROOT/pages/layout/decks.adoc | 10 +- docs/modules/ROOT/pages/layout/floating.adoc | 6 +- docs/modules/ROOT/pages/layout/flow.adoc | 6 +- docs/modules/ROOT/pages/layout/grids.adoc | 56 +- docs/modules/ROOT/pages/layout/layers.adoc | 16 +- docs/modules/ROOT/pages/layout/margins.adoc | 86 +- docs/modules/ROOT/pages/layout/scale.adoc | 4 +- docs/modules/ROOT/pages/layout/sizing.adoc | 64 +- docs/modules/ROOT/pages/layout/span.adoc | 4 +- docs/modules/ROOT/pages/layout/stretch.adoc | 12 +- docs/modules/ROOT/pages/layout/tiles.adoc | 32 +- 14 files changed, 982 insertions(+), 359 deletions(-) diff --git a/docs/modules/ROOT/pages/elements/button_stylers.adoc b/docs/modules/ROOT/pages/elements/button_stylers.adoc index 2877cea4..ad8a2a8c 100644 --- a/docs/modules/ROOT/pages/elements/button_stylers.adoc +++ b/docs/modules/ROOT/pages/elements/button_stylers.adoc @@ -24,72 +24,245 @@ flexibility in defining the button's appearance and behavior. `tl`, `tr`, `bl`, `br` :: The corner radius in pixels for top-left, top-right, bottom-left, and bottom-right corners of type `float`. + + + === Expressions -[,c++] +[cols="2,3", options="header"] +|=== +| Expression | Semantics + +a| +[source,c++] +---- +button_styler{label} +---- +a| +* Create a button with the given label. + +a| +[source,c++] +---- +bst.size(size) +---- +a| +* Sets the relative size of the button. +* `size` is relative to the default size dictated by the + {Global-theme}'s `label_font`. +* A value greater than 1.0 makes the button larger. +* A value less than 1.0 makes the button smaller. +a| +[source,c++] +---- +bst.color(color) +---- +a| +* Sets the color of the button. + +a| +[source,c++] +---- +bst.active_body_color(color) +---- +a| +* Sets the active body color of the button. + +a| +[source,c++] +---- +bst.text_color(color) +---- +a| +* Sets the text color of the button. + +a| +[source,c++] +---- +bst.icon(icon_id) +---- +a| +* Sets the icon of the button. + +a| +[source,c++] +---- +bst.icon_left() +---- +a| +* Sets the icon to the left of the text. + +a| +[source,c++] +---- +bst.icon_right() +---- +a| +* Sets the icon to the right of the text. + +a| +[source,c++] +---- +bst.icon_color(color) +---- +a| +* Sets the icon color of the button. + +a| +[source,c++] +---- +bst.align_left() +---- +a| +* Aligns the text and icon to the left. + +a| +[source,c++] +---- +bst.align_center() +---- +a| +* Aligns the text and icon to the center. + +a| +[source,c++] +---- +bst.align_right() +---- +a| +* Aligns the text and icon to the right. + +a| +[source,c++] +---- +bst.margin(margin) +---- +a| +* Sets the margin of the button. + +a| +[source,c++] +---- +bst.corner_radius(r) +---- +a| +* Sets the corner radius of the button. + +a| +[source,c++] +---- +bts.corner_radius(tl, tr, bl, br) +---- +a| +* Sets the corner radius of the button for each corner. + +a| +[source,c++] +---- +bts.rounded_top() +---- +a| +* Sets the top corners of the button to be rounded. + +a| +[source,c++] +---- +bts.rounded_bottom() +---- +a| +* Sets the bottom corners of the button to be rounded. + +a| +[source,c++] +---- +bts.rounded_left() +---- +a| +* Sets the left corners of the button to be rounded. + +a| +[source,c++] +---- +bts.rounded_right() ---- -button_styler{label} <1> -bst.size(size) <2> -bst.color(color) <3> -bst.active_body_color(color) <4> -bst.text_color(color) <5> -bst.icon(icon_id) <6> -bst.icon_left() <7> -bst.icon_right() <8> -bst.icon_color(color) <9> -bst.align_left() <10> -bst.align_center() <11> -bst.align_right() <12> -bst.margin(margin) <13> -bst.corner_radius(r) <14> -bts.corner_radius(tl, tr, bl, br) <15> -bts.rounded_top() <16> -bts.rounded_bottom() <17> -bts.rounded_left() <18> -bts.rounded_right() <19> -bts.rounded_top(r) <20> -bts.rounded_bottom(r) <21> -bts.rounded_left(r) <22> -bts.rounded_right(r) <23> -bts.rounded_corner_top_left(r) <24> -bts.rounded_corner_top_right(r) <25> -bts.rounded_corner_bottom_left(r) <26> -bts.rounded_corner_bottom_right(r) <27> ----- - -=== Semantics - -<1> Creates a button styler with the given label. -<2> Sets the button relative size of a button styler. A value > 1.0 makes the - button larger, while a value < 1.0 makes the button smaller. -<3> Sets the color of a button styler. -<4> Sets the active body color of a button styler. -<5> Sets the text color of a button styler. -<6> Sets the icon of a button styler. -<7> Sets the icon to the left of the text. -<8> Sets the icon to the right of the text. -<9> Sets the icon color of a button styler. -<10> Aligns the text and icon to the left. -<11> Aligns the text and icon to the center. -<12> Aligns the text and icon to the right. -<13> Sets the margin of a button styler. -<14> Sets the corner radius of a button styler. -<15> Sets the corner radius of a button styler for each corner. -<16> Sets the top corners of a button styler to be rounded. -<17> Sets the bottom corners of a button styler to be rounded. -<18> Sets the left corners of a button styler to be rounded. -<19> Sets the right corners of a button styler to be rounded. -<20> Sets the top corners of a button styler to be rounded with a specific radius. -<21> Sets the bottom corners of a button styler to be rounded with a specific radius. -<22> Sets the left corners of a button styler to be rounded with a specific radius. -<23> Sets the right corners of a button styler to be rounded with a specific radius. -<24> Sets the top-left corner of a button styler to be rounded with a specific radius. -<25> Sets the top-right corner of a button styler to be rounded with a specific radius. -<26> Sets the bottom-left corner of a button styler to be rounded with a specific radius. -<27> Sets the bottom-right corner of a button styler to be rounded with a specific radius. - -All of these expressions return a button styler. Therefore, these expressions -can be chained together to create a button styler with the desired +a| +* Sets the right corners of the button to be rounded. + +a| +[source,c++] +---- +bts.rounded_top(r) +---- +a| +* Sets the top corners of the button to be rounded with a specific + radius. + +a| +[source,c++] +---- +bts.rounded_bottom(r) +---- +a| +* Sets the bottom corners of the button to be rounded with a specific + radius. + +a| +[source,c++] +---- +bts.rounded_left(r) +---- +a| +* Sets the left corners of the button to be rounded with a specific + radius. + +a| +[source,c++] +---- +bts.rounded_right(r) +---- +a| +* Sets the right corners of the button to be rounded with a specific + radius. + +a| +[source,c++] +---- +bts.rounded_corner_top_left(r) +---- +a| +* Sets the top-left corner of the button to be rounded with a specific + radius. + +a| +[source,c++] +---- +bts.rounded_corner_top_right(r) +---- +a| +* Sets the top-right corner of the button to be rounded with a specific + radius. + +a| +[source,c++] +---- +bts.rounded_corner_bottom_left(r) +---- +a| +* Sets the bottom-left corner of the button to be rounded with a + specific radius. + +a| +[source,c++] +---- +bts.rounded_corner_bottom_right(r) +---- +a| +* Sets the bottom-right corner of the button to be rounded with a + specific radius. +|=== + +All of these expressions return the button styler. Therefore, these expressions +can be chained together to create the button styler with the desired appearance. The result is then passed to one of the button creation functions (see {Buttons}). @@ -128,12 +301,12 @@ auto btn = momentary_button( ); ---- -=== Default Button Styler +== Default Button Styler The basic button styler is a simple button with a text label with no icon, with these defaults: -[cols="1,1", options="header"] +[cols="2,3", options="header"] |=== | Property | Default Value @@ -153,7 +326,7 @@ with these defaults: | corner_radius_bottom_right | `corner_radius` |=== -=== Convenience Functions +== Convenience Functions The following convenience functions are provided to create commonly used buttons. These functions simplify button creation, allowing users to quickly @@ -173,72 +346,462 @@ implement standard button types with minimal effort. === Expressions -[,c++] ----- +==== Momentary buttons + +[cols="2,3", options="header"] +|=== +| Expression | Semantics -// Momentary buttons +a| +[source,c++] +---- button(label) +---- +a| +* Creates a button with the specified label. + +a| +[source,c++] +---- button(label, size) +---- +a| +* Creates a button with the specified label and size. + +a| +[source,c++] +---- button(label, size, color) +---- +a| +* Creates a button with the specified label, size, and color. + +a| +[source,c++] +---- button(label) +---- +a| +* Creates a button with the specified label, using the MBase template. + +a| +[source,c++] +---- button(label, size) -button(label, size, color) +---- +a| +* Creates a button with the specified label and size, using the MBase template. + +a| +[source,c++] +---- +button( + label, size, color +) +---- +a| +* Creates a button with the specified label, size, and color, using the MBase template. +|=== + +==== Momentary Buttons with Icon to the Left -// Momentary buttons with icon to the left +[cols="2,3", options="header"] +|=== +| Expression | Semantics + +a| +[source,c++] +---- button(icon_id, label, size) -button(icon_id, label, size, color) -button(icon_id, label, size) -button(icon_id, label, size, color) +---- +a| +* Creates a momentary button with the specified icon to the left, label, and size. + +a| +[source,c++] +---- +button( + icon_id, label, size, color +) +---- +a| +* Creates a momentary button with the specified icon to the left, label, size, and color. + +a| +[source,c++] +---- +button( + icon_id, label, size +) +---- +a| +* Creates a momentary button with the specified icon to the left, label, and size, using the MBase template. + +a| +[source,c++] +---- +button( + icon_id, label, size, color +) +---- +a| +* Creates a momentary button with the specified icon to the left, label, size, and color, using the MBase template. +|=== + +==== Momentary Buttons with Icon to the Right -// Momentary buttons with icon to the right +[cols="2,3", options="header"] +|=== +| Expression | Semantics + +a| +[source,c++] +---- button(label, icon_id, size) -button(label, icon_id, size, color) -button(label, icon_id, size) -button(label, icon_id, size, color) +---- +a| +* Creates a momentary button with the specified label, icon to the right, and size. + +a| +[source,c++] +---- +button( + label, icon_id, size, color +) +---- +a| +* Creates a momentary button with the specified label, icon to the right, size, and color. + +a| +[source,c++] +---- +button( + label, icon_id, size +) +---- +a| +* Creates a momentary button with the specified label, icon to the right, and size, using the MBase template. + +a| +[source,c++] +---- +button( + label, icon_id, size, color +) +---- +a| +* Creates a momentary button with the specified label, icon to the right, size, and color, using the MBase template. +|=== + +==== Toggle Buttons -// Toggle buttons +[cols="2,3", options="header"] +|=== +| Expression | Semantics + +a| +[source,c++] +---- toggle_button(label) +---- +a| +* Creates a toggle button with the specified label. + +a| +[source,c++] +---- toggle_button(label, size) -toggle_button(label, size, color) +---- +a| +* Creates a toggle button with the specified label and size. + +a| +[source,c++] +---- +toggle_button( + label, size, color +) +---- +a| +* Creates a toggle button with the specified label, size, and color. + +a| +[source,c++] +---- toggle_button(label) -toggle_button(label, size) -toggle_button(label, size, color) - -// Toggle buttons with icon to the left -toggle_button(icon_id, label, size) -toggle_button(icon_id, label, size, color) -toggle_button(icon_id, label, size) -toggle_button(icon_id, label, size, color) - -// Toggle buttons with icon to the right -toggle_button(label, icon_id, size) -toggle_button(label, icon_id, size, color) -toggle_button(label, icon_id, size) -toggle_button(label, icon_id, size, color) - -// Latching buttons +---- +a| +* Creates a toggle button with the specified label, using the TBase template. + +a| +[source,c++] +---- +toggle_button( + label, size +) +---- +a| +* Creates a toggle button with the specified label and size, using the TBase template. + +a| +[source,c++] +---- +toggle_button( + label, size, color +) +---- +a| +* Creates a toggle button with the specified label, size, and color, using the TBase template. +|=== + +==== Toggle Buttons with Icon to the Left + +[cols="2,3", options="header"] +|=== +| Expression | Semantics + +a| +[source,c++] +---- +toggle_button( + icon_id, label, size +) +---- +a| +* Creates a toggle button with the specified icon to the left, label, and size. + +a| +[source,c++] +---- +toggle_button( + icon_id, label, size, color +) +---- +a| +* Creates a toggle button with the specified icon to the left, label, size, and color. + +a| +[source,c++] +---- +toggle_button( + icon_id, label, size +) +---- +a| +* Creates a toggle button with the specified icon to the left, label, and size, using the TBase template. + +a| +[source,c++] +---- +toggle_button( + icon_id, label, size, color +) +---- +a| +* Creates a toggle button with the specified icon to the left, label, size, and color, using the TBase template. +|=== + +==== Toggle Buttons with Icon to the Right + +[cols="2,3", options="header"] +|=== +| Expression | Semantics + +a| +[source,c++] +---- +toggle_button( + label, icon_id, size +) +---- +a| +* Creates a toggle button with the specified label, icon to the right, and size. + +a| +[source,c++] +---- +toggle_button( + label, icon_id, size, color +) +---- +a| +* Creates a toggle button with the specified label, icon to the right, size, and color. + +a| +[source,c++] +---- +toggle_button( + label, icon_id, size +) +---- +a| +* Creates a toggle button with the specified label, icon to the right, and size, using the TBase template. + +a| +[source,c++] +---- +toggle_button( + label, icon_id, size, color +) +---- +a| +* Creates a toggle button with the specified label, icon to the right, size, and color, using the TBase template. +|=== + +==== Latching Buttons + +[cols="2,3", options="header"] +|=== +| Expression | Semantics + +a| +[source,c++] +---- latching_button(label) +---- +a| +* Creates a latching button with the specified label. + +a| +[source,c++] +---- latching_button(label, size) -latching_button(label, size, color) +---- +a| +* Creates a latching button with the specified label and size. + +a| +[source,c++] +---- +latching_button( + label, size, color +) +---- +a| +* Creates a latching button with the specified label, size, and color. + +a| +[source,c++] +---- latching_button(label) -latching_button(label, size) -latching_button(label, size, color) +---- +a| +* Creates a latching button with the specified label, using the LBase template. + +a| +[source,c++] +---- +latching_button( + label, size +) +---- +a| +* Creates a latching button with the specified label and size, using the LBase template. + +a| +[source,c++] +---- +latching_button( + label, size, color +) +---- +a| +* Creates a latching button with the specified label, size, and color, using the LBase template. +|=== + +==== Latching Buttons with Icon to the Left + +[cols="2,3", options="header"] +|=== +| Expression | Semantics + +a| +[source,c++] +---- +latching_button( + icon_id, label, size +) +---- +a| +* Creates a latching button with the specified icon to the left, label, and size. + +a| +[source,c++] +---- +latching_button( + icon_id, label, size, color +) +---- +a| +* Creates a latching button with the specified icon to the left, label, size, and color. + +a| +[source,c++] +---- +latching_button( + icon_id, label, size +) +---- +a| +* Creates a latching button with the specified icon to the left, label, and size, using the LBase template. -// Latching buttons with icon to the left -latching_button(icon_id, label, size) -latching_button(icon_id, label, size, color) -latching_button(icon_id, label, size) -latching_button(icon_id, label, size, color) +a| +[source,c++] +---- +latching_button( + icon_id, label, size, color +) +---- +a| +* Creates a latching button with the specified icon to the left, label, size, and color, using the LBase template. +|=== + +==== Latching Buttons with Icon to the Right -// Latching buttons with icon to the right -latching_button(label, icon_id, size) -latching_button(label, icon_id, size, color) -latching_button(label, icon_id, size) -latching_button(label, icon_id, size, color) +[cols="2,3", options="header"] +|=== +| Expression | Semantics +a| +[source,c++] +---- +latching_button( + label, icon_id, size +) ---- +a| +* Creates a latching button with the specified label, icon to the right, and size. -=== Semantics +a| +[source,c++] +---- +latching_button( + label, icon_id, size, color +) +---- +a| +* Creates a latching button with the specified label, icon to the right, size, and color. + +a| +[source,c++] +---- +latching_button( + label, icon_id, size +) +---- +a| +* Creates a latching button with the specified label, icon to the right, and size, using the LBase template. + +a| +[source,c++] +---- +latching_button( + label, icon_id, size, color +) +---- +a| +* Creates a latching button with the specified label, icon to the right, size, and color, using the LBase template. +|=== These are forwarding shortcuts to the `button_styler` expressions. They create a button styler with the specified properties and pass it to the diff --git a/docs/modules/ROOT/pages/elements/buttons.adoc b/docs/modules/ROOT/pages/elements/buttons.adoc index 6d0d4f25..94031daf 100644 --- a/docs/modules/ROOT/pages/elements/buttons.adoc +++ b/docs/modules/ROOT/pages/elements/buttons.adoc @@ -59,35 +59,71 @@ namespace concepts `TBase`:: Type that conforms to the ToggleButton concept. `LBase`:: Type that conforms to the LatchingButton concept. + === Expressions -[,c++] +[cols="2,3", options="header"] +|=== +| Expression | Semantics + +a| +[source,c++] ---- -// Basic default buttons momentary_button(styler); +---- +a| +* Creates a momentary button with the given styler element. + +a| +[source,c++] +---- toggle_button(styler); -latching_button(styler); +---- +a| +* Creates a toggle button with the given styler element. + +a| +[source,c++] +---- +latching_button(styler) +---- +a| +* Creates a latching button with the given styler element. -// Custom buttons -momentary_button(styler); -toggle_button(styler); -latching_button(styler); +a| +[source,c++] ---- +momentary_button( + styler +) +---- +a| +* Creates a momentary button with the given styler element. +* `MBase` is the base type that must conform to the `MomentaryButton` + concept. -=== Semantics +a| +[source,c++] +---- +toggle_button( + styler +) +---- +a| +* Creates a toggle button with the given styler element. +* `TBase` is the base type that must conform to the `ToggleButton` concept. -. `momentary_button` - is a function that creates a momentary button with the given styler - element. `MBase`, if provided, is the base type that must conform to - the `MomentaryButton` concept. -. `toggle_button` - is a function that creates a toggle button with the given styler - element. `TBase`, if provided, is the the base type that must conform - to the `ToggleButton` concept. -. `latching_button` - is a function that creates a latching button with the given styler - element. `LBase`, if provided, is the the base type that must conform - to the `LatchingButton` concept. +a| +[source,c++] +---- +latching_button( + styler +) +---- +a| +* Creates a latching button with the given styler element. +* `LBase` is the base type that must conform to the `LatchingButton` concept. +|=== The provided base types `MBase`, `TBase`, and `LBase` offer the flexibility to use custom button behavior, provided they adhere to their respective @@ -103,43 +139,48 @@ button is clicked. `btn`:: A Button instance. `f` :: A callback function with the signature `void(bool state)`. -=== Expression +=== Expressions -[,c++] +[cols="2,3", options="header"] +|=== +| Expression | Semantics + +a| +[source,c++] ---- btn.on_click = f; ---- +a| +* Assigns a callable function, `f`, to the button's `on_click` event. +* The `on_click` callback is called at the trailing edge of the click, just + before release. +* Momentary and latching buttons will always have a state of `true` when + its `on_click` callback is called. +* Toggle buttons will will have a state that alternates between `true` and + `false` with each click. +|=== -=== Semantics - -The type of the `on_click` callable object is: +The client provides a callback function, typically a c++ lambda, that will be +called when the button is clicked. The type of the `on_click` callable object +is: -[,c++] +[source,c++] ---- -std::function ---- -The client provides a callback function, typically a c++ lambda, that will be -called when the button is clicked. The `state` argument indicates whether the -button is ON (`true`) or OFF (`false`). - -. The `on_click` callback is called at the trailing edge of the click, just -before release. - -. Momentary and latching buttons will always have a state of `true` when -its `on_click` callback is called. - -. Toggle buttons will will have a state that alternates between `true` and -`false` with each click. +The `state` argument indicates whether the button is ON (`true`) or OFF +(`false`). === Example [,c++] ---- -btn.on_click = [](bool state) -{ - std::cout << "Button clicked: " << state << std::endl; -}; +btn.on_click = + [](bool state) + { + std::cout << "Button clicked: " << state << std::endl; + }; ---- == Enable/Disable @@ -153,20 +194,29 @@ differently to indicate that it is disabled. `btn` :: A Button instance. `state` :: A boolean value indicating whether the button is enabled or disabled. -=== Expression +=== Expressions -[,c++] +[cols="2,3", options="header"] +|=== +| Expression | Semantics + +a| +[source,c++] ---- -btn.enable(state) <1> -btn.is_enabled() <2> +btn.enable(state) ---- - -=== Semantics - -<1> Pass `true` to the `state` argument to enable the button, or - `false` to disable it. When disabled, the button will not respond - to clicks. -<2> Returns `true` if the button is enabled, and `false` otherwise. +a| +* Sets the button's enabled state. Pass `true` to the `state` argument to + enable the button, or `false` to disable it. +* When disabled, the button will not respond to clicks. +a| +[source,c++] +---- +btn.is_enabled() +---- +a| +* Returns `true` if the button is enabled, `false` otherwise. +|=== == Value @@ -183,18 +233,28 @@ functions, `value()` and `value(val)`. `btn` :: A Button instance. `val` :: A boolean value. -=== Expression +=== Expressions + +[cols="2,3", options="header"] +|=== +| Expression | Semantics -[,c++] +a| +[source,c++] ---- -btn.value(val) <1> -btn.vauel() <2> +btn.value(val) ---- +a| +* Sets the value of the button to `val`. -=== Semantics - -<1> Sets the value of the button to `val`. -<2> Returns the current value of the button. +a| +[source,c++] +---- +btn.value() +---- +a| +* Returns the current value of the button. +|=== == Button Styler diff --git a/docs/modules/ROOT/pages/layout/alignment.adoc b/docs/modules/ROOT/pages/layout/alignment.adoc index 25684e5d..cc802ce1 100644 --- a/docs/modules/ROOT/pages/layout/alignment.adoc +++ b/docs/modules/ROOT/pages/layout/alignment.adoc @@ -32,16 +32,16 @@ a| halign(align, subject) ---- a| -. Given a total allocated space `X`, `subject` will be positioned horizontally to `X * align`. -. The `subject` will assume its _minimum horizontal limit_. -. Returns instance of `Proxy`. +* Given a total allocated space `X`, `subject` will be positioned horizontally to `X * align`. +* The `subject` will assume its _minimum horizontal limit_. +* Returns instance of `Proxy`. |=== === Examples -. `halign(0.0) // align subject to the left` -. `halign(1.0) // align subject to the right` -. `halign(0.5) // align subject to the center` +* `halign(0.0) // align subject to the left` +* `halign(1.0) // align subject to the right` +* `halign(0.5) // align subject to the center` == align_left @@ -65,8 +65,8 @@ a| align_left(subject) ---- a| -. Equivalent to `halign(0.0, subject)` -. Returns instance of `Proxy`. +* Equivalent to `halign(0.0, subject)` +* Returns instance of `Proxy`. |=== == align_center @@ -91,8 +91,8 @@ a| align_center(subject) ---- a| -. Equivalent to `halign(0.5, subject)` -. Returns instance of `Proxy`. +* Equivalent to `halign(0.5, subject)` +* Returns instance of `Proxy`. |=== == align_right @@ -117,8 +117,8 @@ a| align_right(subject) ---- a| -. Equivalent to `halign(1.0, subject)` -. Returns instance of `Proxy`. +* Equivalent to `halign(1.0, subject)` +* Returns instance of `Proxy`. |=== == valign @@ -144,9 +144,9 @@ a| valign(align, subject) ---- a| -. Given a total allocated space `Y`, `subject` will be positioned vertically to `Y * align`. -. The `subject` will assume its _minimum vertical limit_. -. Returns instance of `Proxy`. +* Given a total allocated space `Y`, `subject` will be positioned vertically to `Y * align`. +* The `subject` will assume its _minimum vertical limit_. +* Returns instance of `Proxy`. |=== === Examples @@ -177,8 +177,8 @@ a| align_top(subject) ---- a| -. Equivalent to `valign(0.0, subject)` -. Returns instance of `Proxy`. +* Equivalent to `valign(0.0, subject)` +* Returns instance of `Proxy`. |=== == align_middle @@ -203,8 +203,8 @@ a| align_middle(subject) ---- a| -. Equivalent to `valign(0.5, subject)` -. Returns instance of `Proxy`. +* Equivalent to `valign(0.5, subject)` +* Returns instance of `Proxy`. |=== == align_bottom @@ -229,8 +229,8 @@ a| align_bottom(subject) ---- a| -. Equivalent to `valign(1.0, subject)` -. Returns instance of `Proxy`. +* Equivalent to `valign(1.0, subject)` +* Returns instance of `Proxy`. |=== == align_left_top @@ -255,8 +255,8 @@ a| align_left_top(subject) ---- a| -. Equivalent to `align_left(align_top(subject))` -. Returns instance of `Proxy`. +* Equivalent to `align_left(align_top(subject))` +* Returns instance of `Proxy`. |=== == align_center_top @@ -281,8 +281,8 @@ a| align_center_top(subject) ---- a| -. Equivalent to `align_center(align_top(subject))` -. Returns instance of `Proxy`. +* Equivalent to `align_center(align_top(subject))` +* Returns instance of `Proxy`. |=== == align_right_top @@ -307,8 +307,8 @@ a| align_right_top(subject) ---- a| -. Equivalent to `align_right(align_top(subject))` -. Returns instance of `Proxy`. +* Equivalent to `align_right(align_top(subject))` +* Returns instance of `Proxy`. |=== == align_left_middle @@ -333,8 +333,8 @@ a| align_left_middle(subject) ---- a| -. Equivalent to `align_left(align_middle(subject))` -. Returns instance of `Proxy`. +* Equivalent to `align_left(align_middle(subject))` +* Returns instance of `Proxy`. |=== == align_center_middle @@ -359,8 +359,8 @@ a| align_center_middle(subject) ---- a| -. Equivalent to `align_center(align_middle(subject))` -. Returns instance of `Proxy`. +* Equivalent to `align_center(align_middle(subject))` +* Returns instance of `Proxy`. |=== == align_right_middle @@ -385,8 +385,8 @@ a| align_right_middle(subject) ---- a| -. Equivalent to `align_right(align_middle(subject))` -. Returns instance of `Proxy`. +* Equivalent to `align_right(align_middle(subject))` +* Returns instance of `Proxy`. |=== == align_left_bottom @@ -411,8 +411,8 @@ a| align_left_bottom(subject) ---- a| -. Equivalent to `align_left(align_bottom(subject))` -. Returns instance of `Proxy`. +* Equivalent to `align_left(align_bottom(subject))` +* Returns instance of `Proxy`. |=== == align_center_bottom @@ -437,8 +437,8 @@ a| align_center_bottom(subject) ---- a| -. Equivalent to `align_center(align_bottom(subject))` -. Returns instance of `Proxy`. +* Equivalent to `align_center(align_bottom(subject))` +* Returns instance of `Proxy`. |=== == align_right_bottom @@ -463,8 +463,8 @@ a| align_right_bottom(subject) ---- a| -. Equivalent to `align_right(align_bottom(subject))` -. Returns instance of `Proxy`. +* Equivalent to `align_right(align_bottom(subject))` +* Returns instance of `Proxy`. |=== ''' diff --git a/docs/modules/ROOT/pages/layout/decks.adoc b/docs/modules/ROOT/pages/layout/decks.adoc index 1c902af6..0a1b9a3e 100644 --- a/docs/modules/ROOT/pages/layout/decks.adoc +++ b/docs/modules/ROOT/pages/layout/decks.adoc @@ -11,9 +11,9 @@ image::/layout/deck.svg[alt="deck", width=353px, role=center] === Semantics -. Everything listed in the {Layers_Semantics}, except 2 and 3. -. Only the active selected element element is drawn. -. Only the active selected element is given the chance to process UI control. +* Everything listed in the {Layers_Semantics}, except 2 and 3. +* Only the active selected element element is drawn. +* Only the active selected element is given the chance to process UI control. == deck @@ -40,7 +40,7 @@ a| deck(e1, e2, e3... eN) ---- a| -. In addition to the semantics of Decks, returns instance of `Composite`. +* In addition to the semantics of Decks, returns instance of `Composite`. |=== === Example @@ -55,7 +55,7 @@ NOTE: If the number of elements is not fixed, you can use an === Requirements -. In addition to the semantics of Deck, returns instance of `Composite`. +* In addition to the semantics of Deck, returns instance of `Composite`. == deck_composite diff --git a/docs/modules/ROOT/pages/layout/floating.adoc b/docs/modules/ROOT/pages/layout/floating.adoc index b976e3a4..9907e128 100644 --- a/docs/modules/ROOT/pages/layout/floating.adoc +++ b/docs/modules/ROOT/pages/layout/floating.adoc @@ -31,10 +31,10 @@ a| floating({left, top, right, bottom}, subject) ---- a| -. The element will be placed exactly to the specified position in the main +* The element will be placed exactly to the specified position in the main view, constrained to the subject's natural {limits}. -. The floating element does not violate the natural {limits} of the subject. -. Returns instance of `Proxy`. +* The floating element does not violate the natural {limits} of the subject. +* Returns instance of `Proxy`. |=== ''' diff --git a/docs/modules/ROOT/pages/layout/flow.adoc b/docs/modules/ROOT/pages/layout/flow.adoc index 46893f09..58d5ff7f 100644 --- a/docs/modules/ROOT/pages/layout/flow.adoc +++ b/docs/modules/ROOT/pages/layout/flow.adoc @@ -73,13 +73,13 @@ a| flow(c) ---- a| -. Returns an instance of `Composite` where child elements are laid out from +* Returns an instance of `Composite` where child elements are laid out from left to right, fitting as many elements as possible within each child's maximum horizontal limit. -. Once a row is full, move to the next row and do the same until the end of +* Once a row is full, move to the next row and do the same until the end of the row is filled. Repeat the procedure until all the elements are laid out. -. The height of each row is determined by the maximum vertical limit of all +* The height of each row is determined by the maximum vertical limit of all the elements to be laid out in that row. |=== diff --git a/docs/modules/ROOT/pages/layout/grids.adoc b/docs/modules/ROOT/pages/layout/grids.adoc index 25eba37d..6ac54456 100644 --- a/docs/modules/ROOT/pages/layout/grids.adoc +++ b/docs/modules/ROOT/pages/layout/grids.adoc @@ -22,20 +22,20 @@ Grids have computed horizontal and vertical sizes following the natural === Semantics -. The elements are laid out in a single row, left to right, immediately next +* The elements are laid out in a single row, left to right, immediately next to each other with no intervening space. -. The elements are positioned horizontally using the supplied fractional +* The elements are positioned horizontally using the supplied fractional positions. The fractional positions values range from 0.0 to 1.0, which specify the child element's horizontal position from left (0.0) to right (1.0). -. The grid's _minimum vertical limit_ is computed as the maximum of the +* The grid's _minimum vertical limit_ is computed as the maximum of the children elements' __minimum vertical limit__s. -. The grid's _maximum vertical limit_ is computed as the minimum of the +* The grid's _maximum vertical limit_ is computed as the minimum of the children elements' __maximum vertical limit__s. -. The final computed minimum limit is clamped to ensure it is not greater +* The final computed minimum limit is clamped to ensure it is not greater than the computed maximum limit. Likewise the computed maximum limit is clamped to ensure it is not less than the computed minimum limit. -. The supplied (horizontal) positions and computed (vertical) coordinates +* The supplied (horizontal) positions and computed (vertical) coordinates may violate the limits of its children elements. .. If the allocated size of a child element is lower than the element's _minimum limits_ in either dimension, the element will be cropped. @@ -69,7 +69,7 @@ a| hgrid(positions, e1,...eN) ---- a| -. In addition to the semantics of Horizontal Grids, returns instance of +* In addition to the semantics of Horizontal Grids, returns instance of `Composite`. |=== @@ -87,19 +87,19 @@ NOTE: If the number of elements is not fixed, you can use an === Requirements -. The number of supplied positions and elements, multiplied by each element's +* The number of supplied positions and elements, multiplied by each element's span, should match, otherwise, undefined behavior. By default elements have a span of `1`. See <<_span_element,Span Element>> for more information. -. The positions assume the first element is at `x=0` (it is at the left-most +* The positions assume the first element is at `x=0` (it is at the left-most position in the row). The fractional position of the second element is at index `0`, the third at index `1`, and so on. -. The externally supplied positions should be sorted with increasing values +* The externally supplied positions should be sorted with increasing values such that positions[n] \<= positions[n+1]. The behavior is undefined if this is violated. === Semantics -. In addition to the semantics of Horizontal Grids, returns instance of +* In addition to the semantics of Horizontal Grids, returns instance of `Composite`. == hgrid_composite @@ -141,12 +141,12 @@ build complex hierarchical structures. === Requirements -. The number of items in the external coordinates vector `positions` must match +* The number of items in the external coordinates vector `positions` must match with the number of elements at any given time. -. The positions assume the first element is at `x=0` (it is at the left-most +* The positions assume the first element is at `x=0` (it is at the left-most position in the row). The fractional position of the second element is at index `0`, the third at index `1`, and so on. -. The externally supplied positions should be sorted with increasing values +* The externally supplied positions should be sorted with increasing values such that positions[n] \<= positions[n+1]. The behavior is undefined if this is violated. @@ -161,20 +161,20 @@ Grids have computed horizontal and vertical sizes following the natural === Semantics -. The elements are laid out in a single column, top to bottom, immediately +* The elements are laid out in a single column, top to bottom, immediately next to each other with no intervening space. -. The elements are positioned vertically using the supplied fractional +* The elements are positioned vertically using the supplied fractional positions. The fractional positions values range from 0.0 to 1.0, which specify the child element's vertical position from top (0.0) to bottom (1.0). -. The grid's _minimum horizontal limit_ is computed as the maximum of the +* The grid's _minimum horizontal limit_ is computed as the maximum of the children elements' __minimum horizontal limit__s. -. The grid's _maximum horizontal limit_ is computed as the minumum of the +* The grid's _maximum horizontal limit_ is computed as the minumum of the children elements' __maximum horizontal limit__s. -. The final computed minimum limit is clamped to ensure it is not greater +* The final computed minimum limit is clamped to ensure it is not greater than the computed maximum limit. Likewise the computed maximum limit is clamped to ensure it is not less than the computed minimum limit. -. The supplied (vertical) positions and computed (horizontal) coordinates +* The supplied (vertical) positions and computed (horizontal) coordinates may violate the limits of its children elements. .. If the allocated size of a child element is lower than the element's _minimum limits_ in either dimension, the element will be cropped. @@ -209,7 +209,7 @@ a| vgrid(positions, e1,...eN) ---- a| -. In addition to the semantics of Vertical Grids, returns instance of +* In addition to the semantics of Vertical Grids, returns instance of `Composite`. |=== @@ -227,19 +227,19 @@ NOTE: If the number of elements is not fixed, you can use an === Requirements -. The number of supplied positions and elements, multiplied by each element's +* The number of supplied positions and elements, multiplied by each element's span, should match, otherwise, undefined behavior. By default elements have a span of `1`. See <<_span_element,Span Element>> for more information. -. The positions assume the first element is at `x=0` (it is at the top-most +* The positions assume the first element is at `x=0` (it is at the top-most position in the column). The fractional position of the second element is at index `0`, the third at index `1`, and so on. -. The externally supplied positions should be sorted with increasing values +* The externally supplied positions should be sorted with increasing values such that positions[n] \<= positions[n+1]. The behavior is undefined if this is violated. === Semantics -. In addition to the semantics of Vertical Grids, returns instance of +* In addition to the semantics of Vertical Grids, returns instance of `Composite`. == vgrid_composite @@ -280,12 +280,12 @@ build complex hierarchical structures. === Requirements -. The number of items in the external coordinates vector `positions` must match +* The number of items in the external coordinates vector `positions` must match with the number of elements at any given time. -. The positions assume the first element is at `x=0` (it is at the top-most +* The positions assume the first element is at `x=0` (it is at the top-most position in the column). The fractional position of the second element is at index `0`, the third at index `1`, and so on. -. The externally supplied positions should be sorted with increasing values +* The externally supplied positions should be sorted with increasing values such that positions[n] \<= positions[n+1]. The behavior is undefined if this is violated. diff --git a/docs/modules/ROOT/pages/layout/layers.adoc b/docs/modules/ROOT/pages/layout/layers.adoc index fd6d7dd2..b364d3d5 100644 --- a/docs/modules/ROOT/pages/layout/layers.adoc +++ b/docs/modules/ROOT/pages/layout/layers.adoc @@ -12,20 +12,20 @@ image::/layout/layer.svg[alt="layer", width=353px, role=center] === Semantics -. The elements are laid out in the z-axis, top to bottom. -. Rendering is done bottom-up; the bottom-most elements are drawn first. -. UI control (such as mouse clicks) proceeds from top to bottom. +* The elements are laid out in the z-axis, top to bottom. +* Rendering is done bottom-up; the bottom-most elements are drawn first. +* UI control (such as mouse clicks) proceeds from top to bottom. Higher-level elements are given control priority. If a higher-level element does not process the event, lower-level elements are given a chance. -. The layer's _minimum limit_ is computed as the maximum of the children +* The layer's _minimum limit_ is computed as the maximum of the children elements' __minimum limit__s. -. The layer's _maximum limit_ is computed as the minimum of the children +* The layer's _maximum limit_ is computed as the minimum of the children elements' __maximum limit__s. -. The final computed minimum limit is clamped to ensure it is not greater +* The final computed minimum limit is clamped to ensure it is not greater than the computed maximum limit. Likewise the computed maximum limit is clamped to ensure it is not less than the computed minimum limit. -. The computed (vertical) and (horizontal) coordinates may violate the +* The computed (vertical) and (horizontal) coordinates may violate the limits of its children elements. .. If the allocated size of a child element is lower than the element's _minimum limits_ in either dimension, the element will be cropped. @@ -57,7 +57,7 @@ a| layer(e1,...eN) ---- a| -. In addition to the semantics of Layers, returns instance of `Composite`. +* In addition to the semantics of Layers, returns instance of `Composite`. |=== === Example diff --git a/docs/modules/ROOT/pages/layout/margins.adoc b/docs/modules/ROOT/pages/layout/margins.adoc index f95510f1..5ddafc75 100644 --- a/docs/modules/ROOT/pages/layout/margins.adoc +++ b/docs/modules/ROOT/pages/layout/margins.adoc @@ -33,10 +33,10 @@ margin({left, top, right, bottom}, ) ---- a| -. Space is added to the left, top, right, and bottom of the subject with the given parameters. -. The element's {limits} is overridden to account for the additional space. -. The `margin` does not violate the natural {limits} of the subject. `margin` will respect the subject's min-max constraints and resizability. -. Returns instance of `Proxy`. +* Space is added to the left, top, right, and bottom of the subject with the given parameters. +* The element's {limits} is overridden to account for the additional space. +* The `margin` does not violate the natural {limits} of the subject. `margin` will respect the subject's min-max constraints and resizability. +* Returns instance of `Proxy`. |=== == margin_left @@ -62,12 +62,12 @@ a| margin_left(left, subject) ---- a| -. Space is added to the left of the subject with the given parameter. -. The element's {limits} is overridden to account for the additional space. -. The `margin_left` does not violate the natural {limits} of the subject. +* Space is added to the left of the subject with the given parameter. +* The element's {limits} is overridden to account for the additional space. +* The `margin_left` does not violate the natural {limits} of the subject. `margin_left` will respect the subject's min-max constraints and resizability. -. Returns instance of `Proxy`. +* Returns instance of `Proxy`. |=== == margin_right @@ -93,12 +93,12 @@ a| margin_right(right, subject) ---- a| -. Space is added to the right of the subject with the given parameter. -. The element's {limits} is overridden to account for the additional space. -. The `margin_right` does not violate the natural {limits} of the subject. +* Space is added to the right of the subject with the given parameter. +* The element's {limits} is overridden to account for the additional space. +* The `margin_right` does not violate the natural {limits} of the subject. `margin_right` will respect the subject's min-max constraints and resizability. -. Returns instance of `Proxy`. +* Returns instance of `Proxy`. |=== == margin_top @@ -124,9 +124,9 @@ a| margin_top(top, subject) ---- a| -. Space is added to the top of the subject with the given parameter. -. The element's {limits} is overridden to account for the additional space. -. The `margin_top` does not violate the natural {limits} of the subject. +* Space is added to the top of the subject with the given parameter. +* The element's {limits} is overridden to account for the additional space. +* The `margin_top` does not violate the natural {limits} of the subject. `margin_top` will respect the subject's min-max constraints and resizability. . Returns instance of `Proxy`. @@ -155,12 +155,12 @@ a| margin_bottom(bottom, subject) ---- a| -. Space is added to the bottom of the subject with the given parameter. -. The element's {limits} is overridden to account for the additional space. -. The `margin_bottom` does not violate the natural {limits} of the subject. +* Space is added to the bottom of the subject with the given parameter. +* The element's {limits} is overridden to account for the additional space. +* The `margin_bottom` does not violate the natural {limits} of the subject. `margin_bottom` will respect the subject's min-max constraints and resizability. -. Returns instance of `Proxy`. +* Returns instance of `Proxy`. |=== == hmargin @@ -196,13 +196,13 @@ margin_left_right({left, right}, subject) margin_left_right(left, right, subject) ---- a| -. Space is added to the left and right sides of the subject with the given +* Space is added to the left and right sides of the subject with the given parameters. -. The element's {limits} is overridden to account for the additional space. -. The `hmargin` (and variants) does not violate the natural {limits} of the +* The element's {limits} is overridden to account for the additional space. +* The `hmargin` (and variants) does not violate the natural {limits} of the subject. `hmargin` (and variants) will respect the subject's min-max constraints and resizability. -. Returns instance of `Proxy`. +* Returns instance of `Proxy`. |=== == vmargin @@ -240,13 +240,13 @@ margin_top_bottom({top, bottom}, subject) margin_top_bottom(top, bottom, subject) ---- a| -. Space is added to the top and bottom sides of the subject with the given +* Space is added to the top and bottom sides of the subject with the given parameters. -. The element's {limits} is overridden to account for the additional space. -. The `vmargin` (and variants) does not violate the natural {limits} of the +* The element's {limits} is overridden to account for the additional space. +* The `vmargin` (and variants) does not violate the natural {limits} of the subject. `vmargin` (and variants) will respect the subject's min-max constraints and resizability. -. Returns instance of `Proxy`. +* Returns instance of `Proxy`. |=== == margin_left_top @@ -276,13 +276,13 @@ margin_left_top({left, top}, subject) margin_left_top(left, top, subject) ---- a| -. Space is added to the left and top sides of the subject with the given +* Space is added to the left and top sides of the subject with the given parameters. -. The element's {limits} is overridden to account for the additional space. -. The `margin_left_top` (and variant) does not violate the natural {limits} +* The element's {limits} is overridden to account for the additional space. +* The `margin_left_top` (and variant) does not violate the natural {limits} of the subject. `margin_left_top` (and variant) will respect the subject's min-max constraints and resizability. -. Returns instance of `Proxy`. +* Returns instance of `Proxy`. |=== == margin_left_bottom @@ -312,13 +312,13 @@ margin_left_bottom({left, bottom}, subject) margin_left_bottom(left, bottom, subject) ---- a| -. Space is added to the left and bottom sides of the subject with the given +* Space is added to the left and bottom sides of the subject with the given parameters. -. The element's {limits} is overridden to account for the additional space. -. The `margin_left_bottom` (and variant) does not violate the natural +* The element's {limits} is overridden to account for the additional space. +* The `margin_left_bottom` (and variant) does not violate the natural {limits} of the subject. `margin_left_bottom` (and variant) will respect the subject's min-max constraints and resizability. -. Returns instance of `Proxy`. +* Returns instance of `Proxy`. |=== == margin_right_top @@ -348,13 +348,13 @@ margin_right_top({right, top}, subject) margin_right_top(right, top, subject) ---- a| -. Space is added to the right and top sides of the subject with the given +* Space is added to the right and top sides of the subject with the given parameters. -. The element's {limits} is overridden to account for the additional space. -. The `margin_right_top` (and variant) does not violate the natural {limits} +* The element's {limits} is overridden to account for the additional space. +* The `margin_right_top` (and variant) does not violate the natural {limits} of the subject. `margin_right_top` (and variant) will respect the subject's min-max constraints and resizability. -. Returns instance of `Proxy`. +* Returns instance of `Proxy`. |=== == margin_right_bottom @@ -384,13 +384,13 @@ margin_right_bottom({right, bottom}, subject) margin_right_bottom(right, bottom, subject) ---- a| -. Space is added to the right and bottom sides of the subject with the given +* Space is added to the right and bottom sides of the subject with the given parameters. -. The element's {limits} is overridden to account for the additional space. -. The `margin_right_bottom` (and variant) does not violate the natural +* The element's {limits} is overridden to account for the additional space. +* The `margin_right_bottom` (and variant) does not violate the natural {limits} of the subject. `margin_right_bottom` (and variant) will respect the subject's min-max constraints and resizability. -. Returns instance of `Proxy`. +* Returns instance of `Proxy`. |=== ''' diff --git a/docs/modules/ROOT/pages/layout/scale.adoc b/docs/modules/ROOT/pages/layout/scale.adoc index acb32518..a3f8940e 100644 --- a/docs/modules/ROOT/pages/layout/scale.adoc +++ b/docs/modules/ROOT/pages/layout/scale.adoc @@ -28,8 +28,8 @@ a| scale(scale_, subject) ---- a| -. The `subject` will be scaled given the `scale_` value. A value > 1.0 scales the element up (zoom in), while a value < 1.0 scales down (zoom out). -. Returns instance of `Proxy`. +* The `subject` will be scaled given the `scale_` value. A value > 1.0 scales the element up (zoom in), while a value < 1.0 scales down (zoom out). +* Returns instance of `Proxy`. |=== ''' diff --git a/docs/modules/ROOT/pages/layout/sizing.adoc b/docs/modules/ROOT/pages/layout/sizing.adoc index 3bee4987..46ba3e49 100644 --- a/docs/modules/ROOT/pages/layout/sizing.adoc +++ b/docs/modules/ROOT/pages/layout/sizing.adoc @@ -33,9 +33,9 @@ a| limit(limits, subject) ---- a| -. The {limits} of `subject` will be set to the specified {limits} constrained by the natural _limits_ of the `subject`. -. The natural _limits_ of the element will not be violated. -. Returns an instance of `Proxy`. +* The {limits} of `subject` will be set to the specified {limits} constrained by the natural _limits_ of the `subject`. +* The natural _limits_ of the element will not be violated. +* Returns an instance of `Proxy`. |=== == fixed_size @@ -63,9 +63,9 @@ fixed_size({width, height}, ) ---- a| -. `subject` will be laid out with a fixed `width` and `height`, constrained by the natural _limits_ of the `subject`. -. The natural _limits_ of the element will not be violated. -. Returns instance of `Proxy`. +* `subject` will be laid out with a fixed `width` and `height`, constrained by the natural _limits_ of the `subject`. +* The natural _limits_ of the element will not be violated. +* Returns instance of `Proxy`. |=== == hsize @@ -91,10 +91,10 @@ a| hsize(width, subject) ---- a| -. `subject` will be laid out with a fixed `width`, constrained by the natural _horizontal limits_ of the `subject`. -. The natural _horizontal limits_ of the element will not be violated. -. The natural _vertical limits_ of `subject` will not be affected. -. Returns instance of `Proxy`. +* `subject` will be laid out with a fixed `width`, constrained by the natural _horizontal limits_ of the `subject`. +* The natural _horizontal limits_ of the element will not be violated. +* The natural _vertical limits_ of `subject` will not be affected. +* Returns instance of `Proxy`. |=== == vsize @@ -120,10 +120,10 @@ a| vsize(height, subject) ---- a| -. `subject` will be laid out with a fixed `height`, constrained by the natural _vertical limits_ of the `subject`. -. The natural _vertical limits_ of the element will not be violated. -. The natural _horizontal limits_ of `subject` will not be affected. -. Returns instance of `Proxy`. +* `subject` will be laid out with a fixed `height`, constrained by the natural _vertical limits_ of the `subject`. +* The natural _vertical limits_ of the element will not be violated. +* The natural _horizontal limits_ of `subject` will not be affected. +* Returns instance of `Proxy`. |=== == min_size @@ -151,9 +151,9 @@ min_size({width, height}, ) ---- a| -. The _minimum limits_ of `subject` will be set to the specified `width` and `height`, constrained by the natural _minimum limits_ of the `subject`. -. The natural _minimum limits_ of the element will not be violated. -. Returns instance of `Proxy`. +* The _minimum limits_ of `subject` will be set to the specified `width` and `height`, constrained by the natural _minimum limits_ of the `subject`. +* The natural _minimum limits_ of the element will not be violated. +* Returns instance of `Proxy`. |=== == hmin_size @@ -179,9 +179,9 @@ a| hmin_size(width, subject) ---- a| -. The _minimum horizontal limit_ of `subject` will be set to the specified `width` constrained by the natural _horizontal minimum limits_ of the `subject`. -. The natural _horizontal minimum limits_ of the element will not be violated. -. Returns instance of `Proxy`. +* The _minimum horizontal limit_ of `subject` will be set to the specified `width` constrained by the natural _horizontal minimum limits_ of the `subject`. +* The natural _horizontal minimum limits_ of the element will not be violated. +* Returns instance of `Proxy`. |=== == vmin_size @@ -207,9 +207,9 @@ a| vmin_size(height, subject) ---- a| -. The _minimum vertical limit_ of `subject` will be set to the specified `height` constrained by the natural vertical _minimum limits_ of the `subject`. -. The natural _vertical minimum limits_ of the element will not be violated. -. Returns instance of `Proxy`. +* The _minimum vertical limit_ of `subject` will be set to the specified `height` constrained by the natural vertical _minimum limits_ of the `subject`. +* The natural _vertical minimum limits_ of the element will not be violated. +* Returns instance of `Proxy`. |=== == max_size @@ -237,9 +237,9 @@ max_size({width, height}, ) ---- a| -. The _maximum limits_ of `subject` will be set to the specified `width` and `height`, constrained by the natural _maximum limits_ of the `subject`. -. The natural _maximum limits_ of the element will not be violated. -. Returns instance of `Proxy`. +* The _maximum limits_ of `subject` will be set to the specified `width` and `height`, constrained by the natural _maximum limits_ of the `subject`. +* The natural _maximum limits_ of the element will not be violated. +* Returns instance of `Proxy`. |=== == hmax_size @@ -267,9 +267,9 @@ max_size({width, height}, ) ---- a| -. The _maximum limits_ of `subject` will be set to the specified `width` and `height`, constrained by the natural _maximum limits_ of the `subject`. -. The natural _maximum limits_ of the element will not be violated. -. Returns instance of `Proxy`. +* The _maximum limits_ of `subject` will be set to the specified `width` and `height`, constrained by the natural _maximum limits_ of the `subject`. +* The natural _maximum limits_ of the element will not be violated. +* Returns instance of `Proxy`. |=== == vmax_size @@ -295,9 +295,9 @@ a| vmax_size(height, subject) ---- a| -. The _maximum vertical limit_ of `subject` will be set to the specified `height` constrained by the natural _maximum vertical limit_ of the `subject`. -. The natural _maximum vertical limit_ of the element will not be violated. -. Returns instance of `Proxy`. +* The _maximum vertical limit_ of `subject` will be set to the specified `height` constrained by the natural _maximum vertical limit_ of the `subject`. +* The natural _maximum vertical limit_ of the element will not be violated. +* Returns instance of `Proxy`. |=== --- diff --git a/docs/modules/ROOT/pages/layout/span.adoc b/docs/modules/ROOT/pages/layout/span.adoc index 51e5c357..2a9e88d4 100644 --- a/docs/modules/ROOT/pages/layout/span.adoc +++ b/docs/modules/ROOT/pages/layout/span.adoc @@ -38,8 +38,8 @@ a| span(nspans, subject) ---- a| -. The `subject` will assume a span with the given `nspans` value. -. Returns instance of `Proxy`. +* The `subject` will assume a span with the given `nspans` value. +* Returns instance of `Proxy`. |=== ''' diff --git a/docs/modules/ROOT/pages/layout/stretch.adoc b/docs/modules/ROOT/pages/layout/stretch.adoc index 13dc9517..5fee1158 100644 --- a/docs/modules/ROOT/pages/layout/stretch.adoc +++ b/docs/modules/ROOT/pages/layout/stretch.adoc @@ -57,9 +57,9 @@ a| hstretch(stretch, subject) ---- a| -. The `subject` will assume the given `stretch` value. -. The stretch value has no effect on elements with fixed horizontal size. -. Returns instance of `Proxy`. +* The `subject` will assume the given `stretch` value. +* The stretch value has no effect on elements with fixed horizontal size. +* Returns instance of `Proxy`. |=== For example, the image below shows how three elements are laid out in an @@ -93,9 +93,9 @@ a| vstretch(stretch, subject) ---- a| -. The `subject` will assume the given `stretch` value. -. The stretch value has no effect on elements with fixed _vertical limits_. -. Returns instance of `Proxy`. +* The `subject` will assume the given `stretch` value. +* The stretch value has no effect on elements with fixed _vertical limits_. +* Returns instance of `Proxy`. |=== For example, the image below shows how three elements are laid out in an diff --git a/docs/modules/ROOT/pages/layout/tiles.adoc b/docs/modules/ROOT/pages/layout/tiles.adoc index a570e1a9..b0100e55 100644 --- a/docs/modules/ROOT/pages/layout/tiles.adoc +++ b/docs/modules/ROOT/pages/layout/tiles.adoc @@ -19,11 +19,11 @@ available space. === Semantics -. The elements are laid out in a single row, left to right, immediately next +* The elements are laid out in a single row, left to right, immediately next to each other with no intervening space. -. The elements are positioned horizontally using the children's natural +* The elements are positioned horizontally using the children's natural {limits}. -. Horizontal space is allocated using this algorithm: +* Horizontal space is allocated using this algorithm: .. Space is allocated for each child element following the child's natural _minimum horizontal limit_. .. If the allocated space exceeds the sum of all children elements' @@ -35,14 +35,14 @@ value of `1.0` is default. A stretchiness value of 2.0 means that the element is able to stretch twice as much compared to its siblings. Horizontally fixed-sized elements will not be stretched (element d in the diagram). (Also see {Stretch-Elements}). -. The tile's _minimum vertical limit_ is computed as the maximum of the +* The tile's _minimum vertical limit_ is computed as the maximum of the children elements' __minimum vertical limit__s. -. The grid's _maximum vertical limit_ is computed as the minimum of the +* The grid's _maximum vertical limit_ is computed as the minimum of the children elements' __maximum vertical limit__s. -. The final computed minimum limit is clamped to ensure it is not greater +* The final computed minimum limit is clamped to ensure it is not greater than the computed maximum limit. Likewise the computed maximum limit is clamped to ensure it is not less than the computed minimum limit. -. The supplied (horizontal) and computed (vertical) coordinates may violate +* The supplied (horizontal) and computed (vertical) coordinates may violate the limits of its children elements. .. If the allocated size of a child element is lower than the element's _minimum limits_ in either dimension, the element will be cropped. @@ -73,7 +73,7 @@ a| htile(e1,...eN) ---- a| -. In addition to the semantics of Horizontal Tiles, returns instance of +* In addition to the semantics of Horizontal Tiles, returns instance of `Composite`. |=== @@ -131,11 +131,11 @@ available space. === Semantics -. The elements are laid out in a single column, top to bottom, immediately +* The elements are laid out in a single column, top to bottom, immediately next to each other with no intervening space. -. The elements are positioned vertically using the children's natural +* The elements are positioned vertically using the children's natural {limits}. -. Vertical space is allocated using this algorithm: +* Vertical space is allocated using this algorithm: .. Space is allocated for each child element following the child's natural _minimum vertical limit_. .. If the allocated space exceeds the sum of all children elements' @@ -147,14 +147,14 @@ value of `1.0` is default. A stretchiness value of 2.0 means that the element is able to stretch twice as much compared to its siblings. Vertically fixed-sized elements will not be stretched (element b in the diagram). (Also see {Stretch-Elements}). -. The tile's _minimum horizontal limit_ is computed as the maximum of the +* The tile's _minimum horizontal limit_ is computed as the maximum of the children elements' __minimum horizontal limit__s. -. The grid's _maximum horizontal limit_ is computed as the minumum of the +* The grid's _maximum horizontal limit_ is computed as the minumum of the children elements' __maximum horizontal limit__s. -. The final computed minimum limit is clamped to ensure it is not greater +* The final computed minimum limit is clamped to ensure it is not greater than the computed maximum limit. Likewise the computed maximum limit is clamped to ensure it is not less than the computed minimum limit. -. The supplied (vertical) and computed (horizontal) coordinates may violate +* The supplied (vertical) and computed (horizontal) coordinates may violate the limits of its children elements. .. If the allocated size of a child element is lower than the element's _minimum limits_ in either dimension, the element will be cropped. @@ -185,7 +185,7 @@ a| vtile(e1,...eN) ---- a| -. In addition to the semantics of Vertical Tiles, returns instance of +* In addition to the semantics of Vertical Tiles, returns instance of `Composite`. |===