X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/17808a759627b03c2acbe7333dd2386557e1b804..2028c33ab5a39a12bd410ac953731a56ad6377ba:/src/mgl/window.cpp diff --git a/src/mgl/window.cpp b/src/mgl/window.cpp index 5ad62e94e3..d46081e8b1 100644 --- a/src/mgl/window.cpp +++ b/src/mgl/window.cpp @@ -106,9 +106,9 @@ static wxWindowMGL* wxGetTopLevelParent(wxWindowMGL *win) static void wxCaptureScreenshot(bool activeWindowOnly) { #ifdef __DOS__ - #define SCREENSHOT_FILENAME _T("sshot%03i.png") + #define SCREENSHOT_FILENAME wxT("sshot%03i.png") #else - #define SCREENSHOT_FILENAME _T("screenshot-%03i.png") + #define SCREENSHOT_FILENAME wxT("screenshot-%03i.png") #endif static int screenshot_num = 0; wxString screenshot; @@ -128,7 +128,7 @@ static void wxCaptureScreenshot(bool activeWindowOnly) g_displayDC->savePNGFromDC(screenshot.mb_str(), r.x, r. y, r.x+r.width, r.y+r.height); - wxMessageBox(wxString::Format(_T("Screenshot captured: %s"), + wxMessageBox(wxString::Format(wxT("Screenshot captured: %s"), screenshot.c_str())); } @@ -288,8 +288,8 @@ static long wxScanToKeyCode(event_t *event, bool translate) #ifdef __WXDEBUG__ #define KEY(mgl_key,wx_key) \ case mgl_key: \ - wxLogTrace(_T("keyevents"), \ - _T("key " #mgl_key ", mapped to " #wx_key)); \ + wxLogTrace(wxT("keyevents"), \ + wxT("key " #mgl_key ", mapped to " #wx_key)); \ key = wx_key; \ break; #else @@ -460,7 +460,6 @@ static ibool MGLAPI wxWindowKeybHandler(window_t *wnd, event_t *e) event.SetEventObject(win); event.SetTimestamp(e->when); event.m_keyCode = wxScanToKeyCode(e, true); - event.m_scanCode = 0; // not used by wx at all event.m_x = where.x; event.m_y = where.y; event.m_shiftDown = ( e->modifiers & EVT_SHIFTKEY ) != 0; @@ -544,7 +543,9 @@ void wxWindowMGL::Init() if ( !g_winMng ) { if ( !wxTheApp->SetDisplayMode(wxGetDefaultDisplayMode()) ) + { wxLogFatalError(_("Cannot initialize display.")); + } } // mgl specific: @@ -559,8 +560,6 @@ wxWindowMGL::~wxWindowMGL() { SendDestroyEvent(); - m_isBeingDeleted = true; - if ( gs_mouseCapture == this ) ReleaseMouse(); @@ -1082,10 +1081,11 @@ int wxWindowMGL::GetCharWidth() const return dc.GetCharWidth(); } -void wxWindowMGL::GetTextExtent(const wxString& string, - int *x, int *y, - int *descent, int *externalLeading, - const wxFont *theFont) const +void wxWindowMGL::DoGetTextExtent(const wxString& string, + int *x, int *y, + int *descent, + int *externalLeading, + const wxFont *theFont) const { wxScreenDC dc; if (!theFont) @@ -1142,7 +1142,7 @@ void wxWindowMGL::HandlePaint(MGLDevCtx *dc) return; } -#ifdef __WXDEBUG__ +#if wxDEBUG_LEVEL >= 2 // FIXME_MGL -- debugging stuff, to be removed! static int debugPaintEvents = -1; if ( debugPaintEvents == -1 ) @@ -1153,7 +1153,7 @@ void wxWindowMGL::HandlePaint(MGLDevCtx *dc) dc->fillRect(-1000,-1000,2000,2000); wxMilliSleep(50); } -#endif +#endif // wxDEBUG_LEVEL >= 2 MGLRegion clip; dc->getClipRegion(clip);