torcs - 1.2.2

GUI Management.


Detailed Description

This is an interface to manage menus.

Note:
The screen size is fiwed to 640x480 and the origin is in the lower-left corner.


Files

file  gui.cpp
 This API is used to manage all the menu screens.

file  guibutton.cpp
 GUI Buttons Management.

file  guiedit.cpp
 GUI Edit Box Management.

file  guihelp.cpp
 GUI help screen management.

file  guiimage.cpp
 GUI Images management.

file  guilabel.cpp
 GUI labels management.

file  guimenu.cpp
 GUI menu management.

file  guiscrollbar.cpp
 GUI scrollbar management.

file  guiscrollist.cpp
 GUI scroll-list management.


Functions

void GfuiDisplayNothing (void)
 Dummy display function for glut.

void GfuiIdle (void)
 Idle function for the GUI to be called during Idle loop of glut.

void GfuiDisplay (void)
 Display function for the GUI to be called during redisplay of glut.

void GfuiMouseHide (void)
 Hide the mouse cursor.

void GfuiMouseShow (void)
 Show the mouse cursor.

tMouseInfoGfuiMouseInfo (void)
 Get the mouse information (position and buttons).

void GfuiMouseSetPos (int x, int y)
 Set the mouse position.

int GfuiScreenIsActive (void *screen)
 Tell if the screen is active or not.

void GfuiScreenActivate (void *screen)
 Activate a screen and make it current.

void GfuiScreenReplace (void *screen)
 Activate a screen and make it current plus release the current screen.

void GfuiScreenDeactivate (void)
 Deactivate the current screen.

void * GfuiScreenCreate (void)
 Create a new screen.

void * GfuiScreenCreateEx (float *bgColor, void *userDataOnActivate, tfuiCallback onActivate, void *userDataOnDeactivate, tfuiCallback onDeactivate, int mouseAllowed)
 Create a screen.

void GfuiScreenRelease (void *scr)
 Release the given screen.

void * GfuiHookCreate (void *userDataOnActivate, tfuiCallback onActivate)
 Create a callback hook.

void GfuiHookRelease (void *hook)
 Release the given hook.

void GfuiAddKey (void *scr, unsigned char key, char *descr, void *userData, tfuiCallback onKeyPressed, tfuiCallback onKeyReleased)
 Add a Keyboard callback to a screen.

void GfuiRegisterKey (unsigned char key, char *descr, void *userData, tfuiCallback onKeyPressed, tfuiCallback onKeyReleased)
 Add a Keyboard callback to the current screen.

void GfuiAddSKey (void *scr, int key, char *descr, void *userData, tfuiCallback onKeyPressed, tfuiCallback onKeyReleased)
 Add a Special Keyboard shortcut to the screen.

void GfuiScreenAddBgImg (void *scr, char *filename)
 Add an image background to a screen.

int GfuiGrButtonCreate (void *scr, char *disabled, char *enabled, char *focused, char *pushed, int x, int y, int align, int mouse, void *userDataOnPush, tfuiCallback onPush, void *userDataOnFocus, tfuiCallback onFocus, tfuiCallback onFocusLost)
 Add a graphical button to a screen.

int GfuiButtonStateCreate (void *scr, char *text, int font, int x, int y, int width, int align, int mouse, void *userDataOnPush, tfuiCallback onPush, void *userDataOnFocus, tfuiCallback onFocus, tfuiCallback onFocusLost)
 Add a state button to a screen.

int GfuiButtonCreate (void *scr, char *text, int font, int x, int y, int width, int align, int mouse, void *userDataOnPush, tfuiCallback onPush, void *userDataOnFocus, tfuiCallback onFocus, tfuiCallback onFocusLost)
 Add a button to a screen.

void GfuiButtonSetText (void *scr, int id, char *text)
 Change the label of a button.

int GfuiButtonGetFocused (void)
 Get the Id of the button focused in the current screen.

