Raxol.Core.Renderer.View (Raxol v2.3.0)

View Source

Provides view-related functionality for rendering UI components.

Summary

Types

Style options for a view.

Functions

Wraps a view with a block-style border.

Wraps a view with a bold border.

Creates a new border around a view.

Creates a new box view with padding and optional border.

Creates a simple box element with the given options.

Creates a button element.

Creates a checkbox element.

Creates a new column layout.

Wraps a view with a double-line border.

Calculates flex layout dimensions based on the given constraints.

Creates a new flex container.

Creates a grid layout.

Applies layout to a view, calculating absolute positions for all elements. Delegates to Raxol.Renderer.Layout.apply_layout/2.

Creates a new view with the specified type and options.

Creates a new panel view (box with border and children).

Creates a process-isolated component node.

Wraps a view with a rounded border.

Creates a new row layout.

Creates a new scrollable view.

Creates a shadow effect for a view.

Wraps a view with a simple border.

Creates a split pane layout.

Creates a split pane from a named preset.

Creates a table view.

Creates a new text view.

Creates a text input element.

Renders a view with the given options.

Wraps a view with a border, optionally with a title and style.

Types

style()

Style options for a view.

Functions

bar_chart(opts \\ [])

See Raxol.View.Components.bar_chart/1.

block_border(view, opts \\ [])

Wraps a view with a block-style border.

bold_border(view, opts \\ [])

Wraps a view with a bold border.

border(view, opts \\ [])

Creates a new border around a view.

border(style, opts, list)

(macro)

border_wrap(style, list)

(macro)

box(opts \\ [])

Creates a new box view with padding and optional border.

box(opts, list)

(macro)

box_element(opts \\ [])

Creates a simple box element with the given options.

button(text, opts \\ [])

Creates a button element.

checkbox(label, opts \\ [])

Creates a checkbox element.

column(opts)

Creates a new column layout.

column(opts, list)

(macro)

container(opts \\ [])

See Raxol.View.Components.container/1.

divider(opts \\ [])

See Raxol.View.Components.divider/1.

double_border(view, opts \\ [])

Wraps a view with a double-line border.

ensure_keyword(opts)

(macro)

ensure_keyword_list(opts)

flex(constraints)

@spec flex(map()) :: %{width: integer(), height: integer()}

Calculates flex layout dimensions based on the given constraints.

flex(opts, list)

(macro)

Creates a new flex container.

grid(opts)

(macro)

grid(opts, list)

(macro)

Creates a grid layout.

heatmap(opts \\ [])

See Raxol.View.Components.heatmap/1.

image(opts \\ [])

See Raxol.View.Components.image/1.

input(opts \\ [])

See Raxol.View.Components.input/1.

label(opts \\ [])

See Raxol.View.Components.label/1.

layout(view, dimensions)

Applies layout to a view, calculating absolute positions for all elements. Delegates to Raxol.Renderer.Layout.apply_layout/2.

line_chart(opts \\ [])

See Raxol.View.Components.line_chart/1.

list(opts \\ [])

See Raxol.View.Components.list/1.

modal(opts \\ [])

See Raxol.View.Components.modal/1.

new(type, opts \\ [])

Creates a new view with the specified type and options.

Options

  • :type - The type of view to create
  • :position - Position of the view {x, y}
  • :z_index - Z-index for layering
  • :size - Size of the view {width, height}
  • :style - Style options for the view
  • :fg / :bg - Foreground / background color
  • :border - Border style
  • :padding / :margin - Spacing
  • :children - Child views
  • :content - Content for the view

panel(opts \\ [])

Creates a new panel view (box with border and children).

process_component(module, props \\ %{})

Creates a process-isolated component node.

progress(opts \\ [])

See Raxol.View.Components.progress/1.

radio_group(opts \\ [])

See Raxol.View.Components.radio_group/1.

rounded_border(view, opts \\ [])

Wraps a view with a rounded border.

row(opts \\ [])

Creates a new row layout.

row(opts, list)

(macro)

scatter_chart(opts \\ [])

See Raxol.View.Components.scatter_chart/1.

scroll(view, opts \\ [])

Creates a new scrollable view.

scroll_wrap(opts, list)

(macro)

select(opts \\ [])

See Raxol.View.Components.select/1.

shadow(opts \\ [])

Creates a shadow effect for a view.

simple_border(view, opts \\ [])

Wraps a view with a simple border.

spacer(opts \\ [])

See Raxol.View.Components.spacer/1.

span(content, opts \\ [])

See Raxol.View.Components.span/2.

sparkline(opts \\ [])

See Raxol.View.Components.sparkline/1.

split(direction, list)

(macro)

split(direction, opts, list)

(macro)

Creates a split pane layout.

split_layout(preset, list)

(macro)

Creates a split pane from a named preset.

split_pane(opts \\ [])

See Raxol.UI.Layout.SplitPane.new/1.

table(opts \\ [])

Creates a table view.

tabs(opts \\ [])

See Raxol.View.Components.tabs/1.

text(content, opts \\ [])

Creates a new text view.

text_input(opts \\ [])

Creates a text input element.

textarea(opts \\ [])

See Raxol.View.Components.textarea/1.

validate_keyword_opts(opts, function_name)

view(opts, list)

(macro)

Renders a view with the given options.

wrap_with_border(view, opts \\ [])

Wraps a view with a border, optionally with a title and style.