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:
Vadim Zeitlin
2000-08-18 17:33:09 +00:00
parent be1f93ab87
commit 3b2555e2d0
25 changed files with 503 additions and 109 deletions

View File

@@ -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;
}
// ----------------------------------------------------------------------------
//
// ----------------------------------------------------------------------------