TRC Library for FTC (2011) 2011
TRC Library Code Project

C:/Users/Michael/Ftc/2011/code/trclib/menu.h File Reference

Go to the source code of this file.

Data Structures

struct  MENU

Defines

#define _MENU_H
#define MOD_ID   MOD_MENU
#define MAX_NUM_CHOICES   6

Functions

void MenuInit (__out MENU &menu, __in string titleText, __in int startLine, __in int defChoice)
bool MenuAddChoice (__inout MENU &menu, __in string choiceText)
int MenuGetChoice (__inout MENU &menu)
void MenuWaitStart ()

Define Documentation

#define _MENU_H

Definition at line 18 of file menu.h.

#define MAX_NUM_CHOICES   6

Definition at line 30 of file menu.h.

#define MOD_ID   MOD_MENU

Definition at line 25 of file menu.h.


Function Documentation

bool MenuAddChoice ( __inout MENU menu,
__in string  choiceText 
)

This function adds a choice to the menu.

Parameters:
menuPoints to the MENU structure to be initialized.
choiceTextSpecifies the choice text.
Returns:
Returns true if the choice is added successful, otherwise the menu is full.

Definition at line 83 of file menu.h.

int MenuGetChoice ( __inout MENU menu)

This function displays the menu and returns the user choice.

Parameters:
menuPoints to the MENU structure to be initialized.
Returns:
Returns the user choice.

Definition at line 113 of file menu.h.

void MenuInit ( __out MENU menu,
__in string  titleText,
__in int  startLine,
__in int  defChoice 
)

This function initializes the choice menu.

Parameters:
menuPoints to the MENU structure to be initialized.
titleTextSpecifies the title text of the menu.
startLineSpecifies the LCD line the menu starts.
defChoiceSpecifies the default choice.

Definition at line 53 of file menu.h.

void MenuWaitStart ( )

This function waits for the start signal from the FCS or the enter button is pressed.

Definition at line 175 of file menu.h.

 All Data Structures Files Functions Variables Defines