]> git.saurik.com Git - wxWidgets.git/blobdiff - src/stc/ScintillaWX.cpp
Added ability to switch off more components of the size page UI
[wxWidgets.git] / src / stc / ScintillaWX.cpp
index 905bcec38c921dbee6e2c0a9227360d8f6d52210..90779336696f95d3832491d179269ae123865c7e 100644 (file)
@@ -132,7 +132,7 @@ public:
     void OnPaint(wxPaintEvent& WXUNUSED(evt))
     {
         wxAutoBufferedPaintDC dc(this);
     void OnPaint(wxPaintEvent& WXUNUSED(evt))
     {
         wxAutoBufferedPaintDC dc(this);
-        Surface* surfaceWindow = Surface::Allocate();
+        Surface* surfaceWindow = Surface::Allocate(0);
         surfaceWindow->Init(&dc, m_ct->wDraw.GetID());
         m_ct->PaintCT(surfaceWindow);
         surfaceWindow->Release();
         surfaceWindow->Init(&dc, m_ct->wDraw.GetID());
         m_ct->PaintCT(surfaceWindow);
         surfaceWindow->Release();
@@ -671,6 +671,8 @@ sptr_t ScintillaWX::DefWndProc(unsigned int /*iMessage*/, uptr_t /*wParam*/, spt
 
 sptr_t ScintillaWX::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
       switch (iMessage) {
 
 sptr_t ScintillaWX::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
       switch (iMessage) {
+#if 0  // TODO: check this
+          
       case SCI_CALLTIPSHOW: {
           // NOTE: This is copied here from scintilla/src/ScintillaBase.cxx
           // because of the little tweak that needs done below for wxGTK.
       case SCI_CALLTIPSHOW: {
           // NOTE: This is copied here from scintilla/src/ScintillaBase.cxx
           // because of the little tweak that needs done below for wxGTK.
@@ -711,6 +713,7 @@ sptr_t ScintillaWX::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam)
           ct.wCallTip.Show();
           break;
       }
           ct.wCallTip.Show();
           break;
       }
+#endif
 
 #ifdef SCI_LEXER
       case SCI_LOADLEXERLIBRARY:
 
 #ifdef SCI_LEXER
       case SCI_LOADLEXERLIBRARY:
@@ -745,8 +748,16 @@ void ScintillaWX::DoPaint(wxDC* dc, wxRect rect) {
 
     if (paintState == paintAbandoned) {
         // Painting area was insufficient to cover new styling or brace
 
     if (paintState == paintAbandoned) {
         // Painting area was insufficient to cover new styling or brace
-        // highlight positions
+        // highlight positions.  So trigger a new paint event that will
+        // repaint the whole window.
+        stc->Refresh(false);
+        
+#if defined(__WXOSX__)
+        // On Mac we also need to finish the current paint to make sure that
+        // everything is on the screen that needs to be there between now and
+        // when the next paint event arrives.
         FullPaintDC(dc);
         FullPaintDC(dc);
+#endif
     }
     paintState = notPainting;
 }
     }
     paintState = notPainting;
 }
@@ -754,8 +765,8 @@ void ScintillaWX::DoPaint(wxDC* dc, wxRect rect) {
 
 // Force the whole window to be repainted
 void ScintillaWX::FullPaint() {
 
 // Force the whole window to be repainted
 void ScintillaWX::FullPaint() {
-    wxClientDC dc(stc);
-    FullPaintDC(&dc);
+    stc->Refresh(false);
+    stc->Update();
 }
 
 
 }