Class: MG::Layout

Inherits:
Widget show all
Defined in:
doc/API_reference.rb

Direct Known Subclasses

Scroll

Instance Attribute Summary collapse

Attributes inherited from Node

#alpha, #anchor_point, #color, #name, #position, #rotation, #scale, #size, #z_index

Constructors collapse

Instance Method Summary collapse

Methods inherited from Widget

#enabled=, #enabled?, #highlighted=, #highlighted?, #on_touch, #touch_enabled=, #touch_enabled?

Methods inherited from Node

#children, #clear, #delete, #delete_from_parent, #intersects?, #number_of_running_actions, #parent, #run_action, #schedule, #schedule_once, #stop_action, #stop_all_actions, #unschedule, #visible=, #visible?

Constructor Details

#initializeLayout

Creates a new List widget.



1632
# File 'doc/API_reference.rb', line 1632

def initialize; end

Instance Attribute Details

#background_colorColor

Returns the background color of the widget.

Returns:

  • (Color)

    the background color of the widget.



1641
1642
1643
# File 'doc/API_reference.rb', line 1641

def background_color
  @background_color
end

#type:absolute, ...

Returns the layout type.

Returns:

  • (:absolute, :vertical, :horizontal, :relative)

    the layout type.



1638
1639
1640
# File 'doc/API_reference.rb', line 1638

def type
  @type
end

Instance Method Details

#<<(child) ⇒ Object

This is alias method of #add.



1656
# File 'doc/API_reference.rb', line 1656

def <<(child); end

#add(child) ⇒ Object

Add a child to the container.

Parameters:

  • child (Node)

    A child node.



1653
# File 'doc/API_reference.rb', line 1653

def add(child); end

#clipping=(value) ⇒ Object

Change if layout can clip it’s content and child.

Parameters:

  • value (Boolean)

    true if clip the its content and children.



1649
# File 'doc/API_reference.rb', line 1649

def clipping=(value); end

#clipping?Boolean

Returns whether the layout can clip its content and children (default is false).

Returns:

  • (Boolean)

    whether the layout can clip its content and children (default is false).



1645
# File 'doc/API_reference.rb', line 1645

def clipping?; end