FloUI.Grid (FloUI v0.1.0-alpha) View Source

Usage in SnapFramework

Render this with children passed to it to automatically lay the children out in the grid. The children must be given width and height styles for it to work. Inspired by https://github.com/BWheatie/scenic_layout_o_matic

data is a map in the form of elixir %{start_xy: {0, 0}, max_xy: {100, 100}}

<%= component FloUI.Grid, %{
        start_xy: {0, 0},
        max_xy: {48 * 3, 48}
    },
    translate: {20, 120}
do %>
    <%= component FloUI.Icon.Button, "Close", id: :icon_button, width: 48, height: 48, translate: {20, 120} do %>
        <%= component FloUI.Icon, {:flo_ui, "icons/clear_white.png"} %>
    <% end %>

    <%= component FloUI.Icon.Button, "Close", id: :icon_button, width: 48, height: 48, translate: {20, 120} do %>
        <%= component FloUI.Icon, {:flo_ui, "icons/clear_white.png"} %>
    <% end %>

    <%= component FloUI.Icon.Button, "Close", id: :icon_button, width: 48, height: 48, translate: {20, 120} do %>
        <%= component FloUI.Icon, {:flo_ui, "icons/clear_white.png"} %>
    <% end %>
<% end %>

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

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

View Source
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.

Link to this function

init(scene, data, opts \\ [])

View Source

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_cast(msg, scene)

View Source

Callback implementation for SnapFramework.Scene.process_cast/2.

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

process_input(input, id, scene)

View Source

Callback implementation for SnapFramework.Scene.process_input/3.

Link to this function

process_update(data, opts, scene)

View Source

Callback implementation for SnapFramework.Scene.process_update/3.

Callback implementation for SnapFramework.Scene.setup/1.

Callback implementation for Scenic.Component.validate/1.