mComponentClass Struct Reference
[mComponent]
the basic class of components, windows. Drived by mObjectClass
More...
#include <mcomponent.h>
Detailed Description
the basic class of components, windows. Drived by mObjectClass
- const char* className - the class name of component,
- See also:
- NCSCLASSNAME
- mComponent * createComponent(mComponent* parent, mComponentClass * the_class, DWORD addData);
create a mComponent instance, see Design Patterns : Factroy Method
- Parameters:
-
| parent | - the parent recieve the new created component |
| the_class | - the class of new created component |
| addData | - param to new compont's construct function: mObjectClass .construct
|
- Returns:
- mComponent * the new instance pointer of component
- WNDPROC _window_proc - window proc, used for registering,
- See also:
- ncsRegisterComponent
- BOOL setProperty(mComponent *self, int id, DWORD value);
Set the property of component
- Parameters:
-
| self | - this pointer |
| id | - the id of property |
| value | - the value of property
|
- Returns:
- TRUE - sucessfull , FALSE - failed
- DWORD getProperty (mComponent * self, int id);
Get the property value of component
- Parameters:
-
| self | - this pointer |
| id | - the id of property
|
- Returns:
- DWORD - value of property or (DWORD)-1 if failed
- int setId (mComponent *self, int id);
Set the Id of this component
- Parameters:
-
| self | - this pointer |
| id | - the new id of component |
- Returns:
- old id.
- int getId (mComponent *self);
Get the Id of this component
- Parameters:
-
- Returns:
- the Id of component
- mComponent* getReleated(mComponent* self, int releated);
Get Releated components, such as parent, children, next sliding, prev sliding
- Parameters:
-
- Returns:
- the releated component pointer if found, NULL otherwise
- mComponent* setReleated(mComponent* self,mComponent *comp, int releated);
Set Releated components
- Parameters:
-
- Returns:
- the param comp pointer if success, or NULL otherwise
- mComponent* getChild(mComponent* self, int id);
Get a child by id
- Parameters:
-
| self | - this pointer |
| id | - the child id |
- Returns:
- the pointer of children, or NULL if failed
- BOOL setSpecificData (mObject* self, DWORD key, DWORD value, PFreeSpecificData freeSpecific = NULL) set the sepcific data to an object
- Parameters:
-
| self | - this pointer |
| key | - the key of data |
| value | - the value of data |
| freeSpecific | - the free function to the value, called when object will be destroied |
- Returns:
- TRUE/FALSE
- DWORD getSpecificData(mComponent* self, DWORD key, BOOL *pOk = NULL) get the specific data has been set
- Parameters:
-
| self | - this pointer |
| key | - the key of specific data |
| pOk | - get the data sucesses or not |
- Returns:
- The data value or zero (when pOk is FALSE)
The documentation for this struct was generated from the following file: