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
- The tag to cycle the layout for.
  ┃ pinnacle.tag.TagHandle
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
- The tag to cycle the layout for.
  ┃ pinnacle.tag.TagHandle
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
- The tag to get a layout for.
  ┃ pinnacle.tag.TagHandle
Returns ​
method current_tree_id ​
function pinnacle.layout.builtin.Cycle:current_tree_id()
-> integer
Gets a (most-likely) unique identifier for the current layout tree. This is guaranteed to be greater than zero.
Returns ​
integer