int GfuiEditboxCreate (void *scr, char *text, int font, int x, int y, int width, int maxlen, void *userDataOnFocus, tfuiCallback onFocus, tfuiCallback onFocusLost)
 Add a editbox to a screen.

int GfuiEditboxGetFocused (void)
 Get the Id of the editbox focused in the current screen.

char * GfuiEditboxGetString (void *scr, int id)
 Get the string.

void GfuiEditboxSetString (void *scr, int id, char *text)
 Set a new string.

void GfuiHelpScreen (void *prevScreen)
 Generate a help screen.

int GfuiStaticImageCreate (void *scr, int x, int y, int w, int h, char *name)
 Create a new static image.

void GfuiStaticImageSet (void *scr, int id, char *name)
 Replace an image by another one.

int GfuiLabelCreateEx (void *scr, char *text, float *fgColor, int font, int x, int y, int align, int maxlen)
 Create a new label (extended version).

int GfuiLabelCreate (void *scr, char *text, int font, int x, int y, int align, int maxlen)
 Add a label to a screen.

int GfuiTitleCreate (void *scr, char *text, int maxlen)
 Add a Title to the screen.

void GfuiLabelSetText (void *scr, int id, char *text)
 Change the text of a label.

void GfuiLabelSetColor (void *scr, int id, float *color)
 Change the color of a label.

void GfuiMenuDefaultKeysAdd (void *scr)
 Add the default menu keyboard callback to a screen.

void * GfuiMenuScreenCreate (char *title)
 Create a new menu screen.

int GfuiMenuButtonCreate (void *scr, char *text, char *tip, void *userdata, tfuiCallback onpush)
 Add a button to a menu screen.

int GfuiMenuBackQuitButtonCreate (void *scr, char *text, char *tip, void *userdata, tfuiCallback onpush)
 Add the "Back" or "Quit" button at the bottom of the menu screen.

void GfuiUnSelectCurrent (void)
 Remove the focus on the current element.

int GfuiVisibilitySet (void *scr, int id, int visible)
 Set/unset the visibility attribute of an object.

int GfuiEnable (void *scr, int id, int flag)
 Enable / Disable an object.

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.

int GfuiScrollBarPosGet (void *scr, int id)
 Get the current position of a scroll bar.

void GfuiScrollBarPosSet (void *scr, int id, int min, int max, int len, int start)
 Set new values for position.

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.

char * GfuiScrollListGetSelectedElement (void *scr, int Id, void **userData)
 Get the selected element from the scroll list.

char * GfuiScrollListGetElement (void *scr, int Id, int index, void **userData)
 Get the specified element from the scroll list.

char * GfuiScrollListExtractSelectedElement (void *scr, int Id, void **userData)
 Extract the selected element from the scroll list (removed).

char * GfuiScrollListExtractElement (void *scr, int Id, int index, void **userData)
 Extract the specified element from the scroll list.

int GfuiScrollListInsertElement (void *scr, int Id, char *element, int index, void *userData)
 Insert an element in a scroll list.

int GfuiScrollListMoveSelectedElement (void *scr, int Id, int delta)
 Move the selected element within the scroll list.


Function Documentation

void GfuiAddKey void *  scr,
unsigned char  key,
char *  descr,
void *  userData,
tfuiCallback  onKeyPressed,
tfuiCallback  onKeyReleased
 

Add a Keyboard callback to a screen.

Parameters:
scr Screen
key Key code (glut value)
descr Description for help screen
userData Parameter to the callback function
onKeyPressed Callback function
onKeyReleased Callback function

void GfuiAddSKey void *  scr,
int  key,
char *  descr,
void *  userData,
tfuiCallback  onKeyPressed,
tfuiCallback  onKeyReleased
 

Add a Special Keyboard shortcut to the screen.

(see glut for normal and special keys)

Parameters:
scr Screen
key Key code (glut value)
descr Description for help screen
userData Parameter to the callback function
onKeyPressed Callback function
onKeyReleased Callback function

