Added DoDragOver and DoDropText from Angelo Mandato, and ensured that

my unicode LoadFile/SaveFile changes were in the .in file this time.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23690 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2003-09-18 22:28:25 +00:00
parent 86c8acb774
commit 4a65f2c80d
8 changed files with 102 additions and 18 deletions

View File

@@ -2117,9 +2117,9 @@ bool wxStyledTextCtrl::SaveFile(const wxString& filename)
bool success = file.Write(GetText(), *wxConvCurrent);
if (success) {
if (success)
SetSavePoint();
}
return success;
}
@@ -2136,14 +2136,13 @@ bool wxStyledTextCtrl::LoadFile(const wxString& filename)
#else
wxString buffer;
#endif
off_t len = file.Length();
if (len > 0)
{
void *bufptr = buffer.GetWriteBuf(len);
success = (file.Read(bufptr, len) == len);
buffer.UngetWriteBuf(len);
#if wxUSE_UNICODE
#if #wxUSE_UNICODE
contents = wxString(buffer, *wxConvCurrent);
#else
contents = buffer;
@@ -2164,6 +2163,16 @@ bool wxStyledTextCtrl::LoadFile(const wxString& filename)
}
wxDragResult wxStyledTextCtrl::DoDragOver(wxCoord x, wxCoord y, wxDragResult def) {
return m_swx->DoDragOver(x, y, def);
}
bool wxStyledTextCtrl::DoDropText(long x, long y, const wxString& data) {
return m_swx->DoDropText(x, y, data);
}
//----------------------------------------------------------------------
// Event handlers