X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/41a852156fab5ee6075b3ab92f8230989547daac..07d02e9ee0fe990aeb81e152a668d0011659b5c7:/src/richtext/richtextformatdlg.cpp diff --git a/src/richtext/richtextformatdlg.cpp b/src/richtext/richtextformatdlg.cpp index bfe3c2565c..018bbb7760 100644 --- a/src/richtext/richtextformatdlg.cpp +++ b/src/richtext/richtextformatdlg.cpp @@ -57,8 +57,11 @@ #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(); } }