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

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29185 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2004-09-17 22:23:59 +00:00
parent 600902562d
commit 4e32eea148
15 changed files with 123 additions and 123 deletions

View File

@@ -4,7 +4,7 @@
// Author: John Labenski and others
// Modified by:
// Created: 02/02/03
// RCS-ID:
// RCS-ID:
// Copyright: (c)
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@@ -25,7 +25,7 @@
#define wxFinite(x) _finite(x)
#elif defined(__GNUG__)||defined(__GNUWIN32__)||defined(__DJGPP__)|| \
defined(__SGI_CC__)||defined(__SUNCC__)||defined(__XLC__)|| \
defined(__HPUX__)||defined(__MWERKS__)
defined(__HPUX__)||defined(__MWERKS__)
#define wxFinite(x) finite(x)
#else
#define wxFinite(x) ((x) == (x))
@@ -36,8 +36,8 @@
#define wxIsNaN(x) _isnan(x)
#elif defined(__GNUG__)||defined(__GNUWIN32__)||defined(__DJGPP__)|| \
defined(__SGI_CC__)||defined(__SUNCC__)||defined(__XLC__)|| \
defined(__HPUX__)||defined(__MWERKS__)
#define wxIsNaN(x) isnan(x)
defined(__HPUX__)||defined(__MWERKS__)
#define wxIsNaN(x) isnan(x)
#else
#define wxIsNaN(x) ((x) != (x))
#endif

View File

@@ -122,7 +122,7 @@ public:
//!code: | -1 0 0 |
//!code: matrix' = | 0 -1 0 | x matrix
//!code: | 0 0 1 |
wxTransformMatrix& Mirror(bool x=TRUE, bool y=FALSE);
wxTransformMatrix& Mirror(bool x=true, bool y=false);
// Translate by dx, dy:
//!ex:
//!code: | 1 0 dx |

View File

@@ -31,8 +31,8 @@
#ifdef __WXDEBUG__
WXDLLIMPEXP_BASE void * wxDebugAlloc(size_t size, wxChar * fileName, int lineNum, bool isObject, bool isVect = FALSE);
WXDLLIMPEXP_BASE void wxDebugFree(void * buf, bool isVect = FALSE);
WXDLLIMPEXP_BASE void * wxDebugAlloc(size_t size, wxChar * fileName, int lineNum, bool isObject, bool isVect = false);
WXDLLIMPEXP_BASE void wxDebugFree(void * buf, bool isVect = false);
//**********************************************************************************
/*
@@ -72,33 +72,33 @@ WXDLLIMPEXP_BASE void wxDebugFree(void * buf, bool isVect = FALSE);
inline void * operator new (size_t size, wxChar * fileName, int lineNum)
{
return wxDebugAlloc(size, fileName, lineNum, FALSE, FALSE);
return wxDebugAlloc(size, fileName, lineNum, false, false);
}
inline void * operator new (size_t size)
{
return wxDebugAlloc(size, NULL, 0, FALSE);
return wxDebugAlloc(size, NULL, 0, false);
}
inline void operator delete (void * buf)
{
wxDebugFree(buf, FALSE);
wxDebugFree(buf, false);
}
#if wxUSE_ARRAY_MEMORY_OPERATORS
inline void * operator new[] (size_t size)
{
return wxDebugAlloc(size, NULL, 0, FALSE, TRUE);
return wxDebugAlloc(size, NULL, 0, false, true);
}
inline void * operator new[] (size_t size, wxChar * fileName, int lineNum)
{
return wxDebugAlloc(size, fileName, lineNum, FALSE, TRUE);
return wxDebugAlloc(size, fileName, lineNum, false, true);
}
inline void operator delete[] (void * buf)
{
wxDebugFree(buf, TRUE);
wxDebugFree(buf, true);
}
#endif
@@ -106,11 +106,11 @@ inline void operator delete[] (void * buf)
#if ( defined(__VISUALC__) && (__VISUALC__ >= 1200) ) || defined(__MWERKS__)
inline void operator delete(void* pData, wxChar* /* fileName */, int /* lineNum */)
{
wxDebugFree(pData, FALSE);
wxDebugFree(pData, false);
}
inline void operator delete[](void* pData, wxChar* /* fileName */, int /* lineNum */)
{
wxDebugFree(pData, TRUE);
wxDebugFree(pData, true);
}
#endif // __VISUALC__>=1200
#endif // wxUSE_GLOBAL_MEMORY_OPERATORS
@@ -236,7 +236,7 @@ public:
static bool GetDebugMode(void) { return debugOn; }
static void SetDebugMode(bool flag) { debugOn = flag; }
static void SetCheckpoint(bool all = FALSE);
static void SetCheckpoint(bool all = false);
static wxMemStruct *GetCheckpoint(void) { return checkPoint; }
// Calculated from the request size and any padding needed
@@ -270,8 +270,8 @@ public:
static bool GetCheckPrevious () { return m_checkPrevious; }
static void SetCheckPrevious (bool value) { m_checkPrevious = value; }
// Checks all nodes, or all nodes if checkAll is TRUE
static int Check(bool checkAll = FALSE);
// Checks all nodes, or all nodes if checkAll is true
static int Check(bool checkAll = false);
// Print out the list of wxMemStruct nodes.
static bool PrintList(void);
@@ -280,14 +280,14 @@ public:
static bool Dump(void);
// Print statistics
static bool PrintStatistics(bool detailed = TRUE);
static bool PrintStatistics(bool detailed = true);
// Print out the classes in the application.
static bool PrintClasses(void);
// Count the number of non-wxDebugContext-related objects
// that are outstanding
static int CountObjectsLeft(bool sinceCheckpoint = FALSE);
static int CountObjectsLeft(bool sinceCheckpoint = false);
// This function is used to output the dump
static void OutputDumpLine(const wxChar *szFormat, ...);
@@ -298,8 +298,8 @@ private:
static wxMemStruct* m_head;
static wxMemStruct* m_tail;
// Set to FALSE if we're not checking all previous nodes when
// we do a new. Set to TRUE when we are.
// Set to false if we're not checking all previous nodes when
// we do a new. Set to true when we are.
static bool m_checkPrevious;
};
@@ -349,8 +349,8 @@ void WXDLLIMPEXP_BASE wxTraceLevel(int level, const wxChar *fmt ...) ATTRIBUTE_P
#define wxTraceLevel(l, fmt)
#endif
#define WXTRACE TRUE ? (void)0 : wxTrace
#define WXTRACELEVEL TRUE ? (void)0 : wxTraceLevel
#define WXTRACE true ? (void)0 : wxTrace
#define WXTRACELEVEL true ? (void)0 : wxTraceLevel
#endif // (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT

