]> git.saurik.com Git - wxWidgets.git/blobdiff - src/stc/PlatWX.cpp
avoid duplicating wxWindow::HandleCommand() in wxFrame, only handle the commands...
[wxWidgets.git] / src / stc / PlatWX.cpp
index 299aea9e9dddde46201fa52f332233a3c1a5a8b5..f7e2de3c0c37e88a37428f6ffa15a954c37ba7e1 100644 (file)
@@ -32,7 +32,9 @@
 #include "wx/imaglist.h"
 #include "wx/tokenzr.h"
 
+#ifdef wxHAS_RAW_BITMAP
 #include "wx/rawbmp.h"
+#endif
 
 #include "Platform.h"
 #include "PlatWX.h"
@@ -289,11 +291,11 @@ bool SurfaceImpl::Initialised() {
 
 
 void SurfaceImpl::PenColour(ColourAllocated fore) {
-    hdc->SetPen(wxPen(wxColourFromCA(fore), 1, wxSOLID));
+    hdc->SetPen(wxPen(wxColourFromCA(fore)));
 }
 
 void SurfaceImpl::BrushColour(ColourAllocated back) {
-    hdc->SetBrush(wxBrush(wxColourFromCA(back), wxSOLID));
+    hdc->SetBrush(wxBrush(wxColourFromCA(back)));
 }
 
 void SurfaceImpl::SetFont(Font &font_) {
@@ -344,7 +346,7 @@ void SurfaceImpl::FillRectangle(PRectangle rc, Surface &surfacePattern) {
     if (((SurfaceImpl&)surfacePattern).bitmap)
         br = wxBrush(*((SurfaceImpl&)surfacePattern).bitmap);
     else    // Something is wrong so display in red
-        br = wxBrush(*wxRED, wxSOLID);
+        br = wxBrush(*wxRED);
     hdc->SetPen(*wxTRANSPARENT_PEN);
     hdc->SetBrush(br);
     hdc->DrawRectangle(wxRectFromPRectangle(rc));
@@ -366,6 +368,7 @@ void SurfaceImpl::AlphaRectangle(PRectangle rc, int cornerSize,
                                  ColourAllocated fill, int alphaFill,
                                  ColourAllocated outline, int alphaOutline,
                                  int /*flags*/) {
+#ifdef wxHAS_RAW_BITMAP
 
     // TODO:  do something with cornerSize
     wxUnusedVar(cornerSize);
@@ -426,6 +429,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) {
@@ -475,13 +485,13 @@ void SurfaceImpl::DrawTextTransparent(PRectangle rc, Font &font, int ybase,
 
     SetFont(font);
     hdc->SetTextForeground(wxColourFromCA(fore));
-    hdc->SetBackgroundMode(wxTRANSPARENT);
+    hdc->SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
 
     // ybase is where the baseline should be, but wxWin uses the upper left
     // corner, so I need to calculate the real position for the text...
     hdc->DrawText(stc2wx(s, len), rc.left, ybase - font.ascent);
 
-    hdc->SetBackgroundMode(wxSOLID);
+    hdc->SetBackgroundMode(wxBRUSHSTYLE_SOLID);
 }
 
 
@@ -1420,7 +1430,7 @@ long Platform::SendScintillaPointer(WindowID w,
                                     void *lParam) {
 
     wxStyledTextCtrl* stc = (wxStyledTextCtrl*)w;
-    return stc->SendMsg(msg, wParam, (long)lParam);
+    return stc->SendMsg(msg, wParam, (wxIntPtr)lParam);
 }