]> git.saurik.com Git - wxWidgets.git/blobdiff - src/stc/PlatWX.cpp
use INVALID_SOCKET instead of -1 to avoid signed/unsigned comparison warning
[wxWidgets.git] / src / stc / PlatWX.cpp
index 6a5cc02735f65c9277518ca1d763096b618225b0..a58a60d8f5086e2d515a01d2e4de72ae10ee51c0 100644 (file)
@@ -32,7 +32,7 @@
 #include "wx/imaglist.h"
 #include "wx/tokenzr.h"
 
-#ifdef wxHAVE_RAW_BITMAP
+#ifdef wxHAS_RAW_BITMAP
 #include "wx/rawbmp.h"
 #endif
 
@@ -291,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_) {
@@ -346,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));
@@ -368,7 +368,7 @@ void SurfaceImpl::AlphaRectangle(PRectangle rc, int cornerSize,
                                  ColourAllocated fill, int alphaFill,
                                  ColourAllocated outline, int alphaOutline,
                                  int /*flags*/) {
-#ifdef wxHAVE_RAW_BITMAP
+#ifdef wxHAS_RAW_BITMAP
 
     // TODO:  do something with cornerSize
     wxUnusedVar(cornerSize);
@@ -485,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);
 }
 
 
@@ -677,7 +677,7 @@ void Window::SetFont(Font &font) {
 }
 
 void Window::SetCursor(Cursor curs) {
-    int cursorId;
+    wxStockCursor cursorId;
 
     switch (curs) {
     case cursorText:
@@ -708,16 +708,13 @@ void Window::SetCursor(Cursor curs) {
         cursorId = wxCURSOR_ARROW;
         break;
     }
-#ifdef __WXMOTIF__
-       wxCursor wc = wxStockCursor(cursorId) ;
-#else
-       wxCursor wc = wxCursor(cursorId) ;
-#endif
-       if(curs != cursorLast)
-       {
-           GETWIN(id)->SetCursor(wc);
-           cursorLast = curs;
-       }
+
+    wxCursor wc = wxCursor(cursorId);
+    if(curs != cursorLast)
+    {
+        GETWIN(id)->SetCursor(wc);
+        cursorLast = curs;
+    }
 }
 
 
@@ -1430,7 +1427,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);
 }