Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

enums

luyoga

Constants

FlexDirection

{
}

Direction

{
}

Align

{
}

Justify

{
}

Edge

{
}

Unit

{
}

Gutter

{
}

PositionType

{
}

Wrap

{
}

Overflow

{
}

Display

{
}

BoxSizing

{
}

NodeType

{
}

layout

luyoga.Layout


Functions

new(self, ygNode : any)

->luyoga.Layout

getLeft(self)

->number

getTop(self)

->number

getRight(self)

->number

getBottom(self)

->number

getWidth(self)

->number

getHeight(self)

->number

getDirection(self)

->Direction

getHadOverflow(self)

->bool

getMargin(self, edge : luyoga.Edge)

->number

getBorder(self, edge : luyoga.Edge)

->number

getPadding(self, edge : luyoga.Edge)

->number

getRawHeight(self)

->number

getRawWidth(self)

->number

node

luyoga.Node


Properties

style : luyoga.Style

layout : luyoga.Layout


Functions

new()

->luyoga.Node

from_cdata(node : any)

->luyoga.Node

reset(self)

calculateLayout(self, availableWidth : number?, availableHeight : number?, ownerDirection : luyoga.Direction)

getHasNewLayout(self)

setHasNewLayout(self, hasNewLayout : boolean)

isDirty(self)

markDirty(self)

insertChild(self, child : luyoga.Node, index : number)

swapChild(self, child : luyoga.Node, index : number)

removeChild(self, child : luyoga.Node)

removeAllChildren(self, child : any)

getChild(self, index : number)

->luyoga.Node

getChildCount(self)

->number

getOwner(self)

->luyoga.Node

getParent(self)

->luyoga.Node

setNodeType(self, nodeType : luyoga.NodeType)

getNodeType(self, nodeType : luyoga.NodeType)

setAlwaysFormsContainingBlock(self, alwaysFormsContainingBlock : boolean)

getAlwaysFormsContainingBlock(self)

->boolean

copyStyle(self, dstNode : luyoga.Node, srcNode : luyoga.Node)

style

Global


Functions

setSize(kind : any)

->function

setSizePercent(kind : any)

->function

setSizeAuto(kind : any)

->function

setSizeMaxContent(kind : any)

->function

setSizeFitContent(kind : any)

->function

setSizeStretch(kind : any)

->function

getSize(kind : any)

->function

luyoga.Style


Properties

setFlexBasis : (self : luyoga.Style, flexBasis : number)

setFlexBasisPercent : (self : luyoga.Style, flexBasis : number)

setFlexBasisAuto : (self : luyoga.Style)

setFlexBasisMaxContent : (self : luyoga.Style)

setFlexBasisFitContent : (self : luyoga.Style)

setFlexBasisStretch : (self : luyoga.Style)

setWidth : (self : luyoga.Style, width : number)

setWidthPercent : (self : luyoga.Style, width : number)

setWidthAuto : (self : luyoga.Style)

setWidthMaxContent : (self : luyoga.Style)

setWidthFitContent : (self : luyoga.Style)

setWidthStretch : (self : luyoga.Style)

setMinWidth : (self : luyoga.Style, minWidth : number)

setMinWidthPercent : (self : luyoga.Style, minWidth : number)

setMinWidthAuto : (self : luyoga.Style)

setMinWidthMaxContent : (self : luyoga.Style)

setMinWidthFitContent : (self : luyoga.Style)

setMinWidthStretch : (self : luyoga.Style)

setMaxWidth : (self : luyoga.Style, maxWidth : number)

setMaxWidthPercent : (self : luyoga.Style, maxWidth : number)

setMaxWidthAuto : (self : luyoga.Style)

setMaxWidthMaxContent : (self : luyoga.Style)

setMaxWidthFitContent : (self : luyoga.Style)

setMaxWidthStretch : (self : luyoga.Style)

setHeight : (self : luyoga.Style, height : number)

setHeightPercent : (self : luyoga.Style, height : number)

setHeightAuto : (self : luyoga.Style)

setHeightMaxContent : (self : luyoga.Style)

setHeightFitContent : (self : luyoga.Style)

setHeightStretch : (self : luyoga.Style)

setMinHeight : (self : luyoga.Style, minHeight : number)

setMinHeightPercent : (self : luyoga.Style, minHeight : number)

setMinHeightAuto : (self : luyoga.Style)

