#include <xbutton.h>
Inheritance diagram for Ars::XButton:


Public Member Functions | |
| XButton (void) | |
| ~XButton (void) | |
| Standard destructor. | |
| virtual const bool | SetupWindow (const Message &msg) |
| Deregister the setup_window message. | |
| virtual const bool | evMouseButtonDown (const MouseMessage &msg) |
| virtual const bool | evMouseButtonUp (const MouseMessage &msg) |
| virtual const bool | evMouseMove (const MouseMessage &msg) |
Protected Attributes | |
| unsigned int | m_MouseButton |
| The last mouse button to be pushed over the control, it's used internally. | |
|
|
Construct a new Button
Definition at line 6 of file xbutton.cpp.
00007 : m_MouseButton( 0 ) 00008 { 00009 } |
|
|
Standard destructor.
Definition at line 11 of file xbutton.cpp.
00012 {
00013 }
|
|
|
Reimplemented from Ars::Window. Definition at line 35 of file xbutton.cpp. References Ars::Window::FindWindow(), Ars::Painter::GetStates(), Ars::MouseMessage::Point, S_DISABLED, S_FOCUS, S_HIGHLIGHT, S_SELECTED, and Ars::Thing::SetState().
00036 {
00037 bool ans = XLabel::evMouseButtonDown( msg );
00038
00039 if( (GetStates() & S_DISABLED) == 0 )
00040 if( (GetStates() & S_SELECTED) != S_SELECTED && FindWindow( &msg.Point ) == this )
00041 {
00042 ans = SetState( S_HIGHLIGHT|S_FOCUS|S_SELECTED );
00043 }
00044
00045 return ans;
00046 }
|
|
|
Reimplemented from Ars::Window. Definition at line 48 of file xbutton.cpp. References Ars::Painter::GetStates(), Ars::Thing::ResetState(), S_FOCUS, S_HIGHLIGHT, S_SELECTED, and Ars::Thing::SetState().
00049 {
00050 bool ans = XLabel::evMouseButtonUp( msg );
00051
00052 if( (GetStates() & S_SELECTED) == S_SELECTED )
00053 {
00054 SetState( S_HIGHLIGHT|S_FOCUS );
00055 ans = ResetState( S_SELECTED ) || ans;
00056 }
00057 return ans;
00058 }
|
|
|
Reimplemented from Ars::XLabel. Definition at line 26 of file xbutton.cpp. References Ars::Window::FindWindow(), Ars::MouseMessage::Point, Ars::Thing::ResetState(), and S_FOCUS.
00027 {
00028 bool ans = XLabel::evMouseMove( msg );
00029
00030 if( FindWindow( &msg.Point ) == this )
00031 ResetState( S_FOCUS );
00032 return ans;
00033 }
|
|
|
Deregister the setup_window message.
Reimplemented from Ars::XLabel. Reimplemented in Ars::XButtonImage. Definition at line 15 of file xbutton.cpp.
00016 {
00017 XLabel::SetupWindow( msg );
00018
00019 MessageServer::Instance().RegisterMessageClient( this , Message::MOUSE_BUTTONDOWN );
00020 MessageServer::Instance().RegisterMessageClient( this , Message::MOUSE_BUTTONUP );
00021 MessageServer::Instance().RegisterMessageClient( this , Message::MOUSE_MOVE );
00022
00023 return true;
00024 }
|
|
|
The last mouse button to be pushed over the control, it's used internally.
Reimplemented from Ars::Window. |
1.3.3