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

CP_StatusBar Class Reference

CP_View subclass to implement a status bar.

List of all members.

Public Member Functions

Constructor / Destructor
 CP_StatusBar ()
 Constructor.
 CP_StatusBar (CPLAT::CP_View *inSuperview, const CPLAT::CP_Point &inUpperLeft, const CPLAT::CP_Size &inContentSize, bool inAutoPosition=true, bool inAtWindowBottom=true, bool inGrowBox=true)
virtual ~CP_StatusBar () throw ()
 Destructor.
Getters
bool GetBorders (SInt32 *ptArray)
SInt16 GetNumberParts ()
SInt16 GetParts (SInt32 *ptArray, SInt16 inNumElements)
CP_Rect GetRect (SInt16 inPartNumber)
CP_String GetText (SInt16 inPartNumber)
SInt32 GetTextLength (SInt16 inPartNumber)
Setters
void SetMinHeight (SInt16 inMinHeight)
bool SetParts (SInt32 *ptArray, SInt16 inNumElements)
bool SetSimpleDisplay (bool inShowSimple)
bool SetText (const CP_String &inText, SInt16 inPartNumber, SInt16 inDisplayFlags=0)

Static Public Member Functions

Persistance
static CP_M_PersistPersistCreator ()

Protected Member Functions

Persistance
virtual void OnInitPersist (CP_View *inSuperview, CP_DataValueList &inDataValueList)
Parts
CP_S_StatusBarPart GetPartInfo (SInt16 inPartNumber)
void SetPartInfo (const CP_S_StatusBarPart &inPartInfo, SInt16 inPartNumber)
Drawing
virtual void OnDraw (CP_Canvas &inCanvas, CP_Region &inUpdateArea)
virtual void OnOwnerDrawPart (CP_Canvas &inCanvas, const CP_S_StatusBarPart &inPart, const CP_Rect &inBounds)
void DrawIndividualPart (CP_Canvas &inCanvas, const CP_S_StatusBarPart &inPart)

Protected Attributes

bool fAutoPosition
bool fHasGrowBox
bool fAtWindowBottom
bool fSimpleStyle
CP_StatusBarPart_ArrayfParts
SInt16 fVerticalBorder
SInt16 fHorizontalBorder
SInt16 fDividerBorder

Private Member Functions

Initialization
void CreatePlatformImp (CP_View *inSuperview, const CP_Point &inUpperLeft, const CP_Size &inContentSize, bool inAutoPosition, bool inAtWindowBottom, bool inGrowBox)
Misc
void CalcWindowPosition ()
Initialization
void CreatePlatformImp (CP_View *inSuperview, const CP_Point &inUpperLeft, const CP_Size &inContentSize, bool inAutoPosition, bool inAtWindowBottom, bool inGrowBox)
Initialization
void CreatePlatformImp (CP_View *inSuperview, const CP_Point &inUpperLeft, const CP_Size &inContentSize, bool inAutoPosition, bool inAtWindowBottom, bool inGrowBox)


Constructor & Destructor Documentation

CPLAT_Begin_Namespace_CPLAT CP_StatusBar::CP_StatusBar  ) 
 

Constructor.

Exceptions:
none 

CP_StatusBar::CP_StatusBar CPLAT::CP_View *  inSuperview,
const CPLAT::CP_Point &  inUpperLeft,
const CPLAT::CP_Size &  inContentSize,
bool  inAutoPosition = true,
bool  inAtWindowBottom = true,
bool  inGrowBox = true
 

Constructor. Create a pane with the upper left corner at inLocation, and the content size of inSize.

Parameters:
inSuperview The subview handler that contains this view.
inUpperLeft Upper left corner of pane in releation to its superview.
inContentSize Content size of the view.
inAutoPosition Is this view positioned automatically in the window.
inAtWindowBottom Flag to indicate if this is auto positioned at the top or bottom of the containing window.
inGrowBox Do we need to show the grow box.
Exceptions:
none 

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

