Source cleaning: whitespaces, tabs, FALSE/false, TRUE/true, -1/wxDefaultCoord, !!/!IsEmpty().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29143 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2004-09-15 13:20:18 +00:00
parent 9eace708fc
commit 5d3e7b52d8
16 changed files with 259 additions and 259 deletions

View File

@@ -77,7 +77,7 @@ public:
virtual int GetBezelFace() const;
// overriden base class virtuals
virtual bool AcceptsFocus() const { return FALSE; }
virtual bool AcceptsFocus() const { return false; }
protected:
// the max position

View File

@@ -27,7 +27,7 @@
// instead of wxPoint and wxSize because they are (x,y) and usually pixel
// oriented while grids and tables are usually thought of as (row,col) so some
// confusion would definitely result in using wxPoint...
//
//
// NOTE: This should probably be refactored to a common RowCol data type which
// is used for this and also for wxGridCellCoords.
//---------------------------------------------------------------------------
@@ -44,7 +44,7 @@ public:
int GetCol() const { return m_col; }
void SetRow(int row) { m_row = row; }
void SetCol(int col) { m_col = col; }
bool operator==(const wxGBPosition& p) const { return m_row == p.m_row && m_col == p.m_col; }
bool operator!=(const wxGBPosition& p) const { return !(*this == p); }
@@ -66,7 +66,7 @@ public:
int GetColspan() const { return m_colspan; }
void SetRowspan(int rowspan) { m_rowspan = rowspan; }
void SetColspan(int colspan) { m_colspan = colspan; }
bool operator==(const wxGBSpan& o) const { return m_rowspan == o.m_rowspan && m_colspan == o.m_colspan; }
bool operator!=(const wxGBSpan& o) const { return !(*this == o); }
@@ -75,7 +75,7 @@ private:
int m_colspan;
};
WXDLLEXPORT_DATA(extern const wxGBSpan) wxDefaultSpan;
@@ -117,7 +117,7 @@ public:
// default ctor
wxGBSizerItem();
// Get the grid position of the item
wxGBPosition GetPos() const { return m_pos; }
void GetPos(int& row, int& col) const;
@@ -147,20 +147,20 @@ public:
// Get the row and column of the endpoint of this item
void GetEndPos(int& row, int& col);
wxGridBagSizer* GetGBSizer() const { return m_gbsizer; }
void SetGBSizer(wxGridBagSizer* sizer) { m_gbsizer = sizer; }
protected:
wxGBPosition m_pos;
wxGBSpan m_span;
wxGridBagSizer* m_gbsizer; // so SetPos/SetSpan can check for intersects
private:
private:
DECLARE_DYNAMIC_CLASS(wxGBSizerItem)
DECLARE_NO_COPY_CLASS(wxGBSizerItem)
DECLARE_NO_COPY_CLASS(wxGBSizerItem)
};
@@ -205,7 +205,7 @@ public:
// Get the size of the specified cell, including hgap and vgap. Only
// valid after a Layout.
wxSize GetCellSize(int row, int col) const;
// Get the grid position of the specified item (non-recursive)
wxGBPosition GetItemPosition(wxWindow *window);
wxGBPosition GetItemPosition(wxSizer *sizer);
@@ -229,31 +229,31 @@ public:
bool SetItemSpan(wxWindow *window, const wxGBSpan& span);
bool SetItemSpan(wxSizer *sizer, const wxGBSpan& span);
bool SetItemSpan(size_t index, const wxGBSpan& span);
// Find the sizer item for the given window or subsizer, returns NULL if
// not found. (non-recursive)
wxGBSizerItem* FindItem(wxWindow* window);
wxGBSizerItem* FindItem(wxSizer* sizer);
// Return the sizer item for the given grid cell, or NULL if there is no
// item at that position. (non-recursive)
wxGBSizerItem* FindItemAtPosition(const wxGBPosition& pos);
// Return the sizer item located at the point given in pt, or NULL if
// there is no item at that point. The (x,y) coordinates in pt correspond
// to the client coordinates of the window using the sizer for
// layout. (non-recursive)
wxGBSizerItem* FindItemAtPoint(const wxPoint& pt);
// Return the sizer item that has a matching user data (it only compares
// pointer values) or NULL if not found. (non-recursive)
wxGBSizerItem* FindItemWithData(const wxObject* userData);
// These are what make the sizer do size calculations and layout
virtual void RecalcSizes();
virtual wxSize CalcMin();
@@ -266,7 +266,7 @@ public:
bool CheckForIntersection(wxGBSizerItem* item, wxGBSizerItem* excludeItem = NULL);
bool CheckForIntersection(const wxGBPosition& pos, const wxGBSpan& span, wxGBSizerItem* excludeItem = NULL);
// The Add base class virtuals should not be used with this class, but
// we'll try to make them automatically select a location for the item
// anyway.
@@ -287,17 +287,17 @@ public:
virtual void Prepend( int width, int height, int proportion = 0, int flag = 0, int border = 0, wxObject* userData = NULL );
virtual void Prepend( wxSizerItem *item );
protected:
wxGBPosition FindEmptyCell();
wxSize m_emptyCellSize;
private:
DECLARE_CLASS(wxGridBagSizer)
DECLARE_NO_COPY_CLASS(wxGridBagSizer)
DECLARE_NO_COPY_CLASS(wxGridBagSizer)
};
//---------------------------------------------------------------------------

