added wxInputHandler and initial support for it in wxControl
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxUNIVERSAL@8132 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#endif
|
||||
|
||||
#include "wx/univ/renderer.h"
|
||||
#include "wx/univ/inphand.h"
|
||||
#include "wx/univ/theme.h"
|
||||
|
||||
// ============================================================================
|
||||
@@ -113,6 +114,29 @@ void wxButton::DoDraw(wxControlRenderer *renderer)
|
||||
renderer->DrawLabel();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// input processing
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
wxInputHandler *wxButton::CreateInputHandler() const
|
||||
{
|
||||
return wxTheme::Get()->GetInputHandler(wxCONTROL_BUTTON);
|
||||
}
|
||||
|
||||
bool wxButton::PerformAction(const wxControlAction& action)
|
||||
{
|
||||
if ( action == wxACTION_BUTTON_TOGGLE )
|
||||
{
|
||||
m_isPressed = !m_isPressed;
|
||||
}
|
||||
else
|
||||
{
|
||||
return wxControl::PerformAction(action);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user