Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef _MENU_H
- #define _MENU_H
- #include "event.h"
- struct _Menu
- {
- char *text;
- char enabled, moveover;
- struct _Menu *next;
- Event *func;
- };
- typedef struct _Menu Menu;
- struct _FormMenu
- {
- Menu *menu;
- char *text;
- char moveover, pressed;
- struct _FormMenu *next;
- };
- typedef struct _FormMenu FormMenu;
- void InitFormMenuItem(FormMenu *menu);
- /* Initialize a form menu item, give default values */
- void AddFormMenu(FormMenu *menu, char *title);
- /* Add an form menu item to an existing chain */
- void DrawFormMenu(void *null);
- /* Draw all the form menus */
- void IsMoveOverFormMenu(void *n);
- /* Judging if mouse is moving over a form menu */
- void DrawMoveOverFormMenu(void *n);
- /* Draw the highlight effect of moving-over form menu */
- void IsClickFormMenu(void *n);
- /* Judging if clicked an form menu */
- void DoubleOver(void *n);
- /* Only a workaround for form menus */
- void DrawClickFormMenu(void *n);
- /* Draw click effect for form menus */
- void InitMenuItem(Menu *menu);
- /* Menu item initialization */
- void AddMenu(Menu *menu, char enabled, char *title, Event *func);
- /* Add a menu item to an existing menu chain */
- void DrawMenu(void *n, Menu *menu, int x, int y);
- /* Draw a menu */
- void IsMoveOverMenu(void *n);
- /* Judging if moving over a menu item */
- void DrawMoveOverMenu(void *n);
- /* Draw if moving over a menu item */
- void ClearMenuMoveOver(void *n);
- /* Clear all move over states */
- Menu *GetUpMenu(FormMenu *formmenu, Menu *menu);
- /* Get the upper menu item */
- Menu *GetDownMenu(FormMenu *formmenu, Menu *menu);
- /* Get the down menu item */
- FormMenu *GetLeftFormMenu();
- /* Get left form menu item */
- FormMenu *GetRightFormMenu();
- /* Get right form menu item */
- FormMenu *FindPressedFormMenu(void *n);
- /* Find the currently pressed form menu */
- Menu *FindMoveOverMenu(void *n);
- /* Find the currently moving over menu item */
- void MenuUp(void *n);
- /* Menu up! */
- void MenuDown(void *n);
- /* Menu down! */
- void FormMenuLeft(void *n);
- /* Move left form menu */
- void FormMenuRight(void *n);
- /* Move right form menu */
- void AddMenuToFormMenu(Menu *menu, FormMenu *formmenu);
- /* Add a menu to a form menu */
- void OpenMenu(FormMenu *menu, int n);
- /* Open a form menu */
- void OpenMenu0(void *n);
- /* Open the first form menu */
- void OpenMenu1(void *n);
- /* Open the second form menu */
- void OpenMenu2(void *n);
- /* Open the third form menu */
- void OpenMenu3(void *n);
- /* Open the forth form menu */
- void OpenMenu4(void *n);
- /* Open the fifth form menu */
- void ChildTitleContextMenu(void *n);
- /* Context menu operations */
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement