Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CP_DrawOSElements Class Reference

A class to draw the OS elements in CP_Views for custom views that need to be drawn in the underlying OS style.

Inheritance diagram for CP_DrawOSElements:

CP_NoCopy List of all members.

Public Member Functions

Constructor / Destructor
 CP_DrawOSElements (CP_View *inDestView, CP_Canvas &inDestCanvas)
 Constructor.
virtual ~CP_DrawOSElements () throw ()
 Destructor.
Buttons
void DrawButton (const CP_Rect &inBounds, SInt32 inValue, bool inIsActive, UInt32 inUserData)
void DrawListButton (const CP_Rect &inBounds, SInt32 inValue, bool inIsActive, UInt32 inUserData, bool inSortDirectionUp)
void DrawPushButton (const CP_Rect &inBounds, SInt32 inValue, bool inIsActive, UInt32 inUserData)
Frames
void DrawFrame (const CP_Rect &inBounds, bool inPrimary, bool inIsActive)
Headers
void DrawPlacard (const CP_Rect &inBounds, bool inIsActive)
void DrawWindowHeader (const CP_Rect &inBounds, bool inIsListHeader, bool inIsActive)
Hilite
void DrawHilite (const CP_Rect &inBounds, bool inIsActive)
Misc
void DrawDisclosure (const CP_Rect &inBounds, CP_E_Direction inDirection, bool inIsActive, UInt32 inUserData)
void DrawPopupArrow (const CP_Rect &inBounds, CP_E_Direction inDirection)
void DrawSeparator (const CP_Rect &inBounds, bool inIsActive)
void DrawSplitter (const CP_Rect &inBounds, bool inIsActive)
Text
void DrawText (const CP_Rect &inBounds, const CP_String &inText, bool inIsActive, SInt32 inHorTextAlignment=CP_E_TextAlign_HorLeft, SInt32 inVerTextPlacement=CP_E_TextAlign_VerMiddle)
CP_Size MeasureText (const CP_String &inText, bool inIsActive)
Tracks
void DrawSlider (const CP_Rect &inBounds, bool inIsActive, SInt32 inMin, SInt32 inMax, SInt32 inValue, UInt32 inUserData)
Getters
ThemeEraseUPP GetEraseUPP ()
Setters
void SetEraseUPP (ThemeEraseUPP inEraseUPP)

Protected Attributes

CP_ViewfDestView
CP_Canvas fDestCanvas
ThemeEraseUPP fEraseUPP

Constructor & Destructor Documentation

CPLAT_Begin_Namespace_CPLAT CP_DrawOSElements::CP_DrawOSElements CP_View inDestView,
CP_Canvas inDestCanvas
 

Constructor.

Parameters:
inDestView CP_View that this class will draw into.
inDestCanvas CP_Canvas that is used to drawn into.
Exceptions:
none 

CP_DrawOSElements::~CP_DrawOSElements  )  throw () [virtual]
 

Destructor.

Exceptions:
none 


Member Function Documentation

void CP_DrawOSElements::DrawButton const CP_Rect inBounds,
SInt32  inValue,
bool  inIsActive,
UInt32  inUserData
 

Draws an OS button.

Parameters:
inBounds Bounding rect of the button to be drawn.
inValue Current value for the button.
inIsActive Flag to indicate if the button is drawn in an active or inactive state.
inUserData Any user supplied data that is needed to drawn the button.
Exceptions:
none 
Returns:
void

void CP_DrawOSElements::DrawListButton const CP_Rect inBounds,
SInt32  inValue,
bool  inIsActive,
UInt32  inUserData,
bool  inSortDirectionUp
 

Draws an OS list type button such as the type found in headers.

Parameters:
inBounds Bounding rect of the button to be drawn.
inValue Current value for the button.
inIsActive Flag to indicate if the button is drawn in an active or inactive state.
inUserData Any user supplied data that is needed to drawn the button.
inSortDirectionUp Flag to indicate if a sort direction indicator is drawn in the up or down facing position.
Exceptions:
none 
Returns:
void

void CP_DrawOSElements::DrawPushButton const CP_Rect inBounds,
SInt32  inValue,
bool  inIsActive,
UInt32  inUserData
 

Draws an OS push button.

Parameters:
inBounds Bounding rect of the button to be drawn.
inValue Current value for the button.
inIsActive Flag to indicate if the button is drawn in an active or inactive state.
inUserData Any user supplied data that is needed to drawn the button.
Exceptions:
none 
Returns:
void

void CP_DrawOSElements::DrawFrame const CP_Rect inBounds,
bool  inPrimary,
bool  inIsActive
 

Draws an OS group box frame.

Parameters:
inBounds Bounding rect of the frame to be drawn.
inPrimary Flag to indicate if the group box is drawn in a primary or secondary style.
inIsActive Flag to indicate if the frame is drawn in an active or inactive state.
Exceptions:
none 
Returns:
void

void CP_DrawOSElements::DrawPlacard const CP_Rect inBounds,
bool  inIsActive
 