int GfuiButtonCreate void *  scr,
char *  text,
int  font,
int  x,
int  y,
int  width,
int  align,
int  mouse,
void *  userDataOnPush,
tfuiCallback  onPush,
void *  userDataOnFocus,
tfuiCallback  onFocus,
tfuiCallback  onFocusLost
 

Add a button to a screen.

Parameters:
scr Screen
text Button label
font Font id
x X position on screen
y Y position on screen (0 = bottom)
width width of the button (0 = text size)
align Button alignment:
GFUI_ALIGN_HR_VB horizontal right, vertical bottom
GFUI_ALIGN_HR_VC horizontal right, vertical center
GFUI_ALIGN_HR_VT horizontal right, vertical top
GFUI_ALIGN_HC_VB horizontal center, vertical bottom
GFUI_ALIGN_HC_VC horizontal center, vertical center
GFUI_ALIGN_HC_VT horizontal center, vertical top
GFUI_ALIGN_HL_VB horizontal left, vertical bottom
GFUI_ALIGN_HL_VC horizontal left, vertical center
GFUI_ALIGN_HL_VT horizontal left, vertical top
mouse Mouse behavior:
GFUI_MOUSE_UP Action performed when the mouse right button is released
GFUI_MOUSE_DOWN Action performed when the mouse right button is pushed
userDataOnPush Parameter to the Push callback
onPush Push callback function
userDataOnFocus Parameter to the Focus (and lost) callback
onFocus Focus callback function
onFocusLost Focus Lost callback function
Returns:
Button Id
-1 Error

Here is the call graph for this function:

int GfuiButtonGetFocused void   ) 
 

Get the Id of the button focused in the current screen.

Returns:
Button Id
-1 if no button or no screen or the focus is not on a button

void GfuiButtonSetText void *  scr,
int  id,
char *  text
 

Change the label of a button.

Parameters:
scr Screen
id Button Id
text New label of the button

Here is the call graph for this function:

int GfuiButtonStateCreate void *  scr,
char *  text,
int  font,
int  x,
int  y,
int  width,
int  align,
int  mouse,
void *  userDataOnPush,
tfuiCallback  onPush,
void *  userDataOnFocus,
tfuiCallback  onFocus,
tfuiCallback  onFocusLost
 

Add a state button to a screen.

Parameters:
scr Screen
text Button label
font Font id
x X position on screen
y Y position on screen (0 = bottom)
width width of the button (0 = text size)
align Button alignment:
GFUI_ALIGN_HR_VB horizontal right, vertical bottom
GFUI_ALIGN_HR_VC horizontal right, vertical center
GFUI_ALIGN_HR_VT horizontal right, vertical top
GFUI_ALIGN_HC_VB horizontal center, vertical bottom
GFUI_ALIGN_HC_VC horizontal center, vertical center
GFUI_ALIGN_HC_VT horizontal center, vertical top
GFUI_ALIGN_HL_VB horizontal left, vertical bottom
GFUI_ALIGN_HL_VC horizontal left, vertical center
GFUI_ALIGN_HL_VT horizontal left, vertical top
mouse Mouse behavior:
GFUI_MOUSE_UP Action performed when the mouse right button is released
GFUI_MOUSE_DOWN Action performed when the mouse right button is pushed
userDataOnPush Parameter to the Push callback
onPush Push callback function
userDataOnFocus Parameter to the Focus (and lost) callback
onFocus Focus callback function
onFocusLost Focus Lost callback function
Returns:
Button Id
-1 Error

Here is the call graph for this function:

void GfuiDisplay void   ) 
 

Display function for the GUI to be called during redisplay of glut.

Here is the call graph for this function:

void GfuiDisplayNothing void   ) 
 

Dummy display function for glut.

Declare this function to glut if nothing is to be displayed by the redisplay mechanism.

int GfuiEditboxCreate void *  scr,
char *  text,
int  font,
int  x,
int  y,
int  width,
int  maxlen,
void *  userDataOnFocus,
tfuiCallback  onFocus,
tfuiCallback  onFocusLost
 

Add a editbox to a screen.

