wxX11 STL-ification.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23536 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -24,7 +24,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/scrolwin.h"
|
#include "wx/scrolwin.h"
|
||||||
#include "wx/dynarray.h"
|
#include "wx/arrstr.h"
|
||||||
#include "wx/datetime.h"
|
#include "wx/datetime.h"
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -101,6 +101,7 @@ public:
|
|||||||
long style = 0,
|
long style = 0,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString &name = wxTextCtrlNameStr);
|
const wxString &name = wxTextCtrlNameStr);
|
||||||
|
virtual ~wxTextCtrl();
|
||||||
|
|
||||||
bool Create(wxWindow *parent,
|
bool Create(wxWindow *parent,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
|
@@ -157,8 +157,6 @@ void wxTextCtrl::Init()
|
|||||||
m_editable = TRUE;
|
m_editable = TRUE;
|
||||||
m_modified = FALSE;
|
m_modified = FALSE;
|
||||||
|
|
||||||
m_undos.DeleteContents( TRUE );
|
|
||||||
|
|
||||||
m_lang = wxSOURCE_LANG_NONE;
|
m_lang = wxSOURCE_LANG_NONE;
|
||||||
|
|
||||||
m_capturing = FALSE;
|
m_capturing = FALSE;
|
||||||
@@ -202,6 +200,11 @@ wxTextCtrl::wxTextCtrl( wxWindow *parent,
|
|||||||
Create( parent, id, value, pos, size, style, validator, name );
|
Create( parent, id, value, pos, size, style, validator, name );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxTextCtrl::~wxTextCtrl()
|
||||||
|
{
|
||||||
|
WX_CLEAR_LIST(wxList, m_undos);
|
||||||
|
}
|
||||||
|
|
||||||
bool wxTextCtrl::Create( wxWindow *parent,
|
bool wxTextCtrl::Create( wxWindow *parent,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
const wxString &value,
|
const wxString &value,
|
||||||
@@ -398,7 +401,7 @@ void wxTextCtrl::Clear()
|
|||||||
|
|
||||||
SetScrollbars( m_charWidth, m_lineHeight, 0, 0, 0, 0 );
|
SetScrollbars( m_charWidth, m_lineHeight, 0, 0, 0, 0 );
|
||||||
Refresh();
|
Refresh();
|
||||||
m_undos.Clear();
|
WX_CLEAR_LIST(wxList, m_undos);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTextCtrl::Replace(long from, long to, const wxString& value)
|
void wxTextCtrl::Replace(long from, long to, const wxString& value)
|
||||||
@@ -795,12 +798,13 @@ void wxTextCtrl::Undo()
|
|||||||
{
|
{
|
||||||
if (m_undos.GetCount() == 0) return;
|
if (m_undos.GetCount() == 0) return;
|
||||||
|
|
||||||
wxList::Node *node = m_undos.Item( m_undos.GetCount()-1 );
|
wxList::compatibility_iterator node = m_undos.Item( m_undos.GetCount()-1 );
|
||||||
wxSourceUndoStep *undo = (wxSourceUndoStep*) node->GetData();
|
wxSourceUndoStep *undo = (wxSourceUndoStep*) node->GetData();
|
||||||
|
|
||||||
undo->Undo();
|
undo->Undo();
|
||||||
|
|
||||||
delete node;
|
delete undo;
|
||||||
|
m_undos.Erase( node );
|
||||||
|
|
||||||
m_modified = TRUE;
|
m_modified = TRUE;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user