Draws an OS placard.

Parameters:
inBounds Bounding rect of the placard to be drawn.
inIsActive Flag to indicate if the placard is drawn in an active or inactive state.
Exceptions:
none 
Returns:
void

void CP_DrawOSElements::DrawWindowHeader const CP_Rect inBounds,
bool  inIsListHeader,
bool  inIsActive
 

Draws an OS window header.

Parameters:
inBounds Bounding rect of the header to be drawn.
inIsListHeader Flag to indicate if this is a list type header.
inIsActive Flag to indicate if the header is drawn in an active or inactive state.
Exceptions:
none 
Returns:
void

void CP_DrawOSElements::DrawHilite const CP_Rect inBounds,
bool  inIsActive
 

Draws an OS hilite.

Parameters:
inBounds Bounding rect of the hilite to be drawn.
inIsActive Flag to indicate if the hilite is drawn in an active or inactive state.
Exceptions:
none 
Returns:
void

void CP_DrawOSElements::DrawDisclosure const CP_Rect inBounds,
CP_E_Direction  inDirection,
bool  inIsActive,
UInt32  inUserData
 

Draws an OS disclosure indicator.

Parameters:
inBounds Bounding rect of the disclosure to be drawn.
inDirection Indicates the direction that the disclosure indicator is drawn in.
inIsActive Flag to indicate if the disclosure is drawn in an active or inactive state.
inUserData Any user supplied data that is needed to drawn the button.
Exceptions:
none 
Returns:
void

void CP_DrawOSElements::DrawPopupArrow const CP_Rect inBounds,
CP_E_Direction  inDirection
 

Draws an OS popup arrow.

Parameters:
inBounds Bounding rect of the arrow to be drawn.
inDirection Indicates the direction of the arrow.
Exceptions:
none 
Returns:
void

void CP_DrawOSElements::DrawSeparator const CP_Rect inBounds,
bool  inIsActive
 

Draws an OS separator line.

Parameters:
inBounds Bounding rect of the separator to be drawn.
inIsActive Flag to indicate if the separator is drawn in an active or inactive state.
Exceptions:
none 
Returns:
void

void CP_DrawOSElements::DrawSplitter const CP_Rect inBounds,
bool  inIsActive
 

Draws an OS splitter indicator.

Parameters:
inBounds Bounding rect of the splitter to be drawn.
inIsActive Flag to indicate if the splitter is drawn in an active or inactive state.
Exceptions:
none 
Returns:
void

void CP_DrawOSElements::DrawText const CP_Rect inBounds,
const CP_String inText,
bool  inIsActive,
SInt32  inHorTextAlignment = CP_E_TextAlign_HorLeft,
SInt32  inVerTextAlignment = CP_E_TextAlign_VerMiddle
 

Draws some OS theme style text.

Parameters:
inBounds Bounding rect of the text to be drawn.
inText The text to be drawn.
inIsActive Flag to indicate if the text is drawn in an active or inactive state.
inHorTextAlignment Horizontal alignment of the text.
inVerTextAlignment Vertical alignment of the text.
Exceptions:
none 
Returns:
void

CP_Size CP_DrawOSElements::MeasureText const CP_String inText,
bool  inIsActive
 

Measures some OS theme style text.

Parameters:
inText The text to be drawn.
inIsActive Flag to indicate if the text is drawn in
Exceptions:
none 
Returns:
CP_Size The horizontal and vertical measurements that the drawn text will occupy.

void CP_DrawOSElements::DrawSlider const CP_Rect inBounds,
bool  inIsActive,
SInt32  inMin,
SInt32  inMax,
SInt32  inValue,
UInt32  inUserData
 

Draws an OS slider.

Parameters:
inBounds Bounding rect of the disclosure to be drawn.
inIsActive Flag to indicate if the disclosure is drawn in an active or inactive state.
inUserData Any user supplied data that is needed to drawn the button.
Exceptions:
none 
Returns:
void

ThemeEraseUPP CP_DrawOSElements::GetEraseUPP  ) 
 

Gets the MacOS ThemeEraseUPP used to erase the background of drawn elements.

Exceptions:
none 
Returns:
ThemeEraseUPP The ThemEraseUPP used to erase the background behind elements.

void CP_DrawOSElements::SetEraseUPP ThemeEraseUPP  inEraseUPP  ) 
 

Sets the MacOS ThemeEraseUPP used to erase the background of drawn elements.

Parameters:
ThemeEraseUPP The ThemEraseUPP used to erase the background behind elements.
Exceptions:
none 
Returns:
void


Member Data Documentation

CP_View* CP_DrawOSElements::fDestView [protected]
 

CP_Canvas CP_DrawOSElements::fDestCanvas [protected]
 

CP_View that is being drawn into.

ThemeEraseUPP CP_DrawOSElements::fEraseUPP [protected]
 

Destination CP_Canvas that is used for the drawing.


The documentation for this class was generated from the following files:
Generated on Sat Sep 17 20:01:33 2005 for CPLAT by  doxygen 1.4.0