added missing consts and pass objects by const reference instead of by value (patch 1205869)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35665 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-09-24 21:43:15 +00:00
parent 68bc51a9ed
commit fbfb8bcc3f
111 changed files with 199 additions and 197 deletions

View File

@@ -3014,7 +3014,7 @@ See also \helpref{wxWriteResource}{wxwriteresource}, \helpref{wxConfigBase}{wxco
\membersection{::wxGetStockLabel}\label{wxgetstocklabel}
\func{wxString}{wxGetStockLabel}{\param{wxWindowID }{id}, \param{bool }{withCodes = true}, \param{wxString }{accelerator = wxEmptyString}}
\func{wxString}{wxGetStockLabel}{\param{wxWindowID }{id}, \param{bool }{withCodes = true}, \param{const wxString\& }{accelerator = wxEmptyString}}
Returns label that should be used for given {\it id} element.

View File

@@ -37,7 +37,7 @@ inch wide on typical printer. With pixel\_scale = 3.0 it would be 3 inches.)
\membersection{wxHtmlDCRenderer::SetFonts}\label{wxhtmldcrenderersetfonts}
\func{void}{SetFonts}{\param{wxString }{normal\_face}, \param{wxString }{fixed\_face}, \param{const int }{*sizes = NULL}}
\func{void}{SetFonts}{\param{const wxString\& }{normal\_face}, \param{const wxString\& }{fixed\_face}, \param{const int }{*sizes = NULL}}
Sets fonts. See \helpref{wxHtmlWindow::SetFonts}{wxhtmlwindowsetfonts} for
detailed description.

View File

@@ -101,7 +101,7 @@ Display page setup dialog and allows the user to modify settings.
\membersection{wxHtmlEasyPrinting::SetFonts}\label{wxhtmleasyprintingsetfonts}
\func{void}{SetFonts}{\param{wxString }{normal\_face}, \param{wxString }{fixed\_face}, \param{const int }{*sizes = NULL}}
\func{void}{SetFonts}{\param{const wxString\& }{normal\_face}, \param{const wxString\& }{fixed\_face}, \param{const int }{*sizes = NULL}}
Sets fonts. See \helpref{wxHtmlWindow::SetFonts}{wxhtmlwindowsetfonts} for
detailed description.

View File

@@ -190,7 +190,7 @@ You shouldn't use InitParser, DoParsing, GetProduct or DoneParser directly.
\membersection{wxHtmlParser::PushTagHandler}\label{wxhtmlparserpushtaghandler}
\func{void}{PushTagHandler}{\param{wxHtmlTagHandler* }{handler}, \param{wxString }{tags}}
\func{void}{PushTagHandler}{\param{wxHtmlTagHandler* }{handler}, \param{const wxString\& }{tags}}
Forces the handler to handle additional tags
(not returned by \helpref{GetSupportedTags}{wxhtmltaghandlergetsupportedtags}).

View File

@@ -36,7 +36,7 @@ further information.
\membersection{wxHtmlPrintout::SetFonts}\label{wxhtmlprintoutsetfonts}
\func{void}{SetFonts}{\param{wxString }{normal\_face}, \param{wxString }{fixed\_face}, \param{const int }{*sizes = NULL}}
\func{void}{SetFonts}{\param{const wxString\& }{normal\_face}, \param{const wxString\& }{fixed\_face}, \param{const int }{*sizes = NULL}}
Sets fonts. See \helpref{wxHtmlWindow::SetFonts}{wxhtmlwindowsetfonts} for
detailed description.

View File

@@ -354,7 +354,7 @@ This function sets the space between border of window and HTML contents. See ima
\membersection{wxHtmlWindow::SetFonts}\label{wxhtmlwindowsetfonts}
\func{void}{SetFonts}{\param{wxString }{normal\_face}, \param{wxString }{fixed\_face}, \param{const int }{*sizes = NULL}}
\func{void}{SetFonts}{\param{const wxString\& }{normal\_face}, \param{const wxString\& }{fixed\_face}, \param{const int }{*sizes = NULL}}
This function sets font sizes and faces.

View File

@@ -269,7 +269,7 @@ Sets underlined flag of actualfont. {\it x} is either true of false.
\membersection{wxHtmlWinParser::SetFonts}\label{wxhtmlwinparsersetfonts}
\func{void}{SetFonts}{\param{wxString }{normal\_face}, \param{wxString }{fixed\_face}, \param{const int }{*sizes = NULL}}
\func{void}{SetFonts}{\param{const wxString\& }{normal\_face}, \param{const wxString\& }{fixed\_face}, \param{const int }{*sizes = NULL}}
Sets fonts. See \helpref{wxHtmlWindow::SetFonts}{wxhtmlwindowsetfonts} for
detailed description.

View File

@@ -384,7 +384,7 @@ by the sizer to resize themselves according to the rules defined by the paramete
\func{void}{SetMinSize}{\param{int }{width}, \param{int }{height}}
\func{void}{SetMinSize}{\param{wxSize }{size}}
\func{void}{SetMinSize}{\param{const wxSize\& }{size}}
Call this to give the sizer a minimal size. Normally, the sizer will calculate its
minimal size based purely on how much space its children need. After calling this

View File

@@ -183,7 +183,7 @@ Set the border item attribute.
\membersection{wxSizerItem::SetDimension}\label{wxsizeritemsetdimension}
\func{void}{SetDimension}{\param{wxPoint }{pos}, \param{wxSize }{size}}
\func{void}{SetDimension}{\param{const wxPoint\& }{pos}, \param{const wxSize\& }{size}}
Set the position and size of the space allocated to the sizer, and
adjust the position and size of the item to be within that space

View File

@@ -32,7 +32,7 @@
%
\membersection{wxSocketServer::wxSocketServer}\label{wxsocketserverctor}
\func{}{wxSocketServer}{\param{wxSockAddress\&}{ address}, \param{wxSocketFlags}{ flags = wxSOCKET\_NONE}}
\func{}{wxSocketServer}{\param{const wxSockAddress\&}{ address}, \param{wxSocketFlags}{ flags = wxSOCKET\_NONE}}
Constructs a new server and tries to bind to the specified {\it address}.
Before trying to accept new connections, test whether it succeeded with

View File

@@ -49,9 +49,9 @@ public:
{ if (*this == brush) return (*this); Ref(brush); return *this; }
// comparison
bool operator == (const wxBrush& brush)
bool operator == (const wxBrush& brush) const
{ return m_refData == brush.m_refData; }
bool operator != (const wxBrush& brush)
bool operator != (const wxBrush& brush) const
{ return m_refData != brush.m_refData; }
// accessors

View File

@@ -57,8 +57,8 @@ public:
virtual bool Ok() const { return m_refData ; }
inline wxCursor& operator = (const wxCursor& cursor) { if (*this == cursor) return (*this); Ref(cursor); return *this; }
inline bool operator == (const wxCursor& cursor) { return m_refData == cursor.m_refData; }
inline bool operator != (const wxCursor& cursor) { return m_refData != cursor.m_refData; }
inline bool operator == (const wxCursor& cursor) const { return m_refData == cursor.m_refData; }
inline bool operator != (const wxCursor& cursor) const { return m_refData != cursor.m_refData; }
inline WX_NSCursor GetNSCursor() const
{

View File

@@ -39,9 +39,9 @@ public:
inline wxPen& operator = (const wxPen& pen)
{ if (*this == pen) return (*this); Ref(pen); return *this; }
inline bool operator == (const wxPen& pen)
inline bool operator == (const wxPen& pen) const
{ return m_refData == pen.m_refData; }
inline bool operator != (const wxPen& pen)
inline bool operator != (const wxPen& pen) const
{ return m_refData != pen.m_refData; }
virtual bool Ok() const { return (m_refData != NULL) ; }

View File

@@ -400,8 +400,8 @@ public: \
{ reverse_iterator tmp = *this; --m_ptr; return tmp; } \
itor& operator--() { ++m_ptr; return *this; } \
const itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; }\
bool operator ==(const itor& it) { return m_ptr == it.m_ptr; } \
bool operator !=(const itor& it) { return m_ptr != it.m_ptr; } \
bool operator ==(const itor& it) const { return m_ptr == it.m_ptr; }\
bool operator !=(const itor& it) const { return m_ptr != it.m_ptr; }\
}; \
\
class const_reverse_iterator \
@@ -433,8 +433,8 @@ public: \
{ itor tmp = *this; --m_ptr; return tmp; } \
itor& operator--() { ++m_ptr; return *this; } \
const itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; }\
bool operator ==(const itor& it) { return m_ptr == it.m_ptr; } \
bool operator !=(const itor& it) { return m_ptr != it.m_ptr; } \
bool operator ==(const itor& it) const { return m_ptr == it.m_ptr; }\
bool operator !=(const itor& it) const { return m_ptr != it.m_ptr; }\
}; \
\
name(size_type n, const_reference v) { assign(n, v); } \

