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

@@ -72,8 +72,8 @@ class WXDLLEXPORT wxGenericGrid: public wxPanel
short defaultWidth = wxGRID_DEFAULT_CELL_WIDTH, short defaultHeight = wxGRID_DEFAULT_CELL_HEIGHT);
void PaintGrid(wxDC& dc);
void ClearGrid(void);
virtual wxGridCell *GetCell(int row, int col);
inline wxGridCell ***GetCells(void) { return m_gridCells; }
virtual wxGridCell *GetCell(int row, int col) const;
inline wxGridCell ***GetCells(void) const { return m_gridCells; }
bool InsertCols(int pos = 0, int n = 1, bool updateLabels = TRUE);
bool InsertRows(int pos = 0, int n = 1, bool updateLabels = TRUE);
bool AppendCols(int n = 1, bool updateLabels = TRUE);
@@ -83,66 +83,66 @@ class WXDLLEXPORT wxGenericGrid: public wxPanel
// Cell accessors
void SetCellValue(const wxString& val, int row, int col);
wxString& GetCellValue(int row, int col);
wxString& GetCellValue(int row, int col) const;
void SetCellAlignment(int flag, int row, int col);
void SetCellAlignment(int flag);
int GetCellAlignment(int row, int col);
int GetCellAlignment(void);
int GetCellAlignment(int row, int col) const;
int GetCellAlignment(void) const;
void SetCellTextColour(const wxColour& val, int row, int col);
void SetCellTextColour(const wxColour& col);
wxColour& GetCellTextColour(int row, int col);
inline wxColour& GetCellTextColour(void) { return m_cellTextColour; }
wxColour& GetCellTextColour(int row, int col) const;
inline wxColour& GetCellTextColour(void) const { return (wxColour&) m_cellTextColour; }
void SetCellBackgroundColour(const wxColour& col);
void SetCellBackgroundColour(const wxColour& colour, int row, int col);
inline wxColour& GetCellBackgroundColour(void) { return m_cellBackgroundColour; }
wxColour& GetCellBackgroundColour(int row, int col);
inline wxFont *GetCellTextFont(void) { return m_cellTextFont; }
wxFont *GetCellTextFont(int row, int col);
void SetCellTextFont(wxFont *fnt);
void SetCellTextFont(wxFont *fnt, int row, int col);
wxBitmap *GetCellBitmap(int row, int col);
inline wxColour& GetCellBackgroundColour(void) const { return (wxColour&) m_cellBackgroundColour; }
wxColour& GetCellBackgroundColour(int row, int col) const;
inline wxFont& GetCellTextFont(void) const { return (wxFont&) m_cellTextFont; }
wxFont& GetCellTextFont(int row, int col) const;
void SetCellTextFont(const wxFont& fnt);
void SetCellTextFont(const wxFont& fnt, int row, int col);
wxBitmap *GetCellBitmap(int row, int col) const;
void SetCellBitmap(wxBitmap *bitmap, int row, int col);
// Size accessors
void SetColumnWidth(int col, int width);
int GetColumnWidth(int col);
int GetColumnWidth(int col) const;
void SetRowHeight(int row, int height);
int GetRowHeight(int row);
int GetRowHeight(int row) const;
// Label accessors
void SetLabelSize(int orientation, int sz);
int GetLabelSize(int orientation);
int GetLabelSize(int orientation) const;
void SetLabelAlignment(int orientation, int alignment);
int GetLabelAlignment(int orientation);
wxGridCell *GetLabelCell(int orientation, int pos);
int GetLabelAlignment(int orientation) const;
wxGridCell *GetLabelCell(int orientation, int pos) const;
void SetLabelValue(int orientation, const wxString& val, int pos);
wxString& GetLabelValue(int orientation, int pos);
wxString& GetLabelValue(int orientation, int pos) const;
void SetLabelTextColour(const wxColour& colour);
void SetLabelBackgroundColour(const wxColour& colour);
inline wxColour& GetLabelTextColour(void) { return m_labelTextColour; }
inline wxColour& GetLabelBackgroundColour(void) { return m_labelBackgroundColour; }
inline wxFont *GetLabelTextFont(void) { return m_labelTextFont; }
inline void SetLabelTextFont(wxFont *fnt) { m_labelTextFont = fnt; }
inline wxColour& GetLabelTextColour(void) const { return (wxColour&) m_labelTextColour; }
inline wxColour& GetLabelBackgroundColour(void) { return (wxColour&) m_labelBackgroundColour; }
inline wxFont& GetLabelTextFont(void) { return (wxFont&) m_labelTextFont; }
inline void SetLabelTextFont(const wxFont& fnt) { m_labelTextFont = fnt; }
// Miscellaneous accessors
inline int GetCursorRow(void) { return m_wCursorRow; }
inline int GetCursorColumn(void) { return m_wCursorColumn; }
inline int GetCursorRow(void) const { return m_wCursorRow; }
inline int GetCursorColumn(void) const { return m_wCursorColumn; }
void SetGridCursor(int row, int col);
inline int GetRows(void) { return m_totalRows; }
inline int GetCols(void) { return m_totalCols; }
inline int GetScrollPosX(void) { return m_scrollPosX; }
inline int GetScrollPosY(void) { return m_scrollPosY; }
inline int GetRows(void) const { return m_totalRows; }
inline int GetCols(void) const { return m_totalCols; }
inline int GetScrollPosX(void) const { return m_scrollPosX; }
inline int GetScrollPosY(void) const { return m_scrollPosY; }
inline void SetScrollPosX(int pos) { m_scrollPosX = pos; }
inline void SetScrollPosY(int pos) { m_scrollPosY = pos; }
inline wxTextCtrl *GetTextItem(void) { return m_textItem; }
inline wxScrollBar *GetHorizScrollBar(void) { return m_hScrollBar; }
inline wxScrollBar *GetVertScrollBar(void) { return m_vScrollBar; }
inline bool GetEditable(void) { return m_editable; }
inline wxTextCtrl *GetTextItem(void) const { return m_textItem; }
inline wxScrollBar *GetHorizScrollBar(void) const { return m_hScrollBar; }
inline wxScrollBar *GetVertScrollBar(void) const { return m_vScrollBar; }
inline bool GetEditable(void) const { return m_editable; }
void SetEditable(bool edit);
inline wxRect& GetCurrentRect(void) { return m_currentRect; }
inline bool CurrentCellVisible(void) { return m_currentRectVisible; }
inline void SetDividerPen(wxPen *pen) { m_divisionPen = pen; }
inline wxPen *GetDividerPen(void) { return m_divisionPen; }
inline wxRect& GetCurrentRect(void) const { return (wxRect&) m_currentRect; }
inline bool CurrentCellVisible(void) const { return m_currentRectVisible; }
inline void SetDividerPen(const wxPen& pen) { m_divisionPen = pen; }
inline wxPen& GetDividerPen(void) const { return (wxPen&) m_divisionPen; }
// High-level event handling
// Override e.g. to check value of current cell; but call
@@ -227,7 +227,7 @@ class WXDLLEXPORT wxGenericGrid: public wxPanel
wxScrollBar* m_vScrollBar;
int m_wCursorRow;
int m_wCursorColumn;
wxRect m_currentRect;
wxRect m_currentRect;
bool m_currentRectVisible;
wxGridCell*** m_gridCells;
wxGridCell** m_rowLabelCells;
@@ -262,24 +262,24 @@ class WXDLLEXPORT wxGenericGrid: public wxPanel
// Colours
wxColour m_cellTextColour;
wxColour m_cellBackgroundColour;
wxFont* m_cellTextFont;
wxFont m_cellTextFont;
wxColour m_labelTextColour;
wxColour m_labelBackgroundColour;
wxBrush* m_labelBackgroundBrush;
wxFont* m_labelTextFont;
wxPen* m_divisionPen;
wxBrush m_labelBackgroundBrush;
wxFont m_labelTextFont;
wxPen m_divisionPen;
wxBitmap* m_doubleBufferingBitmap;
// Position of Edit control
wxRect m_editControlPosition;
wxRect m_editControlPosition;
// Drag status
int m_dragStatus;
int m_dragRowOrCol;
int m_dragStartPosition;
int m_dragLastPosition;
wxCursor* m_horizontalSashCursor;
wxCursor* m_verticalSashCursor;
wxCursor m_horizontalSashCursor;
wxCursor m_verticalSashCursor;
// To avoid multiple refreshes, use Begin/EndBatch
int m_batchCount;
@@ -294,30 +294,30 @@ DECLARE_EVENT_TABLE()
class WXDLLEXPORT wxGridCell: public wxObject
{
public:
wxString textValue;
wxFont *font;
wxColour textColour;
wxColour backgroundColour;
wxBrush *backgroundBrush;
wxBitmap *cellBitmap;
wxString textValue;
wxFont font;
wxColour textColour;
wxColour backgroundColour;
wxBrush backgroundBrush;
wxBitmap* cellBitmap;
int alignment;
wxGridCell(wxGenericGrid *window = (wxGenericGrid *) NULL);
~wxGridCell(void);
virtual wxString& GetTextValue(void) { return textValue; }
virtual wxString& GetTextValue(void) const { return (wxString&) textValue; }
virtual void SetTextValue(const wxString& str) { textValue = str; }
inline wxFont *GetFont(void) { return font; }
inline void SetFont(wxFont *f) { font = f; }
inline wxColour& GetTextColour(void) { return textColour; }
inline wxFont& GetFont(void) const { return (wxFont&) font; }
inline void SetFont(const wxFont& f) { font = f; }
inline wxColour& GetTextColour(void) const { return (wxColour&) textColour; }
inline void SetTextColour(const wxColour& colour) { textColour = colour; }
inline wxColour& GetBackgroundColour(void) { return backgroundColour; }
inline wxColour& GetBackgroundColour(void) const { return (wxColour&) backgroundColour; }
void SetBackgroundColour(const wxColour& colour);
inline wxBrush *GetBackgroundBrush(void) { return backgroundBrush; }
inline void SetBackgroundBrush(wxBrush *brush) { backgroundBrush = brush; }
inline int GetAlignment(void) { return alignment; }
inline wxBrush& GetBackgroundBrush(void) const { return (wxBrush&) backgroundBrush; }
inline void SetBackgroundBrush(const wxBrush& brush) { backgroundBrush = brush; }
inline int GetAlignment(void) const { return alignment; }
inline void SetAlignment(int align) { alignment = align; }
inline wxBitmap *GetCellBitmap(void) { return cellBitmap; }
inline wxBitmap *GetCellBitmap(void) const { return cellBitmap; }
inline void SetCellBitmap(wxBitmap *bitmap) { cellBitmap = bitmap; }
};
@@ -332,9 +332,6 @@ class WXDLLEXPORT wxGrid: public wxGenericGrid
}
};
class WXDLLEXPORT wxGridEvent : public wxCommandEvent {
DECLARE_DYNAMIC_CLASS(wxGridEvent)
public:

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