View File

@@ -117,7 +117,7 @@ enum wxStockCursor
wxCURSOR_DEFAULT, // standard X11 cursor
#endif
#ifdef __WXMAC__
wxCURSOR_COPY_ARROW , // MacOS Theme Plus arrow
wxCURSOR_COPY_ARROW , // MacOS Theme Plus arrow
#endif
#ifdef __X__
// Not yet implemented for Windows
@@ -234,15 +234,15 @@ public:
int GetWidth() const { return x; }
int GetHeight() const { return y; }
bool IsFullySpecified() const { return x != -1 && y != -1; }
bool IsFullySpecified() const { return x != wxDefaultCoord && y != wxDefaultCoord; }
// combine this size with the other one replacing the default (i.e. equal
// to -1) components of this object with those of the other
// to wxDefaultCoord) components of this object with those of the other
void SetDefaults(const wxSize& size)
{
if ( x == -1 )
if ( x == wxDefaultCoord )
x = size.x;
if ( y == -1 )
if ( y == wxDefaultCoord )
y = size.y;
}
@@ -392,11 +392,11 @@ public:
bool operator==(const wxRect& rect) const;
bool operator!=(const wxRect& rect) const { return !(*this == rect); }
// return TRUE if the point is (not strcitly) inside the rect
// return true if the point is (not strcitly) inside the rect
bool Inside(int x, int y) const;
bool Inside(const wxPoint& pt) const { return Inside(pt.x, pt.y); }
// return TRUE if the rectangles have a non empty intersection
// return true if the rectangles have a non empty intersection
bool Intersects(const wxRect& rect) const;
public:
@@ -440,7 +440,7 @@ public:
void AddFont(wxFont *font);
void RemoveFont(wxFont *font);
wxFont *FindOrCreateFont(int pointSize, int family, int style, int weight,
bool underline = FALSE,
bool underline = false,
const wxString& face = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
};

View File

