Nilorea Library

- Main Page
- Modules
- Data Structures
- Files

All Data Structures Files Functions Variables Typedefs Macros Groups
Data Structures | Macros | Typedefs | Functions
LEXMENU: quick GUI functions (by spellcaster)

## Data Structures

struct | LexMenuItemItorStruct
struct | LexMenuEventStruct
struct | LexMenuItemStruct
struct | LexMenuStruct

## Macros

#define | LEX_MENU_IMG_COUNT 4
#define | LEX_MENU_SND_COUNT 5
#define | LEX_MENU_CBF_COUNT 9
#define | LEX_MENU_ALIGN_LEFT 0
#define | LEX_MENU_ALIGN_TOP 0
#define | LEX_MENU_ALIGN_CENTER 1
#define | LEX_MENU_ALIGN_RIGHT 2
#define | LEX_MENU_ALIGN_BOTTOM 2
#define | LEX_MENU_NORMAL 0
#define | LEX_MENU_ACTIVE 1
#define | LEX_MENU_PRESSED 2
#define | LEX_MENU_DISABLED 3
#define | LEX_MENU_ON_ENTER 0
#define | LEX_MENU_ON_LEAVE 1
#define | LEX_MENU_ON_PRESS 2
#define | LEX_MENU_ON_RELEASE 3
#define | LEX_MENU_ON_FIRE 4
#define | LEX_MENU_ON_MOVE 5
#define | LEX_MENU_ON_DRAG 6
#define | LEX_MENU_ON_DRAW 7
#define | LEX_MENU_ON_DRAW_DONE 8
#define | LEX_MENU_MOUSE 1
#define | LEX_MENU_KEYBOARD 2
#define | LEX_MENU_MOUSE_AND_KB 3

## Typedefs

typedef struct LexMenuItemStruct | LexMenuItem
typedef struct LexMenuItemItorStruct | LexMenuItemItor
typedef struct LexMenuStruct | LexMenu
typedef struct LexMenuEventStruct | LexMenuEvent
typedef void(* | LexMenuCallback )(LexMenuEvent *)

## Functions

LexMenu * | lexMenuCreate (BITMAP *bg)
LexMenu * | lexMenuDestroy (LexMenu *menu)
LexMenuItem * | lexMenuCreateItem ()
void | lexMenuAddItem (LexMenu *menu, LexMenuItem *item)
int | lexMenuRun (LexMenu *menu, BITMAP *dst)
void | lexMenuSetImage (LexMenuItem *item, int state, BITMAP *img)
void | lexMenuSetSample (LexMenuItem *item, int event, SAMPLE *sample)
void | lexMenuSetCallback (LexMenuItem *item, int callbackID, LexMenuCallback func)
LexMenu * | lexLoadMenuFromFile (const char *filename, const char *screenname)
BITMAP * | lexMenuGetBitmap (LexMenu *menu, int item, int whichone)

## Detailed Description

## Macro Definition Documentation

#define LEX_MENU_ACTIVE 1

Definition at line 53 of file lexmenu.h.

#define LEX_MENU_ALIGN_BOTTOM 2

Definition at line 38 of file lexmenu.h.

#define LEX_MENU_ALIGN_CENTER 1

Definition at line 36 of file lexmenu.h.

#define LEX_MENU_ALIGN_LEFT 0

Definition at line 34 of file lexmenu.h.

#define LEX_MENU_ALIGN_RIGHT 2

Definition at line 37 of file lexmenu.h.

#define LEX_MENU_ALIGN_TOP 0

Definition at line 35 of file lexmenu.h.

#define LEX_MENU_CBF_COUNT 9

Definition at line 27 of file lexmenu.h.

#define LEX_MENU_DISABLED 3

Definition at line 55 of file lexmenu.h.

#define LEX_MENU_IMG_COUNT 4

Definition at line 25 of file lexmenu.h.

#define LEX_MENU_KEYBOARD 2