View File

@@ -57,7 +57,7 @@ public:
void DrawSunkenEdge(wxDC& dc, const wxRect& rect, int borderSize = 1);
// Tile a bitmap
bool TileBitmap(const wxRect& rect, wxDC& dc, wxBitmap& bitmap);
bool TileBitmap(const wxRect& rect, wxDC& dc, const wxBitmap& bitmap);
protected:
wxColour m_highlightColour; // Usually white

View File

@@ -1088,7 +1088,7 @@ public:
wxSize GetSize() const { return m_size; }
wxRect GetRect() const { return m_rect; }
void SetRect(wxRect rect) { m_rect = rect; }
void SetRect(const wxRect& rect) { m_rect = rect; }
virtual wxEvent *Clone() const { return new wxSizeEvent(*this); }
@@ -1128,7 +1128,7 @@ public:
wxPoint GetPosition() const { return m_pos; }
void SetPosition(const wxPoint& pos) { m_pos = pos; }
wxRect GetRect() const { return m_rect; }
void SetRect(wxRect rect) { m_rect = rect; }
void SetRect(const wxRect& rect) { m_rect = rect; }
virtual wxEvent *Clone() const { return new wxMoveEvent(*this); }

View File

@@ -200,7 +200,7 @@ private:
void CleanUp();
// parse the whole file
void Parse(wxTextBuffer& buffer, bool bLocal);
void Parse(const wxTextBuffer& buffer, bool bLocal);
// the same as SetPath("/")
void SetRootPath();

View File

@@ -195,7 +195,7 @@ public:
void SetStyle(wxFontStyle style);
void SetWeight(wxFontWeight weight);
void SetUnderlined(bool underlined);
void SetFaceName(wxString facename);
void SetFaceName(const wxString& facename);
void SetFamily(wxFontFamily family);
void SetEncoding(wxFontEncoding encoding);

View File

@@ -213,10 +213,10 @@ public:
bool operator==(const wxSize& sz) const { return x == sz.x && y == sz.y; }
bool operator!=(const wxSize& sz) const { return x != sz.x || y != sz.y; }
wxSize operator+(const wxSize& sz) { return wxSize(x + sz.x, y + sz.y); }
wxSize operator-(const wxSize& sz) { return wxSize(x - sz.x, y - sz.y); }
wxSize operator/(const int i) { return wxSize(x / i, y / i); }
wxSize operator*(const int i) { return wxSize(x * i, y * i); }
wxSize operator+(const wxSize& sz) const { return wxSize(x + sz.x, y + sz.y); }
wxSize operator-(const wxSize& sz) const { return wxSize(x - sz.x, y - sz.y); }
wxSize operator/(int i) const { return wxSize(x / i, y / i); }
wxSize operator*(int i) const { return wxSize(x * i, y * i); }
wxSize& operator+=(const wxSize& sz) { x += sz.x; y += sz.y; return *this; }
wxSize& operator-=(const wxSize& sz) { x -= sz.x; y -= sz.y; return *this; }

View File

