InterIm
Object with all the DSL operations.
Most applications will only need to import eu.joaocosta.interim._
and eu.joaocosta.interim.InterIm._
. However, since some of the methods in the DSL can conflict with other variable names, it can be desirable to not import the DSL and explicitly use the InterIm prefix (e.g. IterIm.text
instead of text
)
Attributes
- Graph
-
- Supertypes
-
trait Panelstrait Constantstrait Componentstrait Layoutstrait Primitivesclass Objecttrait Matchableclass AnyShow all
- Self type
-
InterIm.type
Members list
Type members
Inherited classlikes
Attributes
- Inherited from:
- Components
- Supertypes
-
class Objecttrait Matchableclass Any
Inherited types
Attributes
- Inherited from:
- Components
Value members
Concrete methods
Wraps the UI interactions. All API calls should happen inside the body (run parameter).
Wraps the UI interactions. All API calls should happen inside the body (run parameter).
This method takes an input state and a UI context and mutates the UI context accordingly. This should be called on every frame.
The method returns a list of operations to render and the result of the body.
Attributes
Inherited methods
Button component. Returns true if it's being clicked, false otherwise.
Button component. Returns true if it's being clicked, false otherwise.
Value parameters
- label
-
text label to show on this button
Attributes
- Inherited from:
- Components
Checkbox component. Returns true if it's enabled, false otherwise.
Checkbox component. Returns true if it's enabled, false otherwise.
Attributes
- Inherited from:
- Components
Clipped region.
Clipped region.
The body will be rendered only inside the clipped area. Input outside the area will also be ignored.
Note that the clip will only be applied to elements in the current Z-index.
Attributes
- Inherited from:
- Layouts
Close handle. Closes the panel when clicked.
Close handle. Closes the panel when clicked.
Instead of using this component directly, it can be easier to use eu.joaocosta.interim.api.Panels.window with closable = true.
Attributes
- Inherited from:
- Components
Lays out the components in a sequence of columns where all elements have the same size, separated by a padding.
Lays out the components in a sequence of columns where all elements have the same size, separated by a padding.
The body receives a column: Vector[Rect]
, where column(y)
is the rect of the x-th column.
Attributes
- Inherited from:
- Layouts
Advanced operation to add a custom primitive to the list of render operations.
Advanced operation to add a custom primitive to the list of render operations.
Supports an arbitrary data value. It's up to the backend to interpret it as it sees fit. If the backend does not know how to interpret it, it can just render a colored rect.
Value parameters
- data
-
custom value to be interpreted by the backend.
Attributes
- Inherited from:
- Primitives
Lays out the components in a sequence of columns of different sizes, separated by a padding.
Lays out the components in a sequence of columns of different sizes, separated by a padding.
The body receives a nextColumn: Int => Rect
, where nextColumn(width)
is the rect of the next column, with the specified width (if possible). . If the size is negative, the row will start from the right.
Attributes
- Inherited from:
- Layouts
Lays out the components in a sequence of rows of different sizes, separated by a padding.
Lays out the components in a sequence of rows of different sizes, separated by a padding.
The body receives a nextRow: Int => Rect
, where nextRow(height)
is the rect of the next row, with the specified height (if possible). If the size is negative, the row will start from the bottom.
Attributes
- Inherited from:
- Layouts
Lays out the components in a grid where all elements have the same size, separated by a padding.
Lays out the components in a grid where all elements have the same size, separated by a padding.
The body receives a cell: Vector[Vector[Rect]]
, where cell(y)(x)
is the rect of the y-th row and x-th column.
Attributes
- Inherited from:
- Layouts
Draggable handle. Returns the moved area.
Draggable handle. Returns the moved area.
It's important that this element moves along with the moved area.
Instead of using this component directly, it can be easier to use eu.joaocosta.interim.api.Panels.window with movable = true.
Attributes
- Inherited from:
- Components
Applies the operations in a code block at the previous z-index.
Applies the operations in a code block at the previous z-index.
Attributes
- Inherited from:
- Primitives
Applies the operations in a code block at the next z-index.
Radio button component. Returns value currently selected.
Radio button component. Returns value currently selected.
Value parameters
- buttonValue
-
the value of this button (value that this button returns when selected)
- label
-
text label to show on this button
Attributes
- Inherited from:
- Components
Draws a rectangle filling a the specified area with a color.
Lays out the components in a sequence of rows where all elements have the same size, separated by a padding.
Lays out the components in a sequence of rows where all elements have the same size, separated by a padding.
The body receives a row: Vector[Rect]
, where row(y)
is the rect of the y-th row.
Attributes
- Inherited from:
- Layouts
Select box component. Returns the index value currently selected inside a PanelState.
Select box component. Returns the index value currently selected inside a PanelState.
Value parameters
- labels
-
text labels for each value
Attributes
- Inherited from:
- Components
Slider component. Returns the current position of the slider, between min and max.
Slider component. Returns the current position of the slider, between min and max.
Value parameters
- max
-
maximum value fr this slider
- min
-
minimum value for this slider
Attributes
- Inherited from:
- Components
Draws a block of text in the specified area with a color.
Draws a block of text in the specified area with a color.
Value parameters
- font
-
font definition
- horizontalAlignment
-
how the text should be aligned horizontally
- text
-
text to write
- verticalAlignment
-
how the text should be aligned vertically
Attributes
- Inherited from:
- Primitives
Text input component. Returns the current string inputed.
Window with a title.
Window with a title.
Value parameters
- closable
-
if true, the window will include a closable handle in the title bar
- movable
-
if true, the window will include a move handle in the title bar
- title
-
of this window
Attributes
- Inherited from:
- Panels