setMinHeightMaxContent : (self : luyoga.Style)

setMinHeightFitContent : (self : luyoga.Style)

setMinHeightStretch : (self : luyoga.Style)

setMaxHeight : (self : luyoga.Style, maxHeight : number)

setMaxHeightPercent : (self : luyoga.Style, maxHeight : number)

setMaxHeightAuto : (self : luyoga.Style)

setMaxHeightMaxContent : (self : luyoga.Style)

setMaxHeightFitContent : (self : luyoga.Style)

setMaxHeightStretch : (self : luyoga.Style)

__index : luyoga.Style


Functions

new(self, ygNode : table)

->Style

setDirection(self, direction : luyoga.Direction)

getDirection(self)

->Direction

setFlexDirection(self, direction : luyoga.FlexDirection)

getFlexDirection(self)

->luyoga.FlexDirection

setJustifyContent(self, justifyContent : luyoga.Justify)

getJustifyContent(self)

->luyoga.Justify

setAlignContent(self, alignContent : luyoga.Align)

getAlignContent(self)

->luyoga.Align

setAlignItems(self, alignItems : luyoga.Align)

getAlignItems(self)

->luyoga.Align

setAlignSelf(self, alignSelf : luyoga.Align)

getAlignSelf(self)

->luyoga.Align

setPositionType(self, positionType : luyoga.PositionType)

getPositionType(self)

->luyoga.PositionType

setFlexWrap(self, flexWrap : luyoga.Wrap)

getFlexWrap(self)

->luyoga.Wrap

setOverflow(self, overflow : luyoga.Overflow)

getOverflow(self)

->luyoga.Overflow

setDisplay(self, display : luyoga.Display)

getDisplay(self)

->luyoga.Display

setFlex(self, flex : number)

getFlex(self)

->number

setFlexGrow(self, flexGrow : number)

getFlexGrow(self)

->number

setFlexShrink(self, flexShrink : number)

getFlexShrink(self)

->number

setPosition(self, edge : luyoga.Edge, position : number)

setPositionPercent(self, edge : luyoga.Edge, position : number)

getPosition(self, edge : luyoga.Edge)

->Value

setPositionAuto(self, edge : luyoga.Edge)

setMargin(self, edge : luyoga.Edge, margin : number)

setMarginPercent(self, edge : luyoga.Edge, margin : number)

setMarginAuto(self, edge : luyoga.Edge)

getMargin(self, edge : luyoga.Edge)

->Value

setPadding(self, edge : luyoga.Edge, padding : number)

setPaddingPercent(self, edge : luyoga.Edge, padding : number)

getPadding(self, edge : luyoga.Edge)

->Value

setBorder(self, edge : luyoga.Edge, border : number)

getBorder(self, edge : luyoga.Edge)

->Value

setGap(self, edge : any, gutter : luyoga.Gutter, gapLength : number)

setGapPercent(self, edge : any, gutter : luyoga.Gutter, gapLength : number)

getGap(self, gutter : luyoga.Gutter)

->Value

setBoxSizing(self, boxSizing : luyoga.BoxSizing)

getBoxSizing(self)

->luyoga.BoxSizing

setAspectRatio(self, aspectRatio : number)

getAspectRatio(self)

->number

util

Global


Functions

enumKey(enum : table, value : any)

->string?

calcIndex(index : any)

->integer | unknown

value

luyoga.Value


Properties

value : number

unit : luyoga.Unit

__index : luyoga.Value


Functions

new(self, value : any, unit : luyoga.Unit)

->luyoga.Value

from_cdata(self, cdata : any)

->Value

Lua Builtin Types

any

A type for a dynamic argument, it can be anything at run-time.

boolean

A built-in type representing a boolean (true or false) value, see details

function

A built-in type representing functions, see details

integer

A helper type that represents whole numbers, a subset of number

lightuserdata

A built-in type representing a pointer, see details

nil

A built-in type representing a non-existant value, see details. When you see ? at the end of types, it means they can be nil.

number

A built-in type representing floating point numbers, see details

self

A type that represents an instance that you call a function on. When you see a function signature starting with this type, you should use : to call the function on the instance, this way you can omit this first argument.

local object = SomeClass()
object:do_something(123)

string

A built-in type representing a string of characters, see details

table

A built-in type representing associative arrays, see details

unknown

A dummy type for something that cannot be inferred before run-time.

userdata

A built-in type representing array values, see details.