projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed wxUniv/GTK linking by getting rid of GENERICOBJS and putting them into GUIOBJS...
[wxWidgets.git]
/
src
/
univ
/
button.cpp
diff --git
a/src/univ/button.cpp
b/src/univ/button.cpp
index 65a5b69c9bbfbd87f5e64f0ff4a7d143207e4133..fe2cedc46d80a5b509801144f9569b190c45d7de 100644
(file)
--- a/
src/univ/button.cpp
+++ b/
src/univ/button.cpp
@@
-258,22
+258,22
@@
wxStdButtonInputHandler::wxStdButtonInputHandler(wxInputHandler *handler)
m_winHasMouse = FALSE;
}
m_winHasMouse = FALSE;
}
-bool wxStdButtonInputHandler::HandleKey(wx
Control *control
,
+bool wxStdButtonInputHandler::HandleKey(wx
InputConsumer *consumer
,
const wxKeyEvent& event,
bool pressed)
{
int keycode = event.GetKeyCode();
if ( keycode == WXK_SPACE || keycode == WXK_RETURN )
{
const wxKeyEvent& event,
bool pressed)
{
int keycode = event.GetKeyCode();
if ( keycode == WXK_SPACE || keycode == WXK_RETURN )
{
- con
trol
->PerformAction(wxACTION_BUTTON_TOGGLE);
+ con
sumer
->PerformAction(wxACTION_BUTTON_TOGGLE);
return TRUE;
}
return TRUE;
}
- return wxStdInputHandler::HandleKey(con
trol
, event, pressed);
+ return wxStdInputHandler::HandleKey(con
sumer
, event, pressed);
}
}
-bool wxStdButtonInputHandler::HandleMouse(wx
Control *control
,
+bool wxStdButtonInputHandler::HandleMouse(wx
InputConsumer *consumer
,
const wxMouseEvent& event)
{
// the button has 2 states: pressed and normal with the following
const wxMouseEvent& event)
{
// the button has 2 states: pressed and normal with the following
@@
-288,11
+288,11
@@
bool wxStdButtonInputHandler::HandleMouse(wxControl *control,
{
if ( event.ButtonDown(1) )
{
{
if ( event.ButtonDown(1) )
{
- m_winCapture = con
trol
;
+ m_winCapture = con
sumer->GetInputWindow()
;
m_winCapture->CaptureMouse();
m_winHasMouse = TRUE;
m_winCapture->CaptureMouse();
m_winHasMouse = TRUE;
- con
trol
->PerformAction(wxACTION_BUTTON_PRESS);
+ con
sumer
->PerformAction(wxACTION_BUTTON_PRESS);
return TRUE;
}
return TRUE;
}
@@
-307,7
+307,7
@@
bool wxStdButtonInputHandler::HandleMouse(wxControl *control,
if ( m_winHasMouse )
{
// this will generate a click event
if ( m_winHasMouse )
{
// this will generate a click event
- con
trol
->PerformAction(wxACTION_BUTTON_TOGGLE);
+ con
sumer
->PerformAction(wxACTION_BUTTON_TOGGLE);
return TRUE;
}
return TRUE;
}
@@
-316,10
+316,10
@@
bool wxStdButtonInputHandler::HandleMouse(wxControl *control,
}
}
}
}
- return wxStdInputHandler::HandleMouse(con
trol
, event);
+ return wxStdInputHandler::HandleMouse(con
sumer
, event);
}
}
-bool wxStdButtonInputHandler::HandleMouseMove(wx
Control *control
,
+bool wxStdButtonInputHandler::HandleMouseMove(wx
InputConsumer *consumer
,
const wxMouseEvent& event)
{
// we only have to do something when the mouse leaves/enters the pressed
const wxMouseEvent& event)
{
// we only have to do something when the mouse leaves/enters the pressed
@@
-333,8
+333,8
@@
bool wxStdButtonInputHandler::HandleMouseMove(wxControl *control,
m_winHasMouse = FALSE;
// we do have a pressed button, so release it
m_winHasMouse = FALSE;
// we do have a pressed button, so release it
- con
trol
->SetCurrent(FALSE);
- con
trol
->PerformAction(wxACTION_BUTTON_RELEASE);
+ con
sumer->GetInputWindow()
->SetCurrent(FALSE);
+ con
sumer
->PerformAction(wxACTION_BUTTON_RELEASE);
return TRUE;
}
return TRUE;
}
@@
-347,17
+347,17
@@
bool wxStdButtonInputHandler::HandleMouseMove(wxControl *control,
// we did have a pressed button which we released when leaving the
// window, press it again
// we did have a pressed button which we released when leaving the
// window, press it again
- con
trol
->SetCurrent(TRUE);
- con
trol
->PerformAction(wxACTION_BUTTON_PRESS);
+ con
sumer->GetInputWindow()
->SetCurrent(TRUE);
+ con
sumer
->PerformAction(wxACTION_BUTTON_PRESS);
return TRUE;
}
}
return TRUE;
}
}
- return wxStdInputHandler::HandleMouseMove(con
trol
, event);
+ return wxStdInputHandler::HandleMouseMove(con
sumer
, event);
}
}
-bool wxStdButtonInputHandler::HandleFocus(wx
Control *control
,
+bool wxStdButtonInputHandler::HandleFocus(wx
InputConsumer *consumer
,
const wxFocusEvent& event)
{
// buttons change appearance when they get/lose focus, so return TRUE to
const wxFocusEvent& event)
{
// buttons change appearance when they get/lose focus, so return TRUE to
@@
-365,12
+365,12
@@
bool wxStdButtonInputHandler::HandleFocus(wxControl *control,
return TRUE;
}
return TRUE;
}
-bool wxStdButtonInputHandler::HandleActivation(wx
Control *control
,
+bool wxStdButtonInputHandler::HandleActivation(wx
InputConsumer *consumer
,
bool activated)
{
// the default button changes appearance when the app is [de]activated, so
// return TRUE to refresh
bool activated)
{
// the default button changes appearance when the app is [de]activated, so
// return TRUE to refresh
- return wxStaticCast(con
trol
, wxButton)->IsDefault();
+ return wxStaticCast(con
sumer->GetInputWindow()
, wxButton)->IsDefault();
}
#endif // wxUSE_BUTTON
}
#endif // wxUSE_BUTTON