59 scrollist = &(
object->u.scrollist);
74 scrollist = &(
object->u.scrollist);
105 scrollist = &(
object->u.scrollist);
160 object->id = screen->
curId++;
164 object->xmax = x + width;
166 object->ymax =
y + height;
168 scrollist = &(
object->u.scrollist);
179 switch(scrollBarPos) {
202 if(scrollist->
elts == NULL) {
203 scrollist->
elts = elt;
207 cur = scrollist->
elts;
217 }
while(cur != scrollist->
elts);
224 if((cur == scrollist->
elts) && (index != 0)) {
225 scrollist->
elts = elt;
236 if(scrollist->
elts == NULL) {
240 cur = scrollist->
elts;
251 }
while(cur != scrollist->
elts);
256 if(cur == scrollist->
elts) {
257 if(cur->
next == cur) {
295 scrollist = &(
object->u.scrollist);
301 if(scrollist->
elts == NULL) {
305 elt = scrollist->
elts;
316 }
while(elt != scrollist->
elts);
352 scrollist = &(
object->u.scrollist);
354 if((index < 0) || (index > scrollist->
nbElts - 1)) {
358 if(scrollist->
elts == NULL) {
362 elt = scrollist->
elts;
373 }
while(elt != scrollist->
elts);
407 scrollist = &(
object->u.scrollist);
455 scrollist = &(
object->u.scrollist);
457 if((index < 0) || (index > scrollist->
nbElts - 1)) {
504 scrollist = &(
object->u.scrollist);
532 const int BUFSIZE = 256;
539 fgColor = scrollist->
fgColor[0];
540 bgColor = scrollist->
bgColor[0];
542 if(bgColor[3] != 0.0) {
552 glBegin(GL_LINE_STRIP);
566 elt = scrollist->
elts;
569 if(scrollist->
nbElts < 100) {
570 snprintf(buf, BUFSIZE,
" 00 ");
572 snprintf(buf, BUFSIZE,
" 000 ");
580 if(index < scrollist->firstVisible) {
588 glColor4fv(scrollist->
fgColor[0]);
598 snprintf(buf, BUFSIZE,
" %d", index);
601 }
while(elt != scrollist->
elts);
614 if(curObject != NULL) {
616 curObject = curObject->
next;
638 scrollist = &(
object->u.scrollist);
642 if(relY > scrollist->
nbElts) {
681 scrollist = &(
object->u.scrollist);
689 if((newPos < 0) || (newPos > scrollist->
nbElts - 1)) {
char * GfuiScrollListExtractSelectedElement(void *scr, int Id, void **userData)
Extract the selected element from the scroll list (removed).
void GfuiScrollBarPosSet(void *scr, int id, int min, int max, int len, int start)
Set new values for position.
static void onSelect(void *)
int GfuiScrollListInsertElement(void *scr, int Id, char *element, int index, void *userData)
Insert an element in a scroll list.
char * GfuiScrollListGetSelectedElement(void *scr, int Id, void **userData)
Get the selected element from the scroll list.
int GfuiScrollListMoveSelectedElement(void *scr, int Id, int delta)
Move the selected element within the scroll list.
#define GFUI_BGSELSCROLLIST
The Gaming Framework API (client part).
tGfuiScrollList scrollist
char * GfuiScrollListExtractElement(void *scr, int Id, int index, void **userData)
Extract the specified element from the scroll list.
GfuiFontClass * gfuiFont[FONT_NB]
#define GFUI_FOCUS_MOUSE_MOVE
#define GFUI_FGSELSCROLLIST
struct GfuiListElement * next
char * GfuiScrollListGetElement(void *scr, int Id, int index, void **userData)
Get the specified element from the scroll list.
int GfuiScrollBarCreate(void *scr, int x, int y, int align, int width, int orientation, int min, int max, int len, int start, void *userData, tfuiSBCallback onScroll)
Create a new scroll bar.
void(* tfuiCallback)(void *)
struct GfuiListElement * prev
tGfuiObject * gfuiGetObject(void *scr, int id)
void gfuiAddObject(tGfuiScreen *screen, tGfuiObject *object)
float GfuiColor[GFUI_COLORNB][4]
int GfuiScrollListCreate(void *scr, int font, int x, int y, int align, int width, int height, int scrollBarPos, void *userDataOnSelect, tfuiCallback onSelect)
Create a new scroll list.
void gfuiPrintString(int x, int y, GfuiFontClass *font, const char *string)
#define GFUI_VERT_SCROLLBAR
int getWidth(const char *text)