Layout::Block
Inherits Layout::PrimitiveTools < Reference < Object
A 2-dimensional region within the layout.
You can constrain the different Primitives on a block
in order to properly position it.
Example
The follow will create a 100x100 square that is offset from the top left corner of the screen by half it's width.
region = Block.new
region.height.eq 100
region.width.eq 100
region.top.eq region.width / 2
region.left.eq region.width / 2
Constructors
new
SourceInstance methods
bottom
center_x
center_y
children
You can encapsulate blocks inside of each other as children. This makes it easier to compose complex layout blocks.
You can encapsulate blocks inside of each other as children. This makes it easier to compose complex layout blocks.
height
label=(label : String)
Re-assign the label of this block.
Providing a label helps to provide context when debugging.
You can also add a label in #initialize
left
right
top
width