mPopMenuMgrClass Struct Reference
[mPopMenuMgr]
mPopMenuMgr class, derived from mObject
More...
#include <mpopmenumgr.h>
Detailed Description
mPopMenuMgr class, derived from mObject
- BOOL addItem(mPopMenuMgr *self, int type, const char *str, \ PBITMAP bmp, int id, int state, \ mPopMenuMgr *subMenu, DWORD add_data);
add a menu item - Parameters:
-
| type | - menu item type, same as MiniGUI MENUITEMINFO :
- MTF_STRING a menu item with string only
- MTF_BITMAP a menu item with bitmap only
- MTF_BMPSTRING a menu item with string and bitmap
- MTF_RADIOCHECK a menu item with a radio button
- MTF_MARKCHECK a menu item with a check button
- MTF_SEPARATOR a seprator item
|
| str | - the string of menu item, when type is MTF_STRING or MTF_BMPSTRING |
| bmp | - the bitmap pointer of menu item, when type is MTF_BITMAP or MTF_BMPSTRING |
| id | - the id of menu item |
| state | - the state of menu item, same as MiniGIUI MENUITEMINFO, by default it is MFS_ENABLED
- MFS_GRAYED the menu item is disabled
- MFS_DISABLED the menu item is disabled
- MFS_CHECKED the menu item is checked
- MFS_ENABLED the menu item is enabled , default value
- MFS_UNCHECKED the menu item is unchecked
|
| subMenu | - the sub menu of this menu item, by default is NULL |
| add_data | - the additional data of menu item, by default is 0 |
- Returns:
- TRUE - sucessed, FALSE - failed
- HMENU createMenu(mPopMenuMgr *self);
create a pop menu handle from itself - Returns:
- the pop menu handle
- void popMenu(mPopMenuMgr *self, mObject *owner);
pop itself - Parameters:
-
| owner | - it should be a mWidget pointer, indicate the owner who want a pop menu |
- BOOL addSeparator(mPopMenuMgr *self);
add a seprator for menu item - Returns:
- TRUE -sucessed; FALSE -failed
- BOOL getMenuItem(mPopMenuMgr *self, int idx, MENUITEMINFO *pmii, BOOL byCommand);
store a menu item info into MENUITEMINFO - Parameters:
-
| idx | - the index(byCommand==FALSE) or id of menu item |
| pmii | - Out param, store the menu item info |
| byCommand | - indiate the param idx is the index or id of menu item. TRUE for id, FALSE for index. |
- Returns:
- TRUE -sucessed, FALSE - failed
- See also:
- mPopMenuMgr
The documentation for this struct was generated from the following file: