struct PlaceOS::Model::SignageTemplate::Layout

Included Modules

Defined in:

placeos-models/signage_template/layout.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new(position : Position = Position::Top, plugin_id : String | Nil = nil, x_pos : Float32 | Nil = nil, y_pos : Float32 | Nil = nil, plugin_params : Hash(String, JSON::Any) = {} of String => JSON::Any) #

[View source]

Instance Method Detail

def plugin_id : String | Nil #

nil plugin_id means this layout entry is a spacer


[View source]
def plugin_params : Hash(String, JSON::Any) #

[View source]
def position : Position #

[View source]
def spacer? : Bool #

[View source]
def valid? : Bool #

[View source]
def validation_message : String | Nil #

nil when the layout is valid, otherwise a human-readable reason.


[View source]
def x_pos : Float32 | Nil #

percentages of the screen, exclusive bounds (0, 1). Left/Right slices size via x_pos, Top/Bottom via y_pos, Floating widgets require both.


[View source]
def y_pos : Float32 | Nil #

[View source]