X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6a93571daf0f1dc47ac37951852b895153cbd779..12e424d28f9f82575c1ebb3fe57cd654a3a8d513:/src/stc/PlatWX.cpp diff --git a/src/stc/PlatWX.cpp b/src/stc/PlatWX.cpp index e0445dd848..0e92b30e8a 100644 --- a/src/stc/PlatWX.cpp +++ b/src/stc/PlatWX.cpp @@ -13,7 +13,10 @@ #include "wx/image.h" #include "wx/imaglist.h" #include "wx/tokenzr.h" + +#ifdef wxHAVE_RAW_BITMAP #include "wx/rawbmp.h" +#endif #include "Platform.h" #include "PlatWX.h" @@ -345,6 +348,11 @@ void SurfaceImpl::AlphaRectangle(PRectangle rc, int cornerSize, ColourAllocated fill, int alphaFill, ColourAllocated outline, int alphaOutline, int /*flags*/) { +#ifdef wxHAVE_RAW_BITMAP + + // TODO: do something with cornerSize + wxUnusedVar(cornerSize); + int x, y; wxRect r = wxRectFromPRectangle(rc); wxBitmap bmp(r.width, r.height, 32); @@ -402,6 +410,13 @@ void SurfaceImpl::AlphaRectangle(PRectangle rc, int cornerSize, // Draw the bitmap hdc->DrawBitmap(bmp, r.x, r.y, true); + +#else + wxUnusedVar(cornerSize); + wxUnusedVar(alphaFill); + wxUnusedVar(alphaOutline); + RectangleDraw(rc, outline, fill); +#endif } void SurfaceImpl::Ellipse(PRectangle rc, ColourAllocated fore, ColourAllocated back) { @@ -1315,9 +1330,6 @@ unsigned int Platform::DoubleClickTime() { bool Platform::MouseButtonBounce() { return false; } -void Platform::DebugDisplay(const char *s) { - wxLogDebug(stc2wx(s)); -} bool Platform::IsKeyDown(int WXUNUSED(key)) { return false; // I don't think we'll need this. @@ -1358,7 +1370,15 @@ int Platform::Maximum(int a, int b) { return b; } -#define TRACE +//#define TRACE + +void Platform::DebugDisplay(const char *s) { +#ifdef TRACE + wxLogDebug(stc2wx(s)); +#else + wxUnusedVar(s); +#endif +} void Platform::DebugPrintf(const char *format, ...) { #ifdef TRACE @@ -1381,6 +1401,7 @@ bool Platform::ShowAssertionPopUps(bool assertionPopUps_) { } void Platform::Assert(const char *c, const char *file, int line) { +#ifdef TRACE char buffer[2000]; sprintf(buffer, "Assertion [%s] failed at %s %d", c, file, line); if (assertionPopUps) { @@ -1388,18 +1409,16 @@ void Platform::Assert(const char *c, const char *file, int line) { wxMessageBox(stc2wx(buffer), wxT("Assertion failure"), wxICON_HAND | wxOK); -// if (idButton == IDRETRY) { -// ::DebugBreak(); -// } else if (idButton == IDIGNORE) { -// // all OK -// } else { -// abort(); -// } } else { strcat(buffer, "\r\n"); Platform::DebugDisplay(buffer); abort(); } +#else + wxUnusedVar(c); + wxUnusedVar(file); + wxUnusedVar(line); +#endif }