Global Component Functions
[Global defines]

Data Structures

Defines

Typedefs

Functions


Define Documentation

#define ISCLASS ( class_name,
clssName   )     ncsIsClass((const char*)(class_name), (mComponentClass*)(&Class(clssName)))

the wrapper of ncsIsClass, test a one component class is special one.

Note:
class_name is a string indicating the component class name, such as NCSCTRL_STATIC; the clssName is an identifier of a class, such as mStatic.
See also:
ncsIsClass

Definition at line 443 of file mcomponent.h.


Typedef Documentation

A struct of connection map

Note:
used for ncsComponentConnectEvents, in resmanager
See also:
ncsComponentConnectEvents

A struct of event-handler mapping

Note:
only used for param
See also:
NCS_EVENT_HANDLER_NODE

Function Documentation

BOOL ncsComponentConnectEvents ( mComponent comps,
NCS_EVENT_CONNECT_INFO connects,
int  counts = -1 
)

connect the events between parent and its children, used by ncsCreateMainWindowIndirectFromID

Parameters:
comps the mComponent object pointer, it's the parent of the senders and listeners in NCS_EVENT_CONNECT_INFO
connects the connection information array
counts the count of connects array, if it's -1, the array must end by {0, 0, -1, NULL}
See also:
NCS_EVENT_CONNECT_INFO, ncsComponentConnectEvents
mComponentClass * ncsGetComponentClass ( const char *  className,
BOOL  check 
)

Get a mComponentClass instance from MiniGUI.

Note:
the class_name must be registered into MiniGUI by calling ncsRegisterComponent
Parameters:
className the class name to find
check check the class name with found mComponentClass instance, to ensure that we found the right class
Returns:
the mComponentClass pointer if sucess, NULL otherwise
void * ncsGetComponentHandler ( mComponent comp,
int  message 
)

get an event callback

Parameters:
comp 
message - event code
Returns:
void * the handler of message, or NULL if not set
BOOL ncsIsChildClass ( const char *  childClassName,
const char *  parentClassName 
)

check a class name is derived class of a special class

Parameters:
childClassName - the class name to be checked, the component class name, not the typeName of mObject
parentClassName - the class name expected as child class's ancestor, the component class name, not the typeName of mObject
Returns:
TRUE - check sucess, FALSE -failed
BOOL ncsIsClass ( const char *  class_name,
mComponentClass clss 
)

check a class name is a special class type or not

Parameters:
class_name the class name to check, this is the component class Name, not the typeName of mObject.
clss the expected class type pointer
Returns:
TRUE - check success, FALSE -failed
BOOL ncsRegisterComponent ( mComponentClass compCls,
DWORD  dwStyle,
DWORD  dwExStyle,
int  idCursor,
int  idBkColor 
)

register a component class into MiniGUI, so that ncsCreateWindow and ncsCreateWindow can find a mComponentClass instance

Parameters:
compCls the mComponentClass to be registered
dwStyle the default style
dwExStyle the default extend style
idCursor the default cursor
idBkColor the default background color
Returns:
TRUE - success, FALSE - failed
See also:
ncsGetComponentClass, ncsCreateWindow, ncsCreateWindowIndirect, ncsCreateMainWindow, ncsCreateMainWindowIndirect
void * ncsSetComponentHandler ( mComponent comp,
int  message,
void *  handler 
)

set the component handler

Parameters:
comp the compont to set
message the event code
handler the event callback pointer
Returns:
old event callback if it has been set
See also:
ncsSetComponentHandlers
void ncsSetComponentHandlers ( mComponent comp,
NCS_EVENT_HANDLER handlers,
int  count 
)

set an array of event handlers

Parameters:
comp - the component to set
handlers - the array of NCS_EVENT_HANDLER
count - the count of array handlers.
Note:
if count == -1, handlers must end by {-1, NULL}; anywhere, ncsSetComponentHandlers would stop if it find an element of array handlers is equal {-1, NULL}, whether count is equal -1 or not
See also:
ncsSetComponentHandler
Generated on Fri Jun 10 11:18:06 2011 for New Control Set V1.0.0 API Reference by  doxygen 1.6.3