]> git.saurik.com Git - wxWidgets.git/blobdiff - src/richtext/richtextctrl.cpp
Some documentation enhancements for wxRichTextCtrl
[wxWidgets.git] / src / richtext / richtextctrl.cpp
index 636c49443972f05c48317d86accc05b5cd23aee8..bac9d50f61c1607274409740c274e78c069433c6 100644 (file)
@@ -109,18 +109,22 @@ wxRichTextCtrl::wxRichTextCtrl(wxWindow* parent,
                                const wxString& value,
                                const wxPoint& pos,
                                const wxSize& size,
-                               long style)
+                               long style,
+                               const wxValidator& validator,
+                               const wxString& name)
               : wxScrollHelper(this)
 {
     Init();
-    Create(parent, id, value, pos, size, style);
+    Create(parent, id, value, pos, size, style, validator, name);
 }
 
 /// Creation
-bool wxRichTextCtrl::Create( wxWindow* parent, wxWindowID id, const wxString& value, const wxPoint& pos, const wxSize& size, long style)
+bool wxRichTextCtrl::Create( wxWindow* parent, wxWindowID id, const wxString& value, const wxPoint& pos, const wxSize& size, long style,
+                             const wxValidator& validator, const wxString& name)
 {
     if (!wxTextCtrlBase::Create(parent, id, pos, size,
-                                style|wxFULL_REPAINT_ON_RESIZE))
+                                style|wxFULL_REPAINT_ON_RESIZE,
+                                validator, name))
         return false;
 
     if (!GetFont().Ok())
@@ -137,6 +141,7 @@ bool wxRichTextCtrl::Create( wxWindow* parent, wxWindowID id, const wxString& va
     if (style & wxTE_READONLY)
         SetEditable(false);
 
+    // The base attributes must all have default values
     wxTextAttrEx attributes;
     attributes.SetFont(GetFont());
     attributes.SetTextColour(*wxBLACK);
@@ -145,6 +150,8 @@ bool wxRichTextCtrl::Create( wxWindow* parent, wxWindowID id, const wxString& va
     attributes.SetLineSpacing(10);
     attributes.SetParagraphSpacingAfter(10);
     attributes.SetParagraphSpacingBefore(0);
+    attributes.SetTextEffects(0);
+    attributes.SetTextEffectFlags(wxTEXT_ATTR_EFFECT_STRIKETHROUGH|wxTEXT_ATTR_EFFECT_CAPITALS);
 
     SetBasicStyle(attributes);