Icon Collection

Detailed Description

Groups

 ICONFLAG
 

Macros

#define LIBRARY_ICON_COLLECTION
 

Functions

Bool RegisterIcon (Int32 lIconID, BaseBitmap *pBmp, Int32 x=0, Int32 y=0, Int32 w=-1, Int32 h=-1, ICONFLAG lFlags=ICONFLAG::NONE)
 
Bool RegisterIcon (Int32 lIconID, Filename fn, Int32 x=0, Int32 y=0, Int32 w=-1, Int32 h=-1, ICONFLAG lFlags=ICONFLAG::NONE)
 
Bool GetIcon (Int32 lIconID, IconData *pData)
 
Bool UnregisterIcon (Int32 lIconID)
 

Macro Definition Documentation

◆ LIBRARY_ICON_COLLECTION

#define LIBRARY_ICON_COLLECTION

Icon collection library ID.

Function Documentation

◆ RegisterIcon() [1/2]

Bool RegisterIcon ( Int32  lIconID,
BaseBitmap pBmp,
Int32  x = 0,
Int32  y = 0,
Int32  w = -1,
Int32  h = -1,
ICONFLAG  lFlags = ICONFLAG::NONE 
)

Registers an icon from a bitmap.
Optionally a sub-icon can be specified within a larger image by giving a rectangle from (x,y) to (x+w, y+h).
If no rectangle is specified the whole bitmap is used.

Warning
Unless ICONFLAG::COPY is set make sure that pBmp points to a bitmap that will always be available.
Parameters
[in]lIconIDA unique plugin ID. Must be obtained from http://www.plugincafe.com
[in]pBmpThe bitmap to use for the icon. The caller owns the pointed bitmap.
[in]xOptional X coordinate of the top left corner of the sub-icon rectangle.
[in]yOptional Y coordinate of the top left corner of the sub-icon rectangle.
[in]wOptional width of the sub-icon rectangle.
[in]hOptional height of the sub-icon rectangle.
[in]lFlagsThe flags: ICONFLAG
Returns
true if the icon was registered, otherwise false.

◆ RegisterIcon() [2/2]

Bool RegisterIcon ( Int32  lIconID,
Filename  fn,
Int32  x = 0,
Int32  y = 0,
Int32  w = -1,
Int32  h = -1,
ICONFLAG  lFlags = ICONFLAG::NONE 
)

Registers an icon from an image file.
Optionally a sub-icon can be specified within a larger image by giving a rectangle from (x,y) to (x+w, y+h).
If no rectangle is specified the whole bitmap is used.

Parameters
[in]lIconIDA unique plugin ID. Must be obtained from http://www.plugincafe.com
[in]fnThe filename of the image file to use for the icon.
[in]xOptional X coordinate of the top left corner of the sub-icon rectangle.
[in]yOptional Y coordinate of the top left corner of the sub-icon rectangle.
[in]wOptional width of the sub-icon rectangle.
[in]hOptional height of the sub-icon rectangle.
[in]lFlagsThe flags: ICONFLAG
Returns
true if the icon was registered, otherwise false.

◆ GetIcon()

Bool GetIcon ( Int32  lIconID,
IconData pData 
)

Retrieves an icon registered with RegisterIcon().

Parameters
[in]lIconIDThe ID of the icon.
[in,out]pDataFilled with information about the found icon. The caller owns the pointed icon data.
Returns
true if the icon data was retrieved, otherwise false.

◆ UnregisterIcon()

Bool UnregisterIcon ( Int32  lIconID)

Unregisters an icon registered with RegisterIcon().

Parameters
[in]lIconIDThe ID of the icon.
Returns
true if the icon was unregistered, otherwise false.