#include <arspaint.h>
Inheritance diagram for Ars::Painter:


Public Member Functions | |
| Painter (void) | |
| virtual | ~Painter (void) |
| Standard deconstructor. | |
| virtual void | Init (icstring &aStr) |
| void | SetTextAlign (const int vAlign, const int hAlign=-1) |
| virtual const unsigned long | GetStates (void) const |
Definition at line 177 of file arspaint.h.
|
|
Construct a new Painter object
Definition at line 575 of file arspaint.cpp.
00576 {
00577 }
|
|
|
Standard deconstructor.
Definition at line 186 of file arspaint.h.
00186 { }
|
|
|
Reimplemented from Ars::Thing. Definition at line 207 of file arspaint.h. Referenced by Ars::XLabel::AdjustColors(), Ars::XGroupBox::Draw(), Ars::XCheckBox::Draw(), Ars::XButtonImage::Draw(), Ars::XBox::Draw(), Ars::Window::DrawBG(), Ars::XButton::evMouseButtonDown(), Ars::Window::evMouseButtonDown(), Ars::XButton::evMouseButtonUp(), Ars::Window::evMouseButtonUp(), Ars::XCheckBox::evMouseLClick(), and Ars::XLabel::RestoreColors().
00207 { return Thing::GetStates(); }
|
|
|
Initialize the thing object via a string the CAR identifiers used are: fontid: font identifier of the font.cfg file (default is 0) fonth: font height in pixels (default is 12) Reimplemented from Ars::Thing. Reimplemented in Ars::Window, Ars::XButtonImage, Ars::XDropDown, Ars::XImage, Ars::XListBox, Ars::XMPEG, Ars::XProgress, Ars::XScrollBar, and Ars::XTextBox. Definition at line 579 of file arspaint.cpp. References Cfg::GetCfg(), Cfg::Handler::GetCfgFile(), Cfg::Handler::GetCfgString(), Ars::FontEngine::GetFontFilename(), icstring, and Ars::HPaint::m_pFontEngine.
00580 {
00581 Cfg::Handler &h = Cfg::GetCfg();
00582
00583 // Font Id and Font height...
00584 icstring tmp = Rsrc::FindCrdOf( aStr , "fontid" );
00585 int fid = Rsrc::GetInt( tmp );
00586 tmp = Rsrc::FindCrdOf( aStr , "fonth" );
00587 int fh = Rsrc::GetInt( tmp );
00588
00589 if( fid >= 0 || fh >= 0 )
00590 {
00591 string fntName = m_pFontEngine->GetFontFilename();
00592
00593 if( fid >= 0 )
00594 {
00595 char tmp[20];
00596 sprintf( tmp , "Font%d" , fid );
00597 Cfg::Handler &fnt = Cfg::GetCfg( h.GetCfgString( "Paths" , "Fonts" ) );
00598 fntName = fnt.GetCfgFile( "" , tmp );
00599 }
00600
00601 if( fh < 0 )
00602 m_pFontEngine = ArsApplication::GetInstance()->GetFontEngine( fntName );
00603 else
00604 m_pFontEngine = ArsApplication::GetInstance()->GetFontEngine( fntName , fh );
00605 }
00606
00607 Thing::Init( aStr );
00608 }
|
|
||||||||||||
|
Reimplemented from Ars::HPaint. Definition at line 194 of file arspaint.h. References HALIGN_MASK, Ars::Thing::ResetState(), Ars::Thing::SetState(), and VALIGN_MASK.
00195 {
00196 if( vAlign != -1 )
00197 {
00198 ResetState( VALIGN_MASK );
00199 SetState( vAlign );
00200 }
00201 if( hAlign != -1 )
00202 {
00203 ResetState( HALIGN_MASK );
00204 SetState( hAlign );
00205 }
00206 }
|
1.3.3