Skip to content

Class pinnacle.layout.builtin.Cycle : pinnacle.layout.LayoutGenerator

A layout generator that keeps track of layouts per tag and provides methods to cycle between them.

Fields

layouts

layouts: pinnacle.layout.LayoutGenerator[]

The layouts this generator will cycle between.

tag_indices

tag_indices: table<integer, integer>

current_tag nullable

current_tag?: pinnacle.tag.TagHandle

The current tag that will determine the chosen layout.

Functions

method cycle_layout_forward

function pinnacle.layout.builtin.Cycle:cycle_layout_forward(tag: pinnacle.tag.TagHandle)

Cycles the layout forward for the given tag.

Parameters

tag: pinnacle.tag.TagHandle - The tag to cycle the layout for.

method cycle_layout_backward

function pinnacle.layout.builtin.Cycle:cycle_layout_backward(tag: pinnacle.tag.TagHandle)

Cycles the layout backward for the given tag.

Parameters

tag: pinnacle.tag.TagHandle - The tag to cycle the layout for.

method current_layout

function pinnacle.layout.builtin.Cycle:current_layout(tag: pinnacle.tag.TagHandle)
    -> pinnacle.layout.LayoutGenerator?

Gets the current layout generator for the given tag.

Parameters

tag: pinnacle.tag.TagHandle - The tag to get a layout for.

Returns

  1. pinnacle.layout.LayoutGenerator

Last updated: