/* * gl3_2d_items2ds.h * * Created on: 29 oct. 2011 * Author: laurent */ #ifndef GL3_ITEMS2D_H_ #define GL3_ITEMS2D_H_ #include #include "str_string.h" #include "str_array.h" #define ITEMS2DSTDVALUES \ void (*showTriangesFunc) (struct items2d *o); \ void (*showTextFunc) (struct items2d *o); \ uint8_t (*clickFunc) (struct items2d *o, float clickX, float clickY); \ void (*freeFunc) (struct items2d *o); \ str *title; typedef struct items2d { ITEMS2DSTDVALUES; } items2d; items2d * items2dSelectBoxNew (char *text, strArray *list, float posX, float posY); items2d * items2dBackgroundNew(); items2d * items2dConfirmBoxNew(char *text, float posX, float posY, float len); void items2dShowTrianges (items2d *o); void items2dShowText (items2d *o); uint8_t items2dClick (items2d *o, float clickX, float clickY); void items2dFree (items2d *o); typedef struct { items2d **array; uint32_t length; uint32_t arrayQty; } items2dStack; items2dStack * items2dStackNew(); void items2dStackAdd(items2dStack *os, items2d *o); void items2dStackDel(items2dStack *os, items2d *o); void items2dStackShowAllTrianges(items2dStack *os); void items2dStackShowAllText(items2dStack *os); void items2dStackClickAll(items2dStack *os, float x, float y); void items2dStackFreeWithItems2dFree(items2dStack *os); //to free options in optionsStack (use before optionStackFree void items2dStackFree(items2dStack *os); #endif /* GL3_ITEMS2D_H_ */