// due to the rather low-level event API of wxWidgets, we cannot use RunApplicationEventLoop
// but have to use ReceiveNextEvent dealing with events manually, therefore we also have
-// deal with clicks in the menu bar explicitely
+// to deal with clicks in the menu bar explicitly
pascal OSStatus wxMacWindowEventHandler( EventHandlerCallRef handler , EventRef event , void *data ) ;
event.m_x = ev->where.h;
event.m_y = ev->where.v;
- event.m_timeStamp = ev->when;
+ event.SetTimestamp( ev->when );
wxWindow* focus = wxWindow::FindFocus() ;
event.SetEventObject(focus);
bool wxGetKeyState(wxKeyCode key) //virtual key code if < 10.2.x, else see below
{
-#if __WXMAC_CARBON__
-//TODO: Low get map...
- return !!(GetCurrentKeyModifiers() & wxKeyCodeToMacModifier(key));
-#else
- KeyMap keymap;
- GetKeys(keymap);
- return !!(BitTst(keymap, (sizeof(KeyMap)*8) - key));
-#endif
+ wxASSERT_MSG(key != WXK_LBUTTON && key != WXK_RBUTTON && key !=
+ WXK_MBUTTON, wxT("can't use wxGetKeyState() for mouse buttons"));
+
+ KeyMap keymap;
+ GetKeys(keymap);
+ return !!(BitTst(keymap, (sizeof(KeyMap)*8) - key));
}
#if !TARGET_CARBON
event.m_x = wherex;
event.m_y = wherey;
- event.m_timeStamp = when;
+ event.SetTimestamp(when);
event.SetEventObject(focus);
handled = focus->GetEventHandler()->ProcessEvent( event ) ;
if ( handled && event.GetSkipped() )
event.m_x = wherex;
event.m_y = wherey;
- event.m_timeStamp = when;
+ event.SetTimestamp(when);
event.SetEventObject(focus);
handled = focus->GetEventHandler()->ProcessEvent( event ) ;
event.m_metaDown = ev->modifiers & cmdKey;
event.m_x = ev->where.h;
event.m_y = ev->where.v;
- event.m_timeStamp = ev->when;
+ event.SetTimestamp( ev->when );
event.SetEventObject(this);
if ( wxWindow::s_lastMouseWindow )
event.m_x = x;
event.m_y = y;
- event.m_timeStamp = timestamp;
+ event.SetTimestamp(timestamp);
if ( wxWindow::s_lastMouseWindow )
{