Class: GGLib::Containable

Inherits:
Tile
  • Object
show all
Defined in:
lib/widget.rb

Direct Known Subclasses

Widget

Defined Under Namespace

Modules: Align, VAlign Classes: Dimension, Padding

Instance Attribute Summary collapse

Attributes inherited from Tile

#id, #inclusive, #x1, #x2, #y1, #y2

Instance Method Summary collapse

Methods inherited from Tile

#centerOn, #del, deleteAllInstances, deleteById, #each, #eachBorder, getAllInstances, getById, #height, #iTile, intersect?, #intersect?, #isInTile?, #move, #resize, setAllInstances, #setCoordinates, #setTile, #width, #xTile

Constructor Details

#initialize(x1, y1, x2, y2, container = nil) ⇒ Containable

Returns a new instance of Containable.



64
65
66
67
68
69
70
71
72
73
# File 'lib/widget.rb', line 64

def initialize(x1, y1, x2, y2, container=nil)
  super(x1, y1, x2, y2)
  @padding = Padding.new(0,0,0,0)
  @offset = Dimension.new(0,0)
  @maxSize = Dimension.new(Dimension::Infinite,Dimension::Infinite)
  @minSize = Dimension.new(0,0)
  @align = Align::Default
  @valign = VAlign::Default
  @container = container
end

Instance Attribute Details

#alignObject

Returns the value of attribute align.



61
62
63
# File 'lib/widget.rb', line 61

def align
  @align
end

#containerObject (readonly)

Returns the value of attribute container.



62
63
64
# File 'lib/widget.rb', line 62

def container
  @container
end

#maxSizeObject

Returns the value of attribute maxSize.



61
62
63
# File 'lib/widget.rb', line 61

def maxSize
  @maxSize
end

#minSizeObject

Returns the value of attribute minSize.



61
62
63
# File 'lib/widget.rb', line 61

def minSize
  @minSize
end

#offsetObject

Returns the value of attribute offset.



61
62
63
# File 'lib/widget.rb', line 61

def offset
  @offset
end

#paddingObject

Returns the value of attribute padding.



61
62
63
# File 'lib/widget.rb', line 61

def padding
  @padding
end

#valignObject

Returns the value of attribute valign.



61
62
63
# File 'lib/widget.rb', line 61

def valign
  @valign
end