It provides primitive scroll box.
Procs
proc Scroll(name: string; variable: var ScrollObj): ScrollPtr {...}{.raises: [], tags: [].}
-
Creates a new Scroll pointer.
Arguments:
- name is a node name.
- variable is a ScrollObj variable.
Examples:
var scobj: ScrollObj sc = Scroll("Scroll", scobj)
proc Scroll(obj: var ScrollObj): ScrollPtr {...}{.inline, raises: [], tags: [].}
-
Creates a new Scroll pointer with default name "Scroll".
Arguments:
- variable is a ScrollObj variable.
Examples:
var scobj: ScrollObj sc = Scroll(scobj)
Methods
method addChild(self: ScrollPtr; other: NodePtr) {...}{.raises: [], tags: [].}
-
Adds a new node in Scroll.
Arguments:
- other is other Node.
method duplicate(self: ScrollPtr; obj: var ScrollObj): ScrollPtr {...}{.base, raises: [], tags: [].}
- Duplicates Scroll object and create a new Scroll pointer.
method resize(canvas: ScrollPtr; w, h: GLfloat) {...}{.raises: [], tags: [].}
-
Resizes scroll.
Arguments:
- w is a new width.
- h is a new height.
method draw(self: ScrollPtr; w, h: GLfloat) {...}{.raises: [GLerror, Exception], tags: [RootEffect].}
- This uses in the window.nim.
method draw2stage(self: ScrollPtr; w, h: GLfloat) {...}{.raises: [GLerror], tags: [].}
- This uses in the window.nim.
method scrollBy(self: ScrollPtr; x, y: float) {...}{.base, raises: [], tags: [].}
- Scrolls by x and y, if available.
method scrollTo(self: ScrollPtr; x, y: float) {...}{.base, raises: [], tags: [].}
- Scrolls to x and y position.
method handle(self: ScrollPtr; event: InputEvent; mouse_on: var NodePtr) {...}{. raises: [Exception], tags: [RootEffect].}
- handles user input. This uses in the window.nim.