mGNCS API Reference
v1.2.0
A new control set and a new framework for MiniGUI apps
|
Macros | |
#define | NCS_TOOLITEM_FLAG_TEXT_LEFT 0x01 |
indicate that create a tool item whoes text at left. default is in the right More... | |
#define | NCS_TOOLITEM_FLAG_TEXT_UP NCS_TOOLITEM_FLAG_TEXT_LEFT |
indicate that create a tool item whoes text at up More... | |
#define | NCS_TOOLITEM_FLAG_VERT 0x02 |
indicate that create a tool item whoes text and image arranged vertically More... | |
#define | NCS_TOOLITEM_UNCHECKED 0x00 |
tool item state unckecked More... | |
#define | NCS_TOOLITEM_CHECKED 0x01 |
tool item state checked More... | |
Enumerations |
Functions | |
MGNCS_EXPORT mToolImage * | ncsNewToolImage (PBITMAP pbmp, int cell_count, BOOL autoUnload, BOOL bVert) |
create a tool image for tool item More... | |
MGNCS_EXPORT mToolImage * | ncsNewToolImageFromFile (const char *fileName, int cell_count, BOOL autoUnload, BOOL bVert) |
create a tool image from file, More... | |
MGNCS_EXPORT void | ncsFreeToolImage (mToolImage *mti) |
free the toolimage More... | |
MGNCS_EXPORT BOOL | ncsDrawToolImageCell (mToolImage *mti, HDC hdc, int idx, const RECT *prc) |
draw a sub image from toolimage to hdc More... | |
MGNCS_EXPORT void * | ncsCreatePushToolItem (int id, mToolImage *img, const char *str, UINT flags) |
create push tool item. a push tool item like a push button More... | |
MGNCS_EXPORT BOOL | ncsInitToolItems (void) |
initialize tool items More... | |
MGNCS_EXPORT void * | ncsCreateMenuToolItem (int id, mToolImage *img, const char *str, UINT flags, mPopMenuMgr *menu) |
create mnue tool item, like a mMenuButton More... | |
MGNCS_EXPORT void * | ncsCreateCheckToolItem (int id, mToolImage *img, const char *str, UINT flags, int state) |
create a check able tool item, like mCheckButton More... | |
MGNCS_EXPORT void * | ncsCreateRadioToolItem (int id, mToolImage *img, const char *str, UINT flags) |
create a check able tool item, like mRadioButton More... | |
MGNCS_EXPORT void * | ncsCreateWidgetToolItem (mWidget *widget) |
create a toolitem which include a mWidget object More... | |
MGNCS_EXPORT void * | ncsCreateSeparatorItem (void) |
create separator item More... | |
MGNCS_EXPORT int | ncsGetToolItemType (void *toolitem) |
get the type of item More... | |
MGNCS_EXPORT BOOL | ncsIsPushToolItem (void *toolitem) |
check the toolitem is push item or not More... | |
MGNCS_EXPORT BOOL | ncsIsMenuToolItem (void *toolitem) |
check the toolitem is menu tool item or not More... | |
MGNCS_EXPORT BOOL | ncsIsSeparatorToolItem (void *toolitem) |
check the toolitem is separator tool item or not More... | |
MGNCS_EXPORT BOOL | ncsIsWidgetToolItem (void *toolitem) |
check the toolitem is widget tool item or not More... | |
MGNCS_EXPORT int | ncsToolItem_getId (void *self) |
get the id of toolitem More... | |
MGNCS_EXPORT int | ncsToolItem_setId (void *self, int id) |
get the id of toolitem More... | |
MGNCS_EXPORT BOOL | ncsToolItem_setCheck (void *self, int check_state) |
set the check state of toolitem More... | |
MGNCS_EXPORT int | ncsToolItem_getCheck (void *self) |
get the check state of toolitem More... | |
MGNCS_EXPORT BOOL | ncsToolItem_showMenu (void *self, mObject *owner) |
show the menu of MenuToolItem More... | |
MGNCS_EXPORT mObject * | ncsNewToolItem (int id, mObjectClass *_class, DWORD param) |
new a tool item object More... | |
MGNCS_EXPORT void | ncsFreeToolItem (mObject *obj) |
free the tool item object More... | |
#define NCS_TOOLITEM_CHECKED 0x01 |
tool item state checked
Definition at line 212 of file mtoolitem.h.
#define NCS_TOOLITEM_FLAG_TEXT_LEFT 0x01 |
indicate that create a tool item whoes text at left. default is in the right
Definition at line 144 of file mtoolitem.h.
#define NCS_TOOLITEM_FLAG_TEXT_UP NCS_TOOLITEM_FLAG_TEXT_LEFT |
indicate that create a tool item whoes text at up
Definition at line 150 of file mtoolitem.h.
#define NCS_TOOLITEM_FLAG_VERT 0x02 |
indicate that create a tool item whoes text and image arranged vertically
Definition at line 155 of file mtoolitem.h.
#define NCS_TOOLITEM_UNCHECKED 0x00 |
tool item state unckecked
Definition at line 207 of file mtoolitem.h.
enum mToolItemEvent |
define the event code of tool item
Definition at line 121 of file mtoolitem.h.
enum mToolItemType |
define the type of toolitem
Definition at line 59 of file mtoolitem.h.
void * ncsCreateCheckToolItem | ( | int | id, |
mToolImage * | img, | ||
const char * | str, | ||
UINT | flags, | ||
int | state | ||
) |
create a check able tool item, like mCheckButton
id | - the id of toolitem |
img | - the mToolItem image used by this item |
str | - the text of tool item, can be NULL |
flags | - the flags of tool item,
|
state | - the state of tool item |
void * ncsCreateMenuToolItem | ( | int | id, |
mToolImage * | img, | ||
const char * | str, | ||
UINT | flags, | ||
mPopMenuMgr * | menu | ||
) |
create mnue tool item, like a mMenuButton
id | - the id of toolitem |
img | - the mToolItem image used by this item |
str | - the text of tool item, can be NULL |
flags | - the flags of tool item,
|
menu | - the popmenu pointer |
void * ncsCreatePushToolItem | ( | int | id, |
mToolImage * | img, | ||
const char * | str, | ||
UINT | flags | ||
) |
create push tool item. a push tool item like a push button
id | - the id of toolitem |
img | - the mToolItem image used by this item |
str | - the text of tool item, can be NULL |
flags | - the flags of tool item,
|
void * ncsCreateRadioToolItem | ( | int | id, |
mToolImage * | img, | ||
const char * | str, | ||
UINT | flags | ||
) |
create a check able tool item, like mRadioButton
id | - the id of toolitem |
img | - the mToolItem image used by this item |
str | - the text of tool item, can be NULL |
flags | - the flags of tool item,
|
void * ncsCreateSeparatorItem | ( | void | ) |
create separator item
void * ncsCreateWidgetToolItem | ( | mWidget * | widget | ) |
create a toolitem which include a mWidget object
widget | the widget object, its parant must be a mToolBar |
BOOL ncsDrawToolImageCell | ( | mToolImage * | mti, |
HDC | hdc, | ||
int | idx, | ||
const RECT * | prc | ||
) |
draw a sub image from toolimage to hdc
mti | - the mToolImage object |
hdc | - the destination dc handle |
idx | - the index of sub image |
prc | - the area to draw bitmap |
void ncsFreeToolImage | ( | mToolImage * | mti | ) |
free the toolimage
void ncsFreeToolItem | ( | mObject * | obj | ) |
free the tool item object
obj | – the object want to free |
int ncsGetToolItemType | ( | void * | toolitem | ) |
get the type of item
toolitem | - the pointer of toolitem |
BOOL ncsInitToolItems | ( | void | ) |
initialize tool items
BOOL ncsIsMenuToolItem | ( | void * | toolitem | ) |
check the toolitem is menu tool item or not
toolitem | - the pointer of toolitem |
BOOL ncsIsPushToolItem | ( | void * | toolitem | ) |
check the toolitem is push item or not
toolitem | - the pointer of toolitem |
BOOL ncsIsSeparatorToolItem | ( | void * | toolitem | ) |
check the toolitem is separator tool item or not
toolitem | - the pointer of toolitem |
BOOL ncsIsWidgetToolItem | ( | void * | toolitem | ) |
check the toolitem is widget tool item or not
toolitem | - the pointer of toolitem |
mToolImage * ncsNewToolImage | ( | PBITMAP | pbmp, |
int | cell_count, | ||
BOOL | autoUnload, | ||
BOOL | bVert | ||
) |
create a tool image for tool item
pbmp | - the bitmap pointer used by toolitem |
cell_count | - the count of sub bitmaps in the pbmp |
autoUnload | - unload the pbmp when toolimage is deleted |
bVert | - the sub bitmaps is arranged vertically |
mToolImage * ncsNewToolImageFromFile | ( | const char * | fileName, |
int | cell_count, | ||
BOOL | autoUnload, | ||
BOOL | bVert | ||
) |
create a tool image from file,
fileName | - the image file name |
cell_count | - the count of sub bitmaps in the pbmp |
autoUnload | - unload the pbmp when toolimage is deleted |
bVert | - the sub bitmaps is arranged vertically |
mObject * ncsNewToolItem | ( | int | id, |
mObjectClass * | _class, | ||
DWORD | param | ||
) |
new a tool item object
id | – the id of toolid |
_class | – the class of toolitem implememnted, should be a mHotPiece class |
param | – the construct param of class |
int ncsToolItem_getCheck | ( | void * | self | ) |
get the check state of toolitem
self | - the toolitem pointer |
int ncsToolItem_getId | ( | void * | self | ) |
get the id of toolitem
self | - the toolitem pointer |
BOOL ncsToolItem_setCheck | ( | void * | self, |
int | check_state | ||
) |
set the check state of toolitem
self | - the toolitem pointer |
check_state | - the state of check |
int ncsToolItem_setId | ( | void * | self, |
int | id | ||
) |
get the id of toolitem
self | - the toolitem pointer |
id | - the new id of toolitem |
BOOL ncsToolItem_showMenu | ( | void * | self, |
mObject * | owner | ||
) |
show the menu of MenuToolItem
self | - the pointer of Menu Tool Item |
owner | - the owner of the menu |