mainmenu.h

来自「Very very small GUI. Usefull for small s」· C头文件 代码 · 共 46 行

H
46
字号
#if !defined(MAINMENU_H)
#define MAINMENU_H
#include "GUI.h"

#ifdef  MAINMENU_GLOBALS
	#define MAINMENU_EXTRN       
#else
	#define MAINMENU_EXTRN  extern
#endif

typedef void OnSelectionFunc (void * ptr);

typedef struct MENU_ITEM_INFO	MENU_ITEM;
typedef struct MENU_INFO		Pw_MENU;

struct MENU_ITEM_INFO {
	char * Item;
	Pw_MENU * SubMenu;
	OnSelectionFunc * OnSelection;
	int Toggled;
};

struct MENU_INFO {
		Pw_Window  mnuWin;
  		unsigned int Selected;                /* current selection */
  		unsigned int NumItems;
		MENU_ITEM * Items;
  		char * Title;
		Pw_MENU * ParentMenu;
		SCROLL_STATE ScrollState;
		Pw_Font * Font;
		int x, y, w, h;
} ;


//-------------------------------------------------
int CreateMenu (Pw_MENU * menu, Pw_MENU * Owner, Pw_Window* Parent, 
				const MENU_ITEM * ItemData, char * aTitle, int itemcnt,
				int x, int y, int w, int h); 

//-------------------------------------------------


#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?