Class SClassUIInfo
See Also: Class SubClassList, COLORREF.
class SClassUIInfo
Description:
This class is available in release 3.0 and later only.
This class allows developers to provide some additional information on a superclass. Currently this includes a color, and a method which draws a representative image in a Windows DC.
DrawRepresentation(...) can return false to indicate that no image was drawn. DrawRepresentation(...) should cache its image (if applicable) as the method is called repeatedly while drawing certain UI components (like the schematic view).
Methods:
public:
Prototype:
virtual COLORREF Color(SClass_ID superClassID);
Remarks:
Returns a color associated with the specified super class. This is currently used to draw nodes in the schematic view at extreme zoom-outs where it is impossible to draw legible node names.
Parameters:
SClass_ID superClassID
The Super Class whose associated color to return.
Default Implementation:
{ return RGB(128, 128, 128); }
Prototype:
virtual bool DrawRepresentation(SClass_ID superClassID, COLORREF bkColor, HDC hDC, Rect &rect);
Remarks:
Draws an image which represents the superclass (usually an icon) in a rectangle in a given Windows DC. The implementation should attempt to draw the image as fast as possible as this method is called repeatedly while drawing certain UI components.
Parameters:
SClass_ID superClassID
The super class to draw.
COLORREF bkColor
This is the average background color of the surface on which the image is being drawn. It can be used, if desired, to antialias the image.
HDC hDC
The handle to the device context.
Rect &rect
The rectangle to draw in.
Return Value:
Return false if no image was drawn and a generic stand-in image will be used.
Default Implementation:
{ return false; }