Welcome to the EyeBot  Version 7 - RPi1
A Controller For Various Hardware IO
Functions
listmenu.h File Reference

creates lists More...

#include <stdlib.h>
#include "types.h"

Go to the source code of this file.

Functions

void listmenuInit (LIST_MENU *, char *)
 initialises the list to display on the LCD More...
 
void listmenuAddItem (LIST_MENU *, char *, void *)
 Adds an item (a string) to the list. More...
 
void listmenuFreeItems (LIST_MENU *)
 Frees the items in the list. More...
 
int listmenuSize (LIST_MENU)
 Returns the size of the list. More...
 
void listmenuToggleScroll (LIST_MENU *)
 Toggles the scroll functions. More...
 
int listmenuGetScroll (LIST_MENU)
 checks for the scroll value of the list More...
 
void listmenuChangeItemText (LIST_MENU *listmenu, char *newText, int index)
 Changes the item's name. More...
 
int listmenuGetIndex (LIST_MENU listmenu)
 Returns the index of the menu item. More...
 
char * listmenuGetItemText (LIST_MENU listmenu)
 Returns the text for the current menu itme. More...
 

Detailed Description

creates lists

Author
Marcus Pham (Remi Keat)

Function Documentation

void listmenuAddItem ( LIST_MENU listmenu,
char *  name,
void *  plink 
)

Adds an item (a string) to the list.

Parameters
*listmenua pointer to the menu
namethe name of the item to add the list
*plinka pointer to a user function/data
void listmenuChangeItemText ( LIST_MENU listmenu,
char *  newText,
int  index 
)

Changes the item's name.

Parameters
*listmenua pointer to the menu
newTextthe new name of the item to add the list
indexthe index of the item in the list
void listmenuFreeItems ( LIST_MENU listmenu)

Frees the items in the list.

Parameters
*listmenua pointer to the menu
int listmenuGetIndex ( LIST_MENU  listmenu)

Returns the index of the menu item.

Parameters
listmenuthe menu
Returns
the index of the item
char* listmenuGetItemText ( LIST_MENU  listmenu)

Returns the text for the current menu itme.

Parameters
listmenuthe menu
Returns
the string representing the text
int listmenuGetScroll ( LIST_MENU  listmenu)

checks for the scroll value of the list

Parameters
listmenuthe listmenu item
Returns
the scroll value
void listmenuInit ( LIST_MENU listmenu,
char *  name 
)

initialises the list to display on the LCD

Parameters
*listmenua pointer to the menu
namethe name of the list
int listmenuSize ( LIST_MENU  listmenu)

Returns the size of the list.

Parameters
listmenuthe menu to check
Returns
the size of the list
void listmenuToggleScroll ( LIST_MENU listmenu)

Toggles the scroll functions.

Parameters
*listmenua pointer to the list