FloUI.Scrollable.ScrollBar (FloUI v0.1.0-alpha.6) View Source

Scroll bars are meant to be used within the Scrollable.Container component, but you can use them to build your own scrollable containers.

The following events are emitted.

{:register_scroll_bar, direction, scroll_bar_state}
{:update_scroll_position, direction, scroll_position}
{:scroll_bar_state_changed, direction, scroll_bar_state}

additionally you can cast a vector2 offset to a scroll bar

GenServer.cast(scroll_bar_pid, {:update_cursor_scroll, offset})

data is an object in the form of

%{
    direction: :vertical,
    content_size: {200, 200},
    width: 15,
    height: 500,
    scroll_position: {0, 0}
}

The following options are accepted

[
  show_buttons: true,
  theme: Scenic.Primitive.Style.Theme.preset(:dark),
  border: 1,
  radius: 3,
  thickness: 15
]

Link to this section Summary

Link to this section Functions

Link to this function

add_to_graph(graph, data, opts \\ [])

View Source

Callback implementation for Scenic.Component.add_to_graph/3.

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

handle_event(event, from_pid, scene)

View Source

Callback implementation for Scenic.Scene.handle_event/3.

Link to this function

handle_input(input, id, scene)

View Source

Callback implementation for Scenic.Scene.handle_input/3.

Link to this function

handle_update(msg, opts, scene)

View Source

Callback implementation for Scenic.Scene.handle_update/3.

Callback implementation for Scenic.Scene.init/3.

Callback implementation for SnapFramework.Scene.mounted/1.

Link to this function

process_call(msg, from, scene)

View Source

Callback implementation for SnapFramework.Scene.process_call/3.

Link to this function

process_event(event, from_pid, scene)

View Source

Callback implementation for SnapFramework.Scene.process_event/3.

Link to this function

process_info(msg, scene)

View Source

Callback implementation for SnapFramework.Scene.process_info/2.

Link to this function

scroll_bar(graph, data, options \\ [])

View Source

Callback implementation for Scenic.Component.validate/1.