]> git.saurik.com Git - wxWidgets.git/blobdiff - src/richtext/richtextctrl.cpp
Fix wxHtmlHelpData::SetTempDir() to behave correctly without trailing slash.
[wxWidgets.git] / src / richtext / richtextctrl.cpp
index 8ece5a710d7227a312fd338be5b1854447c3dde2..69151389e1e1145a1fc3087121ab918cf8f54e0e 100644 (file)
@@ -4,7 +4,6 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     2005-09-30
-// RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -2665,7 +2664,7 @@ bool wxRichTextCtrl::RecreateBuffer(const wxSize& size)
 // ----------------------------------------------------------------------------
 // file IO functions
 // ----------------------------------------------------------------------------
-
+#if wxUSE_FFILE && wxUSE_STREAMS
 bool wxRichTextCtrl::DoLoadFile(const wxString& filename, int fileType)
 {
     SetFocusObject(& GetBuffer(), true);
@@ -2707,6 +2706,7 @@ bool wxRichTextCtrl::DoSaveFile(const wxString& filename, int fileType)
 
     return false;
 }
+#endif // wxUSE_FFILE && wxUSE_STREAMS
 
 // ----------------------------------------------------------------------------
 // wxRichTextCtrl specific functionality
@@ -4863,8 +4863,15 @@ void wxRichTextCaret::Refresh()
 
 void wxRichTextCaret::DoDraw(wxDC *dc)
 {
-    dc->SetBrush((m_hasFocus ? m_caretBrush : *wxTRANSPARENT_BRUSH));
-    dc->SetPen(m_caretPen);
+    wxBrush brush(m_caretBrush);
+    wxPen pen(m_caretPen);
+    if (m_richTextCtrl && m_richTextCtrl->GetBasicStyle().HasTextColour())
+    {
+        brush = wxBrush(m_richTextCtrl->GetBasicStyle().GetTextColour());
+        pen = wxPen(m_richTextCtrl->GetBasicStyle().GetTextColour());
+    }
+    dc->SetBrush((m_hasFocus ? brush : *wxTRANSPARENT_BRUSH));
+    dc->SetPen(pen);
 
     wxPoint pt(m_x, m_y);