# Module `Layout`

Layout management on node

Example Link

## Functions

fit_into_node(self, node) | Set node for layout node to fit inside it.
fit_into_size(self, target_size) | Set size for layout node to fit inside it
fit_into_window(self) | Set current size for layout node to fit inside it
init(self, node, mode, on_size_changed_callback) | The Layout constructor
set_max_gui_upscale(self, max_gui_upscale) | Set max gui upscale for FIT adjust mode (or side).
set_max_size(self, max_size) | Set maximum size of layout node
set_min_size(self, min_size) | Set minimal size of layout node
set_origin_position(self, new_origin_position) | Set new origin position of layout node.
set_origin_size(self, new_origin_size) | Set new origin size of layout node.

## Fields

mode | Current layout mode
node | Layout node
on_size_changed | On window resize callback(self, new_size)

## Functions

fit_into_node(self, node)
  Set node for layout node to fit inside it. Pass nil to reset

  ### Parameters:

  - self Layout Layout
  - node node or nil

  ### Returns:

  Layout Layout
fit_into_size(self, target_size)
  Set size for layout node to fit inside it

  ### Parameters:

  - self Layout Layout
  - target_size vector3

  ### Returns:

  Layout Layout
fit_into_window(self)
  Set current size for layout node to fit inside it

  ### Parameters:

  - self Layout Layout

  ### Returns:

  Layout Layout
init(self, node, mode, on_size_changed_callback)
  The Layout constructor

  ### Parameters:

  - self Layout Layout
  - node node Gui node
  - mode string The layout mode (from const.LAYOUT_MODE)
  - on_size_changed_callback function or nil The callback on window resize
set_max_gui_upscale(self, max_gui_upscale)
  Set max gui upscale for FIT adjust mode (or side). It happens on bigger render gui screen

  ### Parameters:

  - self Layout Layout
  - max_gui_upscale number

  ### Returns:

  Layout Layout
set_max_size(self, max_size)
  Set maximum size of layout node

  ### Parameters:

  - self Layout Layout
  - max_size vector3

  ### Returns:

  Layout Layout
set_min_size(self, min_size)
  Set minimal size of layout node

  ### Parameters:

  - self Layout Layout
  - min_size vector3

  ### Returns:

  Layout Layout
set_origin_position(self, new_origin_position)
  Set new origin position of layout node. You should apply this on node movement

  ### Parameters:

  - self Layout Layout
  - new_origin_position vector3

  ### Returns:

  Layout Layout
set_origin_size(self, new_origin_size)
  Set new origin size of layout node. You should apply this on node manual size change

  ### Parameters:

  - self Layout Layout
  - new_origin_size vector3

  ### Returns:

  Layout Layout

## Fields

mode
  Current layout mode
  - mode string
node
  Layout node
  - node node
on_size_changed
  On window resize callback(self, new_size)
  - on_size_changed DruidEvent DruidEvent

generated by LDoc TESTING Last updated 2015-01-01 12:00:00