]> git.saurik.com Git - wxWidgets.git/blobdiff - src/richtext/richtextformatdlg.cpp
fixed all the other ports broken by controls labels in wxToolBar patch commit
[wxWidgets.git] / src / richtext / richtextformatdlg.cpp
index bfe3c2565c385f7ed76bf33985c9fad5d18a62a1..018bbb77605fc37086d99412c1b90337907dc8f9 100644 (file)
 #include "richtextindentspage.cpp"
 #include "richtexttabspage.cpp"
 #include "richtextbulletspage.cpp"
+// Digital Mars can't cope with this much code
+#ifndef __DMC__
+  #include "richtextliststylepage.cpp"
+#endif
 #include "richtextstylepage.cpp"
-#include "richtextliststylepage.cpp"
 #endif
 
 #if 0 // def __WXMAC__
@@ -290,12 +293,14 @@ wxPanel* wxRichTextFormattingDialogFactory::CreatePage(int page, wxString& title
         title = _("Bullets");
         return page;
     }
+#ifndef __DMC__
     else if (page == wxRICHTEXT_FORMAT_LIST_STYLE)
     {
         wxRichTextListStylePage* page = new wxRichTextListStylePage(dialog->GetBookCtrl(), wxID_ANY);
         title = _("List Style");
         return page;
     }
+#endif
     else
         return NULL;
 }
@@ -320,7 +325,11 @@ int wxRichTextFormattingDialogFactory::GetPageId(int i) const
 /// Get the number of available page identifiers
 int wxRichTextFormattingDialogFactory::GetPageIdCount() const
 {
+#ifdef __DMC__
+    return 5;
+#else
     return 6;
+#endif
 }
 
 /// Set the sheet style, called at the start of wxRichTextFormattingDialog::Create
@@ -399,6 +408,8 @@ void wxRichTextFontPreviewCtrl::OnPaint(wxPaintEvent& WXUNUSED(event))
         long w = 0, h = 0;
 
         wxString text(_("ABCDEFGabcdefg12345"));
+        if (GetTextEffects() & wxTEXT_ATTR_EFFECT_CAPITALS)
+            text.MakeUpper();
 
         dc.GetTextExtent( text, &w, &h);
         int cx = wxMax(2, (size.x/2) - (w/2));
@@ -407,6 +418,13 @@ void wxRichTextFontPreviewCtrl::OnPaint(wxPaintEvent& WXUNUSED(event))
         dc.SetTextForeground(GetForegroundColour());
         dc.SetClippingRegion(2, 2, size.x-4, size.y-4);
         dc.DrawText(text, cx, cy);
+        
+        if (GetTextEffects() & wxTEXT_ATTR_EFFECT_STRIKETHROUGH)
+        {
+            dc.SetPen(wxPen(GetForegroundColour(), 1));
+            dc.DrawLine(cx, (int) (cy + h/2 + 0.5), cx + w, (int) (cy + h/2 + 0.5));
+        }
+        
         dc.DestroyClippingRegion();
     }
 }