View File

@@ -28,21 +28,21 @@ public:
protected:
virtual bool OnExists() const
{ return FALSE; }
{ return false; }
virtual bool OnOpen(const wxString & WXUNUSED(strBufferName),
wxTextBufferOpenMode WXUNUSED(OpenMode))
{ return TRUE; }
{ return true; }
virtual bool OnClose()
{ return TRUE; }
{ return true; }
virtual bool OnRead(wxMBConv& WXUNUSED(conv))
{ return TRUE; }
{ return true; }
virtual bool OnWrite(wxTextFileType WXUNUSED(typeNew),
wxMBConv& WXUNUSED(conv) = wxConvUTF8)
{ return TRUE; }
{ return true; }
private:
DECLARE_NO_COPY_CLASS(wxMemoryText)

View File

@@ -294,8 +294,8 @@ public:
// pos != NULL
wxMenuItem *FindChildItem(int itemid, size_t *pos = NULL) const;
// called to generate a wxCommandEvent, return TRUE if it was processed,
// FALSE otherwise
// called to generate a wxCommandEvent, return true if it was processed,
// false otherwise
//
// the checked parameter may have boolean value or -1 for uncheckable items
bool SendEvent(int itemid, int checked = -1);
@@ -334,7 +334,7 @@ public:
{
ms_locked = locked;
}
protected:
// virtuals to override in derived classes
// ---------------------------------------
@@ -368,7 +368,7 @@ protected:
wxEvtHandler *m_eventHandler; // a pluggable in event handler
static bool ms_locked;
DECLARE_NO_COPY_CLASS(wxMenuBase)
};
@@ -388,10 +388,10 @@ public:
// menu bar construction
// ---------------------
// append a menu to the end of menubar, return TRUE if ok
// append a menu to the end of menubar, return true if ok
virtual bool Append(wxMenu *menu, const wxString& title);
// insert a menu before the given position into the menubar, return TRUE
// insert a menu before the given position into the menubar, return true
// if inserted ok
virtual bool Insert(size_t pos, wxMenu *menu, const wxString& title);
@@ -416,7 +416,7 @@ public:
virtual void EnableTop(size_t pos, bool enable) = 0;
// is the menu enabled?
virtual bool IsEnabledTop(size_t WXUNUSED(pos)) const { return TRUE; }
virtual bool IsEnabledTop(size_t WXUNUSED(pos)) const { return true; }
// get or change the label of the menu at given position
virtual void SetLabelTop(size_t pos, const wxString& label) = 0;
@@ -462,7 +462,7 @@ public:
// get the frame we are attached to (may return NULL)
wxFrame *GetFrame() const { return m_menuBarFrame; }
// returns TRUE if we're attached to a frame
// returns true if we're attached to a frame
bool IsAttached() const { return GetFrame() != NULL; }
// associate the menubar with the frame
@@ -472,12 +472,12 @@ public:
virtual void Detach();
// need to override these ones to avoid virtual function hiding
virtual bool Enable(bool enable = TRUE) { return wxWindow::Enable(enable); }
virtual bool Enable(bool enable = true) { return wxWindow::Enable(enable); }
virtual void SetLabel(const wxString& s) { wxWindow::SetLabel(s); }
virtual wxString GetLabel() const { return wxWindow::GetLabel(); }
// don't want menu bars to accept the focus by tabbing to them
virtual bool AcceptsFocusFromKeyboard() const { return FALSE; }
virtual bool AcceptsFocusFromKeyboard() const { return false; }
protected:
// the list of all our menus