Definition at line 94 of file lexmenu.h.

#define LEX_MENU_MOUSE 1

Definition at line 93 of file lexmenu.h.

#define LEX_MENU_MOUSE_AND_KB 3

Definition at line 95 of file lexmenu.h.

#define LEX_MENU_NORMAL 0

Definition at line 52 of file lexmenu.h.

#define LEX_MENU_ON_DRAG 6

Definition at line 82 of file lexmenu.h.

#define LEX_MENU_ON_DRAW 7

Definition at line 83 of file lexmenu.h.

#define LEX_MENU_ON_DRAW_DONE 8

Definition at line 84 of file lexmenu.h.

#define LEX_MENU_ON_ENTER 0

Definition at line 76 of file lexmenu.h.

#define LEX_MENU_ON_FIRE 4

Definition at line 80 of file lexmenu.h.

#define LEX_MENU_ON_LEAVE 1

Definition at line 77 of file lexmenu.h.

#define LEX_MENU_ON_MOVE 5

Definition at line 81 of file lexmenu.h.

#define LEX_MENU_ON_PRESS 2

Definition at line 78 of file lexmenu.h.

#define LEX_MENU_ON_RELEASE 3

Definition at line 79 of file lexmenu.h.

#define LEX_MENU_PRESSED 2

Definition at line 54 of file lexmenu.h.

#define LEX_MENU_SND_COUNT 5

Definition at line 26 of file lexmenu.h.

## Typedef Documentation

typedef struct LexMenuStruct LexMenu

Definition at line 130 of file lexmenu.h.

typedef void(* LexMenuCallback)(LexMenuEvent *)

Definition at line 140 of file lexmenu.h.

typedef struct LexMenuEventStruct LexMenuEvent

Definition at line 137 of file lexmenu.h.

typedef struct LexMenuItemStruct LexMenuItem

Definition at line 116 of file lexmenu.h.

typedef struct LexMenuItemItorStruct LexMenuItemItor

Definition at line 117 of file lexmenu.h.

## Function Documentation

LexMenu* lexLoadMenuFromFile | ( | const char * | filename,
|  | const char * | screenname
| ) |  |

Definition at line 634 of file lexmenu.c.

Here is the call graph for this function:

void lexMenuAddItem | ( | LexMenu * | menu,
|  | LexMenuItem * | item
| ) |  |

Definition at line 144 of file lexmenu.c.

Here is the caller graph for this function:

LexMenu* lexMenuCreate | ( | BITMAP * | bg | ) |

Definition at line 17 of file lexmenu.c.

Here is the caller graph for this function:

LexMenuItem* lexMenuCreateItem | ( |  | ) |

Definition at line 64 of file lexmenu.c.

Here is the caller graph for this function:

LexMenu* lexMenuDestroy | ( | LexMenu * | menu | ) |

Definition at line 30 of file lexmenu.c.

BITMAP* lexMenuGetBitmap | ( | LexMenu * | menu,
|  | int | item,
|  | int | whichone
| ) |  |

Definition at line 698 of file lexmenu.c.

int lexMenuRun | ( | LexMenu * | menu,
|  | BITMAP * | dst
| ) |  |

Definition at line 174 of file lexmenu.c.

Here is the call graph for this function:

void lexMenuSetCallback | ( | LexMenuItem * | item,
|  | int | callbackID,
|  | LexMenuCallback | func
| ) |  |

Definition at line 155 of file lexmenu.c.

void lexMenuSetImage | ( | LexMenuItem * | item,
|  | int | state,
|  | BITMAP * | img
| ) |  |

Definition at line 161 of file lexmenu.c.

Here is the caller graph for this function:

void lexMenuSetSample | ( | LexMenuItem * | item,
|  | int | event,
|  | SAMPLE * | sample
| ) |  |

Definition at line 167 of file lexmenu.c.

Here is the caller graph for this function: