+}
+
+//-----------------------------------------------------------------------------
+// wxListTextCtrl (internal)
+//-----------------------------------------------------------------------------
+
+IMPLEMENT_DYNAMIC_CLASS(wxListTextCtrl,wxTextCtrl);
+
+BEGIN_EVENT_TABLE(wxListTextCtrl,wxTextCtrl)
+ EVT_CHAR (wxListTextCtrl::OnChar)
+ EVT_KILL_FOCUS (wxListTextCtrl::OnKillFocus)
+END_EVENT_TABLE()
+
+wxListTextCtrl::wxListTextCtrl( wxWindow *parent, const wxWindowID id,
+ bool *accept, wxString *res, wxListMainWindow *owner,
+ const wxString &value, const wxPoint &pos, const wxSize &size,
+ int style, const wxValidator& validator, const wxString &name ) :
+ wxTextCtrl( parent, id, value, pos, size, style, validator, name )
+{
+ m_res = res;
+ m_accept = accept;
+ m_owner = owner;
+}
+
+void wxListTextCtrl::OnChar( wxKeyEvent &event )
+{
+ if (event.m_keyCode == WXK_RETURN)
+ {
+ (*m_accept) = TRUE;
+ (*m_res) = GetValue();
+ m_owner->OnRenameAccept();
+// Show( FALSE );
+ Destroy();
+ return;
+ }
+ if (event.m_keyCode == WXK_ESCAPE)
+ {
+ (*m_accept) = FALSE;
+ (*m_res) = "";
+// Show( FALSE );
+ Destroy();
+ return;
+ }
+ event.Skip();
+}
+
+void wxListTextCtrl::OnKillFocus( wxFocusEvent &WXUNUSED(event) )
+{
+ (*m_accept) = FALSE;
+ (*m_res) = "";
+// Show( FALSE );
+ Destroy();
+ return;
+}