///////////////////////////////////////////////////////////////////////////////
-// Name: textctrl.h
+// Name: wx/textctrl.h
// Purpose: wxTextCtrlBase class - the interface of wxTextCtrl
// Author: Vadim Zeitlin
// Modified by:
#define wxTE_WORDWRAP 0x0001 // wrap only at words boundaries
#define wxTE_BESTWRAP 0x0000 // this is the default
-// obsolete synonym
-#define wxTE_LINEWRAP wxTE_CHARWRAP
+#if WXWIN_COMPATIBILITY_2_6
+ // obsolete synonym
+ #define wxTE_LINEWRAP wxTE_CHARWRAP
+#endif // WXWIN_COMPATIBILITY_2_6
// force using RichEdit version 2.0 or 3.0 instead of 1.0 (default) for
// wxTE_RICH controls - can be used together with or instead of wxTE_RICH
// operations
void Init();
+ // merges the attributes of the base and the overlay objects and returns
+ // the result; the parameter attributes take precedence
+ //
+ // WARNING: the order of arguments is the opposite of Combine()
+ static wxTextAttr Merge(const wxTextAttr& base, const wxTextAttr& overlay)
+ {
+ return Combine(overlay, base, NULL);
+ }
+
+ // merges the attributes of this object and overlay
+ void Merge(const wxTextAttr& overlay)
+ {
+ *this = Merge(*this, overlay);
+ }
+
+
// operators
void operator= (const wxTextAttr& attr);
// sets/clears the dirty flag
virtual void MarkDirty() = 0;
virtual void DiscardEdits() = 0;
+ void SetModified(bool modified)
+ {
+ if ( modified )
+ MarkDirty();
+ else
+ DiscardEdits();
+ }
// set the max number of characters which may be entered in a single line
// text control