Main Page | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals

Ars::XGroupBox Class Reference

#include <xgroupbox.h>

Inheritance diagram for Ars::XGroupBox:

Inheritance graph
[legend]
Collaboration diagram for Ars::XGroupBox:

Collaboration graph
[legend]

Public Member Functions

 XGroupBox (void)
 ~XGroupBox (void)
 Standard destructor.

virtual void Draw (void)
 Draws the XGroupBox.


Constructor & Destructor Documentation

Ars::XGroupBox::XGroupBox void   ) 
 

Constructs a new XGroupBox

Parameters:
WindowRect A CRect that defines the outer limits of the control
aStr the rest of the resource to initialize the object

Definition at line 6 of file xgroupbox.cpp.

00007 {
00008 }

Ars::XGroupBox::~XGroupBox void   ) 
 

Standard destructor.

Definition at line 10 of file xgroupbox.cpp.

00011 {
00012 }


Member Function Documentation

void Ars::XGroupBox::Draw void   )  [virtual]
 

Draws the XGroupBox.

Reimplemented from Ars::XLabel.

Definition at line 15 of file xgroupbox.cpp.

References Ars::XBox::DrawRaised(), Ars::HPaint::DrawRect(), Ars::XBox::DrawSunken(), Ars::HPaint::EPaintMode, Ars::Thing::GetBgColor(), Ars::Thing::GetFgColor(), Ars::HPaint::GetFontSize(), Ars::HPaint::GetMetrics(), Ars::Painter::GetStates(), Ars::Thing::GetWindowRect(), Ars::Window::GetWindowText(), Ars::XRect::Grow(), HALIGN_MASK, Ars::HPaint::PAINT_REPLACE, Ars::Thing::ResetState(), S_ALIGN_LEFT, S_ALIGN_TOP, S_RAISED, S_SUNKEN, Ars::HPaint::SetMode(), Ars::Thing::SetState(), Ars::HPaint::TextOutStr(), VALIGN_MASK, Ars::XPoint::x, and Ars::XPoint::y.

00016 {
00017         XRect   w( GetWindowRect() );
00018 
00019         w.y += GetFontSize() / 2;
00020 
00021         if( GetStates() & S_RAISED )
00022         {
00023                 DrawRaised( w , GetBgColor() );
00024                 w.Grow( -2 );
00025                 DrawSunken( w , GetBgColor() );
00026                 w.Grow( 2 );
00027         }
00028         else if( GetStates() & S_SUNKEN )
00029         {
00030                 DrawSunken( w , GetBgColor() );
00031                 w.Grow( -2 );
00032                 DrawRaised( w , GetBgColor() );
00033                 w.Grow( 2 );
00034         }
00035 
00036         const unsigned long     stateBak = GetStates();
00037         ResetState( VALIGN_MASK|HALIGN_MASK );
00038         SetState( S_ALIGN_LEFT|S_ALIGN_TOP );
00039         w.y -= GetFontSize() / 2;
00040         w.x += GetFontSize() / 2;
00041         XPoint  sz;
00042         GetMetrics( GetWindowText() , &sz , 0 , 0 );
00043         w.w = sz.x;
00044         w.h = sz.y;
00045 
00046         EPaintMode      prev = SetMode( PAINT_REPLACE );
00047 
00048         DrawRect( w , true , GetBgColor() , GetBgColor() );
00049         TextOutStr( w , GetWindowText() , GetFgColor() );
00050         SetState( stateBak );
00051 
00052         SetMode( prev );
00053 }


The documentation for this class was generated from the following files:
Generated on Fri Dec 5 04:06:57 2003 for Borqueror by doxygen 1.3.3