nodesnim/nodescontrol/vbox

Contains children in the vertical box.

Types

VBoxObj = object of BoxObj
  separator*: float
VBoxPtr = ptr VBoxObj

Procs

proc VBox(name: string; variable: var VBoxObj): VBoxPtr {...}{.raises: [], tags: [].}

Creates a new VBox pointer.

Arguments:

  • name is a node name.
  • variable is a VBoxObj variable.

Examples:

var
  boxobj: VBoxObj
  box = VBox("VBox", boxobj)
proc VBox(obj: var VBoxObj): VBoxPtr {...}{.inline, raises: [], tags: [].}

Creates a new VBox pointer with default node name "VBox".

Arguments:

  • variable is a VBoxObj variable.

Examples:

var
  boxobj: VBoxObj
  box = VBox(boxobj)

Methods

method getChildSize(self: VBoxPtr): Vector2Ref {...}{.raises: [], tags: [].}
Returns size of all children.
method addChild(self: VBoxPtr; child: NodePtr) {...}{.raises: [], tags: [].}

Adds new child in current node.

Arguments:

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

Resizes VBox, if available.

Arguments:

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