Parameters:
scr Screen
text Editbox start text
font Font id
x X position on screen
y Y position on screen (0 = bottom)
width width of the editbox (0 = text size)
maxlen Max lenght of text (0 = text size)
userDataOnFocus Parameter to the Focus (and lost) callback
onFocus Focus callback function
onFocusLost Focus Lost callback function
Returns:
Editbox Id
-1 Error

Here is the call graph for this function:

int GfuiEditboxGetFocused void   ) 
 

Get the Id of the editbox focused in the current screen.

Returns:
Editbox Id
-1 if no editbox or no screen or the focus is not on a editbox

char* GfuiEditboxGetString void *  scr,
int  id
 

Get the string.

Parameters:
scr Screen
id Edit box Id
Returns:
Corresponding string.

Here is the call graph for this function:

void GfuiEditboxSetString void *  scr,
int  id,
char *  text
 

Set a new string.

Parameters:
scr Screen
id Edit box Id
text text to set
Returns:
none

Here is the call graph for this function:

int GfuiEnable void *  scr,
int  id,
int  flag
 

Enable / Disable an object.

Parameters:
scr Screen
id Object id
flag GFUI_ENABLE or GFUI_DISABLE
Returns:
0 ... Ok
-1 .. Error

Here is the call graph for this function:

int GfuiGrButtonCreate void *  scr,
char *  disabled,
char *  enabled,
char *  focused,
char *  pushed,
int  x,
int  y,
int  align,
int  mouse,
void *  userDataOnPush,
tfuiCallback  onPush,
void *  userDataOnFocus,
tfuiCallback  onFocus,
tfuiCallback  onFocusLost
 

Add a graphical button to a screen.

Parameters:
scr Screen
disabled filename of the image when the button is disabled
enabled filename of the image when the button is enabled
focused filename of the image when the button is focused
pushed filename of the image when the button is pushed
x X position on screen
y Y position on screen (0 = bottom)
align Button alignment
mouse Mouse behavior:
GFUI_MOUSE_UP Action performed when the mouse right button is released
GFUI_MOUSE_DOWN Action performed when the mouse right button is pushed
userDataOnPush Parameter to the Push callback
onPush Push callback function
userDataOnFocus Parameter to the Focus (and lost) callback
onFocus Focus callback function
onFocusLost Focus Lost callback function
Returns:
Button Id
-1 Error

Here is the call graph for this function:

void GfuiHelpScreen void *  prevScreen  ) 
 

Generate a help screen.

Parameters:
prevScreen Previous screen to return to
Warning:
The help screen is activated.

Here is the call graph for this function:

void* GfuiHookCreate void *  userDataOnActivate,
tfuiCallback  onActivate
 

Create a callback hook.

Parameters:
userDataOnActivate Parameter to the activate function
onActivate Function called when the screen is activated
Returns:
New hook instance
NULL if Error

void GfuiHookRelease void *  hook  ) 
 

Release the given hook.

Parameters:
hook Hook to release

void GfuiIdle void   ) 
 

Idle function for the GUI to be called during Idle loop of glut.

Here is the call graph for this function:

int GfuiLabelCreate void *  scr,
char *  text,
int  font,
int  x,
int  y,
int  align,
int  maxlen
 

Add a label to a screen.

Parameters:
scr Screen where to add the label
text Text of the label
font Font id
x Position of the label on the screen
y Position of the label on the screen
align Alignment:
GFUI_ALIGN_HR_VB horizontal right, vertical bottom
GFUI_ALIGN_HR_VC horizontal right, vertical center
GFUI_ALIGN_HR_VT horizontal right, vertical top
GFUI_ALIGN_HC_VB horizontal center, vertical bottom
GFUI_ALIGN_HC_VB horizontal center, vertical center
GFUI_ALIGN_HC_VB horizontal center, vertical top
GFUI_ALIGN_HL_VB horizontal left, vertical bottom
GFUI_ALIGN_HL_VB horizontal left, vertical center
GFUI_ALIGN_HL_VB horizontal left, vertical top
maxlen Maximum length of the button string (used when the label is changed)
0 for the text length.
Returns:
label Id
See also:
GfuiSetLabelText