Destructor.

Exceptions:
none 


Member Function Documentation

CP_M_Persist * CP_StatusBar::PersistCreator  )  [static]
 

CP_M_Persist function to create an instance of this button. Called from our CP_PersistManager class to create persistant object from a stream.

Exceptions:
none 
Returns:
CP_M_Persist * Returns a pointer to a new CP_StatusBar object.

bool CP_StatusBar::GetBorders SInt32 inPtArray  ) 
 

Return an array containing the 3 elements that contain the borders -- 1 - vertical border, 2 - horizontal, 3 - divider.

NOTE: Make sure ptArray is large enough to hold 3 elements.

Parameters:
inPtArray The array to hold the result in.
Exceptions:
none 
Returns:
bool True if we could return the parts.

SInt16 CP_StatusBar::GetNumberParts  ) 
 

Return the number of parts in our status bar.

Exceptions:
none 
Returns:
SInt16 The number of parts.

SInt16 CP_StatusBar::GetParts SInt32 inPtArray,
SInt16  inNumElements
 

Return an array containing an array of parts from our status bar.

Parameters:
inPtArray Array to hold the result in.
inNumElements The number of elements we want returned.
Exceptions:
none 
Returns:
SInt16 The number of parts.

CP_Rect CP_StatusBar::GetRect SInt16  inPartNumber  ) 
 

Set the rect of a part in our status bar. Returns a zero (empty) rect upon failure.

Parameters:
inPartNumber The part to return the rect of.
Exceptions:
none 
Returns:
SInt16 The returned rect.

CP_String CP_StatusBar::GetText SInt16  inPartNumber  ) 
 

Return the text for a part.

Parameters:
inPartNumber The part to return the text for.
Exceptions:
none 
Returns:
SInt16 The returned text.

SInt32 CP_StatusBar::GetTextLength SInt16  inPartNumber  ) 
 

Return the length of the text for a part. The low order word contains the text length, the high order word contains the type of operation to draw the text.

Parameters:
inPartNumber The part to return the text length for.
Exceptions:
none 
Returns:
SInt16 The returned text length.

void CP_StatusBar::SetMinHeight SInt16  inMinHeight  ) 
 

Set the minimum height of the drawing area for our status bar.

Parameters:
inMinHeight The minimum height of the status bar.
Exceptions:
none 
Returns:
void

bool CP_StatusBar::SetParts SInt32 ptArray,
SInt16  inNumElements
 

Set the parts to our status bar.

Parameters:
ptArray Array of points for the various parts of the status bar.
inNumElements The number of elements in the passed in array.
Exceptions:
none 
Returns:
bool Returns true if we were able to set the parts.

bool CP_StatusBar::SetSimpleDisplay bool  inShowSimple  ) 
 

Set the status bar to display in simple style, ie only 1 part.

Parameters:
inShowSimple Flag to indicate if this is a simple status bar.
Exceptions:
none 
Returns:
bool Returns true if we were able to set the flag.

bool CP_StatusBar::SetText const CP_String inText,
SInt16  inPartNumber,
SInt16  inDisplayFlags = 0
 

Set the text for a part in our status bar.

Parameters:
inText The text for the part.
inPartNumber The part to set the text for.
inDisplayFlags Flags to control the appearance of the text displayed.
Exceptions:
none 
Returns:
bool Returns true if we were able to set the flag.

void CP_StatusBar::OnInitPersist CP_View inSuperview,
CP_DataValueList inDataValueList
[protected, virtual]
 

Called from the persistance classes once an object has been created, and now needs to be initialized. This method is used to initialize the data members of the class from the passed in CP_DataValueList which contains fields to initialize a data member.

Once the data members have been initialized, a platforms implementation is created through the CreatePlatformImp() method.

Parameters:
inSubViewHandler The superview that contains this push button.
inDataValueList List of the values for setting the data members of this class to.
Exceptions:
none 
Returns:
void