@@ -300,10 +300,10 @@ public :
inline wxPoint2DDouble();
inline wxPoint2DDouble( wxDouble x , wxDouble y );
inline wxPoint2DDouble( const wxPoint2DDouble &pt );
wxPoint2DDouble( const wxPoint2DInt &pt )
{ m_x = (wxDouble) pt.m_x ; m_y = (wxDouble) pt.m_y ; }
wxPoint2DDouble( const wxPoint &pt )
{ m_x = (wxDouble) pt.x ; m_y = (wxDouble) pt.y ; }
wxPoint2DDouble( const wxPoint2DInt &pt )
{ m_x = (wxDouble) pt.m_x ; m_y = (wxDouble) pt.m_y ; }
wxPoint2DDouble( const wxPoint &pt )
{ m_x = (wxDouble) pt.x ; m_y = (wxDouble) pt.y ; }
// two different conversions to integers, floor and rounding
inline void GetFloor( wxInt32 *x , wxInt32 *y ) const;
@@ -388,7 +388,7 @@ inline wxDouble wxPoint2DDouble::GetVectorLength() const
return sqrt( (m_x)*(m_x) + (m_y)*(m_y) ) ;
}
inline void wxPoint2DDouble::SetVectorLength( wxDouble length )
inline void wxPoint2DDouble::SetVectorLength( wxDouble length )
{
wxDouble before = GetVectorLength() ;
m_x = (m_x * length / before) ;
@@ -590,8 +590,8 @@ public:
( ( pt.m_x > m_x + m_width ) ? wxOutRight : 0 ) +
( ( pt.m_y < m_y ) ? wxOutTop : 0 ) +
( ( pt.m_y > m_y + m_height ) ? wxOutBottom : 0 )); }
inline wxOutCode GetOutcode(const wxPoint2DDouble &pt) const
{ return GetOutCode(pt) ; }
inline wxOutCode GetOutcode(const wxPoint2DDouble &pt) const
{ return GetOutCode(pt) ; }
inline bool Contains( const wxPoint2DDouble &pt ) const
{ return GetOutCode( pt ) == wxInside; }
inline bool Contains( const wxRect2DDouble &rect ) const
@@ -702,8 +702,8 @@ public:
( ( pt.m_x >= m_x + m_width ) ? wxOutRight : 0 ) +
( ( pt.m_y < m_y ) ? wxOutTop : 0 ) +
( ( pt.m_y >= m_y + m_height ) ? wxOutBottom : 0 )); }
inline wxOutCode GetOutcode( const wxPoint2DInt &pt ) const
{ return GetOutCode( pt ) ; }
inline wxOutCode GetOutcode( const wxPoint2DInt &pt ) const
{ return GetOutCode( pt ) ; }
inline bool Contains( const wxPoint2DInt &pt ) const
{ return GetOutCode( pt ) == wxInside; }
inline bool Contains( const wxRect2DInt &rect ) const
@@ -776,8 +776,8 @@ inline wxRect2DInt::wxRect2DInt( const wxPoint2DInt& pos, const wxSize& size)
}
inline bool wxRect2DInt::operator == (const wxRect2DInt& rect) const
{
return (m_x==rect.m_x && m_y==rect.m_y &&
{
return (m_x==rect.m_x && m_y==rect.m_y &&
m_width==rect.m_width && m_height==rect.m_height);
}

View File

@@ -136,13 +136,13 @@ public:
// move through the animation
bool GoFirstFrame();
bool GoLastFrame();
bool GoNextFrame(bool cyclic = FALSE);
bool GoPrevFrame(bool cyclic = FALSE);
bool GoNextFrame(bool cyclic = false);
bool GoPrevFrame(bool cyclic = false);
bool GoFrame(int which);
public:
// constructor, destructor, etc.
wxGIFDecoder(wxInputStream *s, bool anim = FALSE);
wxGIFDecoder(wxInputStream *s, bool anim = false);
~wxGIFDecoder();
bool CanRead();
int ReadGIF();

View File

@@ -30,7 +30,7 @@ public:
// use this in the constructor of the user-derived wxGLApp class to
// determine if an OpenGL rendering context with these attributes
// is available - returns TRUE if so, FALSE if not.
// is available - returns true if so, false if not.
bool InitGLVisual(int *attribList);
private:

View File

@@ -281,10 +281,10 @@ public:
void Put(long key, const wxString& value);
// get the string from the key: if not found, an empty string is returned
// and the wasFound is set to FALSE if not NULL
// and the wasFound is set to false if not NULL
wxString Get(long key, bool *wasFound = NULL) const;
// remove the item, returning TRUE if the item was found and deleted
// remove the item, returning true if the item was found and deleted
bool Delete(long key) const;
// clean up
@@ -584,7 +584,7 @@ private:
{ \
m_hashTable[slot] = new listclass(m_keyType); \
if ( m_deleteContents ) \
m_hashTable[slot]->DeleteContents(TRUE); \
m_hashTable[slot]->DeleteContents(true); \
} \
\
((listclass *)m_hashTable[slot])->Append(value, data); \

View File

@@ -433,8 +433,8 @@ public: \
};
// grow/shrink predicates
inline bool never_grow( size_t, size_t ) { return FALSE; }
inline bool never_shrink( size_t, size_t ) { return FALSE; }
inline bool never_grow( size_t, size_t ) { return false; }
inline bool never_shrink( size_t, size_t ) { return false; }
inline bool grow_lf70( size_t buckets, size_t items )
{
return float(items)/float(buckets) >= 0.85;

View File

@@ -6,7 +6,7 @@
// Created: 04/01/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_HELPBASEH__
@@ -45,8 +45,8 @@ public:
// Must call this to set the filename and server name.
// server is only required when implementing TCP/IP-based
// help controllers.
virtual bool Initialize(const wxString& WXUNUSED(file), int WXUNUSED(server) ) { return FALSE; }
virtual bool Initialize(const wxString& WXUNUSED(file)) { return FALSE; }
virtual bool Initialize(const wxString& WXUNUSED(file), int WXUNUSED(server) ) { return false; }
virtual bool Initialize(const wxString& WXUNUSED(file)) { return false; }
// Set viewer: only relevant to some kinds of controller
virtual void SetViewer(const wxString& WXUNUSED(viewer), long WXUNUSED(flags) = 0) {}
@@ -61,10 +61,10 @@ public:
virtual bool DisplaySection(int sectionNo) = 0;
// Display the section using a context id
virtual bool DisplayContextPopup(int WXUNUSED(contextId)) { return FALSE; };
virtual bool DisplayContextPopup(int WXUNUSED(contextId)) { return false; };
// Display the text in a popup, if possible
virtual bool DisplayTextPopup(const wxString& WXUNUSED(text), const wxPoint& WXUNUSED(pos)) { return FALSE; }
virtual bool DisplayTextPopup(const wxString& WXUNUSED(text), const wxPoint& WXUNUSED(pos)) { return false; }
// By default, uses KeywordSection to display a topic. Implementations
// may override this for more specific behaviour.
@@ -76,7 +76,7 @@ public:
virtual void SetFrameParameters(const wxString& WXUNUSED(title),
const wxSize& WXUNUSED(size),
const wxPoint& WXUNUSED(pos) = wxDefaultPosition,
bool WXUNUSED(newFrameEachTime) = FALSE)
bool WXUNUSED(newFrameEachTime) = false)
{
// does nothing by default
}
@@ -91,7 +91,7 @@ public:
virtual bool Quit() = 0;
virtual void OnQuit() {}
private:
DECLARE_CLASS(wxHelpControllerBase)
};