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;
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()));
}
#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
if ( !g_winMng )
{
if ( !wxTheApp->SetDisplayMode(wxGetDefaultDisplayMode()) )
+ {
wxLogFatalError(_("Cannot initialize display."));
+ }
}
// mgl specific:
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)
window_t *wnd = MGL_wmGetWindowAtPosition(g_winMng, pt.x, pt.y);
return (wxWindow*)wnd->userData;
}
-
-
-// ---------------------------------------------------------------------------
-// idle events processing
-// ---------------------------------------------------------------------------
-
-void wxWindowMGL::OnInternalIdle()
-{
- if (wxUpdateUIEvent::CanUpdate(this) && IsShown())
- UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
-}