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

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