#include <xlabel.h>
Inheritance diagram for Ars::XLabel:


Public Member Functions | |
| XLabel (void) | |
| ~XLabel (void) | |
| Standard destructor. | |
| virtual const bool | SetupWindow (const Message &msg) |
| Deregister the setup_window message. | |
| virtual void | SetWndText (const std::string &sWindowText) |
| virtual void | AppendWindowText (const std::string &sWindowText) |
| virtual void | Draw (void) |
| Renders the Window Text, and clips to the Window Rect. | |
| virtual void | AdjustColors (void) |
| virtual void | RestoreColors (void) |
| virtual const bool | evMouseMove (const MouseMessage &msg) |
Definition at line 8 of file xlabel.h.
|
|
Construct a new label
Definition at line 6 of file xlabel.cpp.
00007 {
00008 }
|
|
|
Standard destructor.
Definition at line 10 of file xlabel.cpp.
00011 {
00012 }
|
|
|
Reimplemented from Ars::Window. Definition at line 44 of file xlabel.cpp. References Ars::Thing::GetBgColor(), Ars::Thing::GetFgColor(), Ars::Painter::GetStates(), S_DISABLED, S_HIGHLIGHT, S_INVERTONFOLLOW, S_SELECTED, Ars::Thing::SetBgColor(), and Ars::Thing::SetFgColor().
00045 {
00046 if( GetStates() & S_DISABLED )
00047 SetFgColor( GetFgColor().FadeColor( -32 ) );
00048 else if( (GetStates() & (S_HIGHLIGHT|S_SELECTED)) != 0 )
00049 if( GetStates() & S_INVERTONFOLLOW )
00050 {
00051 RGBColor c = GetFgColor();
00052 SetFgColor( GetBgColor() );
00053 SetBgColor( c );
00054 }
00055 else
00056 SetFgColor( GetFgColor().FadeColor( 32 ) );
00057 XBox::AdjustColors();
00058 }
|
|
|
Add some text to the current label
Definition at line 39 of file xlabel.cpp. References Ars::Window::GetWindowText(), and SetWndText().
00040 {
00041 SetWndText( GetWindowText() + sWindowText );
00042 }
|
|
|
Renders the Window Text, and clips to the Window Rect.
Reimplemented from Ars::XBox. Reimplemented in Ars::XButtonImage, Ars::XCheckBox, Ars::XGroupBox, Ars::XProgress, and Ars::XTextBox. Definition at line 23 of file xlabel.cpp. References Ars::Thing::GetFgColor(), Ars::Thing::GetWindowRect(), Ars::Window::GetWindowText(), and Ars::HPaint::TextOutStr().
00024 {
00025 XBox::Draw();
00026
00027 TextOutStr( GetWindowRect() , GetWindowText() , GetFgColor() );
00028 }
|
|
|
Reimplemented from Ars::MessageClient. Reimplemented in Ars::XToolTip, Ars::XButton, and Ars::XProgress. Definition at line 77 of file xlabel.cpp. References Ars::Window::FindWindow(), Ars::MouseMessage::Point, Ars::Thing::ResetState(), S_HIGHLIGHT, and Ars::Thing::SetState().
00078 {
00079 bool ans = XBox::evMouseMove( msg );
00080
00081 if( FindWindow( &msg.Point ) == this )
00082 SetState( S_HIGHLIGHT );
00083 else
00084 ResetState( S_HIGHLIGHT );
00085
00086 return ans;
00087 }
|
|
|
Reimplemented from Ars::Window. Definition at line 60 of file xlabel.cpp. References Ars::Thing::GetBgColor(), Ars::Thing::GetFgColor(), Ars::Painter::GetStates(), S_DISABLED, S_HIGHLIGHT, S_INVERTONFOLLOW, S_SELECTED, Ars::Thing::SetBgColor(), and Ars::Thing::SetFgColor().
00061 {
00062 if( GetStates() & S_DISABLED )
00063 SetFgColor( GetFgColor().FadeColor( 32 ) );
00064 else if( (GetStates() & (S_HIGHLIGHT|S_SELECTED)) != 0 )
00065 if( GetStates() & S_INVERTONFOLLOW )
00066 {
00067 RGBColor c = GetFgColor();
00068 SetFgColor( GetBgColor() );
00069 SetBgColor( c );
00070 }
00071 else
00072 SetFgColor( GetFgColor().FadeColor( -32 ) );
00073
00074 XBox::RestoreColors();
00075 }
|
|
|
Deregister the setup_window message.
Reimplemented from Ars::Window. Reimplemented in Ars::XToolTip, Ars::XButton, Ars::XButtonImage, Ars::XCheckBox, Ars::XProgress, and Ars::XTextBox. Definition at line 14 of file xlabel.cpp.
00015 {
00016 XBox::SetupWindow( msg );
00017
00018 MessageServer::Instance().RegisterMessageClient( this , Message::MOUSE_MOVE );
00019
00020 return true;
00021 }
|
|
|
Set the WindowText of the label
Reimplemented from Ars::Window. Reimplemented in Ars::XToolTip, and Ars::XTextBox. Definition at line 30 of file xlabel.cpp. References Ars::Thing::SetDirty(), and Ars::Window::UpdateWindow(). Referenced by AppendWindowText(), Ars::XScrollBar::Init(), Ars::XDropDown::Init(), and Ars::XProgress::SetProgress().
00031 {
00032 XBox::SetWndText( sWindowText );
00033
00034 SetDirty( true );
00035
00036 UpdateWindow();
00037 }
|
1.3.3