@@ -180,13 +180,13 @@ public:
protected:
// set the text colours before drawing
void SetTextColoursAndFont(wxGrid& grid,
wxGridCellAttr& attr,
void SetTextColoursAndFont(const wxGrid& grid,
const wxGridCellAttr& attr,
wxDC& dc,
bool isSelected);
// calc the string extent for given string/font
wxSize DoGetBestSize(wxGridCellAttr& attr,
wxSize DoGetBestSize(const wxGridCellAttr& attr,
wxDC& dc,
const wxString& text);
};
@@ -212,7 +212,7 @@ public:
{ return new wxGridCellNumberRenderer; }
protected:
wxString GetString(wxGrid& grid, int row, int col);
wxString GetString(const wxGrid& grid, int row, int col);
};
class WXDLLIMPEXP_ADV wxGridCellFloatRenderer : public wxGridCellStringRenderer
@@ -245,7 +245,7 @@ public:
virtual wxGridCellRenderer *Clone() const;
protected:
wxString GetString(wxGrid& grid, int row, int col);
wxString GetString(const wxGrid& grid, int row, int col);
private:
// formatting parameters
@@ -1175,7 +1175,7 @@ public:
//
void StringToLines( const wxString& value, wxArrayString& lines );
void GetTextBoxSize( wxDC& dc,
void GetTextBoxSize( const wxDC& dc,
const wxArrayString& lines,
long *width, long *height );

View File

@@ -28,8 +28,8 @@
class WXDLLIMPEXP_ADV wxGridCellDateTimeRenderer : public wxGridCellStringRenderer
{
public:
wxGridCellDateTimeRenderer(wxString outformat = wxDefaultDateTimeFormat,
wxString informat = wxDefaultDateTimeFormat);
wxGridCellDateTimeRenderer(const wxString& outformat = wxDefaultDateTimeFormat,
const wxString& informat = wxDefaultDateTimeFormat);
// draw the string right aligned
virtual void Draw(wxGrid& grid,
@@ -50,7 +50,7 @@ public:
virtual void SetParameters(const wxString& params);
protected:
wxString GetString(wxGrid& grid, int row, int col);
wxString GetString(const wxGrid& grid, int row, int col);
wxString m_iformat;
wxString m_oformat;
@@ -85,7 +85,7 @@ public:
virtual void SetParameters(const wxString& params);
protected:
wxString GetString(wxGrid& grid, int row, int col);
wxString GetString(const wxGrid& grid, int row, int col);
wxArrayString m_choices;
};
@@ -149,7 +149,7 @@ public:
private:
wxArrayString GetTextLines( wxGrid& grid,
wxDC& dc,
wxGridCellAttr& attr,
const wxGridCellAttr& attr,
const wxRect& rect,
int row, int col);

View File

@@ -38,8 +38,8 @@ class WXDLLIMPEXP_CORE wxPalette: public wxPaletteBase
wxPalette( const wxPalette& palette );
~wxPalette();
wxPalette& operator = ( const wxPalette& palette );
bool operator == ( const wxPalette& palette );
bool operator != ( const wxPalette& palette );
bool operator == ( const wxPalette& palette ) const;
bool operator != ( const wxPalette& palette ) const;
virtual bool Ok() const;
bool Create( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);

View File

@@ -44,8 +44,8 @@ public:
bool Ok() const { return m_refData != NULL; }
bool operator == ( const wxRegionGeneric& region );
bool operator != ( const wxRegionGeneric& region ) { return !(*this == region); }
bool operator == ( const wxRegionGeneric& region ) const;
bool operator != ( const wxRegionGeneric& region ) const { return !(*this == region); }
//# Modify region
// Clear current region

View File

@@ -47,7 +47,7 @@ public:
wxString GetValue() const { return m_value; }
#if wxUSE_VALIDATORS
void SetTextValidator( wxTextValidator& validator );
void SetTextValidator( const wxTextValidator& validator );
void SetTextValidator( long style = wxFILTER_NONE );
wxTextValidator* GetTextValidator() { return (wxTextValidator*)m_textctrl->GetValidator(); }
#endif

View File

@@ -627,9 +627,9 @@ public:
m_width *= ((wxDouble)num)/((wxDouble)denum); m_height *= ((wxDouble)num)/((wxDouble)denum);}
wxRect2DDouble& operator = (const wxRect2DDouble& rect);
inline bool operator == (const wxRect2DDouble& rect)
inline bool operator == (const wxRect2DDouble& rect) const
{ return (m_x==rect.m_x && m_y==rect.m_y && m_width==rect.m_width && m_height==rect.m_height); }
inline bool operator != (const wxRect2DDouble& rect)
inline bool operator != (const wxRect2DDouble& rect) const
{ return !(*this == rect); }
wxDouble m_x;

View File

@@ -87,8 +87,8 @@ public:
bool Ok() const { return m_refData != NULL; }
bool operator == ( const wxRegion& region );
bool operator != ( const wxRegion& region ) { return !(*this == region); }
bool operator == ( const wxRegion& region ) const;
bool operator != ( const wxRegion& region ) const { return !(*this == region); }
void Clear();

View File

@@ -87,8 +87,8 @@ public:
bool Ok() const { return m_refData != NULL; }
bool operator == ( const wxRegion& region );
bool operator != ( const wxRegion& region ) { return !(*this == region); }
bool operator == ( const wxRegion& region ) const;
bool operator != ( const wxRegion& region ) const { return !(*this == region); }
void Clear();

View File

@@ -333,7 +333,7 @@ protected:
class WXDLLIMPEXP_HTML wxHtmlWordCell : public wxHtmlCell
{
public:
wxHtmlWordCell(const wxString& word, wxDC& dc);
wxHtmlWordCell(const wxString& word, const wxDC& dc);
void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2,
wxHtmlRenderingInfo& info);
wxCursor GetCursor() const;
@@ -343,8 +343,8 @@ public:
void SetPreviousWord(wxHtmlWordCell *cell);
protected:
void SetSelectionPrivPos(wxDC& dc, wxHtmlSelection *s) const;
void Split(wxDC& dc,
void SetSelectionPrivPos(const wxDC& dc, wxHtmlSelection *s) const;
void Split(const wxDC& dc,
const wxPoint& selFrom, const wxPoint& selTo,
unsigned& pos1, unsigned& pos2) const;

View File

@@ -99,7 +99,7 @@ public:
// handler can handle only 'myitems' (e.g. it's GetSupportedTags returns "MYITEMS")
// you can call PushTagHandler(handler, "IT") when you find <myitems>
// and call PopTagHandler() when you find </myitems>
void PushTagHandler(wxHtmlTagHandler *handler, wxString tags);
void PushTagHandler(wxHtmlTagHandler *handler, const wxString& tags);
// Restores state before last call to PushTagHandler
void PopTagHandler();

View File

@@ -123,7 +123,7 @@ public:
#endif // wxUSE_STATUSBAR
// Sets fonts to be used when displaying HTML page.
void SetFonts(wxString normal_face, wxString fixed_face,
void SetFonts(const wxString& normal_face, const wxString& fixed_face,
const int *sizes = NULL);
// Sets font sizes to be relative to the given size or the system

View File

@@ -53,7 +53,7 @@ public:
void SetHtmlText(const wxString& html, const wxString& basepath = wxEmptyString, bool isdir = true);
// Sets fonts to be used when displaying HTML page. (if size null then default sizes used).
void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes = NULL);
void SetFonts(const wxString& normal_face, const wxString& fixed_face, const int *sizes = NULL);
// Sets font sizes to be relative to the given size or the system
// default size; use either specified or default font
@@ -143,7 +143,7 @@ public:
// You can set different header/footer for odd and even pages
// Sets fonts to be used when displaying HTML page. (if size null then default sizes used).
void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes = NULL);
void SetFonts(const wxString& normal_face, const wxString& fixed_face, const int *sizes = NULL);
// Sets font sizes to be relative to the given size or the system
// default size; use either specified or default font
@@ -242,7 +242,7 @@ public:
// pg is one of wxPAGE_ODD, wxPAGE_EVEN and wx_PAGE_ALL constants.
// You can set different header/footer for odd and even pages
void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes = 0);
void SetFonts(const wxString& normal_face, const wxString& fixed_face, const int *sizes = 0);
// Sets fonts to be used when displaying HTML page. (if size null then default sizes used)
// Sets font sizes to be relative to the given size or the system

View File

@@ -65,7 +65,7 @@ public:
wxHtmlWindow *GetWindow() {return m_Window;}
// Sets fonts to be used when displaying HTML page. (if size null then default sizes used).
void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes = NULL);
void SetFonts(const wxString& normal_face, const wxString& fixed_face, const int *sizes = NULL);
// Sets font sizes to be relative to the given size or the system
// default size; use either specified or default font

View File

@@ -48,7 +48,7 @@ class WXDLLIMPEXP_BASE wxConnectionBase: public wxObject
public:
wxConnectionBase(wxChar *buffer, int size); // use external buffer
wxConnectionBase(); // use internal, adaptive buffer
wxConnectionBase(wxConnectionBase& copy);
wxConnectionBase(const wxConnectionBase& copy);
~wxConnectionBase(void);
void SetConnected( bool c ) { m_connected = c; }

View File

@@ -33,9 +33,9 @@ public:
wxAcceleratorTable& operator = (const wxAcceleratorTable& accel)
{ if (*this == accel) return (*this); Ref(accel); return *this; }
bool operator == (const wxAcceleratorTable& accel)
bool operator == (const wxAcceleratorTable& accel) const
{ return m_refData == accel.m_refData; }
bool operator != (const wxAcceleratorTable& accel)
bool operator != (const wxAcceleratorTable& accel) const
{ return m_refData != accel.m_refData; }
bool Ok() const;

View File

@@ -49,9 +49,9 @@ public:
wxBrush& operator = (const wxBrush& brush)
{ if (*this == brush) return (*this); Ref(brush); return *this; }
bool operator == (const wxBrush& brush)
bool operator == (const wxBrush& brush) const
{ return m_refData == brush.m_refData; }
bool operator != (const wxBrush& brush)
bool operator != (const wxBrush& brush) const
{ return m_refData != brush.m_refData; }
wxMacBrushKind MacGetBrushKind() const ;

View File

@@ -34,7 +34,7 @@ public:
wxFontData& GetFontData() { return m_fontData; }
bool IsShown() const;
void OnPanelClose();
void SetData(wxFontData& data);
void SetData(const wxFontData& data);
protected:
wxWindow* m_dialogParent;

View File

@@ -64,8 +64,8 @@ public:
// Operators
inline wxMetafile& operator = (const wxMetafile& metafile) { if (*this == metafile) return (*this); Ref(metafile); return *this; }
inline bool operator == (const wxMetafile& metafile) { return m_refData == metafile.m_refData; }
inline bool operator != (const wxMetafile& metafile) { return m_refData != metafile.m_refData; }
inline bool operator == (const wxMetafile& metafile) const { return m_refData == metafile.m_refData; }
inline bool operator != (const wxMetafile& metafile) const { return m_refData != metafile.m_refData; }
protected:
};

View File