Here is the call graph for this function:

int GfuiLabelCreateEx void *  scr,
char *  text,
float *  fgColor,
int  font,
int  x,
int  y,
int  align,
int  maxlen
 

Create a new label (extended version).

Parameters:
scr Screen where to add the label
text Text of the label
fgColor Pointer on color static array (RGBA)
font Font id
x Position of the label on the screen
y Position of the label on the screen
align Alignment:
GFUI_ALIGN_HR_VB horizontal right, vertical bottom
GFUI_ALIGN_HR_VC horizontal right, vertical center
GFUI_ALIGN_HR_VT horizontal right, vertical top
GFUI_ALIGN_HC_VB horizontal center, vertical bottom
GFUI_ALIGN_HC_VB horizontal center, vertical center
GFUI_ALIGN_HC_VB horizontal center, vertical top
GFUI_ALIGN_HL_VB horizontal left, vertical bottom
GFUI_ALIGN_HL_VB horizontal left, vertical center
GFUI_ALIGN_HL_VB horizontal left, vertical top
maxlen Maximum length of the button string (used when the label is changed)
0 for the text length.
Returns:
label Id
See also:
GfuiSetLabelText

Here is the call graph for this function:

void GfuiLabelSetColor void *  scr,
int  id,
float *  color
 

Change the color of a label.

Parameters:
scr Screen where to add the label
id Id of the label
color an array of 4 floats (RGBA)
See also:
GfuiAddLabel

void GfuiLabelSetText void *  scr,
int  id,
char *  text
 

Change the text of a label.

Parameters:
scr Screen where to add the label
id Id of the label
text Text of the label
Attention:
The maximum length is set at the label creation
See also:
GfuiAddLabel

Here is the call graph for this function:

int GfuiMenuBackQuitButtonCreate void *  scr,
char *  text,
char *  tip,
void *  userdata,
tfuiCallback  onpush
 

Add the "Back" or "Quit" button at the bottom of the menu screen.

Parameters:
scr Screen or Menu handle
text Text of the button
tip Text to display when the button is focused
userdata Parameter of the Push function
onpush Callback when the button is pushed
Returns:
Button Id

Here is the call graph for this function:

int GfuiMenuButtonCreate void *  scr,
char *  text,
char *  tip,
void *  userdata,
tfuiCallback  onpush
 

Add a button to a menu screen.

Parameters:
scr Screen (menu) handle
text Text of the button
tip Text of the tip displayed when the button is focused
userdata Parameter of the Push function
onpush Callback when the button is pushed
Returns:
Button Id

Here is the call graph for this function:

void GfuiMenuDefaultKeysAdd void *  scr  ) 
 

Add the default menu keyboard callback to a screen.

The keys are:
Up Arrow .... Select Previous Entry
Down Arrow .. Select Next Entry
F1 .......... Help
Tab ......... Select Next Entry
Enter ....... Perform Action
Escape ...... Quit the menu

Parameters:
scr Screen Id

Here is the call graph for this function:

void* GfuiMenuScreenCreate char *  title  ) 
 

Create a new menu screen.

Set the title of the menu Add the default keyboard callbacks to the menu.

Parameters:
title title of the screen
Returns:
Handle of the menu

Here is the call graph for this function:

void GfuiMouseHide void   ) 
 

Hide the mouse cursor.

Returns:
none

tMouseInfo* GfuiMouseInfo void   ) 
 

Get the mouse information (position and buttons).

Returns:
mouse information

void GfuiMouseSetPos int  x,
int  y
 

Set the mouse position.

Parameters:
x mouse x pos
y mouse y pos
Returns:
none

void GfuiMouseShow void   ) 
 

Show the mouse cursor.

Returns:
none

void GfuiRegisterKey unsigned char  key,
char *  descr,
void *  userData,
tfuiCallback  onKeyPressed,
tfuiCallback  onKeyReleased
 