View File

@@ -82,10 +82,10 @@ public:
wxMenu *GetSubMenu() const { return m_subMenu; }
// state
virtual void Enable(bool enable = TRUE) { m_isEnabled = enable; }
virtual void Enable(bool enable = true) { m_isEnabled = enable; }
virtual bool IsEnabled() const { return m_isEnabled; }
virtual void Check(bool check = TRUE) { m_isChecked = check; }
virtual void Check(bool check = true) { m_isChecked = check; }
virtual bool IsChecked() const { return m_isChecked; }
void Toggle() { Check(!m_isChecked); }
@@ -122,7 +122,7 @@ public:
}
protected:
int m_id; // numeric id of the item >= 0 or -1
int m_id; // numeric id of the item >= 0 or wxID_ANY or wxID_SEPARATOR
wxMenu *m_parentMenu, // the menu we belong to
*m_subMenu; // our sub menu or NULL
wxString m_text, // label of the item

View File

@@ -234,9 +234,9 @@ public:
const wxFileType::MessageParameters& params) const;
// set an arbitrary command, ask confirmation if it already exists and
// overwriteprompt is TRUE
// overwriteprompt is true
bool SetCommand(const wxString& cmd, const wxString& verb,
bool overwriteprompt = TRUE);
bool overwriteprompt = true);
bool SetDefaultIcon(const wxString& cmd = wxEmptyString, int index = 0);
@@ -290,7 +290,7 @@ public:
// check if the given MIME type is the same as the other one: the
// second argument may contain wildcards ('*'), but not the first. If
// the types are equal or if the mimeType matches wildcard the function
// returns TRUE, otherwise it returns FALSE
// returns true, otherwise it returns false
static bool IsOfType(const wxString& mimeType, const wxString& wildcard);
// ctor
@@ -319,7 +319,7 @@ public:
// get file type from MIME type (in format <category>/<format>)
wxFileType *GetFileTypeFromMimeType(const wxString& mimeType);
// other operations: return TRUE if there were no errors or FALSE if there
// other operations: return true if there were no errors or false if there
// were some unreckognized entries (the good entries are always read anyhow)
//
// FIXME: These ought to be private ??
@@ -327,12 +327,12 @@ public:
// read in additional file (the standard ones are read automatically)
// in mailcap format (see mimetype.cpp for description)
//
// 'fallback' parameter may be set to TRUE to avoid overriding the
// 'fallback' parameter may be set to true to avoid overriding the
// settings from other, previously parsed, files by this one: normally,
// the files read most recently would override the older files, but with
// fallback == TRUE this won't happen
// fallback == true this won't happen
bool ReadMailcap(const wxString& filename, bool fallback = FALSE);
bool ReadMailcap(const wxString& filename, bool fallback = false);
// read in additional file in mime.types format
bool ReadMimeTypes(const wxString& filename);
@@ -343,7 +343,7 @@ public:
// these functions can be used to provide default values for some of the
// MIME types inside the program itself (you may also use
// ReadMailcap(filenameWithDefaultTypes, TRUE /* use as fallback */) to
// ReadMailcap(filenameWithDefaultTypes, true /* use as fallback */) to
// achieve the same goal, but this requires having this info in a file).
//
// The filetypes array should be terminated by either NULL entry or an

View File

@@ -31,7 +31,7 @@ int WXDLLEXPORT wxMessageBox(const wxString& message,
const wxString& caption = wxMessageBoxCaptionStr,
long style = wxOK | wxCENTRE,
wxWindow *parent = NULL,
int x = -1, int y = -1);
int x = wxDefaultCoord, int y = wxDefaultCoord);
#endif // wxUSE_MSGDLG

View File

@@ -18,7 +18,7 @@
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) && !defined(__EMX__)
// Some older compilers (such as EMX) cannot handle
// #pragma interface/implementation correctly, iff
// #pragma interface/implementation correctly, iff
// #pragma implementation is used in _two_ translation
// units (as created by e.g. event.cpp compiled for
// libwx_base and event.cpp compiled for libwx_gui_core).