No changes, just refactor wxTextCtrl::SetStyle() in wxMSW.
Split this overly long function into MSWSetCharFormat() and MSWSetParaFormat(). No real changes otherwise except for the use of PARAFORMAT instead of PARAFORMAT2 if wxUSE_RICHEDIT2 is not set as it was certainly intended (but the fact that nobody complained about this problem means that nobody must be compiling without wxUSE_RICHEDIT2 by now so arguably we should just remove it completely). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65564 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -236,6 +236,19 @@ protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
#if wxUSE_RICHEDIT
|
||||
// Apply the character-related parts of wxTextAttr to the given selection
|
||||
// or the entire control if start == end == -1.
|
||||
//
|
||||
// This function is private and should only be called for rich edit
|
||||
// controls and with (from, to) already in correct order, i.e. from <= to.
|
||||
bool MSWSetCharFormat(const wxTextAttr& attr, long from = -1, long to = -1);
|
||||
|
||||
// Same as above for paragraph-related parts of wxTextAttr. Note that this
|
||||
// can only be applied to the selection as RichEdit doesn't support setting
|
||||
// the paragraph styles globally.
|
||||
bool MSWSetParaFormat(const wxTextAttr& attr, long from, long to);
|
||||
|
||||
|
||||
// we're using RICHEDIT (and not simple EDIT) control if this field is not
|
||||
// 0, it also gives the version of the RICHEDIT control being used
|
||||
// (although not directly: 1 is for 1.0, 2 is for either 2.0 or 3.0 as we
|
||||
|
Reference in New Issue
Block a user