CP_S_StatusBarPart CP_StatusBar::GetPartInfo SInt16  inPartNumber  )  [protected]
 

Get the info structure for an indidual part.

Parameters:
inPartNumber Index of the part to return the info for.
Exceptions:
none 
Returns:
CP_S_StatusBarPart Structure that contains information about the part.

void CP_StatusBar::SetPartInfo const CP_S_StatusBarPart inPartInfo,
SInt16  inPartNumber
[protected]
 

Set the info structure for an indidual part.

Parameters:
inPartInfo Structure that contains information about the part.
inPartNumber Index of the part to return the info for.
Exceptions:
none 
Returns:
CP_S_StatusBarPart Structure that contains information about the part.

void CP_StatusBar::OnDraw CP_Canvas inCanvas,
CP_Region inUpdateArea
[protected, virtual]
 

Thickness of border between parts.

void CP_StatusBar::OnOwnerDrawPart CP_Canvas inCanvas,
const CP_S_StatusBarPart inPart,
const CP_Rect inBounds
[protected, virtual]
 

Override this to handle parts that have the SBT_OWNERDRAW flag set.

Parameters:
inCanvas Not used.
inPart Not used.
inBounds Not used.
Exceptions:
none 
Returns:
void

void CP_StatusBar::DrawIndividualPart CP_Canvas inCanvas,
const CP_S_StatusBarPart inPart
[protected]
 

Draws a single part of the status bar.

Parameters:
inCanvas The CP_Canvas to draw into.
inPart Structure containing the part info.
Exceptions:
none 
Returns:
void

void CP_StatusBar::CreatePlatformImp CP_View inSuperview,
const CP_Point inUpperLeft,
const CP_Size inContentSize,
bool  inAutoPosition,
bool  inAtWindowBottom,
bool  inGrowBox
[private]
 

Create the MacOS implementation of the Button control.

Parameters:
inSuperview The view that contains this control.
inUpperLeft Upper left corner of pane in releation to its superview.
inContentSize Content size of the pane.
inAutoPosition Is this view positioned automatically in the window.
inAtWindowBottom Flag to indicate if this is auto positioned at the top or bottom of the containing window.
inGrowBox Do we need to show the grow box.
Exceptions:
none 
Returns:
void

void CP_StatusBar::CalcWindowPosition  )  [private]
 

Reposition and resize our status bar to its correct location at either the top or bottom of the window.

Exceptions:
none 
Returns:
void

void CP_StatusBar::CreatePlatformImp CP_View inSuperview,
const CP_Point inUpperLeft,
const CP_Size inContentSize,
bool  inAutoPosition,
bool  inAtWindowBottom,
bool  inGrowBox
[private]
 

void CP_StatusBar::CreatePlatformImp CP_View inSuperview,
const CP_Point inUpperLeft,
const CP_Size inContentSize,
bool  inAutoPosition,
bool  inAtWindowBottom,
bool  inGrowBox
[private]
 


Member Data Documentation

bool CP_StatusBar::fAutoPosition [protected]
 

bool CP_StatusBar::fHasGrowBox [protected]
 

Flag to indicate if this pane should auto position itself at the bottom of its enclosing window.

bool CP_StatusBar::fAtWindowBottom [protected]
 

Flag to indicate if we need to cover a grow box area.

bool CP_StatusBar::fSimpleStyle [protected]
 

Flag to indicate if this pane is at the bottom of a window.

CP_StatusBarPart_Array* CP_StatusBar::fParts [protected]
 

Flag to indicate if this should be a simple style, where there is only 1 area with text displayed.

SInt16 CP_StatusBar::fVerticalBorder [protected]
 

Holds information about the various parts of the status bar.

SInt16 CP_StatusBar::fHorizontalBorder [protected]
 

Vertical distance between pane edge and beginning of drawing area.

SInt16 CP_StatusBar::fDividerBorder [protected]
 

Horizontal distance between pane edge and beginning of drawing area.


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