X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/40ff126ac4ff57ab4aa22a5c7c7ce621479e8739..e80edb8515cc574f8ad264f47bd9cfe9501cfc97:/include/wx/textctrl.h?ds=sidebyside diff --git a/include/wx/textctrl.h b/include/wx/textctrl.h index 03223d6957..65e6b90d54 100644 --- a/include/wx/textctrl.h +++ b/include/wx/textctrl.h @@ -197,6 +197,22 @@ public: // 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); @@ -315,6 +331,13 @@ public: // 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 @@ -408,6 +431,7 @@ protected: wxTextAttr m_defaultStyle; DECLARE_NO_COPY_CLASS(wxTextCtrlBase) + DECLARE_ABSTRACT_CLASS(wxTextCtrlBase) }; // ----------------------------------------------------------------------------