Source cleaning: whitespaces, tabs, TRUE/true, FALSE/false, -1/wxID_ANY/wxDefaultCoord/wxNOT_FOUND.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29494 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2004-09-28 15:13:27 +00:00
parent 8a68e8dbbe
commit 7e126a0784
16 changed files with 338 additions and 344 deletions

View File

@@ -54,7 +54,7 @@ static wxColour wxColourFromLong(long c) {
static wxColour wxColourFromSpec(const wxString& spec) {
// spec should be a colour name or "#RRGGBB"
if (spec.GetChar(0) == wxT('#')) {
long red, green, blue;
red = green = blue = 0;
spec.Mid(1,2).ToLong(&red, 16);
@@ -120,7 +120,7 @@ BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl)
EVT_SYS_COLOUR_CHANGED (wxStyledTextCtrl::OnSysColourChanged)
EVT_ERASE_BACKGROUND (wxStyledTextCtrl::OnEraseBackground)
EVT_MENU_RANGE (10, 16, wxStyledTextCtrl::OnMenu)
EVT_LISTBOX_DCLICK (-1, wxStyledTextCtrl::OnListBox)
EVT_LISTBOX_DCLICK (wxID_ANY, wxStyledTextCtrl::OnListBox)
END_EVENT_TABLE()
@@ -166,7 +166,7 @@ void wxStyledTextCtrl::Create(wxWindow *parent,
#endif
m_swx = new ScintillaWX(this);
m_stopWatch.Start();
m_lastKeyDownConsumed = FALSE;
m_lastKeyDownConsumed = false;
m_vScrollBar = NULL;
m_hScrollBar = NULL;
#if wxUSE_UNICODE
@@ -497,7 +497,7 @@ void wxStyledTextCtrl::MarkerDefineBitmap(int markerNumber, const wxBitmap& bmp)
buff[len] = 0;
SendMsg(2049, markerNumber, (long)buff);
delete [] buff;
}
// Set a margin to be either numeric or symbolic.
@@ -881,7 +881,7 @@ void wxStyledTextCtrl::RegisterImage(int type, const wxBitmap& bmp) {
buff[len] = 0;
SendMsg(2405, type, (long)buff);
delete [] buff;
}
// Clear all the registered images.
@@ -1056,7 +1056,7 @@ int wxStyledTextCtrl::FindText(int minPos, int maxPos,
int startPos,
int endPos,
wxDC* draw,
wxDC* target,
wxDC* target,
wxRect renderRect,
wxRect pageRect) {
RangeToFormat fr;
@@ -2566,7 +2566,7 @@ bool wxStyledTextCtrl::SaveFile(const wxString& filename)
wxFile file(filename, wxFile::write);
if (!file.IsOpened())
return FALSE;
return false;
bool success = file.Write(GetText(), *wxConvCurrent);
@@ -2584,13 +2584,13 @@ bool wxStyledTextCtrl::LoadFile(const wxString& filename)
if (file.IsOpened())
{
wxString contents;
off_t len = file.Length();
size_t len = file.Length();
if (len > 0)
{
#if wxUSE_UNICODE
wxMemoryBuffer buffer(len+1);
success = (file.Read(buffer.GetData(), len) == len);
if (success) {
if (success) {
((char*)buffer.GetData())[len] = 0;
contents = wxString(buffer, *wxConvCurrent, len);
}
@@ -2601,7 +2601,7 @@ bool wxStyledTextCtrl::LoadFile(const wxString& filename)
#endif
}
else
success = true; // empty file is ok
success = true; // empty file is ok
if (success)
{
@@ -2616,12 +2616,12 @@ bool wxStyledTextCtrl::LoadFile(const wxString& filename)
#if wxUSE_DRAG_AND_DROP
wxDragResult wxStyledTextCtrl::DoDragOver(wxCoord x, wxCoord y, wxDragResult def) {
return m_swx->DoDragOver(x, y, def);
}
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) {
bool wxStyledTextCtrl::DoDropText(long x, long y, const wxString& data) {
return m_swx->DoDropText(x, y, data);
}
#endif
@@ -2982,7 +2982,7 @@ wxStyledTextEvent::wxStyledTextEvent(wxEventType commandType, int id)
m_listType = 0;
m_x = 0;
m_y = 0;
m_dragAllowMove = FALSE;
m_dragAllowMove = false;
#if wxUSE_DRAG_AND_DROP
m_dragResult = wxDragNone;
#endif