[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

 

LGroupBox



Overview:

LGroupBox is a PowerPlant class that is usually used for visually grouping user interface elements, using a line drawn around them.

Methods :

The methods in this class are:

 

LGroupBox()  
~LGroupBox()  
DrawSelf()  
DrawText()  
DrawBorder()  
CalcTextBoxFrame()  

Data Members:

The data members in this class are:

 

mFrameColor  
 

Operation:

This class derives from LCaption. The text set with DrawText() is the title of the group. This object draws a box with the specified coordinates.

The top of the object's frame does not coincide with the top line drawn for the group box. The other panes that are visually within the group box do not have a programming relationship to the group box in the hierarchy. They are simply visually grouped, without any program control between the group box and the other panes.

Source files:

(Pane Classes)

LGroupBox.h

LGroupBox.cp

See also:

LCaption

LGroupBox()

Purpose:

The constructor creates the object from the passed-in parameters.

Access:

Public

Prototype:

LGroupBox();

LGroupBox( const LGroupBox &inGroupBox );

LGroupBox( const SPaneInfo &inPaneInfo,
Str255 inString,
ResIDT inTextTraitsID );

LGroupBox( LStream *inStream );
Parameters:

The parameters for these constructors are:

 

const LGroupBox&  
inGroupBox  
A reference to the group box object to be copied.  
const SPaneInfo&  
inPaneInfo  
A reference to the SuperPane to draw the group box upon.  
Str255  
inString  
A pointer to the group box text.  
ResIDT  
inTextTraitsID  
The text traits for the group box text.  
LStream*  
inStream  
A pointer to a stream object that contains the information to create the LCaption object.  

~LGroupBox()

Purpose:

The destructor destroys the object.

Access:

Virtual, Public

Prototype:

virtual LGroupBox();
Parameters:

None

DrawSelf()

Purpose:

This method draws the group box. It is drawn in two stages. First the frame rectangle is drawn, minus the area where the title text is drawn. Second, the title text is drawn. In order to draw without any flashing, we find the frame of the text box and clip it out of the drawing region.

Access:

Virtual, Protected

Prototype:

virtual void DrawSelf();
Parameters:

None

Return:

None

DrawText()

Purpose:

This method draws the group box text given the chosen Rect coordinates.

Access:

Virtual, Protected

Prototype:

virtual void DrawText( const Rect &inRect );
Parameters:

The parameter for this method is:

 

const Rect&  
inRect  
A reference to the Rect to draw the group box text in.  

Return:

None

DrawBorder()

Purpose:

This method draws the group box frame given the chosen coordinates.

Access:

Virtual, Protected

Prototype:

virtual void DrawBorder( const Rect &inRect );
Parameters:

The parameter for this method is:

 

const Rect&  
inRect  
A reference to the Rect to draw the group box upon.  

Return:

None

CalcTextBoxFrame()

Purpose:

This method decides where the text will be drawn, but does not draw the text.

Access:

Virtual, Protected

Prototype:

virtual void CalcTextBoxFrame( Rect &outRect );
Parameters:

The parameter for this method is:

 

const Rect&  
outRect  
A reference to the Rect to draw the group box text within.  

Return:

None

mFrameColor

Purpose:

This data member holds the color to draw the group box frame in.

Access:

Protected

Prototype:

RGBColor mFrameColor;

 


[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.

Last updated: July 21, 2000