<< Click to Display Table of Contents >>
User Component API
The methods available when developing custom components are as follows:
Method Detail
GetNewInstance
DWORD GetNewInstance()
User component object creation function.
GetCopyInstance
DWORD GetCopyInstance(DWORD src)
User component object copy function.
Parameters:
src - User component object handle
DeleteInstance
void DeleteInstance(DWORD src)
User component object deletion function.
Parameters:
src - User component object handle
getAttrListLength
int getAttrListLength(DWORD src)
A function that returns the number of properties used by user components.
Parameters:
src - User component object handle
getAttrList
BOOL getAttrList(DWORD src, WCHAR** attrs, const int length)
Puts property names used in the user component and then returns them to the attrs.
Parameters:
src - User component object handle
attrs - Pointer of the buffer where the properties are returned.
length - Number of properties generated by calling the getAttrListLength.
getAttrLength
int getAttrLength(DWORD src, const WCHAR* name)
A function that returns the length of the input property.
Parameters:
src - User component object handle
name - Property name
getAttr
BOOL getAttr(DWORD src, const WCHAR* name, WCHAR* value, const int value_length)
Returns the properties corresponding to the name to the value.
Parameters:
src - User component object handle
name - Property name
value - Place where the properties are saved
value_length - Value generated by calling the getAttrLength
setAttr
BOOL setAttr(DWORD src, const WCHAR* name, const WCHAR* value)
A function that modifies the value of the input property.
Parameters:
src - User component object handle
name - Property name
value - Value of the property to modify
readMe
void readMe(DWORD src, const char* pData, const int length)
A function that read user component properties from the serialized binary data.
Parameters:
src - User component object handle
pData - Binary data storage for reading properties
length - Length of the data to read
writeMeExLength
int writeMeExLength(DWORD src)
A function that returns the length of binary data that serializes the properties of user components.
Parameters:
src - User component object handle
writeMeEx
void writeMeEx(DWORD src, char* pData, const int length)
A function that serializes the properties of user components.
Parameters:
src - User component object handle
pData - Pointer of binary data
length - Length of binary data
isHiddenAttr
BOOL isHiddenAttr(DWORD src, LPCWSTR attrname)
A function that sets whether to display the property in the properties window.
Parameters:
src - User component object handle
attrname - Property name
getAttrType
int getAttrType(DWORD src, LPCWSTR attrname)
A function that add property to match the property type.
Parameters:
src - User component object handle
attrname - Property name
getEnumSize
int getEnumSize(DWORD src, LPCWSTR attrname)
A function that get the number of Enum, when the return value of the getAttrType function is Enum.
Parameters:
src - User component object handle
attrname - Property name
getEnumSize
BOOL getEnumValues(DWORD src, LPCWSTR attrname, WCHAR** enumNames, const int length)
A function that get the values of Enum, when the return value of the getAttrType function is Enum.
Parameters:
src - User component object handle
attrname - Property name
enumNames - Array of Enum values to be stored
length - Number of Enum
paint
void paint(DWORD src, HDC hDC, LPCWSTR data, const float x, const float y, const float w, const float h, const float scale)
A function called when drawing on the screen.
Parameters:
src - User component object handle
hDC - Handle of the screen(refer to the WIN32 API)
data - Caption of the label
x - X-coordinate of the component
y - Y-coordinate of the component
w - Width of the component
h - Height of the component
scale - Scale
paintEX
void paintEX(DWORD src, HDC hDC, LPCWSTR data, const float x, const float y, const float w, const float h, const float scale, const float x_offset, const float y_offset)
A function called when drawing on the screen and that delivers the offset value where the actual image will be saved.
Parameters:
src - User component object handle
hDC - Handle of the screen(refer to the WIN32 API)
data - Caption of the label
x - X-coordinate of the component
y - Y-coordinate of the component
w - Width of the component
h - Height of the component
scale - Scale
x_offset - x offset where the actual image will be saved
y_offset - y offset where the actual image will be saved
void print(DWORD src, HDC hDC, LPCWSTR data, const float x, const float y, const float w, const float h, const float scale, const float x_offset, const float y_offset)
A function that is called when printing.
Parameters:
src - User component object handle
hDC - Handle of the screen(refer to the WIN32 API)
data - Caption of the label
x - X-coordinate of the component
y - Y-coordinate of the component
w - Width of the component
h - Height of the component
scale - Scale
x_offset - x offset where the actual image will be saved
y_offset - y offset where the actual image will be saved
getAutosize
void getAutosize(DWORD src, HDC hDC, LPCWSTR data, float * w, float * h)
A function to set the horizontal and vertical size of the user component when using the AutoSize function.
Parameters:
src - User component object handle
hDC - Handle of the screen(refer to the WIN32 API)
data - Caption of the label
w - pointer of the original width of the component
h - pointer of the original height of the component
setWorkPath
void setWorkPath(DWORD src, const WCHAR* work_path)
A function that set the path of working folder.
Parameters:
src - User component object handle
work_path - Path of working folder
setDLLPath
void setDLLPath(DWORD src, const WCHAR* dll_path)
A function that the path of DLL file.
Parameters:
src - User component object handle
dll_path - Path of DLL file
setExtraParam
void setExtraParam(DWORD src, const WCHAR* extra_param)
A function that apply parameter.
Parameters:
src - User component object handle
extra_param - Parameter
getTooltipLength
int getTooltipLength(DWORD src, const float x, const float y)
A function that get the length of a tooltip.
Parameters:
src - User component object handle
x - X-coordinate of tooltip
y - Y-coordinate of tooltip
getTooltip
BOOL getTooltip(DWORD src, const float x, const float y, WCHAR* tooltip, const int tooltip_length)
A function that get whether tooltip is displayed.
Parameters:
src - User component object handle
x - X-coordinate of tooltip
y - Y-coordinate of tooltip
tooltip - Text of tooltip
tooltip_length - Length of tooltip
splitBindEx
BSTR splitBindEx(DWORD src, HDC hDC, LPCWSTR data, const float firstHeiht, int firstcount, const float nextHeiht, const float desiredWidth)
A function of applying the "User Component" in the Drawing Type of Note.
Parameters:
src - User component object handle
hDC - Handle of the screen(refer to the WIN32 API)
data - Data
firstHeiht - First height
firstcount - First count
nextHeiht - Next height
desiredWidth - Desired Width