// headers
// ----------------------------------------------------------------------------
-#if defined(__GNUG__) && !defined(__APPLE__)
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "textctrlbase.h"
#endif
virtual bool LoadFile(const wxString& file);
virtual bool SaveFile(const wxString& file = wxEmptyString);
- // clears the dirty flag
+ // sets/clears the dirty flag
+ virtual void MarkDirty() = 0;
virtual void DiscardEdits() = 0;
// set the max number of characters which may be entered in a single line
wxTextCtrl& operator<<(const wxChar c);
// do the window-specific processing after processing the update event
- virtual void DoUpdateWindowUI(wxUpdateUIEvent& event) ;
+ virtual void DoUpdateWindowUI(wxUpdateUIEvent& event);
- // obsolete functions
-#if WXWIN_COMPATIBILITY
- bool Modified() const { return IsModified(); }
-#endif
+ virtual bool ShouldInheritColours() const { return false; }
protected:
// the name of the last file loaded with LoadFile() which will be used by
// the text style which will be used for any new text added to the control
wxTextAttr m_defaultStyle;
+
+ DECLARE_NO_COPY_CLASS(wxTextCtrlBase)
};
// ----------------------------------------------------------------------------
m_end;
private:
- DECLARE_DYNAMIC_CLASS(wxTextUrlEvent)
+ DECLARE_DYNAMIC_CLASS_NO_COPY(wxTextUrlEvent)
public:
// for wxWin RTTI only, don't use
class WXDLLEXPORT wxStreamToTextRedirector
{
-public:
- wxStreamToTextRedirector(wxTextCtrl *text, wxSTD ostream *ostr = NULL)
- : m_ostr(ostr ? *ostr : wxSTD cout)
+private:
+ void Init(wxTextCtrl *text)
{
m_sbufOld = m_ostr.rdbuf();
m_ostr.rdbuf(text);
}
+public:
+ wxStreamToTextRedirector(wxTextCtrl *text)
+ : m_ostr(wxSTD cout)
+ {
+ Init(text);
+ }
+
+ wxStreamToTextRedirector(wxTextCtrl *text, wxSTD ostream *ostr)
+ : m_ostr(*ostr)
+ {
+ Init(text);
+ }
+
~wxStreamToTextRedirector()
{
m_ostr.rdbuf(m_sbufOld);