Add a Keyboard callback to the current screen.

Parameters:
key Key code (glut value)
descr Description for help screen
userData Parameter to the callback function
onKeyPressed Callback function called when the specified key is pressed
onKeyReleased Callback function

Here is the call graph for this function:

void GfuiScreenActivate void *  screen  ) 
 

Activate a screen and make it current.

Parameters:
screen Screen to activate
Warning:
The current screen at the call time is deactivated.

Here is the call graph for this function:

void GfuiScreenAddBgImg void *  scr,
char *  filename
 

Add an image background to a screen.

Parameters:
scr Screen
filename file name of the bg image
Returns:
None.

Here is the call graph for this function:

void* GfuiScreenCreate void   ) 
 

Create a new screen.

Returns:
New screen instance
NULL if Error

void* GfuiScreenCreateEx float *  bgColor,
void *  userDataOnActivate,
tfuiCallback  onActivate,
void *  userDataOnDeactivate,
tfuiCallback  onDeactivate,
int  mouseAllowed
 

Create a screen.

Parameters:
bgColor pointer on color array (RGBA) (if NULL default color is used)
userDataOnActivate Parameter to the activate function
onActivate Function called when the screen is activated
userDataOnDeactivate Parameter to the deactivate function
onDeactivate Function called when the screen is deactivated
mouseAllowed Flag to tell if the mouse cursor can be displayed
Returns:
New screen instance
NULL if Error
Bug:
Only black background work well

void GfuiScreenDeactivate void   ) 
 

Deactivate the current screen.

Here is the call graph for this function:

int GfuiScreenIsActive void *  screen  ) 
 

Tell if the screen is active or not.

Parameters:
screen Screen to activate
Returns:
1 if active and 0 if not.

void GfuiScreenRelease void *  scr  ) 
 

Release the given screen.

Parameters:
scr Screen to release
Warning:
If the screen was activated, it is deactivated.

Here is the call graph for this function:

void GfuiScreenReplace void *  screen  ) 
 

Activate a screen and make it current plus release the current screen.

Parameters:
screen Screen to activate
Warning:
The current screen at the call time is deactivated.

Here is the call graph for this function:

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.

Parameters:
scr Screen where to create the scroll bar
x X position
y Y position
align Position of the specified point:
GFUI_ALIGN_HR_VB horizontal right, vertical bottom
GFUI_ALIGN_HR_VC horizontal right, vertical center
GFUI_ALIGN_HR_VT horizontal right, vertical top
GFUI_ALIGN_HC_VB horizontal center, vertical bottom
GFUI_ALIGN_HC_VC horizontal center, vertical center
GFUI_ALIGN_HC_VT horizontal center, vertical top
GFUI_ALIGN_HL_VB horizontal left, vertical bottom
GFUI_ALIGN_HL_VC horizontal left, vertical center
GFUI_ALIGN_HL_VT horizontal left, vertical top
width width including the arrows
orientation Scroll bar orientation:
GFUI_HORI_SCROLLBAR Horizontal
GFUI_VERT_SCROLLBAR Vertical
min Minimum value
max Maximum value
len Visible length
start Starting position
userData User data given to the call back function
onScroll Call back function called when the position change
Returns:
Scroll Bar Id
-1 Error

Here is the call graph for this function:

int GfuiScrollBarPosGet void *  scr,
int  id
 

Get the current position of a scroll bar.

Parameters:
scr Screen
id Scroll bar Id
Returns:
Current position
-1 Error

Here is the call graph for this function:

void GfuiScrollBarPosSet void *  scr,
int  id,
int  min,
int  max,
int  len,
int  start
 

Set new values for position.

Parameters:
scr Screen
id Scroll bar Id
min New minimum value
max New maximum value
len New visible length
start New starting position

Here is the call graph for this function:

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.

