diff --git a/distrib/msw/wx_html.rsp b/distrib/msw/wx_html.rsp
index 8324d3a231..0fd2444d4f 100644
--- a/distrib/msw/wx_html.rsp
+++ b/distrib/msw/wx_html.rsp
@@ -9,30 +9,27 @@ docs/html/faq/*.htm
docs/html/faq/*.gif
docs/html/techref/*.htm
docs/html/techref/*.gif
-docs/html/prologio/*.htm
-docs/html/prologio/*.gif
+
docs/html/dialoged/*.htm
docs/html/dialoged/*.gif
-docs/html/wxbuild/*.htm
-docs/html/wxbuild/*.gif
-docs/html/wxtab/*.htm
-docs/html/wxtab/*.gif
-docs/html/wxchart/*.htm
-docs/html/wxchart/*.gif
+
docs/html/wxtree/*.htm
docs/html/wxtree/*.gif
+
docs/html/wxgraph/*.htm
docs/html/wxgraph/*.gif
-docs/html/wxgrid/*.htm
-docs/html/wxgrid/*.gif
+
docs/html/wxhelp/*.htm
docs/html/wxhelp/*.gif
-docs/html/wxhelp2/*.htm
-docs/html/wxhelp2/*.gif
+
docs/html/wxprop/*.htm
docs/html/wxprop/*.gif
+
docs/html/winstall/*.htm
docs/html/winstall/*.gif
+
docs/html/tex2rtf/*.htm
docs/html/tex2rtf/*.gif
+docs/html/odbc/*.htm
+
diff --git a/docs/latex/wx/dc.tex b/docs/latex/wx/dc.tex
index e2fb6a9f9a..eddddcd335 100644
--- a/docs/latex/wx/dc.tex
+++ b/docs/latex/wx/dc.tex
@@ -329,13 +329,13 @@ and using a style:
\membersection{wxDC::GetBackground}\label{wxdcgetbackground}
-\func{wxBrush *}{GetBackground}{\void}
+\func{wxBrush\&}{GetBackground}{\void}
Gets the brush used for painting the background (see \helpref{wxDC::SetBackground}{wxdcsetbackground}).
\membersection{wxDC::GetBrush}\label{wxdcgetbrush}
-\func{wxBrush *}{GetBrush}{\void}
+\func{wxBrush\&}{GetBrush}{\void}
Gets the current brush (see \helpref{wxDC::SetBrush}{wxdcsetbrush}).
@@ -359,7 +359,7 @@ Gets the rectangle surrounding the current clipping region.
\membersection{wxDC::GetFont}\label{wxdcgetfont}
-\func{wxFont *}{GetFont}{\void}
+\func{wxFont\&}{GetFont}{\void}
Gets the current font (see \helpref{wxDC::SetFont}{wxdcsetfont}).
@@ -384,7 +384,7 @@ See \helpref{wxDC::SetOptimization}{wxsetoptimization} for details.
\membersection{wxDC::GetPen}\label{wxdcgetpen}
-\func{wxPen *}{GetPen}{\void}
+\func{wxPen\&}{GetPen}{\void}
Gets the current pen (see \helpref{wxDC::SetPen}{wxdcsetpen}).
diff --git a/docs/latex/wx/grid.tex b/docs/latex/wx/grid.tex
index 7893892a05..39e4a04a1b 100644
--- a/docs/latex/wx/grid.tex
+++ b/docs/latex/wx/grid.tex
@@ -112,7 +112,7 @@ See also \helpref{wxGrid::BeginBatch}{wxgridbeginbatch}, \helpref{wxGrid::GetBat
\membersection{wxGrid::GetBatchCount}\label{wxgridgetbatchcount}
-\func{void}{GetBatchCount}{\void}
+\constfunc{int}{GetBatchCount}{\void}
Return the level of batch nesting. This is initially zero, and will be incremented
every time BeginBatch is called, and decremented when EndBatch is called. When the
@@ -123,7 +123,7 @@ See also \helpref{wxGrid::BeginBatch}{wxgridbeginbatch}, \helpref{wxGrid::EndBat
\membersection{wxGrid::GetCell}\label{wxgridgetcell}
-\func{wxGridCell *}{GetCell}{\param{int}{ row}, \param{int}{ col}}
+\constfunc{wxGridCell *}{GetCell}{\param{int}{ row}, \param{int}{ col}}
Returns the grid cell object associated with this position.
@@ -131,95 +131,95 @@ wxGenericGrid implementation only.
\membersection{wxGrid::GetCellAlignment}\label{wxgridgetcellalignment}
-\func{int}{GetCellAlignment}{\param{int}{ row}, \param{int}{ col}}
+\constfunc{int}{GetCellAlignment}{\param{int}{ row}, \param{int}{ col}}
-\func{int}{GetCellAlignment}{\void}
+\constfunc{int}{GetCellAlignment}{\void}
Sets the text alignment for the cell at the given position, or the global alignment value.
The return value is wxLEFT, wxRIGHT or wxCENTRE.
\membersection{wxGrid::GetCellBackgroundColour}\label{wxgridgetcellbackgroundcolour}
-\func{wxColour\&}{GetCellBackgroundColour}{\param{int}{ row}, \param{int}{ col}}
+\constfunc{wxColour\&}{GetCellBackgroundColour}{\param{int}{ row}, \param{int}{ col}}
-\func{wxColour\&}{GetCellBackgroundColour}{\void}
+\constfunc{wxColour\&}{GetCellBackgroundColour}{\void}
Gets the background colour for the cell at the given position, or the global background colour.
\membersection{wxGrid::GetCells}\label{wxgridgetcells}
-\func{wxGridCell ***}{GetCells}{\void}
+\constfunc{wxGridCell ***}{GetCells}{\void}
Returns the array of grid cell object associated with this wxGrid.
\membersection{wxGrid::GetCellTextColour}\label{wxgridgetcelltextcolour}
-\func{wxColour\&}{GetCellTextColour}{\param{int}{ row}, \param{int}{ col}}
+\constfunc{wxColour\&}{GetCellTextColour}{\param{int}{ row}, \param{int}{ col}}
-\func{wxColour\&}{GetCellTextColour}{\void}
+\constfunc{wxColour\&}{GetCellTextColour}{\void}
Gets the text colour for the cell at the given position, or the global text colour.
\membersection{wxGrid::GetCellTextFont}\label{wxgridgetcelltextfont}
-\func{wxFont *}{GetCellTextFont}{\param{int}{ row}, \param{int}{ col}}
+\constfunc{const wxFont\&}{GetCellTextFont}{\param{int}{ row}, \param{int}{ col}}
-\func{wxFont *}{GetCellTextFont}{\void}
+\constfunc{wxFont\&}{GetCellTextFont}{\void}
Gets the text font for the cell at the given position, or the global text font.
\membersection{wxGrid::GetCellValue}\label{wxgridgetcellvalue}
-\func{wxString\&}{GetCellValue}{\param{int}{ row}, \param{int}{ col}}
+\constfunc{wxString\&}{GetCellValue}{\param{int}{ row}, \param{int}{ col}}
Returns the cell value at the given position.
\membersection{wxGrid::GetCols}\label{wxgridgetcols}
-\func{int}{GetCols}{\void}
+\constfunc{int}{GetCols}{\void}
Returns the number of columns in the grid.
\membersection{wxGrid::GetColumnWidth}\label{wxgridcolumnwidth}
-\func{int}{GetColumnWidth}{\param{int}{ col}}
+\constfunc{int}{GetColumnWidth}{\param{int}{ col}}
Gets the width in pixels for column {\it col}.
\membersection{wxGrid::GetCurrentRect}\label{wxgridgetcurrentrect}
-\func{wxRectangle *}{GetCurrentRect}{\void}
+\constfunc{wxRectangle *}{GetCurrentRect}{\void}
Returns a pointer to the rectangle enclosing the currently selected cell.
Do not delete this pointer.
\membersection{wxGrid::GetCursorColumn}\label{wxgridgetcursorcolumn}
-\func{int}{GetCursorColumn}{\void}
+\constfunc{int}{GetCursorColumn}{\void}
Returns the column position of the currently selected cell.
\membersection{wxGrid::GetCursorRow}\label{wxgridgetcursorrow}
-\func{int}{GetCursorRow}{\void}
+\constfunc{int}{GetCursorRow}{\void}
Returns the row position of the currently selected cell.
\membersection{wxGrid::GetEditable}\label{wxgridgeteditable}
-\func{bool}{GetEditable}{\void}
+\constfunc{bool}{GetEditable}{\void}
Returns TRUE if the grid cells can be edited.
\membersection{wxGrid::GetHorizScrollBar}\label{wxgridgethorizscrollbar}
-\func{wxScrollBar *}{GetHorizScrollBar}{\void}
+\constfunc{wxScrollBar *}{GetHorizScrollBar}{\void}
Returns a pointer to the horizontal scrollbar.
\membersection{wxGrid::GetLabelAlignment}\label{wxgridgetlabelalignment}
-\func{int}{GetLabelAlignment}{\param{int}{ orientation}}
+\constfunc{int}{GetLabelAlignment}{\param{int}{ orientation}}
Gets the row or column label alignment. {\it orientation} should
be wxHORIZONTAL to specify column label, wxVERTICAL to specify row label.\rtfsp
@@ -227,32 +227,32 @@ be wxHORIZONTAL to specify column label, wxVERTICAL to specify row label.\rtfsp
\membersection{wxGrid::GetLabelBackgroundColour}\label{wxgridgetlabelbackgroundcolour}
-\func{wxColour\&}{GetLabelBackgroundColour}{\void}
+\constfunc{wxColour\&}{GetLabelBackgroundColour}{\void}
Gets a row and column label text colour.
\membersection{wxGrid::GetLabelSize}\label{wxgridgetlabelsize}
-\func{int}{GetLabelSize}{\param{int}{ orientation}}
+\constfunc{int}{GetLabelSize}{\param{int}{ orientation}}
Gets the row label height, or column label width, in pixels. {\it orientation} should
be wxHORIZONTAL to specify column label, wxVERTICAL to specify row label.
\membersection{wxGrid::GetLabelTextColour}\label{wxgridgetlabeltextcolour}
-\func{wxColour\&}{GetLabelTextColour}{\void}
+\constfunc{wxColour\&}{GetLabelTextColour}{\void}
Gets a row and column label text colour.
\membersection{wxGrid::GetLabelTextFont}\label{wxgridgetlabeltextfont}
-\func{wxFont *}{GetLabelTextFont}{\void}
+\constfunc{wxFont\&}{GetLabelTextFont}{\void}
Gets the font to be used for the row and column labels.
\membersection{wxGrid::GetLabelValue}\label{wxgridgetlabelvalue}
-\func{wxString\&}{GetLabelValue}{\param{int}{ orientation}, \param{int}{ pos}}
+\constfunc{wxString\&}{GetLabelValue}{\param{int}{ orientation}, \param{int}{ pos}}
Gets a row or column label value. {\it orientation} should
be wxHORIZONTAL to specify column label, wxVERTICAL to specify row label.\rtfsp
@@ -260,37 +260,37 @@ be wxHORIZONTAL to specify column label, wxVERTICAL to specify row label.\rtfsp
\membersection{wxGrid::GetRowHeight}\label{wxgridgetrowheight}
-\func{int}{GetRowHeight}{\param{int}{ row}}
+\constfunc{int}{GetRowHeight}{\param{int}{ row}}
Gets the height in pixels for row {\it row}.
\membersection{wxGrid::GetRows}\label{wxgridgetrows}
-\func{int}{GetRows}{\void}
+\constfunc{int}{GetRows}{\void}
Returns the number of rows in the grid.
\membersection{wxGrid::GetScrollPosX}\label{wxgridgetscrollposx}
-\func{int}{GetScrollPosX}{\void}
+\constfunc{int}{GetScrollPosX}{\void}
Returns the column scroll position.
\membersection{wxGrid::GetScrollPosY}\label{wxgridgetscrollposy}
-\func{int}{GetScrollPosY}{\void}
+\constfunc{int}{GetScrollPosY}{\void}
Returns the row scroll position.
\membersection{wxGrid::GetTextItem}\label{wxgridgettextitem}
-\func{wxText *}{GetTextItem}{\void}
+\constfunc{wxText *}{GetTextItem}{\void}
Returns a pointer to the text item used for entering text into a cell.
\membersection{wxGrid::GetVertScrollBar}\label{wxgridgetvertscrollbar}
-\func{wxScrollBar *}{GetVertScrollBar}{\void}
+\constfunc{wxScrollBar *}{GetVertScrollBar}{\void}
Returns a pointer to the vertical scrollbar.
@@ -417,9 +417,9 @@ Sets the text colour for the cell at the given position, or for the whole grid.
\membersection{wxGrid::SetCellTextFont}\label{wxgridsetcelltextfont}
-\func{void}{SetCellTextFont}{\param{wxFont *}{font}, \param{int}{ row}, \param{int}{ col}}
+\func{void}{SetCellTextFont}{\param{const wxFont\&}{ font}, \param{int}{ row}, \param{int}{ col}}
-\func{void}{SetCellTextFont}{\param{wxFont *}{font}}
+\func{void}{SetCellTextFont}{\param{const wxFont\&}{ font}}
Sets the text font for the cell at the given position, or for the whole grid.
@@ -437,7 +437,7 @@ Sets the width in pixels for column {\it col}.
\membersection{wxGrid::SetDividerPen}\label{wxgridsetdividerpen}
-\func{void}{SetDividerPen}{\param{wxPen *}{pen}}
+\func{void}{SetDividerPen}{\param{const wxPen\&}{ pen}}
Specifies the pen to be used for drawing the divisions between cells. The default
is a light grey. If NULL is specified, the divisions will not be drawn.
@@ -488,7 +488,7 @@ Sets a row and column label text colour.
\membersection{wxGrid::SetLabelTextFont}\label{wxgridsetlabeltextfont}
-\func{void}{SetLabelTextFont}{\param{wxFont *}{font}}
+\func{void}{SetLabelTextFont}{\param{const wxFont\&}{ font}}
Sets the font to be used for the row and column labels.
diff --git a/docs/latex/wx/window.tex b/docs/latex/wx/window.tex
index 65a3197659..b5ef3bc1e0 100644
--- a/docs/latex/wx/window.tex
+++ b/docs/latex/wx/window.tex
@@ -379,9 +379,9 @@ Returns the average character width for this window.
\membersection{wxWindow::GetChildren}
-\func{wxList*}{GetChildren}{\void}
+\func{wxList\&}{GetChildren}{\void}
-Returns a pointer to the list of the window's children.
+Returns a reference to the list of the window's children.
\membersection{wxWindow::GetClientSize}\label{wxwindowgetclientsize}
@@ -427,9 +427,9 @@ own event handler.
\membersection{wxWindow::GetFont}\label{wxwindowgetfont}
-\constfunc{wxFont*}{GetFont}{\void}
+\constfunc{wxFont\&}{GetFont}{\void}
-Returns a pointer to the font for this window.
+Returns a reference to the font for this window.
\wxheading{See also}
diff --git a/docs/motif/todo.txt b/docs/motif/todo.txt
index f75d67775b..ee35bec834 100644
--- a/docs/motif/todo.txt
+++ b/docs/motif/todo.txt
@@ -35,7 +35,8 @@ High Priority
painting a tiled bitmap, then a slight flicker might be seen unless
X can be persuaded not to repaint the window background by default.
-- Finish wxNotebook.
+- wxNotebook bug: why doesn't the notebook sample appear until the
+ user resizes the window again? But it's OK for MDI. Strange.
- wxSpinButton
diff --git a/docs/word/odbc.doc b/docs/word/odbc.doc
index 670795d3af..7f60405dd2 100644
Binary files a/docs/word/odbc.doc and b/docs/word/odbc.doc differ
diff --git a/include/wx/generic/gridg.h b/include/wx/generic/gridg.h
index 4fa80a339b..b7bd11f4be 100644
--- a/include/wx/generic/gridg.h
+++ b/include/wx/generic/gridg.h
@@ -72,8 +72,8 @@ class WXDLLEXPORT wxGenericGrid: public wxPanel
short defaultWidth = wxGRID_DEFAULT_CELL_WIDTH, short defaultHeight = wxGRID_DEFAULT_CELL_HEIGHT);
void PaintGrid(wxDC& dc);
void ClearGrid(void);
- virtual wxGridCell *GetCell(int row, int col);
- inline wxGridCell ***GetCells(void) { return m_gridCells; }
+ virtual wxGridCell *GetCell(int row, int col) const;
+ inline wxGridCell ***GetCells(void) const { return m_gridCells; }
bool InsertCols(int pos = 0, int n = 1, bool updateLabels = TRUE);
bool InsertRows(int pos = 0, int n = 1, bool updateLabels = TRUE);
bool AppendCols(int n = 1, bool updateLabels = TRUE);
@@ -83,66 +83,66 @@ class WXDLLEXPORT wxGenericGrid: public wxPanel
// Cell accessors
void SetCellValue(const wxString& val, int row, int col);
- wxString& GetCellValue(int row, int col);
+ wxString& GetCellValue(int row, int col) const;
void SetCellAlignment(int flag, int row, int col);
void SetCellAlignment(int flag);
- int GetCellAlignment(int row, int col);
- int GetCellAlignment(void);
+ int GetCellAlignment(int row, int col) const;
+ int GetCellAlignment(void) const;
void SetCellTextColour(const wxColour& val, int row, int col);
void SetCellTextColour(const wxColour& col);
- wxColour& GetCellTextColour(int row, int col);
- inline wxColour& GetCellTextColour(void) { return m_cellTextColour; }
+ wxColour& GetCellTextColour(int row, int col) const;
+ inline wxColour& GetCellTextColour(void) const { return (wxColour&) m_cellTextColour; }
void SetCellBackgroundColour(const wxColour& col);
void SetCellBackgroundColour(const wxColour& colour, int row, int col);
- inline wxColour& GetCellBackgroundColour(void) { return m_cellBackgroundColour; }
- wxColour& GetCellBackgroundColour(int row, int col);
- inline wxFont *GetCellTextFont(void) { return m_cellTextFont; }
- wxFont *GetCellTextFont(int row, int col);
- void SetCellTextFont(wxFont *fnt);
- void SetCellTextFont(wxFont *fnt, int row, int col);
- wxBitmap *GetCellBitmap(int row, int col);
+ inline wxColour& GetCellBackgroundColour(void) const { return (wxColour&) m_cellBackgroundColour; }
+ wxColour& GetCellBackgroundColour(int row, int col) const;
+ inline wxFont& GetCellTextFont(void) const { return (wxFont&) m_cellTextFont; }
+ wxFont& GetCellTextFont(int row, int col) const;
+ void SetCellTextFont(const wxFont& fnt);
+ void SetCellTextFont(const wxFont& fnt, int row, int col);
+ wxBitmap *GetCellBitmap(int row, int col) const;
void SetCellBitmap(wxBitmap *bitmap, int row, int col);
// Size accessors
void SetColumnWidth(int col, int width);
- int GetColumnWidth(int col);
+ int GetColumnWidth(int col) const;
void SetRowHeight(int row, int height);
- int GetRowHeight(int row);
+ int GetRowHeight(int row) const;
// Label accessors
void SetLabelSize(int orientation, int sz);
- int GetLabelSize(int orientation);
+ int GetLabelSize(int orientation) const;
void SetLabelAlignment(int orientation, int alignment);
- int GetLabelAlignment(int orientation);
- wxGridCell *GetLabelCell(int orientation, int pos);
+ int GetLabelAlignment(int orientation) const;
+ wxGridCell *GetLabelCell(int orientation, int pos) const;
void SetLabelValue(int orientation, const wxString& val, int pos);
- wxString& GetLabelValue(int orientation, int pos);
+ wxString& GetLabelValue(int orientation, int pos) const;
void SetLabelTextColour(const wxColour& colour);
void SetLabelBackgroundColour(const wxColour& colour);
- inline wxColour& GetLabelTextColour(void) { return m_labelTextColour; }
- inline wxColour& GetLabelBackgroundColour(void) { return m_labelBackgroundColour; }
- inline wxFont *GetLabelTextFont(void) { return m_labelTextFont; }
- inline void SetLabelTextFont(wxFont *fnt) { m_labelTextFont = fnt; }
+ inline wxColour& GetLabelTextColour(void) const { return (wxColour&) m_labelTextColour; }
+ inline wxColour& GetLabelBackgroundColour(void) { return (wxColour&) m_labelBackgroundColour; }
+ inline wxFont& GetLabelTextFont(void) { return (wxFont&) m_labelTextFont; }
+ inline void SetLabelTextFont(const wxFont& fnt) { m_labelTextFont = fnt; }
// Miscellaneous accessors
- inline int GetCursorRow(void) { return m_wCursorRow; }
- inline int GetCursorColumn(void) { return m_wCursorColumn; }
+ inline int GetCursorRow(void) const { return m_wCursorRow; }
+ inline int GetCursorColumn(void) const { return m_wCursorColumn; }
void SetGridCursor(int row, int col);
- inline int GetRows(void) { return m_totalRows; }
- inline int GetCols(void) { return m_totalCols; }
- inline int GetScrollPosX(void) { return m_scrollPosX; }
- inline int GetScrollPosY(void) { return m_scrollPosY; }
+ inline int GetRows(void) const { return m_totalRows; }
+ inline int GetCols(void) const { return m_totalCols; }
+ inline int GetScrollPosX(void) const { return m_scrollPosX; }
+ inline int GetScrollPosY(void) const { return m_scrollPosY; }
inline void SetScrollPosX(int pos) { m_scrollPosX = pos; }
inline void SetScrollPosY(int pos) { m_scrollPosY = pos; }
- inline wxTextCtrl *GetTextItem(void) { return m_textItem; }
- inline wxScrollBar *GetHorizScrollBar(void) { return m_hScrollBar; }
- inline wxScrollBar *GetVertScrollBar(void) { return m_vScrollBar; }
- inline bool GetEditable(void) { return m_editable; }
+ inline wxTextCtrl *GetTextItem(void) const { return m_textItem; }
+ inline wxScrollBar *GetHorizScrollBar(void) const { return m_hScrollBar; }
+ inline wxScrollBar *GetVertScrollBar(void) const { return m_vScrollBar; }
+ inline bool GetEditable(void) const { return m_editable; }
void SetEditable(bool edit);
- inline wxRect& GetCurrentRect(void) { return m_currentRect; }
- inline bool CurrentCellVisible(void) { return m_currentRectVisible; }
- inline void SetDividerPen(wxPen *pen) { m_divisionPen = pen; }
- inline wxPen *GetDividerPen(void) { return m_divisionPen; }
+ inline wxRect& GetCurrentRect(void) const { return (wxRect&) m_currentRect; }
+ inline bool CurrentCellVisible(void) const { return m_currentRectVisible; }
+ inline void SetDividerPen(const wxPen& pen) { m_divisionPen = pen; }
+ inline wxPen& GetDividerPen(void) const { return (wxPen&) m_divisionPen; }
// High-level event handling
// Override e.g. to check value of current cell; but call
@@ -227,7 +227,7 @@ class WXDLLEXPORT wxGenericGrid: public wxPanel
wxScrollBar* m_vScrollBar;
int m_wCursorRow;
int m_wCursorColumn;
- wxRect m_currentRect;
+ wxRect m_currentRect;
bool m_currentRectVisible;
wxGridCell*** m_gridCells;
wxGridCell** m_rowLabelCells;
@@ -262,24 +262,24 @@ class WXDLLEXPORT wxGenericGrid: public wxPanel
// Colours
wxColour m_cellTextColour;
wxColour m_cellBackgroundColour;
- wxFont* m_cellTextFont;
+ wxFont m_cellTextFont;
wxColour m_labelTextColour;
wxColour m_labelBackgroundColour;
- wxBrush* m_labelBackgroundBrush;
- wxFont* m_labelTextFont;
- wxPen* m_divisionPen;
+ wxBrush m_labelBackgroundBrush;
+ wxFont m_labelTextFont;
+ wxPen m_divisionPen;
wxBitmap* m_doubleBufferingBitmap;
// Position of Edit control
- wxRect m_editControlPosition;
+ wxRect m_editControlPosition;
// Drag status
int m_dragStatus;
int m_dragRowOrCol;
int m_dragStartPosition;
int m_dragLastPosition;
- wxCursor* m_horizontalSashCursor;
- wxCursor* m_verticalSashCursor;
+ wxCursor m_horizontalSashCursor;
+ wxCursor m_verticalSashCursor;
// To avoid multiple refreshes, use Begin/EndBatch
int m_batchCount;
@@ -294,30 +294,30 @@ DECLARE_EVENT_TABLE()
class WXDLLEXPORT wxGridCell: public wxObject
{
public:
- wxString textValue;
- wxFont *font;
- wxColour textColour;
- wxColour backgroundColour;
- wxBrush *backgroundBrush;
- wxBitmap *cellBitmap;
+ wxString textValue;
+ wxFont font;
+ wxColour textColour;
+ wxColour backgroundColour;
+ wxBrush backgroundBrush;
+ wxBitmap* cellBitmap;
int alignment;
wxGridCell(wxGenericGrid *window = (wxGenericGrid *) NULL);
~wxGridCell(void);
- virtual wxString& GetTextValue(void) { return textValue; }
+ virtual wxString& GetTextValue(void) const { return (wxString&) textValue; }
virtual void SetTextValue(const wxString& str) { textValue = str; }
- inline wxFont *GetFont(void) { return font; }
- inline void SetFont(wxFont *f) { font = f; }
- inline wxColour& GetTextColour(void) { return textColour; }
+ inline wxFont& GetFont(void) const { return (wxFont&) font; }
+ inline void SetFont(const wxFont& f) { font = f; }
+ inline wxColour& GetTextColour(void) const { return (wxColour&) textColour; }
inline void SetTextColour(const wxColour& colour) { textColour = colour; }
- inline wxColour& GetBackgroundColour(void) { return backgroundColour; }
+ inline wxColour& GetBackgroundColour(void) const { return (wxColour&) backgroundColour; }
void SetBackgroundColour(const wxColour& colour);
- inline wxBrush *GetBackgroundBrush(void) { return backgroundBrush; }
- inline void SetBackgroundBrush(wxBrush *brush) { backgroundBrush = brush; }
- inline int GetAlignment(void) { return alignment; }
+ inline wxBrush& GetBackgroundBrush(void) const { return (wxBrush&) backgroundBrush; }
+ inline void SetBackgroundBrush(const wxBrush& brush) { backgroundBrush = brush; }
+ inline int GetAlignment(void) const { return alignment; }
inline void SetAlignment(int align) { alignment = align; }
- inline wxBitmap *GetCellBitmap(void) { return cellBitmap; }
+ inline wxBitmap *GetCellBitmap(void) const { return cellBitmap; }
inline void SetCellBitmap(wxBitmap *bitmap) { cellBitmap = bitmap; }
};
@@ -332,9 +332,6 @@ class WXDLLEXPORT wxGrid: public wxGenericGrid
}
};
-
-
-
class WXDLLEXPORT wxGridEvent : public wxCommandEvent {
DECLARE_DYNAMIC_CLASS(wxGridEvent)
public:
diff --git a/include/wx/motif/bitmap.h b/include/wx/motif/bitmap.h
index 7d3801bd88..39bd89c5a8 100644
--- a/include/wx/motif/bitmap.h
+++ b/include/wx/motif/bitmap.h
@@ -136,7 +136,6 @@ public:
// Copy constructors
inline wxBitmap(const wxBitmap& bitmap)
{ Ref(bitmap); if ( wxTheBitmapList ) wxTheBitmapList->AddBitmap(this); }
- inline wxBitmap(const wxBitmap* bitmap) { if (bitmap) Ref(*bitmap); if ( wxTheBitmapList ) wxTheBitmapList->AddBitmap(this); }
// Initialize with raw XBM data
wxBitmap(const char bits[], int width, int height, int depth = 1);
diff --git a/include/wx/motif/brush.h b/include/wx/motif/brush.h
index 8f2764962b..15488cba9b 100644
--- a/include/wx/motif/brush.h
+++ b/include/wx/motif/brush.h
@@ -48,7 +48,6 @@ public:
wxBrush(const wxColour& col, int style);
wxBrush(const wxBitmap& stipple);
inline wxBrush(const wxBrush& brush) { Ref(brush); }
- inline wxBrush(const wxBrush* brush) { if (brush) Ref(*brush); }
~wxBrush();
virtual void SetColour(const wxColour& col) ;
diff --git a/include/wx/motif/colour.h b/include/wx/motif/colour.h
index d9f1711983..7059f61441 100644
--- a/include/wx/motif/colour.h
+++ b/include/wx/motif/colour.h
@@ -35,7 +35,6 @@ public:
// copy ctors and assignment operators
wxColour( const wxColour& col );
- wxColour( const wxColour* col );
wxColour& operator = ( const wxColour& col );
// dtor
diff --git a/include/wx/motif/cursor.h b/include/wx/motif/cursor.h
index 0fde180335..2ca07ac040 100644
--- a/include/wx/motif/cursor.h
+++ b/include/wx/motif/cursor.h
@@ -55,7 +55,6 @@ public:
// Copy constructors
inline wxCursor(const wxCursor& cursor) { Ref(cursor); }
- inline wxCursor(const wxCursor* cursor) { if (cursor) Ref(*cursor); }
wxCursor(const char bits[], int width, int height, int hotSpotX = -1, int hotSpotY = -1,
const char maskBits[] = NULL);
diff --git a/include/wx/motif/dc.h b/include/wx/motif/dc.h
index dda90fba80..b9afc11fca 100644
--- a/include/wx/motif/dc.h
+++ b/include/wx/motif/dc.h
@@ -176,16 +176,16 @@ class WXDLLEXPORT wxDC: public wxObject
virtual void Clear(void) = 0;
virtual void SetFont( const wxFont &font ) = 0;
- virtual wxFont *GetFont(void) const { return (wxFont*) &m_font; };
+ virtual wxFont& GetFont(void) const { return (wxFont&) m_font; };
virtual void SetPen( const wxPen &pen ) = 0;
- virtual wxPen *GetPen(void) const { return (wxPen*) &m_pen; };
+ virtual wxPen& GetPen(void) const { return (wxPen&) m_pen; };
virtual void SetBrush( const wxBrush &brush ) = 0;
- virtual wxBrush *GetBrush(void) const { return (wxBrush*) &m_brush; };
+ virtual wxBrush& GetBrush(void) const { return (wxBrush&) m_brush; };
virtual void SetBackground( const wxBrush &brush ) = 0;
- virtual wxBrush *GetBackground(void) const { return (wxBrush*) &m_backgroundBrush; };
+ virtual wxBrush& GetBackground(void) const { return (wxBrush&) m_backgroundBrush; };
virtual void SetLogicalFunction( int function ) = 0;
virtual int GetLogicalFunction(void) const { return m_logicalFunction; };
diff --git a/include/wx/motif/font.h b/include/wx/motif/font.h
index 769b4d6352..1aa0d4ee0c 100644
--- a/include/wx/motif/font.h
+++ b/include/wx/motif/font.h
@@ -66,7 +66,6 @@ public:
wxFont();
wxFont(int pointSize, int family, int style, int weight, bool underlined = FALSE, const wxString& faceName = wxEmptyString);
inline wxFont(const wxFont& font) { Ref(font); }
- inline wxFont(const wxFont* font) { if (font) Ref(*font); }
~wxFont();
diff --git a/include/wx/motif/icon.h b/include/wx/motif/icon.h
index dcec9a6004..89f048ab15 100644
--- a/include/wx/motif/icon.h
+++ b/include/wx/motif/icon.h
@@ -43,7 +43,6 @@ public:
// Copy constructors
inline wxIcon(const wxIcon& icon) { Ref(icon); }
- inline wxIcon(const wxIcon* icon) { if (icon) Ref(*icon); }
// Initialize with XBM data
wxIcon(const char bits[], int width, int height);
diff --git a/include/wx/motif/notebook.h b/include/wx/motif/notebook.h
index 37d6439d27..279084b9d8 100644
--- a/include/wx/motif/notebook.h
+++ b/include/wx/motif/notebook.h
@@ -177,6 +177,7 @@ public:
// callbacks
// ---------
void OnSize(wxSizeEvent& event);
+ void OnIdle(wxIdleEvent& event);
void OnSelChange(wxNotebookEvent& event);
void OnSetFocus(wxFocusEvent& event);
void OnNavigationKey(wxNavigationKeyEvent& event);
diff --git a/include/wx/motif/palette.h b/include/wx/motif/palette.h
index 589b7735e0..18302f09df 100644
--- a/include/wx/motif/palette.h
+++ b/include/wx/motif/palette.h
@@ -56,7 +56,6 @@ class WXDLLEXPORT wxPalette: public wxGDIObject
public:
wxPalette();
inline wxPalette(const wxPalette& palette) { Ref(palette); }
- inline wxPalette(const wxPalette* palette) { UnRef(); if (palette) Ref(*palette); }
wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
~wxPalette();
diff --git a/include/wx/motif/pen.h b/include/wx/motif/pen.h
index 8a69853d11..4bc54d41b7 100644
--- a/include/wx/motif/pen.h
+++ b/include/wx/motif/pen.h
@@ -54,7 +54,6 @@ public:
wxPen(const wxColour& col, int width, int style);
wxPen(const wxBitmap& stipple, int width);
inline wxPen(const wxPen& pen) { Ref(pen); }
- inline wxPen(const wxPen* pen) { if (pen) Ref(*pen); }
~wxPen();
inline wxPen& operator = (const wxPen& pen) { if (*this == pen) return (*this); Ref(pen); return *this; }
diff --git a/include/wx/motif/window.h b/include/wx/motif/window.h
index f11c73e389..f4a6a05f4c 100644
--- a/include/wx/motif/window.h
+++ b/include/wx/motif/window.h
@@ -310,13 +310,13 @@ public:
inline wxWindow *GetParent() const;
inline void SetParent(wxWindow *p) ;
inline wxWindow *GetGrandParent() const;
- inline wxList *GetChildren() const;
+ inline wxList& GetChildren() const;
// Reparents this window to have the new parent.
virtual bool Reparent(wxWindow* parent);
// Set/get the window's font
virtual void SetFont(const wxFont& f);
- inline virtual wxFont *GetFont() const;
+ inline virtual wxFont& GetFont() const;
// Set/get the window's validator
void SetValidator(const wxValidator& validator);
@@ -655,8 +655,8 @@ inline void wxWindow::SetId(int id) { m_windowId = id; }
inline wxWindow *wxWindow::GetParent() const { return m_windowParent; }
inline void wxWindow::SetParent(wxWindow *p) { m_windowParent = p; }
inline wxWindow *wxWindow::GetGrandParent() const { return (m_windowParent ? m_windowParent->m_windowParent : (wxWindow*) NULL); }
-inline wxList *wxWindow::GetChildren() const { return m_children; }
-inline wxFont *wxWindow::GetFont() const { return (wxFont *) & m_windowFont; }
+inline wxList& wxWindow::GetChildren() const { return (wxList&) * m_children; }
+inline wxFont& wxWindow::GetFont() const { return (wxFont&) m_windowFont; }
inline wxString wxWindow::GetName() const { return m_windowName; }
inline void wxWindow::SetName(const wxString& name) { m_windowName = name; }
inline long wxWindow::GetWindowStyleFlag() const { return m_windowStyle; }
diff --git a/include/wx/msw/bitmap.h b/include/wx/msw/bitmap.h
index e40cc207e2..aa9fa411f6 100644
--- a/include/wx/msw/bitmap.h
+++ b/include/wx/msw/bitmap.h
@@ -125,7 +125,6 @@ public:
// Copy constructors
inline wxBitmap(const wxBitmap& bitmap)
{ Ref(bitmap); if ( wxTheBitmapList ) wxTheBitmapList->AddBitmap(this); }
- inline wxBitmap(const wxBitmap* bitmap) { if (bitmap) Ref(*bitmap); if ( wxTheBitmapList ) wxTheBitmapList->AddBitmap(this); }
// Initialize with raw data
wxBitmap(const char bits[], int width, int height, int depth = 1);
diff --git a/include/wx/msw/brush.h b/include/wx/msw/brush.h
index 5ba87d90d1..5805a69252 100644
--- a/include/wx/msw/brush.h
+++ b/include/wx/msw/brush.h
@@ -49,7 +49,6 @@ public:
wxBrush(const wxColour& col, int style);
wxBrush(const wxBitmap& stipple);
inline wxBrush(const wxBrush& brush) { Ref(brush); }
- inline wxBrush(const wxBrush* brush) { if (brush) Ref(*brush); }
~wxBrush(void);
virtual void SetColour(const wxColour& col) ;
diff --git a/include/wx/msw/control.h b/include/wx/msw/control.h
index 3738d445e0..df1b339b8c 100644
--- a/include/wx/msw/control.h
+++ b/include/wx/msw/control.h
@@ -43,8 +43,8 @@ public:
inline virtual void SetLabelFont(const wxFont& font);
inline virtual void SetButtonFont(const wxFont& font);
- inline wxFont *GetLabelFont(void) const ;
- inline wxFont *GetButtonFont(void) const ;
+ inline wxFont& GetLabelFont(void) const ;
+ inline wxFont& GetButtonFont(void) const ;
#endif
// Places item in centre of panel - so can't be used BEFORE panel->Fit()
@@ -78,8 +78,8 @@ DECLARE_EVENT_TABLE()
inline void wxControl::Callback(const wxFunction function) { m_callback = function; }; // Adds callback
#if WXWIN_COMPATIBILITY
-inline wxFont *wxControl::GetLabelFont(void) const { return GetFont() ; }
-inline wxFont *wxControl::GetButtonFont(void) const { return GetFont() ; }
+inline wxFont& wxControl::GetLabelFont(void) const { return GetFont() ; }
+inline wxFont& wxControl::GetButtonFont(void) const { return GetFont() ; }
inline void wxControl::SetLabelFont(const wxFont& font) { SetFont(font); }
inline void wxControl::SetButtonFont(const wxFont& font) { SetFont(font); }
#endif
diff --git a/include/wx/msw/cursor.h b/include/wx/msw/cursor.h
index f72d922d05..d15f6fcb1a 100644
--- a/include/wx/msw/cursor.h
+++ b/include/wx/msw/cursor.h
@@ -44,7 +44,6 @@ public:
// Copy constructors
inline wxCursor(const wxCursor& cursor) { Ref(cursor); }
- inline wxCursor(const wxCursor* cursor) { /* UnRef(); */ if (cursor) Ref(*cursor); }
wxCursor(const char bits[], int width, int height, int hotSpotX = -1, int hotSpotY = -1,
const char maskBits[] = NULL);
diff --git a/include/wx/msw/dc.h b/include/wx/msw/dc.h
index ba01d4b18f..9186c620d9 100644
--- a/include/wx/msw/dc.h
+++ b/include/wx/msw/dc.h
@@ -235,11 +235,11 @@ public:
inline virtual bool Ok(void) const {return m_ok;};
inline virtual int GetMapMode(void) const {return m_mappingMode;};
- inline virtual wxBrush *GetBackground(void) const { return (wxBrush*) &m_backgroundBrush ;}
- inline virtual wxBrush *GetBrush(void) const { return (wxBrush*) &m_brush ;}
- inline virtual wxFont *GetFont(void) const { return (wxFont*) &m_font ;}
+ inline virtual wxBrush& GetBackground(void) const { return (wxBrush&) m_backgroundBrush ;}
+ inline virtual wxBrush& GetBrush(void) const { return (wxBrush&) m_brush ;}
+ inline virtual wxFont& GetFont(void) const { return (wxFont&) m_font ;}
inline virtual int GetLogicalFunction(void) const { return m_logicalFunction ;}
- inline virtual wxPen *GetPen(void) const { return (wxPen*) &m_pen ;}
+ inline virtual wxPen& GetPen(void) const { return (wxPen&) m_pen ;}
inline virtual wxColour&GetTextBackground(void) const { return (wxColour&) m_textBackgroundColour ;}
inline virtual wxColour&GetTextForeground(void) const { return (wxColour&) m_textForegroundColour ;}
diff --git a/include/wx/msw/font.h b/include/wx/msw/font.h
index 83079df94d..32b37a954b 100644
--- a/include/wx/msw/font.h
+++ b/include/wx/msw/font.h
@@ -54,7 +54,6 @@ public:
wxFont(void);
wxFont(int PointSize, int Family, int Style, int Weight, bool underlined = FALSE, const wxString& Face = wxEmptyString);
inline wxFont(const wxFont& font) { Ref(font); }
- inline wxFont(const wxFont* font) { if (font) Ref(*font); }
~wxFont(void);
diff --git a/include/wx/msw/icon.h b/include/wx/msw/icon.h
index 27d7311298..78fd6c42be 100644
--- a/include/wx/msw/icon.h
+++ b/include/wx/msw/icon.h
@@ -43,7 +43,6 @@ public:
// Copy constructors
inline wxIcon(const wxIcon& icon) { Ref(icon); }
- inline wxIcon(const wxIcon* icon) { /* UnRef(); */ if (icon) Ref(*icon); }
wxIcon(const char bits[], int width, int height);
wxIcon(const wxString& name, long flags = wxBITMAP_TYPE_ICO_RESOURCE,
diff --git a/include/wx/msw/palette.h b/include/wx/msw/palette.h
index 510882fa18..4383c44a3f 100644
--- a/include/wx/msw/palette.h
+++ b/include/wx/msw/palette.h
@@ -39,7 +39,6 @@ class WXDLLEXPORT wxPalette: public wxGDIObject
public:
wxPalette(void);
inline wxPalette(const wxPalette& palette) { Ref(palette); }
- inline wxPalette(const wxPalette* palette) { /* UnRef(); */ if (palette) Ref(*palette); }
wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
~wxPalette(void);
diff --git a/include/wx/msw/pen.h b/include/wx/msw/pen.h
index 4933932078..79b162ecd1 100644
--- a/include/wx/msw/pen.h
+++ b/include/wx/msw/pen.h
@@ -53,7 +53,6 @@ public:
wxPen(const wxColour& col, int width, int style);
wxPen(const wxBitmap& stipple, int width);
inline wxPen(const wxPen& pen) { Ref(pen); }
- inline wxPen(const wxPen* pen) { if (pen) Ref(*pen); }
~wxPen();
inline wxPen& operator = (const wxPen& pen) { if (*this == pen) return (*this); Ref(pen); return *this; }
diff --git a/include/wx/msw/window.h b/include/wx/msw/window.h
index b02d8e4298..c0b172bb2f 100644
--- a/include/wx/msw/window.h
+++ b/include/wx/msw/window.h
@@ -151,7 +151,7 @@ public:
// Set the cursor
virtual void SetCursor(const wxCursor& cursor);
- inline virtual wxCursor *GetCursor() const { return (wxCursor *)& m_windowCursor; };
+ inline virtual wxCursor& GetCursor() const { return (wxCursor& ) m_windowCursor; };
// Get the window with the focus
static wxWindow *FindFocus();
@@ -288,7 +288,7 @@ public:
inline wxWindow *GetParent() const;
inline void SetParent(wxWindow *p) ;
inline wxWindow *GetGrandParent() const;
- inline wxList *GetChildren() const;
+ inline wxList& GetChildren() const;
// Set this window to be the child of 'parent'.
// Returns FALSE it's not possible (some systems
// won't allow it)
@@ -296,7 +296,7 @@ public:
// Set/get the window's font
virtual void SetFont(const wxFont& f);
- inline virtual wxFont *GetFont() const;
+ inline virtual wxFont& GetFont() const;
// Set/get the window's validator
void SetValidator(const wxValidator& validator);
@@ -351,8 +351,8 @@ public:
// For backward compatibility
inline virtual void SetButtonFont(const wxFont& font) { SetFont(font); }
inline virtual void SetLabelFont(const wxFont& font) { SetFont(font); }
- inline virtual wxFont *GetLabelFont() const { return GetFont(); };
- inline virtual wxFont *GetButtonFont() const { return GetFont(); };
+ inline virtual wxFont& GetLabelFont() const { return GetFont(); };
+ inline virtual wxFont& GetButtonFont() const { return GetFont(); };
// Get the default button, if there is one
inline virtual wxButton *GetDefaultItem() const;
@@ -715,8 +715,8 @@ inline void wxWindow::SetId(int id) { m_windowId = id; }
inline wxWindow *wxWindow::GetParent() const { return m_windowParent; }
inline void wxWindow::SetParent(wxWindow *p) { m_windowParent = p; }
inline wxWindow *wxWindow::GetGrandParent() const { return (m_windowParent ? m_windowParent->m_windowParent : NULL); }
-inline wxList *wxWindow::GetChildren() const { return m_children; }
-inline wxFont *wxWindow::GetFont() const { return (wxFont *) & m_windowFont; }
+inline wxList& wxWindow::GetChildren() const { return (wxList&) *m_children; }
+inline wxFont& wxWindow::GetFont() const { return (wxFont&) m_windowFont; }
inline wxString wxWindow::GetName() const { return m_windowName; }
inline void wxWindow::SetName(const wxString& name) { m_windowName = name; }
inline long wxWindow::GetWindowStyleFlag() const { return m_windowStyle; }
diff --git a/include/wx/stubs/bitmap.h b/include/wx/stubs/bitmap.h
index 0b1efd764e..1d2f5417e5 100644
--- a/include/wx/stubs/bitmap.h
+++ b/include/wx/stubs/bitmap.h
@@ -124,7 +124,6 @@ public:
// Copy constructors
inline wxBitmap(const wxBitmap& bitmap)
{ Ref(bitmap); if ( wxTheBitmapList ) wxTheBitmapList->AddBitmap(this); }
- inline wxBitmap(const wxBitmap* bitmap) { if (bitmap) Ref(*bitmap); if ( wxTheBitmapList ) wxTheBitmapList->AddBitmap(this); }
// Initialize with raw data.
wxBitmap(const char bits[], int width, int height, int depth = 1);
diff --git a/include/wx/stubs/brush.h b/include/wx/stubs/brush.h
index 6bff2018f7..a0a1bd7471 100644
--- a/include/wx/stubs/brush.h
+++ b/include/wx/stubs/brush.h
@@ -52,7 +52,6 @@ public:
wxBrush(const wxColour& col, int style);
wxBrush(const wxBitmap& stipple);
inline wxBrush(const wxBrush& brush) { Ref(brush); }
- inline wxBrush(const wxBrush* brush) { if (brush) Ref(*brush); }
~wxBrush();
virtual void SetColour(const wxColour& col) ;
diff --git a/include/wx/stubs/colour.h b/include/wx/stubs/colour.h
index 47d0e2ac21..16ffdac9aa 100644
--- a/include/wx/stubs/colour.h
+++ b/include/wx/stubs/colour.h
@@ -72,6 +72,8 @@ public:
}
bool operator != (const wxColour& colour) { return !(*this == colour); }
+ void InitFromName(const wxString& col);
+
/* TODO
WXCOLORREF GetPixel() const { return m_pixel; };
*/
diff --git a/include/wx/stubs/cursor.h b/include/wx/stubs/cursor.h
index 027745838a..bc6397069f 100644
--- a/include/wx/stubs/cursor.h
+++ b/include/wx/stubs/cursor.h
@@ -45,7 +45,6 @@ public:
// Copy constructors
inline wxCursor(const wxCursor& cursor) { Ref(cursor); }
- inline wxCursor(const wxCursor* cursor) { if (cursor) Ref(*cursor); }
wxCursor(const char bits[], int width, int height, int hotSpotX = -1, int hotSpotY = -1,
const char maskBits[] = NULL);
diff --git a/include/wx/stubs/dc.h b/include/wx/stubs/dc.h
index e9969358cf..ce3e9998d1 100644
--- a/include/wx/stubs/dc.h
+++ b/include/wx/stubs/dc.h
@@ -177,16 +177,16 @@ class WXDLLEXPORT wxDC: public wxObject
virtual void Clear(void) = 0;
virtual void SetFont( const wxFont &font ) = 0;
- virtual wxFont *GetFont(void) const { return (wxFont*) &m_font; };
+ virtual wxFont& GetFont(void) const { return (wxFont&) m_font; };
virtual void SetPen( const wxPen &pen ) = 0;
- virtual wxPen *GetPen(void) const { return (wxPen*) &m_pen; };
+ virtual wxPen& GetPen(void) const { return (wxPen&) m_pen; };
virtual void SetBrush( const wxBrush &brush ) = 0;
- virtual wxBrush *GetBrush(void) const { return (wxBrush*) &m_brush; };
+ virtual wxBrush& GetBrush(void) const { return (wxBrush&) m_brush; };
virtual void SetBackground( const wxBrush &brush ) = 0;
- virtual wxBrush *GetBackground(void) const { return (wxBrush*) &m_backgroundBrush; };
+ virtual wxBrush& GetBackground(void) const { return (wxBrush&) m_backgroundBrush; };
virtual void SetLogicalFunction( int function ) = 0;
virtual int GetLogicalFunction(void) const { return m_logicalFunction; };
diff --git a/include/wx/stubs/font.h b/include/wx/stubs/font.h
index 601657c657..aff8fb3a75 100644
--- a/include/wx/stubs/font.h
+++ b/include/wx/stubs/font.h
@@ -51,7 +51,6 @@ public:
wxFont();
wxFont(int pointSize, int family, int style, int weight, bool underlined = FALSE, const wxString& faceName = wxEmptyString);
inline wxFont(const wxFont& font) { Ref(font); }
- inline wxFont(const wxFont* font) { if (font) Ref(*font); }
~wxFont();
diff --git a/include/wx/stubs/icon.h b/include/wx/stubs/icon.h
index f68c23154b..df475672ba 100644
--- a/include/wx/stubs/icon.h
+++ b/include/wx/stubs/icon.h
@@ -45,7 +45,6 @@ public:
// Copy constructors
inline wxIcon(const wxIcon& icon) { Ref(icon); }
- inline wxIcon(const wxIcon* icon) { if (icon) Ref(*icon); }
wxIcon(const char bits[], int width, int height);
wxIcon(const wxString& name, long flags = wxBITMAP_TYPE_ICO_RESOURCE,
diff --git a/include/wx/stubs/palette.h b/include/wx/stubs/palette.h
index 1d198fc6e3..3482b33934 100644
--- a/include/wx/stubs/palette.h
+++ b/include/wx/stubs/palette.h
@@ -41,7 +41,6 @@ class WXDLLEXPORT wxPalette: public wxGDIObject
public:
wxPalette();
inline wxPalette(const wxPalette& palette) { Ref(palette); }
- inline wxPalette(const wxPalette* palette) { UnRef(); if (palette) Ref(*palette); }
wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
~wxPalette();
diff --git a/include/wx/stubs/pen.h b/include/wx/stubs/pen.h
index 5097841e34..938908b56b 100644
--- a/include/wx/stubs/pen.h
+++ b/include/wx/stubs/pen.h
@@ -57,7 +57,6 @@ public:
wxPen(const wxColour& col, int width, int style);
wxPen(const wxBitmap& stipple, int width);
inline wxPen(const wxPen& pen) { Ref(pen); }
- inline wxPen(const wxPen* pen) { if (pen) Ref(*pen); }
~wxPen();
inline wxPen& operator = (const wxPen& pen) { if (*this == pen) return (*this); Ref(pen); return *this; }
diff --git a/include/wx/stubs/region.h b/include/wx/stubs/region.h
index 0c88b794e7..04d143c2e9 100644
--- a/include/wx/stubs/region.h
+++ b/include/wx/stubs/region.h
@@ -18,6 +18,7 @@
#include "wx/list.h"
#include "wx/gdiobj.h"
+#include "wx/gdicmn.h"
class WXDLLEXPORT wxRect;
class WXDLLEXPORT wxPoint;
diff --git a/include/wx/stubs/timer.h b/include/wx/stubs/timer.h
index 2e0e85010f..953da997c6 100644
--- a/include/wx/stubs/timer.h
+++ b/include/wx/stubs/timer.h
@@ -31,15 +31,15 @@ public:
virtual void Notify() = 0; // Override this member
// Returns the current interval time (0 if stop)
- int Interval() const { return milli; };
- bool OneShot() const { return oneShot; }
+ int Interval() const { return m_milli; };
+ bool OneShot() const { return m_oneShot; }
protected:
- bool oneShot ;
- int milli ;
- int lastMilli ;
+ bool m_oneShot ;
+ int m_milli ;
+ int m_lastMilli ;
- long id;
+ long m_id;
private:
DECLARE_ABSTRACT_CLASS(wxTimer)
diff --git a/include/wx/stubs/window.h b/include/wx/stubs/window.h
index b34c6be619..75809c01b1 100644
--- a/include/wx/stubs/window.h
+++ b/include/wx/stubs/window.h
@@ -81,6 +81,33 @@ WXDLLEXPORT_DATA(extern const char*) wxPanelNameStr;
WXDLLEXPORT_DATA(extern const wxSize) wxDefaultSize;
WXDLLEXPORT_DATA(extern const wxPoint) wxDefaultPosition;
+//-----------------------------------------------------------------------------
+// wxClientData
+//-----------------------------------------------------------------------------
+
+class wxClientData
+{
+public:
+ wxClientData() { }
+ virtual ~wxClientData() { }
+};
+
+//-----------------------------------------------------------------------------
+// wxStringClientData
+//-----------------------------------------------------------------------------
+
+class wxStringClientData: public wxClientData
+{
+public:
+ wxStringClientData() { }
+ wxStringClientData( wxString &data ) { m_data = data; }
+ void SetData( wxString &data ) { m_data = data; }
+ wxString GetData() const { return m_data; }
+
+private:
+ wxString m_data;
+};
+
class WXDLLEXPORT wxWindow: public wxEvtHandler
{
DECLARE_ABSTRACT_CLASS(wxWindow)
@@ -269,11 +296,11 @@ public:
inline wxWindow *GetParent() const;
inline void SetParent(wxWindow *p) ;
inline wxWindow *GetGrandParent() const;
- inline wxList *GetChildren() const;
+ inline wxList& GetChildren() const;
// Set/get the window's font
virtual void SetFont(const wxFont& f);
- inline virtual wxFont *GetFont() const;
+ inline virtual wxFont& GetFont() const;
// Set/get the window's validator
void SetValidator(const wxValidator& validator);
@@ -505,8 +532,8 @@ inline void wxWindow::SetId(int id) { m_windowId = id; }
inline wxWindow *wxWindow::GetParent() const { return m_windowParent; }
inline void wxWindow::SetParent(wxWindow *p) { m_windowParent = p; }
inline wxWindow *wxWindow::GetGrandParent() const { return (m_windowParent ? m_windowParent->m_windowParent : (wxWindow*) NULL); }
-inline wxList *wxWindow::GetChildren() const { return m_children; }
-inline wxFont *wxWindow::GetFont() const { return (wxFont *) & m_windowFont; }
+inline wxList& wxWindow::GetChildren() const { return (wxList&) * m_children; }
+inline wxFont& wxWindow::GetFont() const { return (wxFont&) m_windowFont; }
inline wxString wxWindow::GetName() const { return m_windowName; }
inline void wxWindow::SetName(const wxString& name) { m_windowName = name; }
inline long wxWindow::GetWindowStyleFlag() const { return m_windowStyle; }
diff --git a/samples/grid/test.cpp b/samples/grid/test.cpp
index 874ebeeb35..ceb64fce1e 100644
--- a/samples/grid/test.cpp
+++ b/samples/grid/test.cpp
@@ -137,7 +137,7 @@ bool MyApp::OnInit(void)
frame->grid->SetCellValue("First cell", 0, 0);
frame->grid->SetCellValue("Another cell", 1, 1);
frame->grid->SetCellValue("Yet another cell", 2, 2);
- frame->grid->SetCellTextFont(wxTheFontList->FindOrCreateFont(10, wxROMAN, wxITALIC, wxNORMAL), 0, 0);
+ frame->grid->SetCellTextFont(* wxTheFontList->FindOrCreateFont(10, wxROMAN, wxITALIC, wxNORMAL), 0, 0);
frame->grid->SetCellTextColour(*wxRED, 1, 1);
frame->grid->SetCellBackgroundColour(*wxCYAN, 2, 2);
if (cellBitmap1 && cellBitmap2)
@@ -207,10 +207,10 @@ void MyFrame::ToggleColLabel(wxCommandEvent& WXUNUSED(event))
void MyFrame::ToggleDividers(wxCommandEvent& WXUNUSED(event))
{
- if (!grid->GetDividerPen())
- grid->SetDividerPen(wxThePenList->FindOrCreatePen("LIGHT GREY", 1, wxSOLID));
+ if (!grid->GetDividerPen().Ok())
+ grid->SetDividerPen(* wxThePenList->FindOrCreatePen("LIGHT GREY", 1, wxSOLID));
else
- grid->SetDividerPen((wxPen *) NULL);
+ grid->SetDividerPen(wxNullPen);
grid->Refresh();
}
diff --git a/samples/layout/layout.cpp b/samples/layout/layout.cpp
index a4dd5b9f1a..8096c82b8f 100644
--- a/samples/layout/layout.cpp
+++ b/samples/layout/layout.cpp
@@ -205,12 +205,12 @@ void MyFrame::OnSize(wxSizeEvent& WXUNUSED(event) )
void MyFrame::Draw(wxDC& dc, bool WXUNUSED(draw_bitmaps) )
{
- dc.SetPen(wxGREEN_PEN);
+ dc.SetPen(* wxGREEN_PEN);
dc.DrawLine(0, 0, 200, 200);
dc.DrawLine(200, 0, 0, 200);
- dc.SetBrush(wxCYAN_BRUSH);
- dc.SetPen(wxRED_PEN);
+ dc.SetBrush(* wxCYAN_BRUSH);
+ dc.SetPen(* wxRED_PEN);
dc.DrawRectangle(100, 100, 100, 50);
dc.DrawRoundedRectangle(150, 150, 100, 50, 20);
@@ -219,7 +219,7 @@ void MyFrame::Draw(wxDC& dc, bool WXUNUSED(draw_bitmaps) )
dc.DrawSpline(50, 200, 50, 100, 200, 10);
dc.DrawLine(50, 230, 200, 230);
- dc.SetPen(wxBLACK_PEN);
+ dc.SetPen(* wxBLACK_PEN);
dc.DrawArc(50, 300, 100, 250, 100, 300 );
}
diff --git a/samples/printing/printing.cpp b/samples/printing/printing.cpp
index 598d0876fe..ae9b4126bb 100644
--- a/samples/printing/printing.cpp
+++ b/samples/printing/printing.cpp
@@ -512,7 +512,7 @@ void MyPrintout::DrawPageTwo(wxDC *dc)
float bottomMarginLogical = (float)(logUnitsFactor*(pageHeightMM - bottomMargin));
float rightMarginLogical = (float)(logUnitsFactor*(pageWidthMM - rightMargin));
- dc->SetPen(wxRED_PEN);
+ dc->SetPen(* wxRED_PEN);
dc->DrawLine( (long)leftMarginLogical, (long)topMarginLogical,
(long)rightMarginLogical, (long)topMarginLogical);
dc->DrawLine( (long)leftMarginLogical, (long)bottomMarginLogical,
diff --git a/src/common/layout.cpp b/src/common/layout.cpp
index 7c8b0ab7cb..38750acead 100644
--- a/src/common/layout.cpp
+++ b/src/common/layout.cpp
@@ -731,7 +731,7 @@ int wxIndividualLayoutConstraint::GetEdge(wxEdge which,
// know the dimension is obtainable immediately.
// E.g. a wxExpandSizer may contain a button (but the button's
// true parent is a panel, not the sizer)
- if (other->GetChildren()->Member(thisWin))
+ if (other->GetChildren().Member(thisWin))
{
switch (which)
{
@@ -1054,7 +1054,7 @@ bool wxOldDoLayout(wxWindow *win)
doneSoFar.Append(win);
- wxNode *node = win->GetChildren()->First();
+ wxNode *node = win->GetChildren().First();
while (node)
{
wxWindow *child = (wxWindow *)node->Data();
@@ -1079,7 +1079,7 @@ bool wxOldDoLayout(wxWindow *win)
while ((noChanges > 0) && (noIterations < maxIterations))
{
noChanges = 0;
- wxNode *node = win->GetChildren()->First();
+ wxNode *node = win->GetChildren().First();
while (node)
{
wxWindow *child = (wxWindow *)node->Data();
@@ -1104,7 +1104,7 @@ bool wxOldDoLayout(wxWindow *win)
*/
// Now set the sizes and positions of the children, and
// recursively call Layout().
- node = win->GetChildren()->First();
+ node = win->GetChildren().First();
while (node)
{
wxWindow *child = (wxWindow *)node->Data();
@@ -1203,7 +1203,7 @@ wxSizer::~wxSizer()
{
// Remove all children without deleting them,
// or ~wxbWindow will delete proper windows _twice_
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
while (node)
{
wxNode *next = node->Next();
@@ -1249,7 +1249,7 @@ void wxSizer::SetBorder(int x, int y)
void wxSizer::AddSizerChild(wxWindow *child)
{
child->SetSizerParent(this);
- GetChildren()->Append(child);
+ GetChildren().Append(child);
// Add some constraints for the purpose of storing
// the relative position of the window/sizer
@@ -1272,7 +1272,7 @@ void wxSizer::AddSizerChild(wxWindow *child)
void wxSizer::RemoveSizerChild(wxWindow *child)
{
- GetChildren()->DeleteObject(child);
+ GetChildren().DeleteObject(child);
}
void wxSizer::SetSize(int x, int y, int w, int h, int WXUNUSED(flags))
@@ -1382,7 +1382,7 @@ bool wxSizer::LayoutPhase1(int *noChanges)
// Find the bounding box and set own size
int maxX = 0;
int maxY = 0;
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
while (node)
{
int x, y, width, height;
@@ -1580,7 +1580,7 @@ bool wxRowColSizer::LayoutPhase1(int *noChanges)
int maxX = currentX;
int maxY = currentY;
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
while (node)
{
wxWindow *win = (wxWindow *)node->Data();
diff --git a/src/common/resource.cpp b/src/common/resource.cpp
index fcce235d26..21c1c97190 100644
--- a/src/common/resource.cpp
+++ b/src/common/resource.cpp
@@ -2301,7 +2301,7 @@ wxIcon wxResourceCreateIcon(const wxString& resource, wxResourceTable *table)
else
{
wxLogWarning(_("Icon resource specification %s not found."), (const char*) resource);
- return (wxIcon *) NULL;
+ return wxNullIcon;
}
}
@@ -2827,7 +2827,7 @@ bool wxWindow::LoadFromResource(wxWindow *parent, const wxString& resourceName,
}
// Should have some kind of font at this point
- if (!GetFont()->Ok())
+ if (!GetFont().Ok())
SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT));
if (!GetBackgroundColour().Ok())
SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE));
diff --git a/src/common/tbarsmpl.cpp b/src/common/tbarsmpl.cpp
index 8976f942f2..0e1a739d29 100644
--- a/src/common/tbarsmpl.cpp
+++ b/src/common/tbarsmpl.cpp
@@ -224,7 +224,7 @@ void wxToolBarSimple::DrawTool(wxDC& dc, wxMemoryDC& memDC, wxToolBarTool *tool)
{
dc.SetClippingRegion(ax, ay, (bx-ax+1), (by-ay+1));
dc.Blit((ax+1), (ay+1), (bx-ax-2), (by-ay-2), &memDC, 0, 0);
- wxPen * old_pen = dc.GetPen();
+ wxPen * old_pen = & dc.GetPen();
dc.SetPen( white_pen );
dc.DrawLine(ax,(by-1),ax,ay);
dc.DrawLine(ax,ay,(bx-1),ay);
@@ -276,7 +276,7 @@ void wxToolBarSimple::DrawTool(wxDC& dc, wxMemoryDC& memDC, wxToolBarTool *tool)
memDC.SelectObject(tool->m_bitmap1);
dc.SetClippingRegion(ax, ay, (bx-ax+1), (by-ay+1));
dc.Blit((ax+2), (ay+2), (bx-ax-2), (by-ay-2), &memDC, 0, 0);
- wxPen * old_pen = dc.GetPen();
+ wxPen * old_pen = & dc.GetPen();
dc.SetPen( black_pen );
dc.DrawLine(ax,(by-1),ax,ay);
dc.DrawLine(ax,ay,(bx-1),ay);
diff --git a/src/common/utilscmn.cpp b/src/common/utilscmn.cpp
index d845ed71da..d590221e91 100644
--- a/src/common/utilscmn.cpp
+++ b/src/common/utilscmn.cpp
@@ -445,7 +445,7 @@ wxFindWindowByLabel1 (const wxString& title, wxWindow * parent)
if (parent)
{
- for (wxNode * node = parent->GetChildren()->First (); node; node = node->Next ())
+ for (wxNode * node = parent->GetChildren().First (); node; node = node->Next ())
{
wxWindow *win = (wxWindow *) node->Data ();
wxWindow *retwin = wxFindWindowByLabel1 (title, win);
@@ -501,7 +501,7 @@ wxFindWindowByName1 (const wxString& title, wxWindow * parent)
if (parent)
{
- for (wxNode * node = parent->GetChildren()->First (); node; node = node->Next ())
+ for (wxNode * node = parent->GetChildren().First (); node; node = node->Next ())
{
wxWindow *win = (wxWindow *) node->Data ();
wxWindow *retwin = wxFindWindowByName1 (title, win);
diff --git a/src/generic/gridg.cpp b/src/generic/gridg.cpp
index 8fae3103b2..6184648dc6 100644
--- a/src/generic/gridg.cpp
+++ b/src/generic/gridg.cpp
@@ -80,9 +80,9 @@ wxGenericGrid::wxGenericGrid(void)
m_labelTextColour = *wxBLACK;
// m_labelBackgroundColour = *wxLIGHT_GREY;
m_labelBackgroundColour = wxSystemSettings::GetSystemColour( wxSYS_COLOUR_BTNFACE );
- m_labelBackgroundBrush = (wxBrush *) NULL;
- m_labelTextFont = (wxFont *) NULL;
- m_cellTextFont = (wxFont *) NULL;
+ m_labelBackgroundBrush = wxNullBrush;
+ m_labelTextFont = wxNullFont;
+ m_cellTextFont = wxNullFont;
m_textItem = (wxTextCtrl *) NULL;
m_currentRectVisible = FALSE;
m_editable = TRUE;
@@ -95,7 +95,7 @@ wxGenericGrid::wxGenericGrid(void)
m_dragRowOrCol = 0;
m_dragStartPosition = 0;
m_dragLastPosition = 0;
- m_divisionPen = (wxPen *) NULL;
+ m_divisionPen = wxNullPen;
m_leftOfSheet = wxGRID_DEFAULT_SHEET_LEFT;
m_topOfSheet = wxGRID_DEFAULT_SHEET_TOP;
m_cellHeight = wxGRID_DEFAULT_CELL_HEIGHT;
@@ -122,8 +122,6 @@ wxGenericGrid::wxGenericGrid(void)
m_rowLabelCells = (wxGridCell **) NULL;
m_colLabelCells = (wxGridCell **) NULL;
m_textItem = (wxTextCtrl *) NULL;
- m_horizontalSashCursor = (wxCursor *) NULL;
- m_verticalSashCursor = (wxCursor *) NULL;
}
bool wxGenericGrid::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
@@ -133,16 +131,14 @@ bool wxGenericGrid::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos,
m_editingPanel = (wxPanel *) NULL;
m_hScrollBar = (wxScrollBar *) NULL;
m_vScrollBar = (wxScrollBar *) NULL;
- m_horizontalSashCursor = (wxCursor *) NULL;
- m_verticalSashCursor = (wxCursor *) NULL;
m_cellTextColour = *wxBLACK;
m_cellBackgroundColour = *wxWHITE;
m_labelTextColour = *wxBLACK;
// m_labelBackgroundColour = *wxLIGHT_GREY;
m_labelBackgroundColour = wxSystemSettings::GetSystemColour( wxSYS_COLOUR_BTNFACE );
- m_labelBackgroundBrush = (wxBrush *) NULL;
- m_labelTextFont = wxTheFontList->FindOrCreateFont(10, wxSWISS, wxNORMAL, wxBOLD);
- m_cellTextFont = wxTheFontList->FindOrCreateFont(10, wxSWISS, wxNORMAL, wxNORMAL);
+ m_labelBackgroundBrush = wxNullBrush;
+ m_labelTextFont = * wxTheFontList->FindOrCreateFont(10, wxSWISS, wxNORMAL, wxBOLD);
+ m_cellTextFont = * wxTheFontList->FindOrCreateFont(10, wxSWISS, wxNORMAL, wxNORMAL);
m_textItem = (wxTextCtrl *) NULL;
m_currentRectVisible = FALSE;
m_editable = TRUE;
@@ -155,13 +151,13 @@ bool wxGenericGrid::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos,
m_dragRowOrCol = 0;
m_dragStartPosition = 0;
m_dragLastPosition = 0;
- m_divisionPen = wxThePenList->FindOrCreatePen("LIGHT GREY", 1, wxSOLID);
+ m_divisionPen = * wxThePenList->FindOrCreatePen("LIGHT GREY", 1, wxSOLID);
m_doubleBufferingBitmap = (wxBitmap *) NULL;
- if (!m_horizontalSashCursor)
+ if (!m_horizontalSashCursor.Ok())
{
- m_horizontalSashCursor = new wxCursor(wxCURSOR_SIZEWE);
- m_verticalSashCursor = new wxCursor(wxCURSOR_SIZENS);
+ m_horizontalSashCursor = wxCursor(wxCURSOR_SIZEWE);
+ m_verticalSashCursor = wxCursor(wxCURSOR_SIZENS);
}
SetLabelBackgroundColour(m_labelBackgroundColour);
@@ -402,7 +398,7 @@ void wxGenericGrid::UpdateDimensions(void)
}
}
-wxGridCell *wxGenericGrid::GetCell(int row, int col)
+wxGridCell *wxGenericGrid::GetCell(int row, int col) const
{
if (!m_gridCells)
return (wxGridCell *) NULL;
@@ -414,7 +410,7 @@ wxGridCell *wxGenericGrid::GetCell(int row, int col)
if (!cell)
{
// m_gridCells[row][col] = OnCreateCell();
- wxGridEvent g_evt(GetId(), wxEVT_GRID_CREATE_CELL, this, row, col);
+ wxGridEvent g_evt(GetId(), wxEVT_GRID_CREATE_CELL, (wxGenericGrid*) this, row, col);
GetEventHandler()->ProcessEvent(g_evt);
m_gridCells[row][col] = g_evt.m_cell;
return m_gridCells[row][col];
@@ -556,7 +552,7 @@ void wxGenericGrid::DrawLabelAreas(wxDC *dc)
// dc->DrawRectangle(m_rightOfSheet, m_topOfSheet, cw - m_rightOfSheet, ch - m_topOfSheet);
// Paint the label areas
- dc->SetBrush(*m_labelBackgroundBrush);
+ dc->SetBrush(m_labelBackgroundBrush);
// dc->DrawRectangle(m_leftOfSheet, m_topOfSheet, m_rightOfSheet - m_leftOfSheet + 1, m_horizontalLabelHeight + 1);
dc->DrawRectangle(m_leftOfSheet, m_topOfSheet, cw-m_leftOfSheet, m_horizontalLabelHeight + 1);
// dc->DrawRectangle(m_leftOfSheet, m_topOfSheet, m_verticalLabelWidth + 1, m_bottomOfSheet - m_topOfSheet + 1);
@@ -583,9 +579,9 @@ void wxGenericGrid::DrawGridLines(wxDC *dc)
int i;
- if (m_divisionPen)
+ if (m_divisionPen.Ok())
{
- dc->SetPen(*m_divisionPen);
+ dc->SetPen(m_divisionPen);
int heightCount = m_topOfSheet + m_horizontalLabelHeight;
@@ -653,9 +649,9 @@ void wxGenericGrid::DrawGridLines(wxDC *dc)
}
- if (m_divisionPen)
+ if (m_divisionPen.Ok())
{
- dc->SetPen(*m_divisionPen);
+ dc->SetPen(m_divisionPen);
// Draw vertical grey lines for cells
int widthCount = m_leftOfSheet + m_verticalLabelWidth;
@@ -782,7 +778,7 @@ void wxGenericGrid::DrawColumnLabel(wxDC *dc, wxRect *rect, int col)
rect2.width -= 5;
rect2.height -= 4;
dc->SetTextForeground(GetLabelTextColour());
- dc->SetFont(*GetLabelTextFont());
+ dc->SetFont(GetLabelTextFont());
if ( !cell->GetTextValue().IsNull() )
DrawTextRect(dc, cell->GetTextValue(), &rect2, GetLabelAlignment(wxHORIZONTAL));
}
@@ -835,7 +831,7 @@ void wxGenericGrid::DrawRowLabel(wxDC *dc, wxRect *rect, int row)
rect2.width -= 5;
rect2.height -= 4;
dc->SetTextForeground(GetLabelTextColour());
- dc->SetFont(*GetLabelTextFont());
+ dc->SetFont(GetLabelTextFont());
if ( !cell->GetTextValue().IsNull() )
DrawTextRect(dc, cell->GetTextValue(), &rect2, GetLabelAlignment(wxVERTICAL));
}
@@ -874,7 +870,7 @@ void wxGenericGrid::DrawCellBackground(wxDC *dc, wxRect *rect, int row, int col)
wxGridCell *cell = GetCell(row, col);
if (cell)
{
- dc->SetBrush(*cell->GetBackgroundBrush());
+ dc->SetBrush(cell->GetBackgroundBrush());
dc->SetPen(*wxTRANSPARENT_PEN);
#if 0 // In wxWin 2.0 the dc code is exact. RR.
@@ -912,7 +908,7 @@ void wxGenericGrid::DrawCellValue(wxDC *dc, wxRect *rect, int row, int col)
{
dc->SetBackgroundMode(wxTRANSPARENT);
dc->SetTextForeground(cell->GetTextColour());
- dc->SetFont(*cell->GetFont());
+ dc->SetFont(cell->GetFont());
if ( !cell->GetTextValue().IsNull() )
DrawTextRect(dc, cell->GetTextValue(), &rect2, cell->GetAlignment());
@@ -1239,13 +1235,13 @@ void wxGenericGrid::OnMouseEvent(wxMouseEvent& ev)
if (orientation == wxHORIZONTAL)
{
m_dragStatus = wxGRID_DRAG_LEFT_RIGHT;
- SetCursor(*m_horizontalSashCursor);
+ SetCursor(m_horizontalSashCursor);
m_dragLastPosition = (int)ev.GetX();
}
else
{
m_dragStatus = wxGRID_DRAG_UP_DOWN;
- SetCursor(*m_verticalSashCursor);
+ SetCursor(m_verticalSashCursor);
m_dragLastPosition = (int)ev.GetY();
}
wxClientDC dc(this);
@@ -1272,7 +1268,7 @@ void wxGenericGrid::OnMouseEvent(wxMouseEvent& ev)
dc.EndDrawing();
m_dragLastPosition = (int)ev.GetX();
- SetCursor(*m_horizontalSashCursor);
+ SetCursor(m_horizontalSashCursor);
break;
}
case wxGRID_DRAG_UP_DOWN:
@@ -1286,7 +1282,7 @@ void wxGenericGrid::OnMouseEvent(wxMouseEvent& ev)
dc.EndDrawing();
m_dragLastPosition = (int)ev.GetY();
- SetCursor(*m_verticalSashCursor);
+ SetCursor(m_verticalSashCursor);
break;
}
}
@@ -1297,9 +1293,9 @@ void wxGenericGrid::OnMouseEvent(wxMouseEvent& ev)
if (LabelSashHitTest((int)ev.GetX(), (int)ev.GetY(), &orientation, &rowOrCol, &startPos))
{
if (orientation == wxHORIZONTAL)
- SetCursor(*m_horizontalSashCursor);
+ SetCursor(m_horizontalSashCursor);
else
- SetCursor(*m_verticalSashCursor);
+ SetCursor(m_verticalSashCursor);
}
else
SetCursor(*wxSTANDARD_CURSOR);
@@ -1511,7 +1507,7 @@ void wxGenericGrid::DrawCellText(void)
SetGridClippingRegion(& dc);
dc.SetBackgroundMode(wxTRANSPARENT);
- dc.SetBrush(*cell->GetBackgroundBrush());
+ dc.SetBrush(cell->GetBackgroundBrush());
strcpy(szEdit, m_textItem->GetValue());
@@ -1816,7 +1812,7 @@ void wxGenericGrid::RefreshCell(int row, int col, bool setText)
}
}
-wxString& wxGenericGrid::GetCellValue(int row, int col)
+wxString& wxGenericGrid::GetCellValue(int row, int col) const
{
static wxString emptyString("");
@@ -1833,7 +1829,7 @@ void wxGenericGrid::SetColumnWidth(int col, int width)
m_colWidths[col] = width;
}
-int wxGenericGrid::GetColumnWidth(int col)
+int wxGenericGrid::GetColumnWidth(int col) const
{
if (col <= m_totalCols)
return m_colWidths[col];
@@ -1847,7 +1843,7 @@ void wxGenericGrid::SetRowHeight(int row, int height)
m_rowHeights[row] = height;
}
-int wxGenericGrid::GetRowHeight(int row)
+int wxGenericGrid::GetRowHeight(int row) const
{
if (row <= m_totalRows)
return m_rowHeights[row];
@@ -1865,7 +1861,7 @@ void wxGenericGrid::SetLabelSize(int orientation, int sz)
SetCurrentRect(GetCursorRow(), GetCursorColumn());
}
-int wxGenericGrid::GetLabelSize(int orientation)
+int wxGenericGrid::GetLabelSize(int orientation) const
{
if (orientation == wxHORIZONTAL)
return m_horizontalLabelHeight;
@@ -1873,7 +1869,7 @@ int wxGenericGrid::GetLabelSize(int orientation)
return m_verticalLabelWidth;
}
-wxGridCell *wxGenericGrid::GetLabelCell(int orientation, int pos)
+wxGridCell *wxGenericGrid::GetLabelCell(int orientation, int pos) const
{
if (orientation == wxHORIZONTAL)
{
@@ -1898,7 +1894,7 @@ void wxGenericGrid::SetLabelValue(int orientation, const wxString& val, int pos)
cell->SetTextValue(val);
}
-wxString& wxGenericGrid::GetLabelValue(int orientation, int pos)
+wxString& wxGenericGrid::GetLabelValue(int orientation, int pos) const
{
static wxString emptyString = "";
wxGridCell *cell = GetLabelCell(orientation, pos);
@@ -1918,7 +1914,7 @@ void wxGenericGrid::SetLabelAlignment(int orientation, int align)
SetCurrentRect(GetCursorRow(), GetCursorColumn());
}
-int wxGenericGrid::GetLabelAlignment(int orientation)
+int wxGenericGrid::GetLabelAlignment(int orientation) const
{
if (orientation == wxHORIZONTAL)
return m_horizontalLabelAlignment;
@@ -1935,7 +1931,7 @@ void wxGenericGrid::SetLabelTextColour(const wxColour& colour)
void wxGenericGrid::SetLabelBackgroundColour(const wxColour& colour)
{
m_labelBackgroundColour = colour;
- m_labelBackgroundBrush = wxTheBrushList->FindOrCreateBrush(m_labelBackgroundColour, wxSOLID);
+ m_labelBackgroundBrush = * wxTheBrushList->FindOrCreateBrush(m_labelBackgroundColour, wxSOLID);
}
void wxGenericGrid::SetEditable(bool edit)
@@ -1989,7 +1985,7 @@ void wxGenericGrid::SetCellAlignment(int flag, int row, int col)
cell->SetAlignment(flag);
}
-int wxGenericGrid::GetCellAlignment(int row, int col)
+int wxGenericGrid::GetCellAlignment(int row, int col) const
{
wxGridCell *cell = GetCell(row, col);
if (cell)
@@ -2008,7 +2004,7 @@ void wxGenericGrid::SetCellAlignment(int flag)
GetCell(i, j)->SetAlignment(flag);
}
-int wxGenericGrid::GetCellAlignment(void)
+int wxGenericGrid::GetCellAlignment(void) const
{
return m_cellAlignment;
}
@@ -2033,13 +2029,13 @@ void wxGenericGrid::SetCellBackgroundColour(const wxColour& val, int row, int co
}
}
-wxColour& wxGenericGrid::GetCellBackgroundColour(int row, int col)
+wxColour& wxGenericGrid::GetCellBackgroundColour(int row, int col) const
{
wxGridCell *cell = GetCell(row, col);
if (cell)
return cell->GetBackgroundColour();
else
- return m_cellBackgroundColour;
+ return (wxColour&) m_cellBackgroundColour;
}
void wxGenericGrid::SetCellTextColour(const wxColour& val, int row, int col)
@@ -2052,7 +2048,7 @@ void wxGenericGrid::SetCellTextColour(const wxColour& val, int row, int col)
}
}
-void wxGenericGrid::SetCellTextFont(wxFont *fnt, int row, int col)
+void wxGenericGrid::SetCellTextFont(const wxFont& fnt, int row, int col)
{
wxGridCell *cell = GetCell(row, col);
if (cell)
@@ -2062,22 +2058,22 @@ void wxGenericGrid::SetCellTextFont(wxFont *fnt, int row, int col)
}
}
-wxFont *wxGenericGrid::GetCellTextFont(int row, int col)
+wxFont& wxGenericGrid::GetCellTextFont(int row, int col) const
{
wxGridCell *cell = GetCell(row, col);
if (cell)
- return cell->GetFont();
+ return (wxFont&) cell->GetFont();
else
- return m_cellTextFont;
+ return (wxFont&) m_cellTextFont;
}
-wxColour& wxGenericGrid::GetCellTextColour(int row, int col)
+wxColour& wxGenericGrid::GetCellTextColour(int row, int col) const
{
wxGridCell *cell = GetCell(row, col);
if (cell)
- return cell->GetTextColour();
+ return (wxColour&) cell->GetTextColour();
else
- return m_cellTextColour;
+ return (wxColour&) m_cellTextColour;
}
void wxGenericGrid::SetCellTextColour(const wxColour& val)
@@ -2090,7 +2086,7 @@ void wxGenericGrid::SetCellTextColour(const wxColour& val)
GetCell(i, j)->SetTextColour(val);
}
-void wxGenericGrid::SetCellTextFont(wxFont *fnt)
+void wxGenericGrid::SetCellTextFont(const wxFont& fnt)
{
m_cellTextFont = fnt;
int i,j;
@@ -2110,7 +2106,7 @@ void wxGenericGrid::SetCellBitmap(wxBitmap *bitmap, int row, int col)
}
}
-wxBitmap *wxGenericGrid::GetCellBitmap(int row, int col)
+wxBitmap *wxGenericGrid::GetCellBitmap(int row, int col) const
{
wxGridCell *cell = GetCell(row, col);
if (cell)
@@ -2407,8 +2403,8 @@ void wxGenericGrid::SetGridCursor(int row, int col)
wxGridCell::wxGridCell(wxGenericGrid *window)
{
cellBitmap = (wxBitmap *) NULL;
- font = (wxFont *) NULL;
- backgroundBrush = (wxBrush *) NULL;
+ font = wxNullFont;
+ backgroundBrush = wxNullBrush;
if (window)
textColour = window->GetCellTextColour();
else
@@ -2421,7 +2417,7 @@ wxGridCell::wxGridCell(wxGenericGrid *window)
if (window)
font = window->GetCellTextFont();
else
- font = wxTheFontList->FindOrCreateFont(12, wxSWISS, wxNORMAL, wxNORMAL);
+ font = * wxTheFontList->FindOrCreateFont(12, wxSWISS, wxNORMAL, wxNORMAL);
SetBackgroundColour(backgroundColour);
@@ -2438,7 +2434,7 @@ wxGridCell::~wxGridCell(void)
void wxGridCell::SetBackgroundColour(const wxColour& colour)
{
backgroundColour = colour;
- backgroundBrush = wxTheBrushList->FindOrCreateBrush(backgroundColour, wxSOLID);
+ backgroundBrush = * wxTheBrushList->FindOrCreateBrush(backgroundColour, wxSOLID);
}
void wxGenericGrid::OnText(wxCommandEvent& WXUNUSED(ev) )
diff --git a/src/generic/laywin.cpp b/src/generic/laywin.cpp
index 88677b3780..396fe18067 100644
--- a/src/generic/laywin.cpp
+++ b/src/generic/laywin.cpp
@@ -176,7 +176,7 @@ bool wxLayoutAlgorithm::LayoutMDIFrame(wxMDIParentFrame* frame, wxRect* r)
wxCalculateLayoutEvent event;
event.SetRect(rect);
- wxNode* node = frame->GetChildren()->First();
+ wxNode* node = frame->GetChildren().First();
while (node)
{
wxWindow* win = (wxWindow*) node->Data();
@@ -210,7 +210,7 @@ bool wxLayoutAlgorithm::LayoutFrame(wxFrame* frame, wxWindow* mainWindow)
wxCalculateLayoutEvent event;
event.SetRect(rect);
- wxNode* node = frame->GetChildren()->First();
+ wxNode* node = frame->GetChildren().First();
while (node)
{
wxWindow* win = (wxWindow*) node->Data();
diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp
index f63efe7977..3a916fb19f 100644
--- a/src/generic/listctrl.cpp
+++ b/src/generic/listctrl.cpp
@@ -528,13 +528,13 @@ void wxListLineData::DoDraw( wxPaintDC *dc, bool hilight, bool paintBG )
{
if (hilight)
{
- dc->SetBrush( m_hilightBrush );
- dc->SetPen( wxTRANSPARENT_PEN );
+ dc->SetBrush( * m_hilightBrush );
+ dc->SetPen( * wxTRANSPARENT_PEN );
}
else
{
- dc->SetBrush( wxWHITE_BRUSH );
- dc->SetPen( wxTRANSPARENT_PEN );
+ dc->SetBrush( * wxWHITE_BRUSH );
+ dc->SetPen( * wxTRANSPARENT_PEN );
}
dc->DrawRectangle( m_bound_hilight.x, m_bound_hilight.y,
m_bound_hilight.width, m_bound_hilight.height );
@@ -615,8 +615,8 @@ void wxListLineData::DrawRubberBand( wxPaintDC *dc, bool on )
{
if (on)
{
- dc->SetPen( wxBLACK_PEN );
- dc->SetBrush( wxTRANSPARENT_BRUSH );
+ dc->SetPen( * wxBLACK_PEN );
+ dc->SetBrush( * wxTRANSPARENT_BRUSH );
dc->DrawRectangle( m_bound_hilight.x, m_bound_hilight.y,
m_bound_hilight.width, m_bound_hilight.height );
}
@@ -720,7 +720,7 @@ void wxListHeaderWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
dc.BeginDrawing();
- dc.SetFont( *GetFont() );
+ dc.SetFont( GetFont() );
int w = 0;
int h = 0;
@@ -832,12 +832,12 @@ void wxListHeaderWindow::OnMouse( wxMouseEvent &event )
{
if (hit_border)
{
- if (m_currentCursor == wxSTANDARD_CURSOR) SetCursor( m_resizeCursor );
+ if (m_currentCursor == wxSTANDARD_CURSOR) SetCursor( * m_resizeCursor );
m_currentCursor = m_resizeCursor;
}
else
{
- if (m_currentCursor != wxSTANDARD_CURSOR) SetCursor( wxSTANDARD_CURSOR );
+ if (m_currentCursor != wxSTANDARD_CURSOR) SetCursor( * wxSTANDARD_CURSOR );
m_currentCursor = wxSTANDARD_CURSOR;
}
}
@@ -1035,7 +1035,7 @@ void wxListMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
dc.BeginDrawing();
- dc.SetFont( *GetFont() );
+ dc.SetFont( GetFont() );
wxNode *node = m_lines.First();
while (node)
@@ -1863,7 +1863,7 @@ void wxListMainWindow::CalculatePositions( void )
if (!m_lines.First()) return;
wxPaintDC dc( this );
- dc.SetFont( *GetFont() );
+ dc.SetFont( GetFont() );
int iconSpacing = 0;
if (m_mode & wxLC_ICON) iconSpacing = m_normal_spacing;
diff --git a/src/generic/panelg.cpp b/src/generic/panelg.cpp
index c26d67adbe..70006c5ea0 100644
--- a/src/generic/panelg.cpp
+++ b/src/generic/panelg.cpp
@@ -89,7 +89,7 @@ void wxPanel::OnNavigationKey(wxNavigationKeyEvent& event)
}
// first of all, find the window which currently has the focus
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
wxWindow *winFocus = event.GetCurrentFocus();
// @@@ no FindFocus() in wxGTK
@@ -117,7 +117,7 @@ bool wxPanel::SetFocusToNextChild(wxNode *node, bool bForward)
bool bFound = FALSE; // have we found a window we will set focus to?
- wxList *children = GetChildren();
+ wxList *children = & GetChildren();
if ( node == NULL ) {
// we've never had focus before
node = bForward ? children->First() : children->Last();
diff --git a/src/generic/sashwin.cpp b/src/generic/sashwin.cpp
index 2b4c57472c..9bac85b92d 100644
--- a/src/generic/sashwin.cpp
+++ b/src/generic/sashwin.cpp
@@ -527,9 +527,9 @@ void wxSashWindow::SizeWindows()
int cw, ch;
GetClientSize(&cw, &ch);
- if (GetChildren()->Number() > 0)
+ if (GetChildren().Number() > 0)
{
- wxWindow* child = (wxWindow*) (GetChildren()->First()->Data());
+ wxWindow* child = (wxWindow*) (GetChildren().First()->Data());
int x = 0;
int y = 0;
diff --git a/src/generic/statusbr.cpp b/src/generic/statusbr.cpp
index 424008eafa..13c524247e 100644
--- a/src/generic/statusbr.cpp
+++ b/src/generic/statusbr.cpp
@@ -87,7 +87,7 @@ bool wxStatusBar::Create(wxWindow *parent, wxWindowID id,
bool success = wxWindow::Create(parent, id, pos, size, style, name);
// Don't wish this to be found as a child
- parent->GetChildren()->DeleteObject(this);
+ parent->GetChildren().DeleteObject(this);
InitColours();
@@ -172,8 +172,8 @@ void wxStatusBar::OnPaint(wxPaintEvent& WXUNUSED(event) )
wxPaintDC dc(this);
int i;
- if ( GetFont() )
- dc.SetFont(*GetFont());
+ if ( GetFont().Ok() )
+ dc.SetFont(GetFont());
dc.SetBackgroundMode(wxTRANSPARENT);
for ( i = 0; i < m_nFields; i ++ )
diff --git a/src/generic/tabg.cpp b/src/generic/tabg.cpp
index cd9f9355df..297d93d55e 100644
--- a/src/generic/tabg.cpp
+++ b/src/generic/tabg.cpp
@@ -825,7 +825,7 @@ void wxTabView::Draw(wxDC& dc)
#ifndef wxUSE_NEW_METHOD
if (GetTabStyle() & wxTAB_STYLE_DRAW_BOX)
{
- dc.SetPen(GetShadowPen());
+ dc.SetPen(* GetShadowPen());
// Draw bottom line
dc.DrawLine(
@@ -843,7 +843,7 @@ void wxTabView::Draw(wxDC& dc)
(GetViewRect().y + GetViewRect().height)
);
- dc.SetPen(wxBLACK_PEN);
+ dc.SetPen(* wxBLACK_PEN);
// Draw bottom line
dc.DrawLine(
diff --git a/src/motif/app.cpp b/src/motif/app.cpp
index 1d34942d06..622e9c126e 100644
--- a/src/motif/app.cpp
+++ b/src/motif/app.cpp
@@ -438,7 +438,7 @@ bool wxApp::SendIdleEvents(wxWindow* win)
if (event.MoreRequested())
needMore = TRUE;
- wxNode* node = win->GetChildren()->First();
+ wxNode* node = win->GetChildren().First();
while (node)
{
wxWindow* win = (wxWindow*) node->Data();
diff --git a/src/motif/button.cpp b/src/motif/button.cpp
index 3ff312878a..814d1a2a51 100644
--- a/src/motif/button.cpp
+++ b/src/motif/button.cpp
@@ -98,7 +98,7 @@ void wxButton::SetDefault()
// Because it's very hard to find wxButton in the same row,
// correction is straighforward: we set resource for all wxButton
// in this parent (but not sub panels)
- for (wxNode * node = parent->GetChildren ()->First (); node; node = node->Next ())
+ for (wxNode * node = parent->GetChildren().First (); node; node = node->Next ())
{
wxButton *item = (wxButton *) node->Data ();
if (item->IsKindOf(CLASSINFO(wxButton)))
diff --git a/src/motif/dc.cpp b/src/motif/dc.cpp
index e05e204f43..8502eb79e4 100644
--- a/src/motif/dc.cpp
+++ b/src/motif/dc.cpp
@@ -403,10 +403,10 @@ void wxDC::ComputeScaleAndOrigin(void)
{
// this is a bit artificial, but we need to force wxDC to think
// the pen has changed
- wxPen* pen = GetPen();
+ wxPen* pen = & GetPen();
wxPen tempPen;
m_pen = tempPen;
- SetPen(pen);
+ SetPen(* pen);
}
};
diff --git a/src/motif/dcclient.cpp b/src/motif/dcclient.cpp
index 357b4fc447..e99b12a347 100644
--- a/src/motif/dcclient.cpp
+++ b/src/motif/dcclient.cpp
@@ -1403,7 +1403,7 @@ void wxWindowDC::SetPen( const wxPen &pen )
m_currentPenDash = m_pen.GetDash();
if (m_currentStyle == wxSTIPPLE)
- m_currentStipple = m_pen.GetStipple ();
+ m_currentStipple = * m_pen.GetStipple ();
bool sameStyle = (oldStyle == m_currentStyle &&
oldFill == m_currentFill &&
@@ -1540,7 +1540,7 @@ void wxWindowDC::SetPen( const wxPen &pen )
{
Pixmap myStipple;
- oldStipple = (wxBitmap*) NULL; // For later reset!!
+ oldStipple = wxNullBitmap; // For later reset!!
switch (m_currentFill)
{
@@ -1691,7 +1691,7 @@ void wxWindowDC::SetBrush( const wxBrush &brush )
m_currentFill = m_brush.GetStyle ();
if (m_currentFill == wxSTIPPLE)
- m_currentStipple = m_brush.GetStipple ();
+ m_currentStipple = * m_brush.GetStipple ();
wxColour oldBrushColour(m_currentColour);
m_currentColour = m_brush.GetColour ();
diff --git a/src/motif/dcmemory.cpp b/src/motif/dcmemory.cpp
index c27c9a22e4..37c52a8b5d 100644
--- a/src/motif/dcmemory.cpp
+++ b/src/motif/dcmemory.cpp
@@ -48,8 +48,8 @@ wxMemoryDC::wxMemoryDC(void)
XGCValues valReturn;
XGetGCValues((Display*) m_display, (GC) m_gc, GCFont, &valReturn);
m_oldFont = (WXFont) valReturn.font;
- SetBrush (wxWHITE_BRUSH);
- SetPen (wxBLACK_PEN);
+ SetBrush (* wxWHITE_BRUSH);
+ SetPen (* wxBLACK_PEN);
};
wxMemoryDC::wxMemoryDC( wxDC* dc )
@@ -77,8 +77,8 @@ wxMemoryDC::wxMemoryDC( wxDC* dc )
XGCValues valReturn;
XGetGCValues((Display*) m_display, (GC) m_gc, GCFont, &valReturn);
m_oldFont = (WXFont) valReturn.font;
- SetBrush (wxWHITE_BRUSH);
- SetPen (wxBLACK_PEN);
+ SetBrush (* wxWHITE_BRUSH);
+ SetPen (* wxBLACK_PEN);
};
wxMemoryDC::~wxMemoryDC(void)
@@ -117,8 +117,8 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap )
bool oldOpt = GetOptimization();
SetOptimization(FALSE);
- SetBrush (wxWHITE_BRUSH);
- SetPen (wxBLACK_PEN);
+ SetBrush (* wxWHITE_BRUSH);
+ SetPen (* wxBLACK_PEN);
SetOptimization(oldOpt);
diff --git a/src/motif/frame.cpp b/src/motif/frame.cpp
index c95fc09b97..d540ec4a9c 100644
--- a/src/motif/frame.cpp
+++ b/src/motif/frame.cpp
@@ -378,7 +378,7 @@ void wxFrame::GetClientSize(int *x, int *y) const
// it seems that if a frame holds a panel, the menu bar size
// gets automatically taken care of --- grano@cs.helsinki.fi 4.4.95
bool hasSubPanel = FALSE;
- for(wxNode* node = GetChildren()->First(); node; node = node->Next())
+ for(wxNode* node = GetChildren().First(); node; node = node->Next())
{
wxWindow *win = (wxWindow *)node->Data();
hasSubPanel = (win->IsKindOf(CLASSINFO(wxPanel)) && !win->IsKindOf(CLASSINFO(wxDialog)));
@@ -571,7 +571,7 @@ wxStatusBar *wxFrame::OnCreateStatusBar(int number, long style, wxWindowID id,
// Set the height according to the font and the border size
wxClientDC dc(statusBar);
- dc.SetFont(* statusBar->GetFont());
+ dc.SetFont(statusBar->GetFont());
long x, y;
dc.GetTextExtent("X", &x, &y);
@@ -664,7 +664,7 @@ void wxFrame::SetMenuBar(wxMenuBar *menuBar)
void wxFrame::Fit()
{
// Work out max. size
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
int max_width = 0;
int max_height = 0;
while (node)
@@ -721,7 +721,7 @@ void wxFrame::OnSize(wxSizeEvent& event)
// do we have _exactly_ one child?
wxWindow *child = NULL;
- for ( wxNode *node = GetChildren()->First(); node; node = node->Next() )
+ for ( wxNode *node = GetChildren().First(); node; node = node->Next() )
{
wxWindow *win = (wxWindow *)node->Data();
if ( !win->IsKindOf(CLASSINFO(wxFrame)) &&
@@ -751,7 +751,7 @@ void wxFrame::OnSize(wxSizeEvent& event)
// subwindow found.
void wxFrame::OnActivate(wxActivateEvent& event)
{
- for(wxNode *node = GetChildren()->First(); node; node = node->Next())
+ for(wxNode *node = GetChildren().First(); node; node = node->Next())
{
// Find a child that's a subwindow, but not a dialog box.
wxWindow *child = (wxWindow *)node->Data();
diff --git a/src/motif/notebook.cpp b/src/motif/notebook.cpp
index 00729a08ed..ae9e5c7252 100644
--- a/src/motif/notebook.cpp
+++ b/src/motif/notebook.cpp
@@ -48,6 +48,7 @@ BEGIN_EVENT_TABLE(wxNotebook, wxControl)
EVT_MOUSE_EVENTS(wxNotebook::OnMouseEvent)
EVT_SET_FOCUS(wxNotebook::OnSetFocus)
EVT_NAVIGATION_KEY(wxNotebook::OnNavigationKey)
+ EVT_IDLE(wxNotebook::OnIdle)
END_EVENT_TABLE()
IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxControl)
@@ -392,6 +393,23 @@ void wxNotebook::OnSize(wxSizeEvent& event)
event.Skip();
}
+// This was supposed to cure the non-display of the notebook
+// until the user resizes the window.
+// What's going on?
+void wxNotebook::OnIdle(wxIdleEvent& event)
+{
+ static bool s_bFirstTime = TRUE;
+ if ( s_bFirstTime ) {
+ wxSize sz(GetSize());
+ wxSizeEvent sizeEvent(sz, GetId());
+ sizeEvent.SetEventObject(this);
+ GetEventHandler()->ProcessEvent(sizeEvent);
+ Refresh();
+ s_bFirstTime = FALSE;
+ }
+ event.Skip();
+}
+
// Implementation: calculate the layout of the view rect
// and resize the children if required
bool wxNotebook::RefreshLayout(bool force)
diff --git a/src/motif/scrolbar.cpp b/src/motif/scrolbar.cpp
index 10b670d400..08dca34d54 100644
--- a/src/motif/scrolbar.cpp
+++ b/src/motif/scrolbar.cpp
@@ -148,7 +148,7 @@ void wxScrollBar::SetScrollbar(int position, int thumbSize, int range, int pageS
void wxScrollBar::Command(wxCommandEvent& event)
{
- SetPosition(event.m_commandInt);
+ SetThumbPosition(event.m_commandInt);
ProcessCommand(event);
}
diff --git a/src/motif/toolbar.cpp b/src/motif/toolbar.cpp
index 071f4f030b..989b24331b 100644
--- a/src/motif/toolbar.cpp
+++ b/src/motif/toolbar.cpp
@@ -590,7 +590,7 @@ void wxToolBar::DestroyPixmaps()
wxToolBarTool *wxToolBar::AddTool(int index, const wxBitmap& bitmap, const wxBitmap& pushedBitmap,
bool toggle, long xPos, long yPos, wxObject *clientData, const wxString& helpString1, const wxString& helpString2)
{
- wxToolBarTool *tool = new wxToolBarTool(index, bitmap, (wxBitmap *)NULL, toggle, xPos, yPos, helpString1, helpString2);
+ wxToolBarTool *tool = new wxToolBarTool(index, bitmap, wxNullBitmap, toggle, xPos, yPos, helpString1, helpString2);
tool->m_clientData = clientData;
if (xPos > -1)
diff --git a/src/motif/utils.cpp b/src/motif/utils.cpp
index 07ac707905..29f7b5488a 100644
--- a/src/motif/utils.cpp
+++ b/src/motif/utils.cpp
@@ -571,7 +571,7 @@ wxXSetBusyCursor (wxWindow * win, wxCursor * cursor)
XFlush (display);
- for(wxNode *node = win->GetChildren()->First (); node; node = node->Next())
+ for(wxNode *node = win->GetChildren().First (); node; node = node->Next())
{
wxWindow *child = (wxWindow *) node->Data ();
wxXSetBusyCursor (child, cursor);
diff --git a/src/motif/window.cpp b/src/motif/window.cpp
index d6bef2d967..9be496a55a 100644
--- a/src/motif/window.cpp
+++ b/src/motif/window.cpp
@@ -942,7 +942,7 @@ void wxWindow::Refresh(bool eraseBack, const wxRect *rect)
// Responds to colour changes: passes event on to children.
void wxWindow::OnSysColourChanged(wxSysColourChangedEvent& event)
{
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
while ( node )
{
// Only propagate to non-top-level windows
@@ -1371,7 +1371,7 @@ bool wxWindow::IsEnabled() const
// it's an application error (pops up a dialog)
bool wxWindow::TransferDataToWindow()
{
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
while ( node )
{
wxWindow *child = (wxWindow *)node->Data();
@@ -1391,7 +1391,7 @@ bool wxWindow::TransferDataToWindow()
// validation failed: don't quit
bool wxWindow::TransferDataFromWindow()
{
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
while ( node )
{
wxWindow *child = (wxWindow *)node->Data();
@@ -1407,7 +1407,7 @@ bool wxWindow::TransferDataFromWindow()
bool wxWindow::Validate()
{
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
while ( node )
{
wxWindow *child = (wxWindow *)node->Data();
@@ -1430,14 +1430,13 @@ wxWindow *wxWindow::FindFocus()
void wxWindow::AddChild(wxWindow *child)
{
- GetChildren()->Append(child);
+ GetChildren().Append(child);
child->m_windowParent = this;
}
void wxWindow::RemoveChild(wxWindow *child)
{
- if (GetChildren())
- GetChildren()->DeleteObject(child);
+ GetChildren().DeleteObject(child);
child->m_windowParent = NULL;
}
@@ -1450,9 +1449,7 @@ bool wxWindow::Reparent(wxWindow* WXUNUSED(parent))
void wxWindow::DestroyChildren()
{
- if (GetChildren())
- {
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
while (node)
{
wxNode* next = node->Next();
@@ -1460,19 +1457,18 @@ void wxWindow::DestroyChildren()
delete child;
node = next;
}
- GetChildren()->Clear();
+ GetChildren().Clear();
#if 0
wxNode *node;
- while ((node = GetChildren()->First()) != (wxNode *)NULL) {
+ while ((node = GetChildren().First()) != (wxNode *)NULL) {
wxWindow *child;
if ((child = (wxWindow *)node->Data()) != (wxWindow *)NULL) {
delete child;
- if ( GetChildren()->Member(child) )
+ if ( GetChildren().Member(child) )
delete node;
}
} /* while */
#endif
- }
}
void wxWindow::MakeModal(bool modal)
@@ -1687,7 +1683,7 @@ bool wxWindow::DoPhase(int phase)
{
noChanges = 0;
noFailures = 0;
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
while (node)
{
wxWindow *child = (wxWindow *)node->Data();
@@ -1732,7 +1728,7 @@ void wxWindow::ResetConstraints()
constr->centreX.SetDone(FALSE);
constr->centreY.SetDone(FALSE);
}
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
while (node)
{
wxWindow *win = (wxWindow *)node->Data();
@@ -1791,7 +1787,7 @@ void wxWindow::SetConstraintSizes(bool recurse)
if (recurse)
{
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
while (node)
{
wxWindow *win = (wxWindow *)node->Data();
@@ -1928,9 +1924,7 @@ bool wxWindow::Close(bool force)
wxObject* wxWindow::GetChild(int number) const
{
// Return a pointer to the Nth object in the window
- if (!GetChildren())
- return(NULL) ;
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
int n = number;
while (node && n--)
node = node->Next() ;
@@ -1961,7 +1955,7 @@ void wxWindow::Fit()
{
int maxX = 0;
int maxY = 0;
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
while ( node )
{
wxWindow *win = (wxWindow *)node->Data();
@@ -2015,7 +2009,7 @@ wxWindow *wxWindow::FindWindow(long id)
if ( GetId() == id)
return this;
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
while ( node )
{
wxWindow *child = (wxWindow *)node->Data();
@@ -2032,7 +2026,7 @@ wxWindow *wxWindow::FindWindow(const wxString& name)
if ( GetName() == name)
return this;
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
while ( node )
{
wxWindow *child = (wxWindow *)node->Data();
diff --git a/src/msw/app.cpp b/src/msw/app.cpp
index 58798d9374..76458c15a6 100644
--- a/src/msw/app.cpp
+++ b/src/msw/app.cpp
@@ -869,7 +869,7 @@ bool wxApp::SendIdleEvents(wxWindow* win)
if (event.MoreRequested())
needMore = TRUE;
- wxNode* node = win->GetChildren()->First();
+ wxNode* node = win->GetChildren().First();
while (node)
{
wxWindow* win = (wxWindow*) node->Data();
diff --git a/src/msw/bitmap.cpp b/src/msw/bitmap.cpp
index 6949e0783a..9d8228fea9 100644
--- a/src/msw/bitmap.cpp
+++ b/src/msw/bitmap.cpp
@@ -405,9 +405,9 @@ wxBitmap wxBitmap::GetBitmapForDC(wxDC& dc) const
*/
if( this->GetPalette() && this->GetPalette()->Ok() && (this->GetPalette()->GetHPALETTE() != 0) )
{
- tmpBitmap.SetPalette(this->GetPalette());
+ tmpBitmap.SetPalette(* this->GetPalette());
memDC.SelectObject(tmpBitmap);
- memDC.SetPalette(this->GetPalette());
+ memDC.SetPalette(* this->GetPalette());
hPal = (HPALETTE) this->GetPalette()->GetHPALETTE();
}
else
diff --git a/src/msw/bmpbuttn.cpp b/src/msw/bmpbuttn.cpp
index 201529d4ca..f21e4ff954 100644
--- a/src/msw/bmpbuttn.cpp
+++ b/src/msw/bmpbuttn.cpp
@@ -82,7 +82,7 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bit
// Subclass again for purposes of dialog editing mode
SubclassWin((WXHWND)wx_button);
- SetFont(* parent->GetFont()) ;
+ SetFont(parent->GetFont()) ;
SetSize(x, y, width, height);
ShowWindow(wx_button, SW_SHOW);
diff --git a/src/msw/button.cpp b/src/msw/button.cpp
index 03200cfacf..79f81ffaaa 100644
--- a/src/msw/button.cpp
+++ b/src/msw/button.cpp
@@ -87,7 +87,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label,
// Subclass again for purposes of dialog editing mode
SubclassWin((WXHWND)wx_button);
- SetFont(* parent->GetFont());
+ SetFont(parent->GetFont());
SetSize(x, y, width, height);
ShowWindow(wx_button, SW_SHOW);
@@ -117,7 +117,7 @@ void wxButton::SetSize(int x, int y, int width, int height, int sizeFlags)
int cyf;
char buf[300];
GetWindowText((HWND) GetHWND(), buf, 300);
- GetTextExtent(buf, ¤t_width, &cyf,NULL,NULL,GetFont());
+ GetTextExtent(buf, ¤t_width, &cyf,NULL,NULL,& GetFont());
// If we're prepared to use the existing width, then...
if (width == -1 && ((sizeFlags & wxSIZE_AUTO_WIDTH) != wxSIZE_AUTO_WIDTH))
@@ -126,7 +126,7 @@ void wxButton::SetSize(int x, int y, int width, int height, int sizeFlags)
{
int cx;
int cy;
- wxGetCharSize(GetHWND(), &cx, &cy,GetFont());
+ wxGetCharSize(GetHWND(), &cx, &cy,& GetFont());
actualWidth = (int)(current_width + 3*cx) ;
}
diff --git a/src/msw/checkbox.cpp b/src/msw/checkbox.cpp
index 3c659f88fa..33452a6cdd 100644
--- a/src/msw/checkbox.cpp
+++ b/src/msw/checkbox.cpp
@@ -105,7 +105,7 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
// Subclass again for purposes of dialog editing mode
SubclassWin(m_hWnd);
- SetFont(*parent->GetFont());
+ SetFont(parent->GetFont());
SetSize(x, y, width, height);
@@ -143,7 +143,7 @@ void wxCheckBox::SetSize(int x, int y, int width, int height, int sizeFlags)
if ( !str.IsEmpty() )
{
- GetTextExtent(str, ¤t_width, &cyf, NULL, NULL, GetFont());
+ GetTextExtent(str, ¤t_width, &cyf, NULL, NULL, & GetFont());
if (w1 < 0)
w1 = (int)(current_width + RADIO_SIZE);
if (h1 < 0)
diff --git a/src/msw/choice.cpp b/src/msw/choice.cpp
index 9688accf39..1ea6050d46 100644
--- a/src/msw/choice.cpp
+++ b/src/msw/choice.cpp
@@ -105,7 +105,7 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id,
// Subclass again for purposes of dialog editing mode
SubclassWin(m_hWnd);
- SetFont(* parent->GetFont());
+ SetFont(parent->GetFont());
int i;
for (i = 0; i < n; i++)
@@ -204,7 +204,7 @@ void wxChoice::SetSize(int x, int y, int width, int height, int sizeFlags)
int cx; // button font dimensions
int cy;
- wxGetCharSize(GetHWND(), &cx, &cy, GetFont());
+ wxGetCharSize(GetHWND(), &cx, &cy, & GetFont());
int control_width, control_height;
@@ -232,7 +232,7 @@ void wxChoice::SetSize(int x, int y, int width, int height, int sizeFlags)
for (i = 0; i < m_noStrings; i++)
{
wxString str(GetString(i));
- GetTextExtent(str, &len, &ht, NULL, NULL,GetFont());
+ GetTextExtent(str, &len, &ht, NULL, NULL, & GetFont());
if ( len > longest)
longest = len;
}
diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp
index db6801a3f3..abd740fa2b 100644
--- a/src/msw/combobox.cpp
+++ b/src/msw/combobox.cpp
@@ -127,7 +127,7 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
// Subclass again for purposes of dialog editing mode
SubclassWin(m_hWnd);
- SetFont(* parent->GetFont());
+ SetFont(parent->GetFont());
int i;
for (i = 0; i < n; i++)
{
diff --git a/src/msw/frame.cpp b/src/msw/frame.cpp
index 8616d1a2ae..c46347705c 100644
--- a/src/msw/frame.cpp
+++ b/src/msw/frame.cpp
@@ -370,7 +370,7 @@ wxStatusBar *wxFrame::OnCreateStatusBar(int number, long style, wxWindowID id,
// Set the height according to the font and the border size
wxClientDC dc(statusBar);
- dc.SetFont(* statusBar->GetFont());
+ dc.SetFont(statusBar->GetFont());
long x, y;
dc.GetTextExtent("X", &x, &y);
@@ -508,7 +508,7 @@ bool wxFrame::LoadAccelerators(const wxString& table)
void wxFrame::Fit(void)
{
// Work out max. size
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
int max_width = 0;
int max_height = 0;
while (node)
@@ -801,7 +801,7 @@ void wxFrame::OnSize(wxSizeEvent& event)
// do we have _exactly_ one child?
wxWindow *child = NULL;
- for ( wxNode *node = GetChildren()->First(); node; node = node->Next() )
+ for ( wxNode *node = GetChildren().First(); node; node = node->Next() )
{
wxWindow *win = (wxWindow *)node->Data();
if ( !win->IsKindOf(CLASSINFO(wxFrame)) &&
@@ -831,7 +831,7 @@ void wxFrame::OnSize(wxSizeEvent& event)
// subwindow found.
void wxFrame::OnActivate(wxActivateEvent& event)
{
- for(wxNode *node = GetChildren()->First(); node; node = node->Next())
+ for(wxNode *node = GetChildren().First(); node; node = node->Next())
{
// Find a child that's a subwindow, but not a dialog box.
wxWindow *child = (wxWindow *)node->Data();
@@ -1037,7 +1037,7 @@ void wxFrame::PositionToolBar(void)
// propagate our state change to all child frames
void wxFrame::IconizeChildFrames(bool bIconize)
{
- for ( wxNode *node = GetChildren()->First(); node; node = node->Next() ) {
+ for ( wxNode *node = GetChildren().First(); node; node = node->Next() ) {
wxWindow *win = (wxWindow *)node->Data();
if ( win->IsKindOf(CLASSINFO(wxFrame)) ) {
((wxFrame *)win)->Iconize(bIconize);
diff --git a/src/msw/gauge95.cpp b/src/msw/gauge95.cpp
index e48513d680..f671fb2c7e 100644
--- a/src/msw/gauge95.cpp
+++ b/src/msw/gauge95.cpp
@@ -81,7 +81,7 @@ bool wxGauge95::Create(wxWindow *parent, wxWindowID id,
SendMessage((HWND) GetHWND(), PBM_SETRANGE, 0, MAKELPARAM(0, range));
- SetFont(* parent->GetFont());
+ SetFont(parent->GetFont());
if (width == -1)
width = 50;
diff --git a/src/msw/gaugemsw.cpp b/src/msw/gaugemsw.cpp
index 0c33ec4dda..1f82c799c4 100644
--- a/src/msw/gaugemsw.cpp
+++ b/src/msw/gaugemsw.cpp
@@ -128,7 +128,7 @@ bool wxGaugeMSW::Create(wxWindow *parent, wxWindowID id,
SendMessage((HWND) GetHWND(), ZYZG_SETFGCOLOR, 0, RGB(GetForegroundColour().Red(), GetForegroundColour().Green(), GetForegroundColour().Blue()));
SendMessage((HWND) GetHWND(), ZYZG_SETBKCOLOR, 0, RGB(GetBackgroundColour().Red(), GetBackgroundColour().Green(), GetBackgroundColour().Blue()));
- SetFont(* parent->GetFont());
+ SetFont(parent->GetFont());
if (width == -1)
width = 50;
diff --git a/src/msw/imaglist.cpp b/src/msw/imaglist.cpp
index e6ca103540..1ad87888ba 100644
--- a/src/msw/imaglist.cpp
+++ b/src/msw/imaglist.cpp
@@ -167,7 +167,7 @@ bool wxImageList::Draw(int index, wxDC& dc, int x, int y,
if ( solidBackground )
{
- wxBrush *brush = dc.GetBackground();
+ wxBrush *brush = & dc.GetBackground();
if ( brush && brush->Ok())
{
wxColour col(brush->GetColour());
diff --git a/src/msw/listbox.cpp b/src/msw/listbox.cpp
index c3a7f12755..40f02d0f05 100644
--- a/src/msw/listbox.cpp
+++ b/src/msw/listbox.cpp
@@ -244,7 +244,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
if ( (m_windowStyle & wxLB_MULTIPLE) == 0 )
SendMessage(hwnd, LB_SETCURSEL, 0, 0);
- SetFont(* parent->GetFont());
+ SetFont(parent->GetFont());
SetSize(x, y, width, height);
@@ -495,7 +495,7 @@ void wxListBox::SetSize(int x, int y, int width, int height, int sizeFlags)
int cx; // button font dimensions
int cy;
- wxGetCharSize(GetHWND(), &cx, &cy,GetFont());
+ wxGetCharSize(GetHWND(), &cx, &cy, & GetFont());
float control_width, control_height, control_x, control_y;
@@ -540,8 +540,8 @@ void wxListBox::SetHorizontalExtent(const wxString& s)
int existingExtent = (int)SendMessage(hwnd, LB_GETHORIZONTALEXTENT, 0, 0L);
HDC dc = GetWindowDC(hwnd);
HFONT oldFont = 0;
- if (GetFont() && GetFont()->GetResourceHandle())
- oldFont = (HFONT) ::SelectObject(dc, (HFONT) GetFont()->GetResourceHandle());
+ if (GetFont().Ok() && GetFont().GetResourceHandle())
+ oldFont = (HFONT) ::SelectObject(dc, (HFONT) GetFont().GetResourceHandle());
GetTextMetrics(dc, &lpTextMetric);
SIZE extentXY;
@@ -561,8 +561,8 @@ void wxListBox::SetHorizontalExtent(const wxString& s)
int largestExtent = 0;
HDC dc = GetWindowDC(hwnd);
HFONT oldFont = 0;
- if (GetFont() && GetFont()->GetResourceHandle())
- oldFont = (HFONT) ::SelectObject(dc, (HFONT) GetFont()->GetResourceHandle());
+ if (GetFont().Ok() && GetFont().GetResourceHandle())
+ oldFont = (HFONT) ::SelectObject(dc, (HFONT) GetFont().GetResourceHandle());
GetTextMetrics(dc, &lpTextMetric);
int i;
diff --git a/src/msw/mdi.cpp b/src/msw/mdi.cpp
index 953733d50a..61653c10fe 100644
--- a/src/msw/mdi.cpp
+++ b/src/msw/mdi.cpp
@@ -527,7 +527,7 @@ bool wxMDIParentFrame::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control)
}
if (id >= wxFIRST_MDI_CHILD && id <= wxLAST_MDI_CHILD)
{
- wxNode* node = GetChildren()->First();
+ wxNode* node = GetChildren().First();
while (node)
{
wxWindow* child = (wxWindow*) node->Data();
diff --git a/src/msw/nativdlg.cpp b/src/msw/nativdlg.cpp
index a8b9eb10cc..097db29e59 100644
--- a/src/msw/nativdlg.cpp
+++ b/src/msw/nativdlg.cpp
@@ -96,7 +96,7 @@ wxWindow* wxWindow::GetWindowChild1(wxWindowID& id)
if ( m_windowId == id )
return this;
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
while ( node )
{
wxWindow* child = (wxWindow*) node->Data();
diff --git a/src/msw/radiobox.cpp b/src/msw/radiobox.cpp
index fee27add59..f49f7a857d 100644
--- a/src/msw/radiobox.cpp
+++ b/src/msw/radiobox.cpp
@@ -154,7 +154,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
}
#endif
- SetFont(* parent->GetFont());
+ SetFont(parent->GetFont());
SubclassWin((WXHWND)m_hWnd);
@@ -183,10 +183,10 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
m_useCtl3D = TRUE;
}
#endif
- if (GetFont())
+ if (GetFont().Ok())
{
SendMessage((HWND)m_radioButtons[i],WM_SETFONT,
- (WPARAM)GetFont()->GetResourceHandle(),0L);
+ (WPARAM)GetFont().GetResourceHandle(),0L);
}
m_subControls.Append((wxObject *)newId);
}
@@ -262,7 +262,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
}
#endif
- SetFont(* parent->GetFont());
+ SetFont(parent->GetFont());
// Subclass again for purposes of dialog editing mode
SubclassWin((WXHWND)m_hWnd);
@@ -407,7 +407,7 @@ void wxRadioBox::SetSize(int x, int y, int width, int height, int sizeFlags)
int current_width, cyf;
int cx1,cy1 ;
- wxGetCharSize(m_hWnd, &cx1, &cy1, GetFont());
+ wxGetCharSize(m_hWnd, &cx1, &cy1, & GetFont());
// Attempt to have a look coherent with other platforms:
// We compute the biggest toggle dim, then we align all
// items according this value.
@@ -423,7 +423,7 @@ void wxRadioBox::SetSize(int x, int y, int width, int height, int sizeFlags)
{
// It's a labelled toggle
GetWindowText((HWND) m_radioButtons[i], buf, 300);
- GetTextExtent(buf, ¤t_width, &cyf,NULL,NULL, GetFont());
+ GetTextExtent(buf, ¤t_width, &cyf,NULL,NULL, & GetFont());
eachWidth = (int)(current_width + RADIO_SIZE);
eachHeight = (int)((3*cyf)/2);
}
@@ -503,7 +503,7 @@ void wxRadioBox::SetSize(int x, int y, int width, int height, int sizeFlags)
{
// It's a labeled item
GetWindowText((HWND) m_radioButtons[i], buf, 300);
- GetTextExtent(buf, ¤t_width, &cyf,NULL,NULL,GetFont());
+ GetTextExtent(buf, ¤t_width, &cyf,NULL,NULL, & GetFont());
// How do we find out radio button bitmap size!!
// By adjusting them carefully, manually :-)
diff --git a/src/msw/radiobut.cpp b/src/msw/radiobut.cpp
index 8a222716d2..32bd65e9b8 100644
--- a/src/msw/radiobut.cpp
+++ b/src/msw/radiobut.cpp
@@ -103,7 +103,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id,
}
#endif
- SetFont(* parent->GetFont());
+ SetFont(parent->GetFont());
// Subclass again for purposes of dialog editing mode
SubclassWin((WXHWND)m_hWnd);
@@ -114,7 +114,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id,
if (label != "")
{
int label_width, label_height;
- GetTextExtent(label, &label_width, &label_height, NULL, NULL, GetFont());
+ GetTextExtent(label, &label_width, &label_height, NULL, NULL, & GetFont());
if (width < 0)
width = (int)(label_width + RADIO_SIZE);
if (height<0)
diff --git a/src/msw/scrolbar.cpp b/src/msw/scrolbar.cpp
index 904fc74ec7..bac5e67a09 100644
--- a/src/msw/scrolbar.cpp
+++ b/src/msw/scrolbar.cpp
@@ -100,7 +100,7 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
::SetScrollPos(scroll_bar, SB_CTL, 0, FALSE);
ShowWindow(scroll_bar, SW_SHOW);
- SetFont(* parent->GetFont());
+ SetFont(parent->GetFont());
m_hWnd = (WXHWND)scroll_bar;
diff --git a/src/msw/slider95.cpp b/src/msw/slider95.cpp
index 20f3620080..6e5f9c4ba3 100644
--- a/src/msw/slider95.cpp
+++ b/src/msw/slider95.cpp
@@ -156,7 +156,7 @@ bool wxSlider95::Create(wxWindow *parent, wxWindowID id,
SetWindowText((HWND) m_hWnd, "");
- SetFont(* parent->GetFont());
+ SetFont(parent->GetFont());
if ( m_windowStyle & wxSL_LABELS )
{
@@ -168,20 +168,19 @@ bool wxSlider95::Create(wxWindow *parent, wxWindowID id,
wxGetInstance(), NULL);
- if (GetFont())
+ if (GetFont().Ok())
{
-// GetFont()->RealizeResource();
- if (GetFont()->GetResourceHandle())
+ if (GetFont().GetResourceHandle())
{
if ( m_staticMin )
SendMessage((HWND)m_staticMin,WM_SETFONT,
- (WPARAM)GetFont()->GetResourceHandle(),0L);
+ (WPARAM)GetFont().GetResourceHandle(),0L);
if ( m_staticMax )
SendMessage((HWND)m_staticMax,WM_SETFONT,
- (WPARAM)GetFont()->GetResourceHandle(),0L);
+ (WPARAM)GetFont().GetResourceHandle(),0L);
if (m_staticValue)
SendMessage((HWND)m_staticValue,WM_SETFONT,
- (WPARAM)GetFont()->GetResourceHandle(),0L);
+ (WPARAM)GetFont().GetResourceHandle(),0L);
}
}
}
@@ -369,7 +368,7 @@ void wxSlider95::SetSize(int x, int y, int width, int height, int sizeFlags)
int cy;
int cyf;
- wxGetCharSize(GetHWND(), &cx, &cy,GetFont());
+ wxGetCharSize(GetHWND(), &cx, &cy, & GetFont());
if ((m_windowStyle & wxSL_VERTICAL) != wxSL_VERTICAL)
{
@@ -378,12 +377,12 @@ void wxSlider95::SetSize(int x, int y, int width, int height, int sizeFlags)
int min_len = 0;
GetWindowText((HWND) m_staticMin, buf, 300);
- GetTextExtent(buf, &min_len, &cyf,NULL,NULL, GetFont());
+ GetTextExtent(buf, &min_len, &cyf,NULL,NULL, & GetFont());
int max_len = 0;
GetWindowText((HWND) m_staticMax, buf, 300);
- GetTextExtent(buf, &max_len, &cyf,NULL,NULL, GetFont());
+ GetTextExtent(buf, &max_len, &cyf,NULL,NULL, & GetFont());
if (m_staticValue)
{
int new_width = (int)(wxMax(min_len, max_len));
@@ -439,11 +438,11 @@ void wxSlider95::SetSize(int x, int y, int width, int height, int sizeFlags)
{
int min_len;
GetWindowText((HWND) m_staticMin, buf, 300);
- GetTextExtent(buf, &min_len, &cyf,NULL,NULL,GetFont());
+ GetTextExtent(buf, &min_len, &cyf,NULL,NULL, & GetFont());
int max_len;
GetWindowText((HWND) m_staticMax, buf, 300);
- GetTextExtent(buf, &max_len, &cyf,NULL,NULL, GetFont());
+ GetTextExtent(buf, &max_len, &cyf,NULL,NULL, & GetFont());
if (m_staticValue)
{
diff --git a/src/msw/slidrmsw.cpp b/src/msw/slidrmsw.cpp
index cd2b47760c..28d9a1ac7e 100644
--- a/src/msw/slidrmsw.cpp
+++ b/src/msw/slidrmsw.cpp
@@ -136,22 +136,22 @@ bool wxSliderMSW::Create(wxWindow *parent, wxWindowID id,
0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)NewControlId(),
wxGetInstance(), NULL);
- SetFont(* parent->GetFont());
+ SetFont(parent->GetFont());
- if (GetFont())
+ if (GetFont().Ok())
{
// GetFont()->RealizeResource();
- if (GetFont()->GetResourceHandle())
+ if (GetFont().GetResourceHandle())
{
if ( m_staticMin )
SendMessage((HWND)m_staticMin,WM_SETFONT,
- (WPARAM)GetFont()->GetResourceHandle(),0L);
+ (WPARAM)GetFont().GetResourceHandle(),0L);
if ( m_staticMax )
SendMessage((HWND)m_staticMax,WM_SETFONT,
- (WPARAM)GetFont()->GetResourceHandle(),0L);
+ (WPARAM)GetFont().GetResourceHandle(),0L);
if (m_staticValue)
SendMessage((HWND)m_staticValue,WM_SETFONT,
- (WPARAM)GetFont()->GetResourceHandle(),0L);
+ (WPARAM)GetFont().GetResourceHandle(),0L);
}
}
@@ -340,7 +340,7 @@ void wxSliderMSW::SetSize(int x, int y, int width, int height, int sizeFlags)
int cy;
int cyf;
- wxGetCharSize(GetHWND(), &cx, &cy,GetFont());
+ wxGetCharSize(GetHWND(), &cx, &cy,& GetFont());
if ((m_windowStyle & wxSL_VERTICAL) != wxSL_VERTICAL)
{
@@ -349,12 +349,12 @@ void wxSliderMSW::SetSize(int x, int y, int width, int height, int sizeFlags)
int min_len = 0;
GetWindowText((HWND) m_staticMin, buf, 300);
- GetTextExtent(buf, &min_len, &cyf,NULL,NULL, GetFont());
+ GetTextExtent(buf, &min_len, &cyf,NULL,NULL, & GetFont());
int max_len = 0;
GetWindowText((HWND) m_staticMax, buf, 300);
- GetTextExtent(buf, &max_len, &cyf,NULL,NULL, GetFont());
+ GetTextExtent(buf, &max_len, &cyf,NULL,NULL, & GetFont());
if (m_staticValue)
{
int new_width = (int)(wxMax(min_len, max_len));
@@ -400,11 +400,11 @@ void wxSliderMSW::SetSize(int x, int y, int width, int height, int sizeFlags)
{
int min_len;
GetWindowText((HWND) m_staticMin, buf, 300);
- GetTextExtent(buf, &min_len, &cyf,NULL,NULL,GetFont());
+ GetTextExtent(buf, &min_len, &cyf,NULL,NULL,& GetFont());
int max_len;
GetWindowText((HWND) m_staticMax, buf, 300);
- GetTextExtent(buf, &max_len, &cyf,NULL,NULL, GetFont());
+ GetTextExtent(buf, &max_len, &cyf,NULL,NULL, & GetFont());
if (m_staticValue)
{
diff --git a/src/msw/statbmp.cpp b/src/msw/statbmp.cpp
index 0725df9d88..e5070f3546 100644
--- a/src/msw/statbmp.cpp
+++ b/src/msw/statbmp.cpp
@@ -84,7 +84,7 @@ bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id,
// Subclass again for purposes of dialog editing mode
SubclassWin(m_hWnd);
- SetFont(* GetParent()->GetFont());
+ SetFont(GetParent()->GetFont());
SetSize(x, y, width, height);
return TRUE;
diff --git a/src/msw/statbox.cpp b/src/msw/statbox.cpp
index 63ddabb570..eb82270972 100644
--- a/src/msw/statbox.cpp
+++ b/src/msw/statbox.cpp
@@ -89,7 +89,7 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID id,
// Subclass again for purposes of dialog editing mode
SubclassWin(GetHWND());
- SetFont(* parent->GetFont());
+ SetFont(parent->GetFont());
SetSize(x, y, width, height);
ShowWindow(wx_button, SW_SHOW);
@@ -131,10 +131,10 @@ void wxStaticBox::SetSize(int x, int y, int width, int height, int sizeFlags)
int cy;
int cyf;
- wxGetCharSize(GetHWND(), &cx, &cy,GetFont());
+ wxGetCharSize(GetHWND(), &cx, &cy, & GetFont());
GetTextExtent(wxGetWindowText(m_hWnd), ¤t_width, &cyf,
- NULL,NULL,GetFont());
+ NULL,NULL, & GetFont());
if ( w1 < 0 )
w1 = current_width + 3*cx;
if ( h1 < 0 )
diff --git a/src/msw/stattext.cpp b/src/msw/stattext.cpp
index e27866942b..3c7f1df266 100644
--- a/src/msw/stattext.cpp
+++ b/src/msw/stattext.cpp
@@ -86,7 +86,7 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id,
SubclassWin(m_hWnd);
- SetFont(* parent->GetFont());
+ SetFont(parent->GetFont());
SetSize(x, y, width, height);
return TRUE;
@@ -114,7 +114,7 @@ void wxStaticText::SetSize(int x, int y, int width, int height, int sizeFlags)
int cyf;
::GetWindowText((HWND) GetHWND(), buf, 300);
- GetTextExtent(buf, ¤t_width, &cyf, NULL, NULL,GetFont());
+ GetTextExtent(buf, ¤t_width, &cyf, NULL, NULL, & GetFont());
int ww, hh;
GetSize(&ww, &hh);
@@ -126,7 +126,7 @@ void wxStaticText::SetSize(int x, int y, int width, int height, int sizeFlags)
{
int cx;
int cy;
- wxGetCharSize(GetHWND(), &cx, &cy,GetFont());
+ wxGetCharSize(GetHWND(), &cx, &cy, & GetFont());
actualWidth = (int)(current_width + cx) ;
}
@@ -159,7 +159,7 @@ void wxStaticText::SetLabel(const wxString& label)
::ScreenToClient((HWND) parent->GetHWND(), &point);
}
- GetTextExtent(label, &w, &h, NULL, NULL, GetFont());
+ GetTextExtent(label, &w, &h, NULL, NULL, & GetFont());
MoveWindow((HWND) GetHWND(), point.x, point.y, (int)(w + 10), (int)h,
TRUE);
SetWindowText((HWND) GetHWND(), (const char *)label);
diff --git a/src/msw/tbarmsw.cpp b/src/msw/tbarmsw.cpp
index 91bed87c4b..15dd0eafae 100644
--- a/src/msw/tbarmsw.cpp
+++ b/src/msw/tbarmsw.cpp
@@ -348,7 +348,7 @@ wxToolBarTool *wxToolBarMSW::AddTool(int index, const wxBitmap& bitmap, const wx
wxToolBarTool *tool = new wxToolBarTool(index, bitmap, *bitmap2, toggle, xPos, yPos, helpString1, helpString2);
#else
- wxToolBarTool *tool = new wxToolBarTool(index, bitmap, (wxBitmap *)NULL, toggle, xPos, yPos, helpString1, helpString2);
+ wxToolBarTool *tool = new wxToolBarTool(index, bitmap, wxNullBitmap, toggle, xPos, yPos, helpString1, helpString2);
#endif
tool->m_clientData = clientData;
diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp
index 623a803942..0f5afa110a 100644
--- a/src/msw/textctrl.cpp
+++ b/src/msw/textctrl.cpp
@@ -200,9 +200,9 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
SubclassWin(GetHWND());
- if ( parent->GetFont() && parent->GetFont()->Ok() )
+ if ( parent->GetFont().Ok() && parent->GetFont().Ok() )
{
- SetFont(* parent->GetFont());
+ SetFont(parent->GetFont());
}
else
{
@@ -328,7 +328,7 @@ void wxTextCtrl::SetSize(int x, int y, int width, int height, int sizeFlags)
int cx; // button font dimensions
int cy;
- wxGetCharSize(GetHWND(), &cx, &cy,GetFont());
+ wxGetCharSize(GetHWND(), &cx, &cy, & GetFont());
int control_width, control_height, control_x, control_y;
diff --git a/src/msw/window.cpp b/src/msw/window.cpp
index a3ee4e93e1..68cf6d87c2 100644
--- a/src/msw/window.cpp
+++ b/src/msw/window.cpp
@@ -108,9 +108,9 @@ END_EVENT_TABLE()
// Find an item given the MS Windows id
wxWindow *wxWindow::FindItem(int id) const
{
- if (!GetChildren())
- return NULL;
- wxNode *current = GetChildren()->First();
+// if (!GetChildren())
+// return NULL;
+ wxNode *current = GetChildren().First();
while (current)
{
wxWindow *childWin = (wxWindow *)current->Data();
@@ -139,9 +139,9 @@ wxWindow *wxWindow::FindItem(int id) const
// Find an item given the MS Windows handle
wxWindow *wxWindow::FindItemByHWND(WXHWND hWnd, bool controlOnly) const
{
- if (!GetChildren())
- return NULL;
- wxNode *current = GetChildren()->First();
+// if (!GetChildren())
+// return NULL;
+ wxNode *current = GetChildren().First();
while (current)
{
wxObject *obj = (wxObject *)current->Data() ;
@@ -1594,7 +1594,7 @@ long wxWindow::MSWOnNotify(WXWPARAM wParam, WXLPARAM lParam)
{
// Rely on MSWNotify to check whether the message
// belongs to the window or not
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
while (node)
{
wxWindow *child = (wxWindow *)node->Data();
@@ -1818,7 +1818,7 @@ long wxWindow::MSWOnQueryNewPalette()
// Responds to colour changes: passes event on to children.
void wxWindow::OnSysColourChanged(wxSysColourChangedEvent& event)
{
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
while ( node )
{
// Only propagate to non-top-level windows
@@ -3493,7 +3493,7 @@ bool wxWindow::IsEnabled(void) const
// it's an application error (pops up a dialog)
bool wxWindow::TransferDataToWindow()
{
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
while ( node )
{
wxWindow *child = (wxWindow *)node->Data();
@@ -3513,7 +3513,7 @@ bool wxWindow::TransferDataToWindow()
// validation failed: don't quit
bool wxWindow::TransferDataFromWindow()
{
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
while ( node )
{
wxWindow *child = (wxWindow *)node->Data();
@@ -3529,7 +3529,7 @@ bool wxWindow::TransferDataFromWindow()
bool wxWindow::Validate()
{
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
while ( node )
{
wxWindow *child = (wxWindow *)node->Data();
@@ -3556,30 +3556,28 @@ wxWindow *wxWindow::FindFocus()
void wxWindow::AddChild(wxWindow *child)
{
- GetChildren()->Append(child);
+ GetChildren().Append(child);
child->m_windowParent = this;
}
void wxWindow::RemoveChild(wxWindow *child)
{
- if (GetChildren())
- GetChildren()->DeleteObject(child);
+// if (GetChildren())
+ GetChildren().DeleteObject(child);
child->m_windowParent = NULL;
}
void wxWindow::DestroyChildren()
{
- if (GetChildren()) {
wxNode *node;
- while ((node = GetChildren()->First()) != (wxNode *)NULL) {
+ while ((node = GetChildren().First()) != (wxNode *)NULL) {
wxWindow *child;
if ((child = (wxWindow *)node->Data()) != (wxWindow *)NULL) {
delete child;
- if ( GetChildren()->Member(child) )
+ if ( GetChildren().Member(child) )
delete node;
}
} /* while */
- }
}
void wxWindow::MakeModal(bool modal)
@@ -3794,7 +3792,7 @@ bool wxWindow::DoPhase(int phase)
{
noChanges = 0;
noFailures = 0;
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
while (node)
{
wxWindow *child = (wxWindow *)node->Data();
@@ -3839,7 +3837,7 @@ void wxWindow::ResetConstraints()
constr->centreX.SetDone(FALSE);
constr->centreY.SetDone(FALSE);
}
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
while (node)
{
wxWindow *win = (wxWindow *)node->Data();
@@ -3898,7 +3896,7 @@ void wxWindow::SetConstraintSizes(bool recurse)
if (recurse)
{
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
while (node)
{
wxWindow *win = (wxWindow *)node->Data();
@@ -4036,9 +4034,9 @@ bool wxWindow::Close(bool force)
wxObject* wxWindow::GetChild(int number) const
{
// Return a pointer to the Nth object in the Panel
- if (!GetChildren())
- return(NULL) ;
- wxNode *node = GetChildren()->First();
+// if (!GetChildren())
+// return(NULL) ;
+ wxNode *node = GetChildren().First();
int n = number;
while (node && n--)
node = node->Next() ;
@@ -4100,7 +4098,7 @@ void wxWindow::Fit()
{
int maxX = 0;
int maxY = 0;
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
while ( node )
{
wxWindow *win = (wxWindow *)node->Data();
@@ -4133,7 +4131,7 @@ wxWindow *wxWindow::FindWindow(long id)
if ( GetId() == id)
return this;
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
while ( node )
{
wxWindow *child = (wxWindow *)node->Data();
@@ -4150,7 +4148,7 @@ wxWindow *wxWindow::FindWindow(const wxString& name)
if ( GetName() == name)
return this;
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
while ( node )
{
wxWindow *child = (wxWindow *)node->Data();
diff --git a/src/stubs/app.cpp b/src/stubs/app.cpp
index bfe240f225..b04a01bbe2 100644
--- a/src/stubs/app.cpp
+++ b/src/stubs/app.cpp
@@ -326,7 +326,7 @@ bool wxApp::SendIdleEvents(wxWindow* win)
if (event.MoreRequested())
needMore = TRUE;
- wxNode* node = win->GetChildren()->First();
+ wxNode* node = win->GetChildren().First();
while (node)
{
wxWindow* win = (wxWindow*) node->Data();
diff --git a/src/stubs/bmpbuttn.cpp b/src/stubs/bmpbuttn.cpp
index 9e46c22b2b..169f0d557a 100644
--- a/src/stubs/bmpbuttn.cpp
+++ b/src/stubs/bmpbuttn.cpp
@@ -30,8 +30,8 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bit
SetValidator(validator);
parent->AddChild(this);
- m_backgroundColour = parent->GetDefaultBackgroundColour() ;
- m_foregroundColour = parent->GetDefaultForegroundColour() ;
+ m_backgroundColour = parent->GetBackgroundColour() ;
+ m_foregroundColour = parent->GetForegroundColour() ;
m_windowStyle = style;
m_marginX = 0;
m_marginY = 0;
diff --git a/src/stubs/data.cpp b/src/stubs/data.cpp
index 6245f1607c..5e6c418519 100644
--- a/src/stubs/data.cpp
+++ b/src/stubs/data.cpp
@@ -15,6 +15,10 @@
#include "wx/wx.h"
+#if wxUSE_POSTSCRIPT
+#include "wx/postscrp.h"
+#endif
+
#define _MAXPATHLEN 500
// Useful buffer, initialized in CommonInit
diff --git a/src/stubs/dc.cpp b/src/stubs/dc.cpp
index 484a44f6fd..642dc1edc5 100644
--- a/src/stubs/dc.cpp
+++ b/src/stubs/dc.cpp
@@ -376,10 +376,10 @@ void wxDC::ComputeScaleAndOrigin(void)
{
// this is a bit artificial, but we need to force wxDC to think
// the pen has changed
- wxPen* pen = GetPen();
+ wxPen* pen = & GetPen();
wxPen tempPen;
m_pen = tempPen;
- SetPen(pen);
+ SetPen(* pen);
}
};
diff --git a/src/stubs/dcclient.cpp b/src/stubs/dcclient.cpp
index 36a3f9ccaf..925d9609ee 100644
--- a/src/stubs/dcclient.cpp
+++ b/src/stubs/dcclient.cpp
@@ -15,6 +15,7 @@
#include "wx/dcclient.h"
#include "wx/dcmemory.h"
+#include "wx/region.h"
#include
//-----------------------------------------------------------------------------
diff --git a/src/stubs/frame.cpp b/src/stubs/frame.cpp
index b12097f5c4..84555cbf01 100644
--- a/src/stubs/frame.cpp
+++ b/src/stubs/frame.cpp
@@ -190,7 +190,7 @@ wxStatusBar *wxFrame::OnCreateStatusBar(int number, long style, wxWindowID id,
// Set the height according to the font and the border size
wxClientDC dc(statusBar);
- dc.SetFont(* statusBar->GetFont());
+ dc.SetFont(statusBar->GetFont());
long x, y;
dc.GetTextExtent("X", &x, &y);
@@ -264,7 +264,7 @@ void wxFrame::SetMenuBar(wxMenuBar *menuBar)
void wxFrame::Fit()
{
// Work out max. size
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
int max_width = 0;
int max_height = 0;
while (node)
@@ -321,7 +321,7 @@ void wxFrame::OnSize(wxSizeEvent& event)
// do we have _exactly_ one child?
wxWindow *child = NULL;
- for ( wxNode *node = GetChildren()->First(); node; node = node->Next() )
+ for ( wxNode *node = GetChildren().First(); node; node = node->Next() )
{
wxWindow *win = (wxWindow *)node->Data();
if ( !win->IsKindOf(CLASSINFO(wxFrame)) &&
@@ -351,7 +351,7 @@ void wxFrame::OnSize(wxSizeEvent& event)
// subwindow found.
void wxFrame::OnActivate(wxActivateEvent& event)
{
- for(wxNode *node = GetChildren()->First(); node; node = node->Next())
+ for(wxNode *node = GetChildren().First(); node; node = node->Next())
{
// Find a child that's a subwindow, but not a dialog box.
wxWindow *child = (wxWindow *)node->Data();
diff --git a/src/stubs/scrolbar.cpp b/src/stubs/scrolbar.cpp
index a602748157..54df181166 100644
--- a/src/stubs/scrolbar.cpp
+++ b/src/stubs/scrolbar.cpp
@@ -72,7 +72,7 @@ void wxScrollBar::SetScrollbar(int position, int thumbSize, int range, int pageS
void wxScrollBar::Command(wxCommandEvent& event)
{
- SetPosition(event.m_commandInt);
+ SetThumbPosition(event.m_commandInt);
ProcessCommand(event);
}
diff --git a/src/stubs/stattext.cpp b/src/stubs/stattext.cpp
index a1275b8bdc..3b19c7184d 100644
--- a/src/stubs/stattext.cpp
+++ b/src/stubs/stattext.cpp
@@ -32,8 +32,8 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id,
SetName(name);
if (parent) parent->AddChild(this);
- SetBackgroundColour(parent->GetDefaultBackgroundColour()) ;
- SetForegroundColour(parent->GetDefaultForegroundColour()) ;
+ SetBackgroundColour(parent->GetBackgroundColour()) ;
+ SetForegroundColour(parent->GetForegroundColour()) ;
if ( id == -1 )
m_windowId = (int)NewControlId();
@@ -42,7 +42,7 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id,
m_windowStyle = style;
- SetFont(* parent->GetFont());
+ SetFont(parent->GetFont());
// TODO
return FALSE;
diff --git a/src/stubs/window.cpp b/src/stubs/window.cpp
index fa6aac07b6..10ec3976dd 100644
--- a/src/stubs/window.cpp
+++ b/src/stubs/window.cpp
@@ -378,7 +378,7 @@ void wxWindow::Refresh(bool eraseBack, const wxRect *rect)
// Responds to colour changes: passes event on to children.
void wxWindow::OnSysColourChanged(wxSysColourChangedEvent& event)
{
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
while ( node )
{
// Only propagate to non-top-level windows
@@ -583,7 +583,7 @@ bool wxWindow::IsEnabled() const
// it's an application error (pops up a dialog)
bool wxWindow::TransferDataToWindow()
{
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
while ( node )
{
wxWindow *child = (wxWindow *)node->Data();
@@ -603,7 +603,7 @@ bool wxWindow::TransferDataToWindow()
// validation failed: don't quit
bool wxWindow::TransferDataFromWindow()
{
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
while ( node )
{
wxWindow *child = (wxWindow *)node->Data();
@@ -619,7 +619,7 @@ bool wxWindow::TransferDataFromWindow()
bool wxWindow::Validate()
{
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
while ( node )
{
wxWindow *child = (wxWindow *)node->Data();
@@ -642,30 +642,27 @@ wxWindow *wxWindow::FindFocus()
void wxWindow::AddChild(wxWindow *child)
{
- GetChildren()->Append(child);
+ GetChildren().Append(child);
child->m_windowParent = this;
}
void wxWindow::RemoveChild(wxWindow *child)
{
- if (GetChildren())
- GetChildren()->DeleteObject(child);
+ GetChildren().DeleteObject(child);
child->m_windowParent = NULL;
}
void wxWindow::DestroyChildren()
{
- if (GetChildren()) {
wxNode *node;
- while ((node = GetChildren()->First()) != (wxNode *)NULL) {
+ while ((node = GetChildren().First()) != (wxNode *)NULL) {
wxWindow *child;
if ((child = (wxWindow *)node->Data()) != (wxWindow *)NULL) {
delete child;
- if ( GetChildren()->Member(child) )
+ if ( GetChildren().Member(child) )
delete node;
}
} /* while */
- }
}
void wxWindow::MakeModal(bool modal)
@@ -880,7 +877,7 @@ bool wxWindow::DoPhase(int phase)
{
noChanges = 0;
noFailures = 0;
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
while (node)
{
wxWindow *child = (wxWindow *)node->Data();
@@ -925,7 +922,7 @@ void wxWindow::ResetConstraints()
constr->centreX.SetDone(FALSE);
constr->centreY.SetDone(FALSE);
}
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
while (node)
{
wxWindow *win = (wxWindow *)node->Data();
@@ -984,7 +981,7 @@ void wxWindow::SetConstraintSizes(bool recurse)
if (recurse)
{
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
while (node)
{
wxWindow *win = (wxWindow *)node->Data();
@@ -1121,9 +1118,7 @@ bool wxWindow::Close(bool force)
wxObject* wxWindow::GetChild(int number) const
{
// Return a pointer to the Nth object in the window
- if (!GetChildren())
- return(NULL) ;
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
int n = number;
while (node && n--)
node = node->Next() ;
@@ -1154,7 +1149,7 @@ void wxWindow::Fit()
{
int maxX = 0;
int maxY = 0;
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
while ( node )
{
wxWindow *win = (wxWindow *)node->Data();
@@ -1192,7 +1187,7 @@ wxWindow *wxWindow::FindWindow(long id)
if ( GetId() == id)
return this;
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
while ( node )
{
wxWindow *child = (wxWindow *)node->Data();
@@ -1209,7 +1204,7 @@ wxWindow *wxWindow::FindWindow(const wxString& name)
if ( GetName() == name)
return this;
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
while ( node )
{
wxWindow *child = (wxWindow *)node->Data();
diff --git a/utils/ogl/src/basic.cpp b/utils/ogl/src/basic.cpp
index 4faa132925..2ca8ddaee5 100644
--- a/utils/ogl/src/basic.cpp
+++ b/utils/ogl/src/basic.cpp
@@ -605,7 +605,7 @@ void wxShape::FormatText(wxDC& dc, const wxString& s, int i)
wxShapeRegion *region = (wxShapeRegion *)node->Data();
region->SetText(s);
- dc.SetFont(region->GetFont());
+ dc.SetFont(* region->GetFont());
region->GetSize(&w, &h);
@@ -919,10 +919,10 @@ void wxShape::OnDrawContents(wxDC& dc)
GetBoundingBoxMin(&bound_x, &bound_y);
if (m_regions.Number() < 1) return;
- if (m_pen) dc.SetPen(m_pen);
+ if (m_pen) dc.SetPen(* m_pen);
wxShapeRegion *region = (wxShapeRegion *)m_regions.First()->Data();
- if (region->GetFont()) dc.SetFont(region->GetFont());
+ if (region->GetFont()) dc.SetFont(* region->GetFont());
dc.SetTextForeground(* (region->GetActualColourObject()));
dc.SetBackgroundMode(wxTRANSPARENT);
@@ -988,8 +988,8 @@ void wxShape::OnEraseContents(wxDC& dc)
if (m_pen)
penWidth = m_pen->GetWidth();
- dc.SetPen(g_oglWhiteBackgroundPen);
- dc.SetBrush(g_oglWhiteBackgroundBrush);
+ dc.SetPen(* g_oglWhiteBackgroundPen);
+ dc.SetBrush(* g_oglWhiteBackgroundBrush);
dc.DrawRectangle(WXROUND(topLeftX - penWidth), WXROUND(topLeftY - penWidth),
WXROUND(maxX + penWidth*2.0 + 4.0), WXROUND(maxY + penWidth*2.0 + 4.0));
}
@@ -2535,8 +2535,8 @@ void wxShape::OnDrawControlPoints(wxDC& dc)
if (!m_drawHandles)
return;
- dc.SetBrush(wxBLACK_BRUSH);
- dc.SetPen(wxBLACK_PEN);
+ dc.SetBrush(* wxBLACK_BRUSH);
+ dc.SetPen(* wxBLACK_PEN);
wxNode *node = m_controlPoints.First();
while (node)
diff --git a/utils/ogl/src/basic2.cpp b/utils/ogl/src/basic2.cpp
index b5bd83af21..ba46cca6fe 100644
--- a/utils/ogl/src/basic2.cpp
+++ b/utils/ogl/src/basic2.cpp
@@ -503,8 +503,8 @@ void wxPolygonShape::OnDraw(wxDC& dc)
if (m_shadowMode != SHADOW_NONE)
{
if (m_shadowBrush)
- dc.SetBrush(m_shadowBrush);
- dc.SetPen(g_oglTransparentPen);
+ dc.SetBrush(* m_shadowBrush);
+ dc.SetPen(* g_oglTransparentPen);
dc.DrawPolygon(n, intPoints, WXROUND(m_xpos + m_shadowOffsetX), WXROUND(m_ypos + m_shadowOffsetY));
}
@@ -512,12 +512,12 @@ void wxPolygonShape::OnDraw(wxDC& dc)
if (m_pen)
{
if (m_pen->GetWidth() == 0)
- dc.SetPen(g_oglTransparentPen);
+ dc.SetPen(* g_oglTransparentPen);
else
- dc.SetPen(m_pen);
+ dc.SetPen(* m_pen);
}
if (m_brush)
- dc.SetBrush(m_brush);
+ dc.SetBrush(* m_brush);
dc.DrawPolygon(n, intPoints, WXROUND(m_xpos), WXROUND(m_ypos));
delete[] intPoints;
@@ -525,7 +525,7 @@ void wxPolygonShape::OnDraw(wxDC& dc)
void wxPolygonShape::OnDrawOutline(wxDC& dc, double x, double y, double w, double h)
{
- dc.SetBrush(wxTRANSPARENT_BRUSH);
+ dc.SetBrush(* wxTRANSPARENT_BRUSH);
// Multiply all points by proportion of new size to old size
double x_proportion = (double)(fabs(w/m_originalWidth));
double y_proportion = (double)(fabs(h/m_originalHeight));
@@ -879,8 +879,8 @@ void wxRectangleShape::OnDraw(wxDC& dc)
if (m_shadowMode != SHADOW_NONE)
{
if (m_shadowBrush)
- dc.SetBrush(m_shadowBrush);
- dc.SetPen(g_oglTransparentPen);
+ dc.SetBrush(* m_shadowBrush);
+ dc.SetPen(* g_oglTransparentPen);
if (m_cornerRadius != 0.0)
dc.DrawRoundedRectangle(WXROUND(x1 + m_shadowOffsetX), WXROUND(y1 + m_shadowOffsetY),
@@ -892,12 +892,12 @@ void wxRectangleShape::OnDraw(wxDC& dc)
if (m_pen)
{
if (m_pen->GetWidth() == 0)
- dc.SetPen(g_oglTransparentPen);
+ dc.SetPen(* g_oglTransparentPen);
else
- dc.SetPen(m_pen);
+ dc.SetPen(* m_pen);
}
if (m_brush)
- dc.SetBrush(m_brush);
+ dc.SetBrush(* m_brush);
if (m_cornerRadius != 0.0)
dc.DrawRoundedRectangle(WXROUND(x1), WXROUND(y1), WXROUND(m_width), WXROUND(m_height), m_cornerRadius);
@@ -1049,8 +1049,8 @@ void wxEllipseShape::OnDraw(wxDC& dc)
if (m_shadowMode != SHADOW_NONE)
{
if (m_shadowBrush)
- dc.SetBrush(m_shadowBrush);
- dc.SetPen(g_oglTransparentPen);
+ dc.SetBrush(* m_shadowBrush);
+ dc.SetPen(* g_oglTransparentPen);
dc.DrawEllipse((long) ((m_xpos - GetWidth()/2) + m_shadowOffsetX),
(long) ((m_ypos - GetHeight()/2) + m_shadowOffsetY),
(long) GetWidth(), (long) GetHeight());
@@ -1059,12 +1059,12 @@ void wxEllipseShape::OnDraw(wxDC& dc)
if (m_pen)
{
if (m_pen->GetWidth() == 0)
- dc.SetPen(g_oglTransparentPen);
+ dc.SetPen(* g_oglTransparentPen);
else
- dc.SetPen(m_pen);
+ dc.SetPen(* m_pen);
}
if (m_brush)
- dc.SetBrush(m_brush);
+ dc.SetBrush(* m_brush);
dc.DrawEllipse((long) (m_xpos - GetWidth()/2), (long) (m_ypos - GetHeight()/2), (long) GetWidth(), (long) GetHeight());
}
diff --git a/utils/ogl/src/composit.cpp b/utils/ogl/src/composit.cpp
index 366777b25f..c5118f64e7 100644
--- a/utils/ogl/src/composit.cpp
+++ b/utils/ogl/src/composit.cpp
@@ -101,8 +101,8 @@ void wxCompositeShape::OnDraw(wxDC& dc)
if (m_shadowMode != SHADOW_NONE)
{
if (m_shadowBrush)
- dc.SetBrush(m_shadowBrush);
- dc.SetPen(g_oglTransparentPen);
+ dc.SetBrush(* m_shadowBrush);
+ dc.SetPen(* g_oglTransparentPen);
if (m_cornerRadius != 0.0)
dc.DrawRoundedRectangle(WXROUND(x1 + m_shadowOffsetX), WXROUND(y1 + m_shadowOffsetY),
@@ -841,7 +841,7 @@ wxDivisionShape::~wxDivisionShape()
void wxDivisionShape::OnDraw(wxDC& dc)
{
- dc.SetBrush(wxTRANSPARENT_BRUSH);
+ dc.SetBrush(* wxTRANSPARENT_BRUSH);
dc.SetBackgroundMode(wxTRANSPARENT);
double x1 = (double)(GetX() - (GetWidth()/2.0));
@@ -856,18 +856,18 @@ void wxDivisionShape::OnDraw(wxDC& dc)
if (m_leftSide)
{
- dc.SetPen(m_leftSidePen);
+ dc.SetPen(* m_leftSidePen);
dc.DrawLine(WXROUND(x1), WXROUND(y2), WXROUND(x1), WXROUND(y1));
}
if (m_topSide)
{
- dc.SetPen(m_topSidePen);
+ dc.SetPen(* m_topSidePen);
dc.DrawLine(WXROUND(x1), WXROUND(y1), WXROUND(x2), WXROUND(y1));
}
// For testing purposes, draw a rectangle so we know
// how big the division is.
-// SetBrush(wxCYAN_BRUSH);
+// SetBrush(* wxCYAN_BRUSH);
// wxRectangleShape::OnDraw(dc);
}
diff --git a/utils/ogl/src/divided.cpp b/utils/ogl/src/divided.cpp
index 68fa6ca646..ba8cd615ac 100644
--- a/utils/ogl/src/divided.cpp
+++ b/utils/ogl/src/divided.cpp
@@ -81,7 +81,7 @@ void wxDividedShape::OnDrawContents(wxDC& dc)
double leftX = (double)(m_xpos - (m_width / 2.0));
double rightX = (double)(m_xpos + (m_width / 2.0));
- if (m_pen) dc.SetPen(m_pen);
+ if (m_pen) dc.SetPen(* m_pen);
if (m_textColour) dc.SetTextForeground(* m_textColour);
@@ -108,7 +108,7 @@ void wxDividedShape::OnDrawContents(wxDC& dc)
while (node)
{
wxShapeRegion *region = (wxShapeRegion *)node->Data();
- dc.SetFont(region->GetFont());
+ dc.SetFont(* region->GetFont());
dc.SetTextForeground(* region->GetActualColourObject());
double proportion =
@@ -128,7 +128,7 @@ void wxDividedShape::OnDrawContents(wxDC& dc)
wxPen *regionPen = region->GetActualPen();
if (regionPen)
{
- dc.SetPen(regionPen);
+ dc.SetPen(* regionPen);
dc.DrawLine(WXROUND(leftX), WXROUND(y), WXROUND(rightX), WXROUND(y));
}
}
diff --git a/utils/ogl/src/drawn.cpp b/utils/ogl/src/drawn.cpp
index d602580b86..e473681512 100644
--- a/utils/ogl/src/drawn.cpp
+++ b/utils/ogl/src/drawn.cpp
@@ -431,7 +431,7 @@ void wxOpSetGDI::Do(wxDC& dc, double xoffset, double yoffset)
if (m_image->m_outlineColours.Member((wxObject *)m_gdiIndex))
{
if (m_image->m_outlinePen)
- dc.SetPen(m_image->m_outlinePen);
+ dc.SetPen(* m_image->m_outlinePen);
}
else
{
@@ -440,7 +440,7 @@ void wxOpSetGDI::Do(wxDC& dc, double xoffset, double yoffset)
{
wxPen *pen = (wxPen *)node->Data();
if (pen)
- dc.SetPen(pen);
+ dc.SetPen(* pen);
}
}
break;
@@ -456,14 +456,14 @@ void wxOpSetGDI::Do(wxDC& dc, double xoffset, double yoffset)
{
wxBrush *br = wxTheBrushList->FindOrCreateBrush(m_image->m_outlinePen->GetColour(), wxSOLID);
if (br)
- dc.SetBrush(br);
+ dc.SetBrush(* br);
}
}
else if (m_image->m_fillColours.Member((wxObject *)m_gdiIndex))
{
if (m_image->m_fillBrush)
{
- dc.SetBrush(m_image->m_fillBrush);
+ dc.SetBrush(* m_image->m_fillBrush);
}
}
else
@@ -473,7 +473,7 @@ void wxOpSetGDI::Do(wxDC& dc, double xoffset, double yoffset)
{
wxBrush *brush = (wxBrush *)node->Data();
if (brush)
- dc.SetBrush(brush);
+ dc.SetBrush(* brush);
}
}
break;
@@ -485,7 +485,7 @@ void wxOpSetGDI::Do(wxDC& dc, double xoffset, double yoffset)
{
wxFont *font = (wxFont *)node->Data();
if (font)
- dc.SetFont(font);
+ dc.SetFont(* font);
}
break;
}
@@ -1194,7 +1194,7 @@ void wxOpPolyDraw::ReadExpr(wxPseudoMetaFile *image, wxExpr *expr)
// Draw an outline using the current operation.
bool wxOpPolyDraw::OnDrawOutline(wxDC& dc, double x, double y, double w, double h, double oldW, double oldH)
{
- dc.SetBrush(wxTRANSPARENT_BRUSH);
+ dc.SetBrush(* wxTRANSPARENT_BRUSH);
// Multiply all points by proportion of new size to old size
double x_proportion = (double)(fabs(w/oldW));
diff --git a/utils/ogl/src/lines.cpp b/utils/ogl/src/lines.cpp
index a44bb7d2c6..a62cffbfa3 100644
--- a/utils/ogl/src/lines.cpp
+++ b/utils/ogl/src/lines.cpp
@@ -216,7 +216,7 @@ void wxLineShape::FormatText(wxDC& dc, const wxString& s, int i)
wxShapeRegion *region = (wxShapeRegion *)node->Data();
region->SetText(s);
- dc.SetFont(region->GetFont());
+ dc.SetFont(* region->GetFont());
region->GetSize(&w, &h);
// Initialize the size if zero
@@ -284,15 +284,15 @@ void wxLineShape::DrawRegion(wxDC& dc, wxShapeRegion *region, double x, double y
// First, clear a rectangle for the text IF there is any
if (region->GetFormattedText().Number() > 0)
{
- dc.SetPen(g_oglWhiteBackgroundPen);
- dc.SetBrush(g_oglWhiteBackgroundBrush);
+ dc.SetPen(* g_oglWhiteBackgroundPen);
+ dc.SetBrush(* g_oglWhiteBackgroundBrush);
// Now draw the text
- if (region->GetFont()) dc.SetFont(region->GetFont());
+ if (region->GetFont()) dc.SetFont(* region->GetFont());
dc.DrawRectangle((long)(xp - w/2.0), (long)(yp - h/2.0), (long)w, (long)h);
- if (m_pen) dc.SetPen(m_pen);
+ if (m_pen) dc.SetPen(* m_pen);
dc.SetTextForeground(* region->GetActualColourObject());
#ifdef __WXMSW__
@@ -320,8 +320,8 @@ void wxLineShape::EraseRegion(wxDC& dc, wxShapeRegion *region, double x, double
if (region->GetFormattedText().Number() > 0)
{
- dc.SetPen(g_oglWhiteBackgroundPen);
- dc.SetBrush(g_oglWhiteBackgroundBrush);
+ dc.SetPen(* g_oglWhiteBackgroundPen);
+ dc.SetBrush(* g_oglWhiteBackgroundBrush);
dc.DrawRectangle((long)(xp - w/2.0), (long)(yp - h/2.0), (long)w, (long)h);
}
@@ -727,8 +727,8 @@ void wxLineShape::DrawArrow(wxDC& dc, wxArrowHead *arrow, double xOffset, bool p
points[2].x = (int) side2_x; points[2].y = (int) side2_y;
points[3].x = (int) tip_x; points[3].y = (int) tip_y;
- dc.SetPen(m_pen);
- dc.SetBrush(m_brush);
+ dc.SetPen(* m_pen);
+ dc.SetBrush(* m_brush);
dc.DrawPolygon(4, points);
break;
}
@@ -748,11 +748,11 @@ void wxLineShape::DrawArrow(wxDC& dc, wxArrowHead *arrow, double xOffset, bool p
double x1 = (double)(x - (diameter/2.0));
double y1 = (double)(y - (diameter/2.0));
- dc.SetPen(m_pen);
+ dc.SetPen(* m_pen);
if (arrow->_GetType() == ARROW_HOLLOW_CIRCLE)
- dc.SetBrush(g_oglWhiteBackgroundBrush);
+ dc.SetBrush(* g_oglWhiteBackgroundBrush);
else
- dc.SetBrush(m_brush);
+ dc.SetBrush(* m_brush);
dc.DrawEllipse((long) x1, (long) y1, (long) diameter, (long) diameter);
break;
@@ -854,7 +854,7 @@ void wxLineShape::OnErase(wxDC& dc)
double bound_x, bound_y;
GetBoundingBoxMax(&bound_x, &bound_y);
- if (m_font) dc.SetFont(m_font);
+ if (m_font) dc.SetFont(* m_font);
// Undraw text regions
for (int i = 0; i < 3; i++)
@@ -870,8 +870,8 @@ void wxLineShape::OnErase(wxDC& dc)
}
// Undraw line
- dc.SetPen(g_oglWhiteBackgroundPen);
- dc.SetBrush(g_oglWhiteBackgroundBrush);
+ dc.SetPen(* g_oglWhiteBackgroundPen);
+ dc.SetBrush(* g_oglWhiteBackgroundBrush);
// Drawing over the line only seems to work if the line has a thickness
// of 1.
@@ -1177,9 +1177,9 @@ void wxLineShape::OnDraw(wxDC& dc)
if (m_lineControlPoints)
{
if (m_pen)
- dc.SetPen(m_pen);
+ dc.SetPen(* m_pen);
if (m_brush)
- dc.SetBrush(m_brush);
+ dc.SetBrush(* m_brush);
int n = m_lineControlPoints->Number();
wxPoint *points = new wxPoint[n];
@@ -1211,7 +1211,7 @@ void wxLineShape::OnDraw(wxDC& dc)
wxPen *solid_pen =
wxThePenList->FindOrCreatePen(m_pen->GetColour(), 1, wxSOLID);
if (solid_pen)
- dc.SetPen(solid_pen);
+ dc.SetPen(* solid_pen);
}
DrawArrows(dc);
}
@@ -1813,7 +1813,7 @@ void wxLineShape::OnSizingBeginDragLeft(wxControlPoint* pt, double x, double y,
if (lpt->m_type == CONTROL_POINT_ENDPOINT_FROM || lpt->m_type == CONTROL_POINT_ENDPOINT_TO)
{
- m_canvas->SetCursor(g_oglBullseyeCursor);
+ m_canvas->SetCursor(* g_oglBullseyeCursor);
lpt->m_oldCursor = wxSTANDARD_CURSOR;
}
}
@@ -1847,7 +1847,7 @@ void wxLineShape::OnSizingEndDragLeft(wxControlPoint* pt, double x, double y, in
if (lpt->m_type == CONTROL_POINT_ENDPOINT_FROM)
{
if (lpt->m_oldCursor)
- m_canvas->SetCursor(lpt->m_oldCursor);
+ m_canvas->SetCursor(* lpt->m_oldCursor);
// this->Erase(dc);
@@ -1861,7 +1861,7 @@ void wxLineShape::OnSizingEndDragLeft(wxControlPoint* pt, double x, double y, in
if (lpt->m_type == CONTROL_POINT_ENDPOINT_TO)
{
if (lpt->m_oldCursor)
- m_canvas->SetCursor(lpt->m_oldCursor);
+ m_canvas->SetCursor(* lpt->m_oldCursor);
// lpt->m_xpos = x; lpt->m_ypos = y;
@@ -2429,11 +2429,11 @@ void wxLabelShape::OnDraw(wxDC& dc)
if (m_pen)
{
if (m_pen->GetWidth() == 0)
- dc.SetPen(g_oglTransparentPen);
+ dc.SetPen(* g_oglTransparentPen);
else
- dc.SetPen(m_pen);
+ dc.SetPen(* m_pen);
}
- dc.SetBrush(wxTRANSPARENT_BRUSH);
+ dc.SetBrush(* wxTRANSPARENT_BRUSH);
if (m_cornerRadius > 0.0)
dc.DrawRoundedRectangle(WXROUND(x1), WXROUND(y1), WXROUND(m_width), WXROUND(m_height), m_cornerRadius);
diff --git a/utils/ogl/src/ogldiag.cpp b/utils/ogl/src/ogldiag.cpp
index 86a2025290..3961607b18 100644
--- a/utils/ogl/src/ogldiag.cpp
+++ b/utils/ogl/src/ogldiag.cpp
@@ -93,7 +93,7 @@ void wxDiagram::Redraw(wxDC& dc)
if (m_shapeList)
{
if (GetCanvas())
- GetCanvas()->SetCursor(wxHOURGLASS_CURSOR);
+ GetCanvas()->SetCursor(* wxHOURGLASS_CURSOR);
wxNode *current = m_shapeList->First();
while (current)
@@ -105,7 +105,7 @@ void wxDiagram::Redraw(wxDC& dc)
current = current->Next();
}
if (GetCanvas())
- GetCanvas()->SetCursor(wxSTANDARD_CURSOR);
+ GetCanvas()->SetCursor(* wxSTANDARD_CURSOR);
}
}