\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.
\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.
\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.
\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}).
\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.
\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.
\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.
\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
\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
%
\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
{ 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
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
{
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) ; }
{ 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 \
{ 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); } \
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
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); }
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); }
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();
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);
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; }
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);
};
{ 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
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
//
void StringToLines( const wxString& value, wxArrayString& lines );
- void GetTextBoxSize( wxDC& dc,
+ void GetTextBoxSize( const wxDC& dc,
const wxArrayString& lines,
long *width, long *height );
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,
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;
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;
};
private:
wxArrayString GetTextLines( wxGrid& grid,
wxDC& dc,
- wxGridCellAttr& attr,
+ const wxGridCellAttr& attr,
const wxRect& rect,
int row, int col);
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);
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
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
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;
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();
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();
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;
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;
// 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();
#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
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
// 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
// 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
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
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; }
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;
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 ;
wxFontData& GetFontData() { return m_fontData; }
bool IsShown() const;
void OnPanelClose();
- void SetData(wxFontData& data);
+ void SetData(const wxFontData& data);
protected:
wxWindow* m_dialogParent;
// 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:
};
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); }
~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) ; }
// 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
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;
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 ;
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 ;
// 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:
};
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); }
~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) ; }
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);
~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;
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;
// 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);
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,
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
virtual int Type() { return wxSockAddress::IPV4; }
virtual wxSockAddress *Clone() const;
- bool operator==(wxIPV4address& addr);
+ bool operator==(const wxIPV4address& addr) const;
private:
wxString m_origHostname;
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; }
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
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);
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 );
// 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:
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();
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);
#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 :-)"))
}
#endif
-DoodleSegment::DoodleSegment(DoodleSegment& seg):wxObject()
+DoodleSegment::DoodleSegment(const DoodleSegment& seg):wxObject()
{
wxList::compatibility_iterator node = seg.lines.GetFirst();
while (node)
wxList lines;
DoodleSegment(void){};
- DoodleSegment(DoodleSegment& seg);
+ DoodleSegment(const DoodleSegment& seg);
~DoodleSegment(void);
void Draw(wxDC *dc);
}
#endif
-DoodleSegment::DoodleSegment(DoodleSegment& seg)
+DoodleSegment::DoodleSegment(const DoodleSegment& seg)
:wxObject()
{
wxList::compatibility_iterator node = seg.lines.GetFirst();
wxList lines;
DoodleSegment(void){};
- DoodleSegment(DoodleSegment& seg);
+ DoodleSegment(const DoodleSegment& seg);
~DoodleSegment(void);
void Draw(wxDC *dc);
#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.");
{
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
}
// 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))
{
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
}
// 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;
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);
{
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
// 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
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
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) ;
// 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;
underlined = underlined_;
}
-void wxNativeFontInfo::SetFaceName(wxString facename_)
+void wxNativeFontInfo::SetFaceName(const wxString& facename_)
{
faceName = facename_;
}
InitTime();
}
- MemFSHashObj(wxMemoryOutputStream& stream)
+ MemFSHashObj(const wxMemoryOutputStream& stream)
{
m_Len = stream.GetSize();
m_Data = new char[m_Len];
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
{
}
-wxConnectionBase::wxConnectionBase(wxConnectionBase& copy)
+wxConnectionBase::wxConnectionBase(const wxConnectionBase& copy)
: wxObject(),
m_connected(copy.m_connected),
m_buffer(copy.m_buffer),
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;
return true;
}
-bool wxTransformMatrix::operator != (const wxTransformMatrix& mat)
+bool wxTransformMatrix::operator != (const wxTransformMatrix& mat) const
{
return (! ((*this) == mat));
}
);
}
-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;
}
-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
// Ctor
// --------------------------------------------------------------------------
-wxSocketServer::wxSocketServer(wxSockAddress& addr_man,
+wxSocketServer::wxSocketServer(const wxSockAddress& addr_man,
wxSocketFlags flags)
: wxSocketBase(flags, wxSOCKET_SERVER)
{
/* NOTE: experimental stuff - might change */
-wxDatagramSocket::wxDatagramSocket( wxSockAddress& addr,
+wxDatagramSocket::wxDatagramSocket( const wxSockAddress& addr,
wxSocketFlags flags )
: wxSocketBase( flags, wxSOCKET_DATAGRAM )
{
return (*this);
}
-wxDatagramSocket& wxDatagramSocket::SendTo( wxSockAddress& addr,
+wxDatagramSocket& wxDatagramSocket::SendTo( const wxSockAddress& addr,
const void* buf,
wxUint32 nBytes )
{
}
}
-wxString wxGetStockLabel(wxWindowID id, bool withCodes, wxString accelerator)
+wxString wxGetStockLabel(wxWindowID id, bool withCodes, const wxString& accelerator)
{
wxString stockLabel;
// wxGridCellStringRenderer
// ----------------------------------------------------------------------------
-void wxGridCellStringRenderer::SetTextColoursAndFont(wxGrid& grid,
- wxGridCellAttr& attr,
+void wxGridCellStringRenderer::SetTextColoursAndFont(const wxGrid& grid,
+ const wxGridCellAttr& attr,
wxDC& dc,
bool isSelected)
{
dc.SetFont( attr.GetFont() );
}
-wxSize wxGridCellStringRenderer::DoGetBestSize(wxGridCellAttr& attr,
+wxSize wxGridCellStringRenderer::DoGetBestSize(const wxGridCellAttr& attr,
wxDC& dc,
const wxString& text)
{
// 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;
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();
}
-void wxGrid::GetTextBoxSize( wxDC& dc,
+void wxGrid::GetTextBoxSize( const wxDC& dc,
const wxArrayString& lines,
long *width, long *height )
{
// 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;
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();
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;
wxArrayString
wxGridCellAutoWrapStringRenderer::GetTextLines(wxGrid& grid,
wxDC& dc,
- wxGridCellAttr& attr,
+ const wxGridCellAttr& attr,
const wxRect& rect,
int row, int col)
{
class wxHtmlListBoxStyle : public wxDefaultHtmlRenderingStyle
{
public:
- wxHtmlListBoxStyle(wxHtmlListBox& hlbox) : m_hlbox(hlbox) { }
+ wxHtmlListBoxStyle(const wxHtmlListBox& hlbox) : m_hlbox(hlbox) { }
virtual wxColour GetSelectedTextColour(const wxColour& colFg)
{
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);
// 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()
// 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)
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)
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() );
void wxListMainWindow::SendNotify( size_t line,
wxEventType command,
- wxPoint point )
+ const wxPoint& point )
{
wxListEvent le( command, GetParent()->GetId() );
le.SetEventObject( GetParent() );
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;
}
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));
m_textctrl->SetValidator( validator );
}
-void wxTextEntryDialog::SetTextValidator( wxTextValidator& validator )
+void wxTextEntryDialog::SetTextValidator( const wxTextValidator& validator )
{
m_textctrl->SetValidator( validator );
}
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;
// wxRegion comparison
// ----------------------------------------------------------------------------
-bool wxRegion::operator==( const wxRegion& region )
+bool wxRegion::operator==( const wxRegion& region ) const
{
if (m_refData == region.m_refData) return TRUE;
static void wxGtkTextInsert(GtkWidget *text,
GtkTextBuffer *text_buffer,
const wxTextAttr& attr,
- wxCharBuffer buffer)
+ const wxCharBuffer& buffer)
{
gint start_offset;
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;
// wxRegion comparison
// ----------------------------------------------------------------------------
-bool wxRegion::operator==( const wxRegion& region )
+bool wxRegion::operator==( const wxRegion& region ) const
{
if (m_refData == region.m_refData) return TRUE;
static void wxGtkTextInsert(GtkWidget *text,
GtkTextBuffer *text_buffer,
const wxTextAttr& attr,
- wxCharBuffer buffer)
+ const wxCharBuffer& buffer)
{
gint start_offset;
-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);
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);
// 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
{
pos2 = j;
}
-void wxHtmlWordCell::SetSelectionPrivPos(wxDC& dc, wxHtmlSelection *s) const
+void wxHtmlWordCell::SetSelectionPrivPos(const wxDC& dc, wxHtmlSelection *s) const
{
unsigned p1, p2;
handler->SetParser(this);
}
-void wxHtmlParser::PushTagHandler(wxHtmlTagHandler *handler, wxString tags)
+void wxHtmlParser::PushTagHandler(wxHtmlTagHandler *handler, const wxString& tags)
{
wxStringTokenizer tokenizer(tags, wxT(", "));
wxString key;
-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;
}
-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);
-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);
}
-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;
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] =
// empty
}
-void wxFontDialog::SetData(wxFontData& fontdata)
+void wxFontDialog::SetData(const wxFontData& fontdata)
{
m_fontData = fontdata;
}
}
}
- static void PrintOutType(wxString& sMessage, wxString sValue, CFTypeRef cfRef)
+ static void PrintOutType(wxString& sMessage, const wxString& sValue, CFTypeRef cfRef)
{
sMessage << wxT(" {");
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 ;
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 ;
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() ;
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() ;
}
}
-ControlRef wxMacFindSubControl( wxTopLevelWindowMac* toplevelWindow, Point location , ControlRef superControl , ControlPartCode *outPart )
+ControlRef wxMacFindSubControl( wxTopLevelWindowMac* toplevelWindow, const Point& location , ControlRef superControl , ControlPartCode *outPart )
{
if ( superControl )
{
return NULL ;
}
-ControlRef wxMacFindControlUnderMouse( wxTopLevelWindowMac* toplevelWindow , Point location , WindowRef window , ControlPartCode *outPart )
+ControlRef wxMacFindControlUnderMouse( wxTopLevelWindowMac* toplevelWindow , const Point& location , WindowRef window , ControlPartCode *outPart )
{
#if TARGET_API_MAC_OSX
if ( UMAGetSystemVersion() >= 0x1030 && ( toplevelWindow == 0 || toplevelWindow->MacUsesCompositing() ) )
return wxTheClipboard->IsOpened();
}
-bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat)
+bool wxIsClipboardFormatAvailable(const wxDataFormat& dataFormat)
{
return wxTheClipboard->IsSupported( dataFormat );
}
return NULL; // just in case...
}
-wxDataFormat wxEnumClipboardFormats(wxDataFormat dataFormat)
+wxDataFormat wxEnumClipboardFormats(const wxDataFormat& dataFormat)
{
// Only wxDF_TEXT supported
if (dataFormat == wxDF_TEXT)
return wxDF_INVALID;
}
-bool wxGetClipboardFormatName(wxDataFormat dataFormat, char *formatName,
+bool wxGetClipboardFormatName(const wxDataFormat& dataFormat, char *formatName,
int maxCount)
{
wxStrncpy( formatName, dataFormat.GetId().c_str(), maxCount );
IMPLEMENT_DYNAMIC_CLASS(wxSpinButton, wxControl);
IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxNotifyEvent);
-static void CalcSizes( wxPoint pt, wxSize sz,
+static void CalcSizes( const wxPoint& pt, const wxSize& sz,
wxPoint& pt1, wxSize& sz1,
wxPoint& pt2, wxSize& sz2,
bool isVertical )
NULL);
}
-extern void wxDoChangeFont(WXWidget widget, wxFont& font)
+extern void wxDoChangeFont(WXWidget widget, const wxFont& font)
{
// Lesstif 0.87 hangs here, but 0.93 does not; MBN: sometimes it does
#if !wxCHECK_LESSTIF() // || wxCHECK_LESSTIF_VERSION( 0, 93 )
// Creates a bitmap with transparent areas drawn in
// the given colour.
-wxBitmap wxCreateMaskedBitmap(const wxBitmap& bitmap, wxColour& colour)
+wxBitmap wxCreateMaskedBitmap(const wxBitmap& bitmap, const wxColour& colour)
{
wxBitmap newBitmap(bitmap.GetWidth(),
bitmap.GetHeight(),
// Find the wxWindow at the current mouse position, returning the mouse
// position.
-wxWindow* wxFindWindowAtPointer(wxPoint& pt)
+wxWindow* wxFindWindowAtPointer(const wxPoint& pt)
{
return wxFindWindowAtPoint(wxGetMousePosition());
}
lf.lfUnderline = underlined;
}
-void wxNativeFontInfo::SetFaceName(wxString facename)
+void wxNativeFontInfo::SetFaceName(const wxString& facename)
{
wxStrncpy(lf.lfFaceName, facename, WXSIZEOF(lf.lfFaceName));
}
}
// init with conversion
- void Init(LV_ITEM_OTHER& item)
+ void Init(const LV_ITEM_OTHER& item)
{
// avoid unnecessary dynamic memory allocation, jjust make m_pItem
// point to our own m_item
}
// Sets information about this column
-bool wxListCtrl::SetColumn(int col, wxListItem& item)
+bool wxListCtrl::SetColumn(int col, const wxListItem& item)
{
LV_COLUMN lvCol;
wxConvertToMSWListCol(col, item, lvCol);
// Inserts an item, returning the index of the new item if successful,
// -1 otherwise.
-long wxListCtrl::InsertItem(wxListItem& info)
+long wxListCtrl::InsertItem(const wxListItem& info)
{
wxASSERT_MSG( !IsVirtual(), _T("can't be used with virtual controls") );
}
// For list view mode (only), inserts a column.
-long wxListCtrl::InsertColumn(long col, wxListItem& item)
+long wxListCtrl::InsertColumn(long col, const wxListItem& item)
{
LV_COLUMN lvCol;
wxConvertToMSWListCol(col, item, lvCol);
wxDL_VOIDMETHOD_DEFINE(DestroyPortAssociation, (CGrafPtr g), (g));
wxDL_VOIDMETHOD_DEFINE(NativeEventToMacEvent, (MSG* p1, EventRecord* p2), (p1,p2));
wxDL_VOIDMETHOD_DEFINE(MCIsPlayerEvent, (ComponentInstance ci, EventRecord* p2), (ci, p2));
- wxDL_METHOD_DEFINE(int, MCSetMovie, (ComponentInstance ci, Movie m, void* p1, Point w),
+ wxDL_METHOD_DEFINE(int, MCSetMovie, (ComponentInstance ci, Movie m, void* p1, const Point& w),
(ci,m,p1,w),0);
wxDL_VOIDMETHOD_DEFINE(MCPositionController,
(ComponentInstance ci, Rect* r, void* junk, void* morejunk), (ci,r,junk,morejunk));
} // end of wxNativeFontInfo::SetUnderlined
void wxNativeFontInfo::SetFaceName(
- wxString sFacename
+ const wxString& sFacename
)
{
wxStrncpy((wxChar*)fa.szFacename, sFacename, WXSIZEOF(fa.szFacename));
wxFAIL_MSG( _T("not implemented") );
}
-void wxNativeFontInfo::SetFaceName(wxString facename)
+void wxNativeFontInfo::SetFaceName(const wxString& facename)
{
pango_font_description_set_family( description, wxGTK_CONV(facename) );
}
// can't do this under X
}
-void wxNativeFontInfo::SetFaceName(wxString facename)
+void wxNativeFontInfo::SetFaceName(const wxString& facename)
{
SetXFontComponent(wxXLFD_FAMILY, facename);
}
// wxRegion comparison
// ----------------------------------------------------------------------------
-bool wxRegion::operator==( const wxRegion& region )
+bool wxRegion::operator==( const wxRegion& region ) const
{
if (m_refData == region.m_refData) return TRUE;