Number counter box.
Types
CounterObj = object of ControlPtr as_int*: bool ## if true, then use integer representation. min_value*, value*, max_value*: float label*: LabelPtr
CounterPtr = ptr CounterObj
Procs
proc Counter(name: string = "Counter"): CounterPtr {...}{.raises: [], tags: [].}
-
Creates a new Counter pointer.
Arguments:
- name is a node name.
Examples:
var c = Counter("Counter")
Methods
method changeValue(self: CounterPtr; value: float) {...}{.base, raises: [], tags: [].}
- Changes value, if it more than min_value and less than max_value.
method draw(self: CounterPtr; w, h: GLfloat) {...}{.raises: [GLerror, Exception], tags: [RootEffect].}
- This uses in the window.nim.
method duplicate(self: CounterPtr): CounterPtr {...}{.base, raises: [], tags: [].}
- Duplicates Counter object and create a new Counter pointer.
method handle(self: CounterPtr; event: InputEvent; mouse_on: var NodePtr) {...}{. raises: [Exception], tags: [RootEffect].}
method setMaxValue(self: CounterPtr; value: float) {...}{.base, raises: [], tags: [].}
- Changes max value, if it more then current value.
method setMinValue(self: CounterPtr; value: float) {...}{.base, raises: [], tags: [].}
- Changes max value, if it less then current value.