Class: Glimmer::SWT::GridLayoutProxy

Inherits:
LayoutProxy show all
Defined in:
lib/glimmer/swt/grid_layout_proxy.rb

Constant Summary collapse

STYLE =
".grid-layout {\n  display: grid;\n  grid-template-rows: min-content;\n  place-content: start;\n  align-items: stretch;\n}\n"

Instance Attribute Summary collapse

Attributes inherited from LayoutProxy

#args, #parent

Instance Method Summary collapse

Methods inherited from LayoutProxy

#css_class, #dom, for, layout_class, layout_exists?, #layout​

Methods included from PropertyOwner

#attribute_getter, #attribute_setter, #get_attribute, #set_attribute

Constructor Details

#initialize(parent, args) ⇒ GridLayoutProxy

Returns a new instance of GridLayoutProxy.



76
77
78
79
80
81
82
83
# File 'lib/glimmer/swt/grid_layout_proxy.rb', line 76

def initialize(parent, args)
  super(parent, args)
  self.horizontal_spacing = 10
  self.vertical_spacing = 10
  self.margin_width = 15
  self.margin_height = 15
  self.num_columns = @args.first || 1
end

Instance Attribute Details

#horizontal_spacingObject

Returns the value of attribute horizontal_spacing.



15
16
17
# File 'lib/glimmer/swt/grid_layout_proxy.rb', line 15

def horizontal_spacing
  @horizontal_spacing
end

#make_columns_equal_widthObject

Returns the value of attribute make_columns_equal_width.



15
16
17
# File 'lib/glimmer/swt/grid_layout_proxy.rb', line 15

def make_columns_equal_width
  @make_columns_equal_width
end

#margin_heightObject

Returns the value of attribute margin_height.



15
16
17
# File 'lib/glimmer/swt/grid_layout_proxy.rb', line 15

def margin_height
  @margin_height
end

#margin_widthObject

Returns the value of attribute margin_width.



15
16
17
# File 'lib/glimmer/swt/grid_layout_proxy.rb', line 15

def margin_width
  @margin_width
end

#num_columnsObject

Returns the value of attribute num_columns.



15
16
17
# File 'lib/glimmer/swt/grid_layout_proxy.rb', line 15

def num_columns
  @num_columns
end

#vertical_spacingObject

Returns the value of attribute vertical_spacing.



15
16
17
# File 'lib/glimmer/swt/grid_layout_proxy.rb', line 15

def vertical_spacing
  @vertical_spacing
end