struct
PlaceOS::Model::SignageTemplate::Layout
- PlaceOS::Model::SignageTemplate::Layout
- Struct
- Value
- Object
Included Modules
- JSON::Serializable
Defined in:
placeos-models/signage_template/layout.crConstructors
- .new(pull : JSON::PullParser)
- .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)
Instance Method Summary
-
#plugin_id : String | Nil
nil plugin_id means this layout entry is a spacer
- #plugin_params : Hash(String, JSON::Any)
- #position : Position
- #spacer? : Bool
- #valid? : Bool
-
#validation_message : String | Nil
nilwhen the layout is valid, otherwise a human-readable reason. -
#x_pos : Float32 | Nil
percentages of the screen, exclusive bounds (0, 1).
- #y_pos : Float32 | Nil
Constructor Detail
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)
#
Instance Method Detail
def validation_message : String | Nil
#
nil when the layout is valid, otherwise a human-readable reason.
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.