Parameters:
scr Current screen
font Current font
x X Position
y Y Position
align Box Alignement (Horizontal and Vertical)
width Width of the box
height Height of the box
scrollBarPos Position of the scrollbar:
GFUI_SB_NONE No scroll bar
GFUI_SB_RIGHT Right scroll bar
GFUI_SB_LEFT Left scroll bar
userDataOnSelect User data to pass to the onSelect callback
onSelect Callback when the selection is done
Returns:
Scroll List Id

Here is the call graph for this function:

char* GfuiScrollListExtractElement void *  scr,
int  Id,
int  index,
void **  userData
 

Extract the specified element from the scroll list.

Parameters:
scr Current screen
Id Scroll list Id
index Position where to extract the element
userData address of the userData of the element to retrieve
Returns:
Name of the extracted element
NULL if Error

Here is the call graph for this function:

char* GfuiScrollListExtractSelectedElement void *  scr,
int  Id,
void **  userData
 

Extract the selected element from the scroll list (removed).

Parameters:
scr Current screen
Id Scroll list Id
userData address of the userData of the element to retrieve
Returns:
Name of the extracted element
NULL if Error

Here is the call graph for this function:

char* GfuiScrollListGetElement void *  scr,
int  Id,
int  index,
void **  userData
 

Get the specified element from the scroll list.

Parameters:
scr Current screen
Id Scroll list Id
index Position where to get the element
userData address of the userData of the element to retrieve
Returns:
Name of the retrieved element
NULL if Error

Here is the call graph for this function:

char* GfuiScrollListGetSelectedElement void *  scr,
int  Id,
void **  userData
 

Get the selected element from the scroll list.

Parameters:
scr Current screen
Id Scroll list Id
userData address of the userData of the element to retrieve
Returns:
Name of the retrieved element
NULL if Error

Here is the call graph for this function:

int GfuiScrollListInsertElement void *  scr,
int  Id,
char *  element,
int  index,
void *  userData
 

Insert an element in a scroll list.

Parameters:
scr Current screen
Id Scroll list Id
element New element
index Position where to insert the element
userData User defined data
Returns:
0 ... Ok
-1 .. Error

Here is the call graph for this function:

int GfuiScrollListMoveSelectedElement void *  scr,
int  Id,
int  delta
 

Move the selected element within the scroll list.

Parameters:
scr Current screen
Id Scroll list Id
delta displacement
Returns:
0 ... Ok
-1 .. Error

Here is the call graph for this function:

int GfuiStaticImageCreate void *  scr,
int  x,
int  y,
int  w,
int  h,
char *  name
 

Create a new static image.

This kind of image is not clickable.

Parameters:
scr Screen where to add the label
x Position of the left of the image on the screen
y Position of the bottom of the image on the screen
w Width of the image on the screen
h Height of the image on the screen
name Filename on the image (png)
Returns:
Image Id
-1 Error
Warning:
the image must be sqare and its size must be a power of 2.

Here is the call graph for this function:

void GfuiStaticImageSet void *  scr,
int  id,
char *  name
 

Replace an image by another one.

Parameters:
scr Screen where to add the label
id Image Id
name Filename on the image (png)
Returns:
none
Warning:
the image must be sqare and its size must be a power of 2.

Here is the call graph for this function:

int GfuiTitleCreate void *  scr,
char *  text,
int  maxlen
 

Add a Title to the screen.

Parameters:
scr Screen where to add the label
text Text of the title
maxlen Maximum length of the button string (used when the label is changed)
0 for the text length.
Returns:
label Id
See also:
GfuiSetLabelText

Here is the call graph for this function:

void GfuiUnSelectCurrent void   ) 
 

Remove the focus on the current element.

int GfuiVisibilitySet void *  scr,
int  id,
int  visible
 

Set/unset the visibility attribute of an object.

Parameters:
scr Screen
id Object id
visible GFUI_VISIBLE or GFUI_INVISIBLE
Returns:
0 ... Ok
-1 .. Error

Here is the call graph for this function:


Generated at Thu Feb 26 21:54:22 2004 for torcs by doxygen 1.3.3 written by Dimitri van Heesch, © 1997-1999
TORCS © Eric Espié 1999, 2002.