Sorry folks, a lot of changes to remedy GetFont, GetBrush etc.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1137 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1998-12-08 23:26:18 +00:00
parent c18ecb1164
commit c0ed460c2e
106 changed files with 535 additions and 526 deletions

View File

@@ -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

View File

@@ -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}).

View File

@@ -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.

View File

@@ -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}

View File

@@ -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

Binary file not shown.

View File

@@ -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
@@ -262,12 +262,12 @@ 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
@@ -278,8 +278,8 @@ class WXDLLEXPORT wxGenericGrid: public wxPanel
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;
@@ -295,29 +295,29 @@ class WXDLLEXPORT wxGridCell: public wxObject
{
public:
wxString textValue;
wxFont *font;
wxFont font;
wxColour textColour;
wxColour backgroundColour;
wxBrush *backgroundBrush;
wxBitmap *cellBitmap;
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:

View File

@@ -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);

View File

@@ -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) ;

View File

@@ -35,7 +35,6 @@ public:
// copy ctors and assignment operators
wxColour( const wxColour& col );
wxColour( const wxColour* col );
wxColour& operator = ( const wxColour& col );
// dtor

View File

@@ -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);

View File

@@ -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; };

View File

@@ -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();

View File

@@ -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);

View File

@@ -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);

View File

@@ -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();

View File

@@ -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; }

View File

@@ -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; }

View File

@@ -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);

View File

@@ -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) ;

View File

@@ -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

View File

@@ -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);

View File

@@ -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 ;}

View File

@@ -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);

View File

@@ -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,

View File

@@ -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);

View File

@@ -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; }

View File

@@ -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; }

View File

@@ -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);

View File

@@ -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) ;

View File

@@ -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; };
*/

View File

@@ -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);

View File

@@ -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; };

View File

@@ -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();

View File

@@ -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,

View File

@@ -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();

View File

@@ -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; }

View File

@@ -18,6 +18,7 @@
#include "wx/list.h"
#include "wx/gdiobj.h"
#include "wx/gdicmn.h"
class WXDLLEXPORT wxRect;
class WXDLLEXPORT wxPoint;

View File

@@ -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)

View File

@@ -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; }

View File

@@ -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();
}

View File

@@ -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 );
}

View File

@@ -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,

View File

@@ -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();

View File

@@ -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));

View File

@@ -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);

View File

@@ -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);

View File

@@ -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) )

View File

@@ -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();

View File

@@ -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;

View File

@@ -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();

View File

@@ -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;

View File

@@ -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 ++ )

View File

@@ -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(

View File

@@ -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();

View File

@@ -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)))

View File

@@ -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);
}
};

View File

@@ -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 ();

View File

@@ -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);

View File

@@ -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();

View File

@@ -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)

View File

@@ -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);
}

View File

@@ -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)

View File

@@ -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);

View File

@@ -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();

View File

@@ -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();

View File

@@ -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

View File

@@ -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);

View File

@@ -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, &current_width, &cyf,NULL,NULL,GetFont());
GetTextExtent(buf, &current_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) ;
}

View File

@@ -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, &current_width, &cyf, NULL, NULL, GetFont());
GetTextExtent(str, &current_width, &cyf, NULL, NULL, & GetFont());
if (w1 < 0)
w1 = (int)(current_width + RADIO_SIZE);
if (h1 < 0)

View File

@@ -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;
}

View File

@@ -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++)
{

View File

@@ -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);

View File

@@ -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;

View File

@@ -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;

View File

@@ -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());

View File

@@ -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;

View File

@@ -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();

View File

@@ -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();

View File

@@ -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, &current_width, &cyf,NULL,NULL, GetFont());
GetTextExtent(buf, &current_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, &current_width, &cyf,NULL,NULL,GetFont());
GetTextExtent(buf, &current_width, &cyf,NULL,NULL, & GetFont());
// How do we find out radio button bitmap size!!
// By adjusting them carefully, manually :-)

View File

@@ -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)

View File

@@ -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;

View File

@@ -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)
{

View File

@@ -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)
{

View File

@@ -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;

View File

@@ -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), &current_width, &cyf,
NULL,NULL,GetFont());
NULL,NULL, & GetFont());
if ( w1 < 0 )
w1 = current_width + 3*cx;
if ( h1 < 0 )

View File

@@ -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, &current_width, &cyf, NULL, NULL,GetFont());
GetTextExtent(buf, &current_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);

View File

@@ -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;

View File

@@ -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;

View File

@@ -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();

View File

@@ -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();

View File

@@ -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;

View File

@@ -15,6 +15,10 @@
#include "wx/wx.h"
#if wxUSE_POSTSCRIPT
#include "wx/postscrp.h"
#endif
#define _MAXPATHLEN 500
// Useful buffer, initialized in CommonInit

View File

@@ -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);
}
};

View File

@@ -15,6 +15,7 @@
#include "wx/dcclient.h"
#include "wx/dcmemory.h"
#include "wx/region.h"
#include <math.h>
//-----------------------------------------------------------------------------

View File

@@ -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();

View File

@@ -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);
}

View File

@@ -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;

View File

@@ -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();

View File

@@ -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)

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