![]() |
GUI Toolkit for TI nSpire
0.55 beta (dated 2021-03-21)
A GUI toolkit for Ndless-TI NSpire using SDL and Ndless libraries.
|
#include <ContainerVWidget.h>
Public Member Functions | |
ContainerVWidget () | |
ContainerVWidget (char *l, int x, int y, int w, int h, Widget *p) | |
virtual | ~ContainerVWidget () |
virtual void | adjust () override |
virtual int | getsize () |
virtual void | logic (CursorTask *mouse, KeyboardTask *keyboard) override |
virtual void | render (SDL_Surface *screen, ColorEngine *colors, FontEngine *fonts) override |
![]() | |
Widget (char *l, int x, int y, int w, int h, Widget *p) | |
virtual void | focus (Widget *emitter) |
virtual void | unfocusup (Widget *emitter) |
virtual void | unfocusdown (Widget *emitter) |
virtual void | addchild (Widget *child) |
virtual void | setdimensions (int mx, int my, int mw, int mh) |
virtual void | setxpos (int mx) |
virtual void | setypos (int my) |
virtual void | setwidth (int mw) |
virtual void | setheight (int mh) |
virtual void | setlabel (char *l) |
virtual void | setcontainerstatus (bool status) |
virtual void | setparent (Widget *p) |
virtual void | setvisible () |
virtual void | setinvisible () |
virtual void | enable () |
virtual void | disable () |
virtual int | getxpos () |
virtual int | getypos () |
virtual int | getwidth () |
virtual int | getheight () |
virtual int | getuseablexpos () |
virtual int | getuseableypos () |
virtual int | getuseablewidth () |
virtual int | getuseableheight () |
virtual char * | getlabel () |
virtual bool | getcontainerstatus () |
virtual Widget * | getparent () |
virtual bool | getisenabled () |
virtual bool | isvisible () |
virtual char * | getwidgettype () |
virtual void | linkonclick (void(*func)(char *)) |
virtual void | linkonrelease (void(*func)(char *)) |
virtual void | linkonhover (void(*func)(char *)) |
Additional Inherited Members | |
![]() | |
virtual bool | cursoron (CursorTask *mouse) |
![]() | |
bool | has_focus = false |
bool | is_enabled = true |
bool | is_visible = true |
char * | widgettype |
char * | label |
int | xpos |
int | xrel |
int | ypos |
int | yrel |
int | width |
int | widrel |
int | height |
int | heirel |
bool | is_container = false |
bool | is_hovering = false |
Widget * | parent = nullptr |
int | nbchildren |
std::vector< Widget * > | children |
void(* | clickfunction )(char *) = nullptr |
void(* | releasefunction )(char *) = nullptr |
void(* | hoverfunction )(char *) = nullptr |
Example of program using ContainerVWidget controls
The following simple example demonstrates how to use the ContainerVWidget controls.
ContainerVWidget class.
The class to be used for using a ContainerVWidget control widget. ContainerVWidget inherits from Widget class.
|
inline |
|
inline |
Advanced constructor.
Widget properties are set with parameters values given at call.
l | : text string (char*) that will be used as the ContainerHWidget textual content |
x | : position x in pixels relatively to the parent Widget usable drawspace |
y | : position y in pixels relatively to the parent Widget usable drawspace |
w | : width in pixel of the ButtonWidget |
h | : height in pixel of the ButtonWidget |
p | : pointer type to a Widget* to create a link with the parent widget (if any). |
|
inlinevirtual |
Object destructor
Object destructor, remove all trace of the object and free allocated memory
None |
|
overridevirtual |
Adjust method
This method permits to automatically adjust the dimensions of both the container and of the children widgets
None |
Reimplemented from Widget.
|
inlinevirtual |
How many children do have the container ?
This method returns the number of children of the container (this is very usefull for setting their dimensions in the adjust() method.
None |
|
overridevirtual |
The ContainerVWidget logic mechanism
Widget method to be launched to drive the the mechanics behind the CheckBoxWidget behavior.
mouse | : pointer to a CursorTask handler object serving at passing the mouse (Touchpad) state and position |
keyboard | : pointer to a KeyboardTask handler object serving at passing the keyboard state |
Reimplemented from Widget.
|
overridevirtual |
The ContainerVWidget render method.
Widget method to be launched to draw the ContainerHWidget. This actually do nothing cause ContainerHWidget and ContainerVWidget are just containers and nothing is actually drawn But this method is overriden as for all Widget and cascades the render() order to children widgets
screen | : pointer to a SDL_Surface object where we would like to draw the widget |
colors | : pointer to a ColorEngine object giving all the color options to be used (theme) for drawing the widget |
fonts | : pointer to a FontEngine object giving all the fonts options to be used (theme) for drawing the widget |
Reimplemented from Widget.