added wxTextCtrl::MarkDirty()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23845 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2003-09-23 00:09:18 +00:00
parent ff1b5f81af
commit 3a9fa0d6b5
19 changed files with 62 additions and 9 deletions

View File

@ -53,6 +53,7 @@ All (GUI):
- added some support for C++ exceptions in the library (do read the manual!)
- added wxListCtrl::GetViewRect()
- added wxTextCtrl::MarkDirty()
wxMSW:

View File

@ -76,6 +76,7 @@ public:
virtual void Remove(long from, long to);
// clears the dirty flag
virtual void MarkDirty();
virtual void DiscardEdits();
// writing text inserts it at the current position, appending always

View File

@ -65,7 +65,8 @@ public:
virtual void Replace(long from, long to, const wxString& value);
virtual void Remove(long from, long to);
// clears the dirty flag
// sets/clears the dirty flag
virtual void MarkDirty();
virtual void DiscardEdits();
virtual void SetMaxLength(unsigned long len);

View File

@ -65,7 +65,8 @@ public:
virtual void Replace(long from, long to, const wxString& value);
virtual void Remove(long from, long to);
// clears the dirty flag
// sets/clears the dirty flag
virtual void MarkDirty();
virtual void DiscardEdits();
virtual void SetMaxLength(unsigned long len);

View File

@ -76,7 +76,8 @@ public:
// load the controls contents from the file
virtual bool LoadFile(const wxString& file);
// clears the dirty flag
// sets/clears the dirty flag
virtual void MarkDirty();
virtual void DiscardEdits();
// set the max number of characters which may be entered in a single line

View File

@ -86,6 +86,7 @@ public:
virtual void WriteText(const wxString& text);
virtual void AppendText(const wxString& text);
virtual void MarkDirty();
virtual void DiscardEdits();
virtual bool IsModified() const;

View File

@ -74,6 +74,7 @@ public:
virtual bool LoadFile(const wxString& file);
// clears the dirty flag
virtual void MarkDirty();
virtual void DiscardEdits();
virtual void SetMaxLength(unsigned long len);

View File

@ -74,6 +74,7 @@ public:
virtual bool LoadFile(const wxString& rsFile);
virtual void MarkDirty();
virtual void DiscardEdits(void);
virtual void WriteText(const wxString& rsText);

View File

@ -262,7 +262,8 @@ public:
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

View File

@ -152,7 +152,8 @@ public:
virtual void Replace(wxTextPos from, wxTextPos to, const wxString& value);
virtual void Remove(wxTextPos from, wxTextPos to);
// clears the dirty flag
// sets/clears the dirty flag
virtual void MarkDirty();
virtual void DiscardEdits();
// writing text inserts it at the current position, appending always

View File

@ -72,6 +72,10 @@ void wxTextCtrl::SetEditable(bool)
{
}
void wxTextCtrl::MarkDirty()
{
}
void wxTextCtrl::DiscardEdits()
{
}

View File

@ -905,6 +905,11 @@ void wxTextCtrl::OnParentEnable( bool enable )
}
}
void wxTextCtrl::MarkDirty()
{
m_modified = TRUE;
}
void wxTextCtrl::DiscardEdits()
{
m_modified = FALSE;

View File

@ -905,6 +905,11 @@ void wxTextCtrl::OnParentEnable( bool enable )
}
}
void wxTextCtrl::MarkDirty()
{
m_modified = TRUE;
}
void wxTextCtrl::DiscardEdits()
{
m_modified = FALSE;

View File

@ -1433,7 +1433,12 @@ bool wxTextCtrl::CanRedo() const
return FALSE ;
}
// Makes 'unmodified'
// Makes modifie or unmodified
void wxTextCtrl::MarkDirty()
{
m_dirty = true;
}
void wxTextCtrl::DiscardEdits()
{
m_dirty = false;

View File

@ -1433,7 +1433,12 @@ bool wxTextCtrl::CanRedo() const
return FALSE ;
}
// Makes 'unmodified'
// Makes modifie or unmodified
void wxTextCtrl::MarkDirty()
{
m_dirty = true;
}
void wxTextCtrl::DiscardEdits()
{
m_dirty = false;

View File

@ -420,7 +420,12 @@ bool wxTextCtrl::IsModified() const
return m_modified;
}
// Makes 'unmodified'
// Makes modified or unmodified
void wxTextCtrl::MarkDirty()
{
m_modified = FALSE;
}
void wxTextCtrl::DiscardEdits()
{
m_modified = FALSE;

View File

@ -1261,7 +1261,11 @@ bool wxTextCtrl::IsModified() const
return SendMessage(GetHwnd(), EM_GETMODIFY, 0, 0) != 0;
}
// Makes 'unmodified'
void wxTextCtrl::MarkDirty()
{
SendMessage(GetHwnd(), EM_SETMODIFY, TRUE, 0L);
}
void wxTextCtrl::DiscardEdits()
{
SendMessage(GetHwnd(), EM_SETMODIFY, FALSE, 0L);

View File

@ -710,6 +710,11 @@ bool wxTextCtrl::IsModified() const
return bRc;
} // end of wxTextCtrl::IsModified
void wxTextCtrl::MarkDirty()
{
wxFAIL_MSG( _T("not implemented") );
}
//
// Makes 'unmodified'
//

View File

@ -1585,6 +1585,11 @@ bool wxTextCtrl::IsEditable() const
return m_isEditable && IsEnabled();
}
void wxTextCtrl::MarkDirty()
{
m_isModified = TRUE;
}
void wxTextCtrl::DiscardEdits()
{
m_isModified = FALSE;