nodesnim/nodescontrol/vbox

    Dark Mode
Search:
Group by:

Contains children in the vertical box.

Types

VBoxObj = object of BoxObj
  separator*: float
VBoxRef = ref VBoxObj

Procs

proc VBox(name: string = "VBox"): VBoxRef {...}{.raises: [], tags: [].}

Creates a new VBox.

Arguments:

  • name is a node name.

Example:

var box = VBox("VBox")

Methods

method getChildSize(self: VBoxRef): Vector2Obj {...}{.raises: [], tags: [].}
Returns size of all children.
method addChild(self: VBoxRef; child: NodeRef) {...}{.raises: [], tags: [].}

Adds new child in current node.

Arguments:

  • child: other node.
method draw(self: VBoxRef; w, h: GLfloat) {...}{.raises: [GLerror, Exception],
    tags: [RootEffect].}
This uses in the window.nim.
method duplicate(self: VBoxRef): VBoxRef {...}{.base, raises: [], tags: [].}
Duplicate VBox object and create a new VBox.
method resize(self: VBoxRef; w, h: GLfloat; save_anchor: bool = false) {...}{.
    raises: [], tags: [].}

Resizes VBox, if available.

Arguments:

  • w is a new width.
  • h is a new height.