Source cleaning: whitespaces & tabs, ::, TRUE/true, FALSE/false.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28925 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
2679196c7e
commit
213ceb3f0e
@ -16,12 +16,12 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#elif defined( __CYGWIN__ ) && !defined( HAVE_W32API_H )
|
#elif defined( __CYGWIN__ ) && !defined( HAVE_W32API_H )
|
||||||
#if ( __GNUC__ > 2 )
|
#if ( __GNUC__ > 2 )
|
||||||
#define HAVE_W32API_H
|
#define HAVE_W32API_H
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (defined(__WATCOMC__) && __WATCOMC__ >= 1200)
|
#if (defined(__WATCOMC__) && __WATCOMC__ >= 1200)
|
||||||
#define HAVE_W32API_H
|
#define HAVE_W32API_H
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -176,7 +176,7 @@ public:
|
|||||||
void SetSize(const wxSize& size) { SetSize(size.x, size.y); }
|
void SetSize(const wxSize& size) { SetSize(size.x, size.y); }
|
||||||
|
|
||||||
// forward some of base class virtuals to wxGDIImageRefData
|
// forward some of base class virtuals to wxGDIImageRefData
|
||||||
bool FreeResource(bool force = FALSE);
|
bool FreeResource(bool force = false);
|
||||||
virtual WXHANDLE GetResourceHandle() const;
|
virtual WXHANDLE GetResourceHandle() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -36,15 +36,15 @@ class WXDLLEXPORT wxGDIRefData : public wxObjectRefData
|
|||||||
class WXDLLEXPORT wxGDIObject : public wxObject
|
class WXDLLEXPORT wxGDIObject : public wxObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxGDIObject() { m_visible = FALSE; };
|
wxGDIObject() { m_visible = false; };
|
||||||
|
|
||||||
// Creates the resource
|
// Creates the resource
|
||||||
virtual bool RealizeResource() { return FALSE; };
|
virtual bool RealizeResource() { return false; };
|
||||||
|
|
||||||
// Frees the resource
|
// Frees the resource
|
||||||
virtual bool FreeResource(bool WXUNUSED(force) = FALSE) { return FALSE; }
|
virtual bool FreeResource(bool WXUNUSED(force) = false) { return false; }
|
||||||
|
|
||||||
virtual bool IsFree() const { return FALSE; }
|
virtual bool IsFree() const { return false; }
|
||||||
|
|
||||||
bool IsNull() const { return (m_refData == 0); }
|
bool IsNull() const { return (m_refData == 0); }
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ public:
|
|||||||
virtual void SetVisible(bool v) { m_visible = v; }
|
virtual void SetVisible(bool v) { m_visible = v; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool m_visible; // TRUE only if we should delete this object ourselves
|
bool m_visible; // true only if we should delete this object ourselves
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_DYNAMIC_CLASS(wxGDIObject)
|
DECLARE_DYNAMIC_CLASS(wxGDIObject)
|
||||||
|
@ -78,7 +78,7 @@ wxBEGIN_FLAGS( wxGaugeStyle )
|
|||||||
wxFLAGS_MEMBER(wxBORDER_RAISED)
|
wxFLAGS_MEMBER(wxBORDER_RAISED)
|
||||||
wxFLAGS_MEMBER(wxBORDER_STATIC)
|
wxFLAGS_MEMBER(wxBORDER_STATIC)
|
||||||
wxFLAGS_MEMBER(wxBORDER_NONE)
|
wxFLAGS_MEMBER(wxBORDER_NONE)
|
||||||
|
|
||||||
// old style border flags
|
// old style border flags
|
||||||
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
|
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
|
||||||
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
|
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
|
||||||
@ -117,7 +117,7 @@ wxEND_PROPERTIES_TABLE()
|
|||||||
wxBEGIN_HANDLERS_TABLE(wxGauge95)
|
wxBEGIN_HANDLERS_TABLE(wxGauge95)
|
||||||
wxEND_HANDLERS_TABLE()
|
wxEND_HANDLERS_TABLE()
|
||||||
|
|
||||||
wxCONSTRUCTOR_6( wxGauge95 , wxWindow* , Parent , wxWindowID , Id , int , Range , wxPoint , Position , wxSize , Size , long , WindowStyle )
|
wxCONSTRUCTOR_6( wxGauge95 , wxWindow* , Parent , wxWindowID , Id , int , Range , wxPoint , Position , wxSize , Size , long , WindowStyle )
|
||||||
#else
|
#else
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxGauge95, wxControl)
|
IMPLEMENT_DYNAMIC_CLASS(wxGauge95, wxControl)
|
||||||
#endif
|
#endif
|
||||||
|
@ -378,9 +378,9 @@ bool wxBMPFileHandler::LoadFile(wxBitmap *bitmap,
|
|||||||
WXHBITMAP hBitmap = (WXHBITMAP)wxLoadBMP(name);
|
WXHBITMAP hBitmap = (WXHBITMAP)wxLoadBMP(name);
|
||||||
if(hBitmap) {
|
if(hBitmap) {
|
||||||
bitmap->SetHBITMAP(hBitmap);
|
bitmap->SetHBITMAP(hBitmap);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -396,7 +396,7 @@ bool wxBMPFileHandler::SaveFile(wxBitmap *bitmap,
|
|||||||
|
|
||||||
return dib.Save(name);
|
return dib.Save(name);
|
||||||
#else
|
#else
|
||||||
return FALSE;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
// Created: 01/02/97
|
// Created: 01/02/97
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Julian Smart
|
// Copyright: (c) Julian Smart
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
||||||
@ -36,8 +36,8 @@ IMPLEMENT_DYNAMIC_CLASS(wxGDIObject, wxObject)
|
|||||||
/*
|
/*
|
||||||
void wxGDIObject::IncrementResourceUsage(void)
|
void wxGDIObject::IncrementResourceUsage(void)
|
||||||
{
|
{
|
||||||
if ( !M_GDIDATA )
|
if ( !M_GDIDATA )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// wxDebugMsg("Object %ld about to be incremented: %d\n", (long)this, m_usageCount);
|
// wxDebugMsg("Object %ld about to be incremented: %d\n", (long)this, m_usageCount);
|
||||||
M_GDIDATA->m_usageCount ++;
|
M_GDIDATA->m_usageCount ++;
|
||||||
@ -45,12 +45,12 @@ void wxGDIObject::IncrementResourceUsage(void)
|
|||||||
|
|
||||||
void wxGDIObject::DecrementResourceUsage(void)
|
void wxGDIObject::DecrementResourceUsage(void)
|
||||||
{
|
{
|
||||||
if ( !M_GDIDATA )
|
if ( !M_GDIDATA )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
M_GDIDATA->m_usageCount --;
|
M_GDIDATA->m_usageCount --;
|
||||||
if (wxTheApp)
|
if (wxTheApp)
|
||||||
wxTheApp->SetPendingCleanup(TRUE);
|
wxTheApp->SetPendingCleanup(true);
|
||||||
// wxDebugMsg("Object %ld decremented: %d\n", (long)this, M_GDIDATA->m_usageCount);
|
// wxDebugMsg("Object %ld decremented: %d\n", (long)this, M_GDIDATA->m_usageCount);
|
||||||
if (M_GDIDATA->m_usageCount < 0)
|
if (M_GDIDATA->m_usageCount < 0)
|
||||||
{
|
{
|
||||||
|
@ -175,7 +175,7 @@ wxGLCanvas::wxGLCanvas(wxWindow *parent, wxWindowID id,
|
|||||||
SetupPixelFormat(attribList);
|
SetupPixelFormat(attribList);
|
||||||
SetupPalette(palette);
|
SetupPalette(palette);
|
||||||
|
|
||||||
m_glContext = new wxGLContext(TRUE, this, palette);
|
m_glContext = new wxGLContext(true, this, palette);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxGLCanvas::wxGLCanvas( wxWindow *parent,
|
wxGLCanvas::wxGLCanvas( wxWindow *parent,
|
||||||
@ -198,7 +198,7 @@ wxGLCanvas::wxGLCanvas( wxWindow *parent,
|
|||||||
SetupPixelFormat(attribList);
|
SetupPixelFormat(attribList);
|
||||||
SetupPalette(palette);
|
SetupPalette(palette);
|
||||||
|
|
||||||
m_glContext = new wxGLContext(TRUE, this, palette, shared );
|
m_glContext = new wxGLContext(true, this, palette, shared );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Not very useful for wxMSW, but this is to be wxGTK compliant
|
// Not very useful for wxMSW, but this is to be wxGTK compliant
|
||||||
@ -224,7 +224,7 @@ wxGLCanvas::wxGLCanvas( wxWindow *parent, const wxGLCanvas *shared, wxWindowID i
|
|||||||
|
|
||||||
wxGLContext *sharedContext=0;
|
wxGLContext *sharedContext=0;
|
||||||
if (shared) sharedContext=shared->GetContext();
|
if (shared) sharedContext=shared->GetContext();
|
||||||
m_glContext = new wxGLContext(TRUE, this, palette, sharedContext );
|
m_glContext = new wxGLContext(true, this, palette, sharedContext );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxGLCanvas::~wxGLCanvas()
|
wxGLCanvas::~wxGLCanvas()
|
||||||
@ -244,7 +244,7 @@ bool wxGLCanvas::Create(wxWindow *parent,
|
|||||||
long style,
|
long style,
|
||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
static bool s_registeredGLCanvasClass = FALSE;
|
static bool s_registeredGLCanvasClass = false;
|
||||||
|
|
||||||
// We have to register a special window class because we need
|
// We have to register a special window class because we need
|
||||||
// the CS_OWNDC style for GLCanvas.
|
// the CS_OWNDC style for GLCanvas.
|
||||||
@ -287,7 +287,7 @@ bool wxGLCanvas::Create(wxWindow *parent,
|
|||||||
if ( !::RegisterClass(&wndclass) )
|
if ( !::RegisterClass(&wndclass) )
|
||||||
{
|
{
|
||||||
wxLogLastError(wxT("RegisterClass(wxGLCanvasClass)"));
|
wxLogLastError(wxT("RegisterClass(wxGLCanvasClass)"));
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Register the GLCanvas class name for windows which don't do full repaint
|
// Register the GLCanvas class name for windows which don't do full repaint
|
||||||
@ -301,16 +301,16 @@ bool wxGLCanvas::Create(wxWindow *parent,
|
|||||||
|
|
||||||
::UnregisterClass(wxGLCanvasClassName, wxhInstance);
|
::UnregisterClass(wxGLCanvasClassName, wxhInstance);
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
s_registeredGLCanvasClass = TRUE;
|
s_registeredGLCanvasClass = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxCHECK_MSG( parent, FALSE, wxT("can't create wxWindow without parent") );
|
wxCHECK_MSG( parent, false, wxT("can't create wxWindow without parent") );
|
||||||
|
|
||||||
if ( !CreateBase(parent, id, pos, size, style, wxDefaultValidator, name) )
|
if ( !CreateBase(parent, id, pos, size, style, wxDefaultValidator, name) )
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
parent->AddChild(this);
|
parent->AddChild(this);
|
||||||
|
|
||||||
@ -466,8 +466,8 @@ void wxGLCanvas::SetupPalette(const wxPalette& palette)
|
|||||||
|
|
||||||
if (m_palette.Ok())
|
if (m_palette.Ok())
|
||||||
{
|
{
|
||||||
SelectPalette((HDC) m_hDC, (HPALETTE) m_palette.GetHPALETTE(), FALSE);
|
::SelectPalette((HDC) m_hDC, (HPALETTE) m_palette.GetHPALETTE(), FALSE);
|
||||||
RealizePalette((HDC) m_hDC);
|
::RealizePalette((HDC) m_hDC);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -547,10 +547,10 @@ void wxGLCanvas::OnQueryNewPalette(wxQueryNewPaletteEvent& event)
|
|||||||
::SelectPalette((HDC) GetHDC(), (HPALETTE) GetPalette()->GetHPALETTE(), FALSE);
|
::SelectPalette((HDC) GetHDC(), (HPALETTE) GetPalette()->GetHPALETTE(), FALSE);
|
||||||
::RealizePalette((HDC) GetHDC());
|
::RealizePalette((HDC) GetHDC());
|
||||||
Refresh();
|
Refresh();
|
||||||
event.SetPaletteRealized(TRUE);
|
event.SetPaletteRealized(true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
event.SetPaletteRealized(FALSE);
|
event.SetPaletteRealized(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// I think this doesn't have to be propagated to child windows.
|
// I think this doesn't have to be propagated to child windows.
|
||||||
@ -736,10 +736,10 @@ bool wxGLApp::InitGLVisual(int *attribList)
|
|||||||
|
|
||||||
if (pixelFormat == 0) {
|
if (pixelFormat == 0) {
|
||||||
wxLogError(_("Failed to initialize OpenGL"));
|
wxLogError(_("Failed to initialize OpenGL"));
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxGLApp::~wxGLApp()
|
wxGLApp::~wxGLApp()
|
||||||
|
@ -508,7 +508,7 @@ GSocket *GSocket::WaitConnection()
|
|||||||
* make the appropriate setsockopt() call.
|
* make the appropriate setsockopt() call.
|
||||||
* Implemented as a GSocket function because clients (ie, wxSocketServer)
|
* Implemented as a GSocket function because clients (ie, wxSocketServer)
|
||||||
* don't have access to the GSocket struct information.
|
* don't have access to the GSocket struct information.
|
||||||
* Returns TRUE if the flag was set correctly, FALSE if an error occured
|
* Returns true if the flag was set correctly, false if an error occured
|
||||||
* (ie, if the parameter was NULL)
|
* (ie, if the parameter was NULL)
|
||||||
*/
|
*/
|
||||||
bool GSocket::SetReusable()
|
bool GSocket::SetReusable()
|
||||||
|
Loading…
Reference in New Issue
Block a user