@@ -51,8 +51,8 @@ public:
virtual bool Ok() const { return (m_refData != NULL) ; }
inline wxPalette& operator = (const wxPalette& palette) { if (*this == palette) return (*this); Ref(palette); return *this; }
inline bool operator == (const wxPalette& palette) { return m_refData == palette.m_refData; }
inline bool operator != (const wxPalette& palette) { return m_refData != palette.m_refData; }
inline bool operator == (const wxPalette& palette) const { return m_refData == palette.m_refData; }
inline bool operator != (const wxPalette& palette) const { return m_refData != palette.m_refData; }
/* TODO: implementation
inline WXHPALETTE GetHPALETTE() const { return (M_PALETTEDATA ? M_PALETTEDATA->m_hPalette : 0); }

View File

@@ -58,8 +58,8 @@ public:
~wxPen();
inline wxPen& operator = (const wxPen& pen) { if (*this == pen) return (*this); Ref(pen); return *this; }
inline bool operator == (const wxPen& pen) { return m_refData == pen.m_refData; }
inline bool operator != (const wxPen& pen) { return m_refData != pen.m_refData; }
inline bool operator == (const wxPen& pen) const { return m_refData == pen.m_refData; }
inline bool operator != (const wxPen& pen) const { return m_refData != pen.m_refData; }
virtual bool Ok() const { return (m_refData != NULL) ; }

View File

@@ -753,7 +753,7 @@ private :
// toplevel.cpp
ControlRef wxMacFindControlUnderMouse( wxTopLevelWindowMac* toplevelWindow, Point location , WindowRef window , ControlPartCode *outPart ) ;
ControlRef wxMacFindControlUnderMouse( wxTopLevelWindowMac* toplevelWindow, const Point& location , WindowRef window , ControlPartCode *outPart ) ;
#endif // wxUSE_GUI

View File

@@ -33,9 +33,9 @@ public:
wxAcceleratorTable& operator = (const wxAcceleratorTable& accel)
{ if (*this == accel) return (*this); Ref(accel); return *this; }
bool operator == (const wxAcceleratorTable& accel)
bool operator == (const wxAcceleratorTable& accel) const
{ return m_refData == accel.m_refData; }
bool operator != (const wxAcceleratorTable& accel)
bool operator != (const wxAcceleratorTable& accel) const
{ return m_refData != accel.m_refData; }
bool Ok() const;

View File

@@ -49,9 +49,9 @@ public:
wxBrush& operator = (const wxBrush& brush)
{ if (*this == brush) return (*this); Ref(brush); return *this; }
bool operator == (const wxBrush& brush)
bool operator == (const wxBrush& brush) const
{ return m_refData == brush.m_refData; }
bool operator != (const wxBrush& brush)
bool operator != (const wxBrush& brush) const
{ return m_refData != brush.m_refData; }
wxMacBrushKind MacGetBrushKind() const ;

View File

@@ -64,8 +64,8 @@ public:
virtual bool Ok() const { return (m_refData != NULL && ( M_CURSORDATA->m_hCursor != NULL || M_CURSORDATA->m_themeCursor != -1 ) ) ; }
inline wxCursor& operator = (const wxCursor& cursor) { if (*this == cursor) return (*this); Ref(cursor); return *this; }
inline bool operator == (const wxCursor& cursor) { return m_refData == cursor.m_refData; }
inline bool operator != (const wxCursor& cursor) { return m_refData != cursor.m_refData; }
inline bool operator == (const wxCursor& cursor) const { return m_refData == cursor.m_refData; }
inline bool operator != (const wxCursor& cursor) const { return m_refData != cursor.m_refData; }
void MacInstall() const ;

View File

@@ -75,8 +75,8 @@ public:
// Operators
inline wxMetafile& operator = (const wxMetafile& metafile) { if (*this == metafile) return (*this); Ref(metafile); return *this; }
inline bool operator == (const wxMetafile& metafile) { return m_refData == metafile.m_refData; }
inline bool operator != (const wxMetafile& metafile) { return m_refData != metafile.m_refData; }
inline bool operator == (const wxMetafile& metafile) const { return m_refData == metafile.m_refData; }
inline bool operator != (const wxMetafile& metafile) const { return m_refData != metafile.m_refData; }
protected:
};

View File

@@ -51,8 +51,8 @@ public:
virtual bool Ok() const { return (m_refData != NULL) ; }
inline wxPalette& operator = (const wxPalette& palette) { if (*this == palette) return (*this); Ref(palette); return *this; }
inline bool operator == (const wxPalette& palette) { return m_refData == palette.m_refData; }
inline bool operator != (const wxPalette& palette) { return m_refData != palette.m_refData; }
inline bool operator == (const wxPalette& palette) const { return m_refData == palette.m_refData; }
inline bool operator != (const wxPalette& palette) const { return m_refData != palette.m_refData; }
/* TODO: implementation
inline WXHPALETTE GetHPALETTE() const { return (M_PALETTEDATA ? M_PALETTEDATA->m_hPalette : 0); }

View File

@@ -58,8 +58,8 @@ public:
~wxPen();
inline wxPen& operator = (const wxPen& pen) { if (*this == pen) return (*this); Ref(pen); return *this; }
inline bool operator == (const wxPen& pen) { return m_refData == pen.m_refData; }
inline bool operator != (const wxPen& pen) { return m_refData != pen.m_refData; }
inline bool operator == (const wxPen& pen) const { return m_refData == pen.m_refData; }
inline bool operator != (const wxPen& pen) const { return m_refData != pen.m_refData; }
virtual bool Ok() const { return (m_refData != NULL) ; }

View File

@@ -48,8 +48,8 @@ public:
void SetValue(int col, int row, double value);
void operator = (const wxTransformMatrix& mat);
bool operator == (const wxTransformMatrix& mat);
bool operator != (const wxTransformMatrix& mat);
bool operator == (const wxTransformMatrix& mat) const;
bool operator != (const wxTransformMatrix& mat) const;
//multiply every element by t
wxTransformMatrix& operator*=(const double& t);

View File

@@ -31,8 +31,8 @@ public:
~wxAcceleratorTable();
wxAcceleratorTable& operator = (const wxAcceleratorTable& accel) { if (*this == accel) return (*this); Ref(accel); return *this; }
bool operator == (const wxAcceleratorTable& accel) { return m_refData == accel.m_refData; }
bool operator != (const wxAcceleratorTable& accel) { return m_refData != accel.m_refData; }
bool operator == (const wxAcceleratorTable& accel) const { return m_refData == accel.m_refData; }
bool operator != (const wxAcceleratorTable& accel) const { return m_refData != accel.m_refData; }
bool Ok() const;

View File

@@ -120,7 +120,7 @@ public:
bool GetColumn(int col, wxListItem& item) const;
// Sets information about this column
bool SetColumn(int col, wxListItem& item) ;
bool SetColumn(int col, const wxListItem& item) ;
// Gets the column width
int GetColumnWidth(int col) const;
@@ -298,7 +298,7 @@ public:
// Inserts an item, returning the index of the new item if successful,
// -1 otherwise.
long InsertItem(wxListItem& info);
long InsertItem(const wxListItem& info);
// Insert a string item
long InsertItem(long index, const wxString& label);
@@ -310,7 +310,7 @@ public:
long InsertItem(long index, const wxString& label, int imageIndex);
// For list view mode (only), inserts a column.
long InsertColumn(long col, wxListItem& info);
long InsertColumn(long col, const wxListItem& info);
long InsertColumn(long col,
const wxString& heading,

View File

@@ -138,7 +138,7 @@ protected:
wxSocketBase *GetActivePort();
// helper for GetPort()
wxString GetPortCmdArgument(wxIPV4address Local, wxIPV4address New);
wxString GetPortCmdArgument(const wxIPV4address& Local, const wxIPV4address& New);
// accept connection from server in active mode, returns the same socket as
// passed in in passive mode

View File

@@ -104,7 +104,7 @@ public:
virtual int Type() { return wxSockAddress::IPV4; }
virtual wxSockAddress *Clone() const;
bool operator==(wxIPV4address& addr);
bool operator==(const wxIPV4address& addr) const;
private:
wxString m_origHostname;

View File

@@ -184,7 +184,7 @@ public:
virtual wxSize GetSize() const;
virtual wxSize CalcMin();
virtual void SetDimension( wxPoint pos, wxSize size );
virtual void SetDimension( const wxPoint& pos, const wxSize& size );
wxSize GetMinSize() const
{ return m_minSize; }
@@ -406,24 +406,24 @@ public:
void SetMinSize( int width, int height )
{ DoSetMinSize( width, height ); }
void SetMinSize( wxSize size )
void SetMinSize( const wxSize& size )
{ DoSetMinSize( size.x, size.y ); }
// Searches recursively
bool SetItemMinSize( wxWindow *window, int width, int height )
{ return DoSetItemMinSize( window, width, height ); }
bool SetItemMinSize( wxWindow *window, wxSize size )
bool SetItemMinSize( wxWindow *window, const wxSize& size )
{ return DoSetItemMinSize( window, size.x, size.y ); }
// Searches recursively
bool SetItemMinSize( wxSizer *sizer, int width, int height )
{ return DoSetItemMinSize( sizer, width, height ); }
bool SetItemMinSize( wxSizer *sizer, wxSize size )
bool SetItemMinSize( wxSizer *sizer, const wxSize& size )
{ return DoSetItemMinSize( sizer, size.x, size.y ); }
bool SetItemMinSize( size_t index, int width, int height )
{ return DoSetItemMinSize( index, width, height ); }
bool SetItemMinSize( size_t index, wxSize size )
bool SetItemMinSize( size_t index, const wxSize& size )
{ return DoSetItemMinSize( index, size.x, size.y ); }
wxSize GetSize() const

View File

@@ -230,7 +230,7 @@ class WXDLLIMPEXP_NET wxSocketServer : public wxSocketBase
DECLARE_CLASS(wxSocketServer)
public:
wxSocketServer(wxSockAddress& addr, wxSocketFlags flags = wxSOCKET_NONE);
wxSocketServer(const wxSockAddress& addr, wxSocketFlags flags = wxSOCKET_NONE);
wxSocketBase* Accept(bool wait = true);
bool AcceptWith(wxSocketBase& socket, bool wait = true);
@@ -272,12 +272,12 @@ class WXDLLIMPEXP_NET wxDatagramSocket : public wxSocketBase
DECLARE_CLASS(wxDatagramSocket)
public:
wxDatagramSocket(wxSockAddress& addr, wxSocketFlags flags = wxSOCKET_NONE);
wxDatagramSocket(const wxSockAddress& addr, wxSocketFlags flags = wxSOCKET_NONE);
wxDatagramSocket& RecvFrom( wxSockAddress& addr,
void* buf,
wxUint32 nBytes );
wxDatagramSocket& SendTo( wxSockAddress& addr,
wxDatagramSocket& SendTo( const wxSockAddress& addr,
const void* buf,
wxUint32 nBytes );

View File

@@ -31,7 +31,7 @@ WXDLLEXPORT bool wxIsStockLabel(wxWindowID id, const wxString& label);
// for wxSTOCK_OK):
WXDLLEXPORT wxString wxGetStockLabel(wxWindowID id,
bool withCodes = true,
wxString accelerator = wxEmptyString);
const wxString& accelerator = wxEmptyString);
#ifdef __WXGTK20__
// Translates stock ID to GTK+'s stock item string indentifier:

View File

@@ -87,8 +87,8 @@ public:
bool Ok() const { return m_refData != NULL; }
bool operator == ( const wxRegion& region );
bool operator != ( const wxRegion& region ) { return !(*this == region); }
bool operator == ( const wxRegion& region ) const;
bool operator != ( const wxRegion& region ) const { return !(*this == region); }
void Clear();

View File

@@ -199,7 +199,7 @@ private:
class DnDFrame : public wxFrame
{
public:
DnDFrame(wxFrame *frame, wxChar *title, int x, int y, int w, int h);
DnDFrame(wxFrame *frame, const wxChar *title, int x, int y, int w, int h);
virtual ~DnDFrame();
void OnPaint(wxPaintEvent& event);
@@ -920,7 +920,7 @@ bool DnDApp::OnInit()
#if wxUSE_DRAG_AND_DROP || wxUSE_CLIPBOARD
DnDFrame::DnDFrame(wxFrame *frame, wxChar *title, int x, int y, int w, int h)
DnDFrame::DnDFrame(wxFrame *frame, const wxChar *title, int x, int y, int w, int h)
: wxFrame(frame, wxID_ANY, title, wxPoint(x, y), wxSize(w, h)),
m_strText(_T("wxWidgets drag & drop works :-)"))

View File

@@ -119,7 +119,7 @@ wxInputStream& DrawingDocument::LoadObject(wxInputStream& stream)
}
#endif
DoodleSegment::DoodleSegment(DoodleSegment& seg):wxObject()
DoodleSegment::DoodleSegment(const DoodleSegment& seg):wxObject()
{
wxList::compatibility_iterator node = seg.lines.GetFirst();
while (node)

View File

@@ -32,7 +32,7 @@ public:
wxList lines;
DoodleSegment(void){};
DoodleSegment(DoodleSegment& seg);
DoodleSegment(const DoodleSegment& seg);
~DoodleSegment(void);
void Draw(wxDC *dc);

View File

@@ -117,7 +117,7 @@ wxInputStream& DrawingDocument::LoadObject(wxInputStream& stream)
}
#endif
DoodleSegment::DoodleSegment(DoodleSegment& seg)
DoodleSegment::DoodleSegment(const DoodleSegment& seg)
:wxObject()
{
wxList::compatibility_iterator node = seg.lines.GetFirst();

View File

@@ -32,7 +32,7 @@ class DoodleSegment: public wxObject
wxList lines;
DoodleSegment(void){};
DoodleSegment(DoodleSegment& seg);
DoodleSegment(const DoodleSegment& seg);
~DoodleSegment(void);
void Draw(wxDC *dc);

View File

@@ -417,7 +417,7 @@ MySizerDialog::MySizerDialog(wxWindow *parent, const wxChar *title)
#define POS(r, c) wxGBPosition(r,c)
#define SPAN(r, c) wxGBSpan(r,c)
wxChar* gbsDescription =_T("\
const wxChar gbsDescription[] =_T("\
The wxGridBagSizer is similar to the wxFlexGridSizer except the items are explicitly positioned\n\
in a virtual cell of the layout grid, and column or row spanning is allowed. For example, this\n\
static text is positioned at (0,0) and it spans 7 columns.");

View File

@@ -40,7 +40,7 @@ class OwnerDrawnFrame : public wxFrame
{
public:
// ctor & dtor
OwnerDrawnFrame(wxFrame *frame, wxChar *title, int x, int y, int w, int h);
OwnerDrawnFrame(wxFrame *frame, const wxChar *title, int x, int y, int w, int h);
~OwnerDrawnFrame(){};
// notifications
@@ -202,7 +202,7 @@ void OwnerDrawnFrame::InitMenu()
}
// main frame constructor
OwnerDrawnFrame::OwnerDrawnFrame(wxFrame *frame, wxChar *title,
OwnerDrawnFrame::OwnerDrawnFrame(wxFrame *frame, const wxChar *title,
int x, int y, int w, int h)
: wxFrame(frame, wxID_ANY, title, wxPoint(x, y), wxSize(w, h))
{

View File

@@ -66,7 +66,7 @@ wxPageSetupData* g_pageSetupData = (wxPageSetupData*) NULL;
IMPLEMENT_APP(MyApp)
// Writes a header on a page. Margin units are in millimetres.
bool WritePageHeader(wxPrintout *printout, wxDC *dc, wxChar *text, float mmToLogical);
bool WritePageHeader(wxPrintout *printout, wxDC *dc, const wxChar *text, float mmToLogical);
// The `main program' equivalent, creating the windows and returning the
// main frame
@@ -578,7 +578,7 @@ void MyPrintout::DrawPageTwo(wxDC *dc)
}
// Writes a header on a page. Margin units are in millimetres.
bool WritePageHeader(wxPrintout *printout, wxDC *dc, wxChar *text, float mmToLogical)
bool WritePageHeader(wxPrintout *printout, wxDC *dc, const wxChar *text, float mmToLogical)
{
/*
static wxFont *headerFont = (wxFont *) NULL;

View File

@@ -68,7 +68,7 @@ DECLARE_EVENT_TABLE()
class MyPrintout: public wxPrintout
{
public:
MyPrintout(wxChar *title = _T("My printout")):wxPrintout(title) {}
MyPrintout(const wxChar *title = _T("My printout")):wxPrintout(title) {}
bool OnPrintPage(int page);
bool HasPage(int page);
bool OnBeginDocument(int startPage, int endPage);

View File

@@ -181,7 +181,7 @@ class RegFrame : public wxFrame
{
public:
// ctor & dtor
RegFrame(wxFrame *parent, wxChar *title, int x, int y, int w, int h);
RegFrame(wxFrame *parent, const wxChar *title, int x, int y, int w, int h);
virtual ~RegFrame();
// callbacks
@@ -331,7 +331,7 @@ bool RegApp::OnInit()
// RegFrame
// ----------------------------------------------------------------------------
RegFrame::RegFrame(wxFrame *parent, wxChar *title, int x, int y, int w, int h)
RegFrame::RegFrame(wxFrame *parent, const wxChar *title, int x, int y, int w, int h)
: wxFrame(parent, wxID_ANY, title, wxPoint(x, y), wxSize(w, h))
{
// this reduces flicker effects

View File

@@ -120,7 +120,7 @@ struct wxCmdLineOption
void SetStrVal(const wxString& val)
{ Check(wxCMD_LINE_VAL_STRING); m_strVal = val; m_hasVal = true; }
#if wxUSE_DATETIME
void SetDateVal(const wxDateTime val)
void SetDateVal(const wxDateTime& val)
{ Check(wxCMD_LINE_VAL_DATE); m_dateVal = val; m_hasVal = true; }
#endif // wxUSE_DATETIME

View File

@@ -83,7 +83,7 @@ void wxEffects::DrawSunkenEdge(wxDC& dc, const wxRect& rect, int WXUNUSED(border
dc.SetPen(wxNullPen);
}
bool wxEffects::TileBitmap(const wxRect& rect, wxDC& dc, wxBitmap& bitmap)
bool wxEffects::TileBitmap(const wxRect& rect, wxDC& dc, const wxBitmap& bitmap)
{
static bool hiColour = (wxDisplayDepth() >= 16) ;

View File

@@ -572,7 +572,7 @@ wxFileConfig::~wxFileConfig()
// parse a config file
// ----------------------------------------------------------------------------
void wxFileConfig::Parse(wxTextBuffer& buffer, bool bLocal)
void wxFileConfig::Parse(const wxTextBuffer& buffer, bool bLocal)
{
const wxChar *pStart;
const wxChar *pEnd;

View File

@@ -514,7 +514,7 @@ void wxNativeFontInfo::SetUnderlined(bool underlined_)
underlined = underlined_;
}
void wxNativeFontInfo::SetFaceName(wxString facename_)
void wxNativeFontInfo::SetFaceName(const wxString& facename_)
{
faceName = facename_;
}

View File

@@ -41,7 +41,7 @@ class MemFSHashObj : public wxObject
InitTime();
}
MemFSHashObj(wxMemoryOutputStream& stream)
MemFSHashObj(const wxMemoryOutputStream& stream)
{
m_Len = stream.GetSize();
m_Data = new char[m_Len];

View File

@@ -641,8 +641,8 @@ wxSocketBase *wxFTP::AcceptIfActive(wxSocketBase *sock)
return sock;
}
wxString wxFTP::GetPortCmdArgument(wxIPV4address addrLocal,
wxIPV4address addrNew)
wxString wxFTP::GetPortCmdArgument(const wxIPV4address& addrLocal,
const wxIPV4address& addrNew)
{
// Just fills in the return value with the local IP
// address of the current socket. Also it fill in the

View File

@@ -47,7 +47,7 @@ wxConnectionBase::wxConnectionBase()
{
}
wxConnectionBase::wxConnectionBase(wxConnectionBase& copy)
wxConnectionBase::wxConnectionBase(const wxConnectionBase& copy)
: wxObject(),
m_connected(copy.m_connected),
m_buffer(copy.m_buffer),

View File

@@ -71,7 +71,7 @@ void wxTransformMatrix::operator = (const wxTransformMatrix& mat)
m_isIdentity = mat.m_isIdentity;
}
bool wxTransformMatrix::operator == (const wxTransformMatrix& mat)
bool wxTransformMatrix::operator == (const wxTransformMatrix& mat) const
{
if (m_isIdentity && mat.m_isIdentity)
return true;
@@ -88,7 +88,7 @@ bool wxTransformMatrix::operator == (const wxTransformMatrix& mat)
return true;
}
bool wxTransformMatrix::operator != (const wxTransformMatrix& mat)
bool wxTransformMatrix::operator != (const wxTransformMatrix& mat) const
{
return (! ((*this) == mat));
}

View File

@@ -214,7 +214,7 @@ wxString wxIPV4address::IPAddress() const
);
}
bool wxIPV4address::operator==(wxIPV4address& addr)
bool wxIPV4address::operator==(const wxIPV4address& addr) const
{
if(Hostname().Cmp(addr.Hostname().c_str()) == 0 && Service() == addr.Service()) return true;
return false;

View File

@@ -295,8 +295,10 @@ wxSize wxSizerItem::GetMinSizeWithBorder() const
}
void wxSizerItem::SetDimension( wxPoint pos, wxSize size )
void wxSizerItem::SetDimension( const wxPoint& pos_, const wxSize& size_ )
{
wxPoint pos = pos_;
wxSize size = size_;
if (m_flag & wxSHAPED)
{
// adjust aspect ratio

View File

@@ -1053,7 +1053,7 @@ wxUint32 wxSocketBase::GetPushback(void *buffer, wxUint32 size, bool peek)
// Ctor
// --------------------------------------------------------------------------
wxSocketServer::wxSocketServer(wxSockAddress& addr_man,
wxSocketServer::wxSocketServer(const wxSockAddress& addr_man,
wxSocketFlags flags)
: wxSocketBase(flags, wxSOCKET_SERVER)
{
@@ -1260,7 +1260,7 @@ bool wxSocketClient::WaitOnConnect(long seconds, long milliseconds)
/* NOTE: experimental stuff - might change */
wxDatagramSocket::wxDatagramSocket( wxSockAddress& addr,
wxDatagramSocket::wxDatagramSocket( const wxSockAddress& addr,
wxSocketFlags flags )
: wxSocketBase( flags, wxSOCKET_DATAGRAM )
{
@@ -1300,7 +1300,7 @@ wxDatagramSocket& wxDatagramSocket::RecvFrom( wxSockAddress& addr,
return (*this);
}
wxDatagramSocket& wxDatagramSocket::SendTo( wxSockAddress& addr,
wxDatagramSocket& wxDatagramSocket::SendTo( const wxSockAddress& addr,
const void* buf,
wxUint32 nBytes )
{

View File

@@ -89,7 +89,7 @@ bool wxIsStockID(wxWindowID id)
}
}
wxString wxGetStockLabel(wxWindowID id, bool withCodes, wxString accelerator)
wxString wxGetStockLabel(wxWindowID id, bool withCodes, const wxString& accelerator)
{
wxString stockLabel;

View File

@@ -1644,8 +1644,8 @@ void wxGridCellRenderer::Draw(wxGrid& grid,
// wxGridCellStringRenderer
// ----------------------------------------------------------------------------
void wxGridCellStringRenderer::SetTextColoursAndFont(wxGrid& grid,
wxGridCellAttr& attr,
void wxGridCellStringRenderer::SetTextColoursAndFont(const wxGrid& grid,
const wxGridCellAttr& attr,
wxDC& dc,
bool isSelected)
{
@@ -1676,7 +1676,7 @@ void wxGridCellStringRenderer::SetTextColoursAndFont(wxGrid& grid,
dc.SetFont( attr.GetFont() );
}
wxSize wxGridCellStringRenderer::DoGetBestSize(wxGridCellAttr& attr,
wxSize wxGridCellStringRenderer::DoGetBestSize(const wxGridCellAttr& attr,
wxDC& dc,
const wxString& text)
{
@@ -1797,7 +1797,7 @@ void wxGridCellStringRenderer::Draw(wxGrid& grid,
// wxGridCellNumberRenderer
// ----------------------------------------------------------------------------
wxString wxGridCellNumberRenderer::GetString(wxGrid& grid, int row, int col)
wxString wxGridCellNumberRenderer::GetString(const wxGrid& grid, int row, int col)
{
wxGridTableBase *table = grid.GetTable();
wxString text;
@@ -1863,7 +1863,7 @@ wxGridCellRenderer *wxGridCellFloatRenderer::Clone() const
return renderer;
}
wxString wxGridCellFloatRenderer::GetString(wxGrid& grid, int row, int col)
wxString wxGridCellFloatRenderer::GetString(const wxGrid& grid, int row, int col)
{
wxGridTableBase *table = grid.GetTable();
@@ -7563,7 +7563,7 @@ void wxGrid::StringToLines( const wxString& value, wxArrayString& lines )
}
void wxGrid::GetTextBoxSize( wxDC& dc,
void wxGrid::GetTextBoxSize( const wxDC& dc,
const wxArrayString& lines,
long *width, long *height )
{

View File

@@ -33,7 +33,7 @@
// Enables a grid cell to display a formated date and or time
wxGridCellDateTimeRenderer::wxGridCellDateTimeRenderer(wxString outformat, wxString informat)
wxGridCellDateTimeRenderer::wxGridCellDateTimeRenderer(const wxString& outformat, const wxString& informat)
{
m_iformat = informat;
m_oformat = outformat;
@@ -52,7 +52,7 @@ wxGridCellRenderer *wxGridCellDateTimeRenderer::Clone() const
return renderer;
}
wxString wxGridCellDateTimeRenderer::GetString(wxGrid& grid, int row, int col)
wxString wxGridCellDateTimeRenderer::GetString(const wxGrid& grid, int row, int col)
{
wxGridTableBase *table = grid.GetTable();
@@ -142,7 +142,7 @@ wxGridCellRenderer *wxGridCellEnumRenderer::Clone() const
return renderer;
}
wxString wxGridCellEnumRenderer::GetString(wxGrid& grid, int row, int col)
wxString wxGridCellEnumRenderer::GetString(const wxGrid& grid, int row, int col)
{
wxGridTableBase *table = grid.GetTable();
wxString text;
@@ -326,7 +326,7 @@ wxGridCellAutoWrapStringRenderer::Draw(wxGrid& grid,
wxArrayString
wxGridCellAutoWrapStringRenderer::GetTextLines(wxGrid& grid,
wxDC& dc,
wxGridCellAttr& attr,
const wxGridCellAttr& attr,
const wxRect& rect,
int row, int col)
{

View File

@@ -151,7 +151,7 @@ private:
class wxHtmlListBoxStyle : public wxDefaultHtmlRenderingStyle
{
public:
wxHtmlListBoxStyle(wxHtmlListBox& hlbox) : m_hlbox(hlbox) { }
wxHtmlListBoxStyle(const wxHtmlListBox& hlbox) : m_hlbox(hlbox) { }
virtual wxColour GetSelectedTextColour(const wxColour& colFg)
{

View File

@@ -362,7 +362,7 @@ public:
void GetItem( int index, wxListItem &info );
wxString GetText(int index) const;
void SetText( int index, const wxString s );
void SetText( int index, const wxString& s );
wxListItemAttr *GetAttr() const;
void SetAttr(wxListItemAttr *attr);
@@ -466,7 +466,7 @@ private:
// generate and process the list event of the given type, return true if
// it wasn't vetoed, i.e. if we should proceed
bool SendListEvent(wxEventType type, wxPoint pos);
bool SendListEvent(wxEventType type, const wxPoint& pos);
DECLARE_DYNAMIC_CLASS(wxListHeaderWindow)
DECLARE_EVENT_TABLE()
@@ -717,7 +717,7 @@ public:
// send out a wxListEvent
void SendNotify( size_t line,
wxEventType command,
wxPoint point = wxDefaultPosition );
const wxPoint& point = wxDefaultPosition );
// override base class virtual to reset m_lineHeight when the font changes
virtual bool SetFont(const wxFont& font)
@@ -1365,7 +1365,7 @@ wxString wxListLineData::GetText(int index) const
return s;
}
void wxListLineData::SetText( int index, const wxString s )
void wxListLineData::SetText( int index, const wxString& s )
{
wxListItemDataList::compatibility_iterator node = m_items.Item( index );
if (node)
@@ -2009,7 +2009,7 @@ void wxListHeaderWindow::OnSetFocus( wxFocusEvent &WXUNUSED(event) )
m_owner->Update();
}
bool wxListHeaderWindow::SendListEvent(wxEventType type, wxPoint pos)
bool wxListHeaderWindow::SendListEvent(wxEventType type, const wxPoint& pos)
{
wxWindow *parent = GetParent();
wxListEvent le( type, parent->GetId() );
@@ -2794,7 +2794,7 @@ void wxListMainWindow::HighlightAll( bool on )
void wxListMainWindow::SendNotify( size_t line,
wxEventType command,
wxPoint point )
const wxPoint& point )
{
wxListEvent le( command, GetParent()->GetId() );
le.SetEventObject( GetParent() );

View File

@@ -83,12 +83,12 @@ wxPalette& wxPalette::operator = (const wxPalette& palette)
return *this;
}
bool wxPalette::operator == (const wxPalette& palette)
bool wxPalette::operator == (const wxPalette& palette) const
{
return m_refData == palette.m_refData;
}
bool wxPalette::operator != (const wxPalette& palette)
bool wxPalette::operator != (const wxPalette& palette) const
{
return m_refData != palette.m_refData;
}

View File

@@ -275,7 +275,7 @@ wxObjectRefData *wxRegionGeneric::CloneRefData(const wxObjectRefData *data) cons
return new wxRegionRefData(*(wxRegionRefData *)data);
}
bool wxRegionGeneric::operator== (const wxRegionGeneric& region)
bool wxRegionGeneric::operator== (const wxRegionGeneric& region) const
{
wxASSERT(m_refData && region.m_refData);
return REGION::XEqualRegion(M_REGIONDATA,M_REGIONDATA_OF(region));

View File

@@ -173,7 +173,7 @@ void wxTextEntryDialog::SetTextValidator( long style )
m_textctrl->SetValidator( validator );
}
void wxTextEntryDialog::SetTextValidator( wxTextValidator& validator )
void wxTextEntryDialog::SetTextValidator( const wxTextValidator& validator )
{
m_textctrl->SetValidator( validator );
}

View File

@@ -157,7 +157,7 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
if (parent)
gtk_parent = GTK_WINDOW( gtk_widget_get_toplevel(parent->m_widget) );
gchar* ok_btn_stock;
const gchar* ok_btn_stock;
if ( style & wxSAVE )
{
gtk_action = GTK_FILE_CHOOSER_ACTION_SAVE;

View File

@@ -160,7 +160,7 @@ wxObjectRefData *wxRegion::CloneRefData(const wxObjectRefData *data) const
// wxRegion comparison
// ----------------------------------------------------------------------------
bool wxRegion::operator==( const wxRegion& region )
bool wxRegion::operator==( const wxRegion& region ) const
{
if (m_refData == region.m_refData) return TRUE;

View File

@@ -164,7 +164,7 @@ extern "C" {
static void wxGtkTextInsert(GtkWidget *text,
GtkTextBuffer *text_buffer,
const wxTextAttr& attr,
wxCharBuffer buffer)
const wxCharBuffer& buffer)
{
gint start_offset;

View File

@@ -157,7 +157,7 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
if (parent)
gtk_parent = GTK_WINDOW( gtk_widget_get_toplevel(parent->m_widget) );
gchar* ok_btn_stock;
const gchar* ok_btn_stock;
if ( style & wxSAVE )
{
gtk_action = GTK_FILE_CHOOSER_ACTION_SAVE;

View File

@@ -160,7 +160,7 @@ wxObjectRefData *wxRegion::CloneRefData(const wxObjectRefData *data) const
// wxRegion comparison
// ----------------------------------------------------------------------------
bool wxRegion::operator==( const wxRegion& region )
bool wxRegion::operator==( const wxRegion& region ) const
{
if (m_refData == region.m_refData) return TRUE;

View File

@@ -164,7 +164,7 @@ extern "C" {
static void wxGtkTextInsert(GtkWidget *text,
GtkTextBuffer *text_buffer,
const wxTextAttr& attr,
wxCharBuffer buffer)
const wxCharBuffer& buffer)
{
gint start_offset;

View File

@@ -1187,7 +1187,7 @@ void wxHtmlHelpFrame::WriteCustomization(wxConfigBase *cfg, const wxString& path
static void SetFontsToHtmlWin(wxHtmlWindow *win, wxString scalf, wxString fixf, int size)
static void SetFontsToHtmlWin(wxHtmlWindow *win, const wxString& scalf, const wxString& fixf, int size)
{
int f_sizes[7];
f_sizes[0] = int(size * 0.6);

View File

@@ -252,7 +252,7 @@ bool wxHtmlCell::IsBefore(wxHtmlCell *cell) const
IMPLEMENT_ABSTRACT_CLASS(wxHtmlWordCell, wxHtmlCell)
wxHtmlWordCell::wxHtmlWordCell(const wxString& word, wxDC& dc) : wxHtmlCell()
wxHtmlWordCell::wxHtmlWordCell(const wxString& word, const wxDC& dc) : wxHtmlCell()
{
m_Word = word;
dc.GetTextExtent(m_Word, &m_Width, &m_Height, &m_Descent);
@@ -272,7 +272,7 @@ void wxHtmlWordCell::SetPreviousWord(wxHtmlWordCell *cell)
// Splits m_Word into up to three parts according to selection, returns
// substring before, in and after selection and the points (in relative coords)
// where s2 and s3 start:
void wxHtmlWordCell::Split(wxDC& dc,
void wxHtmlWordCell::Split(const wxDC& dc,
const wxPoint& selFrom, const wxPoint& selTo,
unsigned& pos1, unsigned& pos2) const
{
@@ -337,7 +337,7 @@ void wxHtmlWordCell::Split(wxDC& dc,
pos2 = j;
}
void wxHtmlWordCell::SetSelectionPrivPos(wxDC& dc, wxHtmlSelection *s) const
void wxHtmlWordCell::SetSelectionPrivPos(const wxDC& dc, wxHtmlSelection *s) const
{
unsigned p1, p2;

View File

@@ -351,7 +351,7 @@ void wxHtmlParser::AddTagHandler(wxHtmlTagHandler *handler)
handler->SetParser(this);
}
void wxHtmlParser::PushTagHandler(wxHtmlTagHandler *handler, wxString tags)
void wxHtmlParser::PushTagHandler(wxHtmlTagHandler *handler, const wxString& tags)
{
wxStringTokenizer tokenizer(tags, wxT(", "));
wxString key;

View File

@@ -235,7 +235,7 @@ void wxHtmlWindow::SetRelatedStatusBar(int bar)
void wxHtmlWindow::SetFonts(wxString normal_face, wxString fixed_face, const int *sizes)
void wxHtmlWindow::SetFonts(const wxString& normal_face, const wxString& fixed_face, const int *sizes)
{
wxString op = m_OpenedPage;

View File

@@ -89,7 +89,7 @@ void wxHtmlDCRenderer::SetHtmlText(const wxString& html, const wxString& basepat
}
void wxHtmlDCRenderer::SetFonts(wxString normal_face, wxString fixed_face,
void wxHtmlDCRenderer::SetFonts(const wxString& normal_face, const wxString& fixed_face,
const int *sizes)
{
m_Parser->SetFonts(normal_face, fixed_face, sizes);
@@ -452,7 +452,7 @@ void wxHtmlPrintout::SetMargins(float top, float bottom, float left, float right
void wxHtmlPrintout::SetFonts(wxString normal_face, wxString fixed_face,
void wxHtmlPrintout::SetFonts(const wxString& normal_face, const wxString& fixed_face,
const int *sizes)
{
m_Renderer->SetFonts(normal_face, fixed_face, sizes);
@@ -628,7 +628,7 @@ void wxHtmlEasyPrinting::SetFooter(const wxString& footer, int pg)
}
void wxHtmlEasyPrinting::SetFonts(wxString normal_face, wxString fixed_face,
void wxHtmlEasyPrinting::SetFonts(const wxString& normal_face, const wxString& fixed_face,
const int *sizes)
{
m_fontMode = FontMode_Explicit;

View File

@@ -111,7 +111,7 @@ void wxHtmlWinParser::RemoveModule(wxHtmlTagsModule *module)
m_Modules.DeleteObject(module);
}
void wxHtmlWinParser::SetFonts(wxString normal_face, wxString fixed_face,
void wxHtmlWinParser::SetFonts(const wxString& normal_face, const wxString& fixed_face,
const int *sizes)
{
static int default_sizes[7] =

View File

@@ -60,7 +60,7 @@ wxFontDialog::~wxFontDialog()
// empty
}
void wxFontDialog::SetData(wxFontData& fontdata)
void wxFontDialog::SetData(const wxFontData& fontdata)
{
m_fontData = fontdata;
}

View File

@@ -968,7 +968,7 @@ public:
}
}
static void PrintOutType(wxString& sMessage, wxString sValue, CFTypeRef cfRef)
static void PrintOutType(wxString& sMessage, const wxString& sValue, CFTypeRef cfRef)
{
sMessage << wxT(" {");

View File

@@ -2555,7 +2555,7 @@ static pascal void wxMacControlUserPaneDrawProc(ControlRef control, SInt16 part)
win->MacControlUserPaneDrawProc(part) ;
}
static pascal ControlPartCode wxMacControlUserPaneHitTestProc(ControlRef control, Point where)
static pascal ControlPartCode wxMacControlUserPaneHitTestProc(ControlRef control, const Point& where)
{
wxTextCtrl *textCtrl = wxDynamicCast( wxFindControlFromMacControl(control) , wxTextCtrl ) ;
wxMacMLTEClassicControl * win = textCtrl ? (wxMacMLTEClassicControl*)(textCtrl->GetPeer()) : NULL ;
@@ -2565,7 +2565,7 @@ static pascal ControlPartCode wxMacControlUserPaneHitTestProc(ControlRef control
return kControlNoPart ;
}
static pascal ControlPartCode wxMacControlUserPaneTrackingProc(ControlRef control, Point startPt, ControlActionUPP actionProc)
static pascal ControlPartCode wxMacControlUserPaneTrackingProc(ControlRef control, const Point& startPt, ControlActionUPP actionProc)
{
wxTextCtrl *textCtrl = wxDynamicCast( wxFindControlFromMacControl(control) , wxTextCtrl ) ;
wxMacMLTEClassicControl * win = textCtrl ? (wxMacMLTEClassicControl*)(textCtrl->GetPeer()) : NULL ;

View File

@@ -31,7 +31,7 @@ class wxMacToolTip
wxMacToolTip( ) ;
~wxMacToolTip() ;
void Setup( WindowRef window , const wxString& text , wxPoint localPosition ) ;
void Setup( WindowRef window , const wxString& text , const wxPoint& localPosition ) ;
long GetMark() { return m_mark ; }
void Draw() ;
void Clear() ;
@@ -184,7 +184,7 @@ wxMacToolTip::wxMacToolTip()
m_timer = NULL ;
}
void wxMacToolTip::Setup( WindowRef win , const wxString& text , wxPoint localPosition )
void wxMacToolTip::Setup( WindowRef win , const wxString& text , const wxPoint& localPosition )
{
m_mark++ ;
Clear() ;

Some files were not shown because too many files have changed in this diff Show More