"wxGDIObject * => &" related changes (see mail to the list)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1142 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1998-12-09 17:30:17 +00:00
parent e7003166c3
commit 8bbe427f8e
66 changed files with 2551 additions and 2698 deletions

View File

@@ -222,7 +222,7 @@ public:
protected: protected:
static bool IsImmutable(const wxString& key) static bool IsImmutable(const wxString& key)
{ return key[0u] == wxCONFIG_IMMUTABLE_PREFIX; } { return !key.IsEmpty() && key[0u] == wxCONFIG_IMMUTABLE_PREFIX; }
private: private:
// are we doing automatic environment variable expansion? // are we doing automatic environment variable expansion?

View File

@@ -75,7 +75,6 @@ public:
wxBitmap( const char **bits ); wxBitmap( const char **bits );
wxBitmap( char **bits ); wxBitmap( char **bits );
wxBitmap( const wxBitmap& bmp ); wxBitmap( const wxBitmap& bmp );
wxBitmap( const wxBitmap* bmp );
wxBitmap( const wxString &filename, int type = wxBITMAP_TYPE_XPM ); wxBitmap( const wxString &filename, int type = wxBITMAP_TYPE_XPM );
~wxBitmap(); ~wxBitmap();
wxBitmap& operator = ( const wxBitmap& bmp ); wxBitmap& operator = ( const wxBitmap& bmp );

View File

@@ -4,7 +4,7 @@
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
// Copyright: (c) 1998 Robert Roebling // Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@@ -37,20 +37,19 @@ class wxBrush: public wxGDIObject
public: public:
wxBrush(void); wxBrush();
wxBrush( const wxColour &colour, int style ); wxBrush( const wxColour &colour, int style );
wxBrush( const wxBitmap &stippleBitmap ); wxBrush( const wxBitmap &stippleBitmap );
wxBrush( const wxBrush &brush ); wxBrush( const wxBrush &brush );
wxBrush( const wxBrush *brush ); ~wxBrush();
~wxBrush(void);
wxBrush& operator = ( const wxBrush& brush ); wxBrush& operator = ( const wxBrush& brush );
bool operator == ( const wxBrush& brush ); bool operator == ( const wxBrush& brush );
bool operator != ( const wxBrush& brush ); bool operator != ( const wxBrush& brush );
bool Ok(void) const; bool Ok() const;
int GetStyle(void) const; int GetStyle() const;
wxColour &GetColour(void) const; wxColour &GetColour() const;
wxBitmap *GetStipple(void) const; wxBitmap *GetStipple() const;
void SetColour( const wxColour& col ); void SetColour( const wxColour& col );
@@ -58,7 +57,7 @@ class wxBrush: public wxGDIObject
void SetStyle( int style ); void SetStyle( int style );
void SetStipple( const wxBitmap& stipple ); void SetStipple( const wxBitmap& stipple );
void Unshare(void); void Unshare();
// no data :-) // no data :-)
}; };

View File

@@ -4,7 +4,7 @@
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
// Copyright: (c) 1998 Robert Roebling // Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@@ -50,7 +50,6 @@ public:
// copy ctors and assignment operators // copy ctors and assignment operators
wxColour( const wxColour& col ); wxColour( const wxColour& col );
wxColour( const wxColour* col );
wxColour& operator = ( const wxColour& col ); wxColour& operator = ( const wxColour& col );
// dtor // dtor

View File

@@ -4,7 +4,7 @@
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
// Copyright: (c) 1998 Robert Roebling // Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@@ -19,14 +19,6 @@
#include "wx/object.h" #include "wx/object.h"
#include "wx/gdicmn.h" #include "wx/gdicmn.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxWindow;
class wxCursor;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// wxCursor // wxCursor
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -37,22 +29,16 @@ class wxCursor: public wxObject
public: public:
wxCursor(void); wxCursor();
wxCursor( int cursorId ); wxCursor( int cursorId );
wxCursor( const wxCursor &cursor ); wxCursor( const wxCursor &cursor );
wxCursor( const wxCursor *cursor ); ~wxCursor();
~wxCursor(void);
wxCursor& operator = ( const wxCursor& cursor ); wxCursor& operator = ( const wxCursor& cursor );
bool operator == ( const wxCursor& cursor ); bool operator == ( const wxCursor& cursor ) const;
bool operator != ( const wxCursor& cursor ); bool operator != ( const wxCursor& cursor ) const;
bool Ok(void) const; bool Ok() const;
private: GdkCursor *GetCursor() const;
public:
friend wxWindow;
GdkCursor *GetCursor(void) const;
// no data :-) // no data :-)
}; };

View File

@@ -4,7 +4,7 @@
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
// Copyright: (c) 1998 Robert Roebling // Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@@ -34,14 +34,14 @@ class wxDC;
// constants // constants
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#define MM_TEXT 0 #define MM_TEXT 0
#define MM_ISOTROPIC 1 #define MM_ISOTROPIC 1
#define MM_ANISOTROPIC 2 #define MM_ANISOTROPIC 2
#define MM_LOMETRIC 3 #define MM_LOMETRIC 3
#define MM_HIMETRIC 4 #define MM_HIMETRIC 4
#define MM_TWIPS 5 #define MM_TWIPS 5
#define MM_POINTS 6 #define MM_POINTS 6
#define MM_METRIC 7 #define MM_METRIC 7
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// global variables // global variables
@@ -158,15 +158,15 @@ public:
virtual bool Blit( long xdest, long ydest, virtual bool Blit( long xdest, long ydest,
long width, long height, long width, long height,
wxDC *source, wxDC *source,
long xsrc, long ysrc, long xsrc, long ysrc,
int logical_func=wxCOPY, int logical_func=wxCOPY,
bool useMask=FALSE ) = 0; bool useMask=FALSE ) = 0;
inline bool Blit( const wxPoint& destPt, inline bool Blit( const wxPoint& destPt,
const wxSize& sz, const wxSize& sz,
wxDC *source, wxDC *source,
const wxPoint& srcPt, const wxPoint& srcPt,
int rop = wxCOPY, int rop = wxCOPY,
bool useMask=FALSE) bool useMask=FALSE)
{ {
return Blit(destPt.x, destPt.y, sz.x, sz.y, source, srcPt.x, srcPt.y, rop, useMask); return Blit(destPt.x, destPt.y, sz.x, sz.y, source, srcPt.x, srcPt.y, rop, useMask);
} }
@@ -180,25 +180,25 @@ public:
virtual void GetTextExtent( const wxString &string, virtual void GetTextExtent( const wxString &string,
long *width, long *height, long *width, long *height,
long *descent = (long *) NULL, long *descent = (long *) NULL,
long *externalLeading = (long *) NULL, long *externalLeading = (long *) NULL,
wxFont *theFont = (wxFont *) NULL, wxFont *theFont = (wxFont *) NULL,
bool use16 = FALSE ) = 0; bool use16 = FALSE ) = 0;
virtual long GetCharWidth(void) = 0; virtual long GetCharWidth(void) = 0;
virtual long GetCharHeight(void) = 0; virtual long GetCharHeight(void) = 0;
virtual void Clear() = 0; virtual void Clear() = 0;
virtual void SetFont( const wxFont &font ) = 0; virtual void SetFont( const wxFont &font ) = 0;
virtual wxFont *GetFont() { return &m_font; }; virtual const wxFont& GetFont() const { return m_font; };
virtual void SetPen( const wxPen &pen ) = 0; virtual void SetPen( const wxPen &pen ) = 0;
virtual wxPen *GetPen() { return &m_pen; }; virtual const wxPen& GetPen() const { return m_pen; };
virtual void SetBrush( const wxBrush &brush ) = 0; virtual void SetBrush( const wxBrush &brush ) = 0;
virtual wxBrush *GetBrush() { return &m_brush; }; virtual const wxBrush& GetBrush() const { return m_brush; };
virtual void SetBackground( const wxBrush &brush ) = 0; virtual void SetBackground( const wxBrush &brush ) = 0;
virtual wxBrush *GetBackground() { return &m_backgroundBrush; }; virtual const wxBrush& GetBackground() const { return m_backgroundBrush; };
virtual void SetLogicalFunction( int function ) = 0; virtual void SetLogicalFunction( int function ) = 0;
virtual int GetLogicalFunction() { return m_logicalFunction; }; virtual int GetLogicalFunction() { return m_logicalFunction; };
@@ -267,65 +267,65 @@ public:
void ComputeScaleAndOrigin(); void ComputeScaleAndOrigin();
long XDEV2LOG(long x) const long XDEV2LOG(long x) const
{ {
long new_x = x - m_deviceOriginX; long new_x = x - m_deviceOriginX;
if (new_x > 0) if (new_x > 0)
return (long)((double)(new_x) / m_scaleX + 0.5) * m_signX + m_logicalOriginX; return (long)((double)(new_x) / m_scaleX + 0.5) * m_signX + m_logicalOriginX;
else else
return (long)((double)(new_x) / m_scaleX - 0.5) * m_signX + m_logicalOriginX; return (long)((double)(new_x) / m_scaleX - 0.5) * m_signX + m_logicalOriginX;
} }
long XDEV2LOGREL(long x) const long XDEV2LOGREL(long x) const
{ {
if (x > 0) if (x > 0)
return (long)((double)(x) / m_scaleX + 0.5); return (long)((double)(x) / m_scaleX + 0.5);
else else
return (long)((double)(x) / m_scaleX - 0.5); return (long)((double)(x) / m_scaleX - 0.5);
} }
long YDEV2LOG(long y) const long YDEV2LOG(long y) const
{ {
long new_y = y - m_deviceOriginY; long new_y = y - m_deviceOriginY;
if (new_y > 0) if (new_y > 0)
return (long)((double)(new_y) / m_scaleY + 0.5) * m_signY + m_logicalOriginY; return (long)((double)(new_y) / m_scaleY + 0.5) * m_signY + m_logicalOriginY;
else else
return (long)((double)(new_y) / m_scaleY - 0.5) * m_signY + m_logicalOriginY; return (long)((double)(new_y) / m_scaleY - 0.5) * m_signY + m_logicalOriginY;
} }
long YDEV2LOGREL(long y) const long YDEV2LOGREL(long y) const
{ {
if (y > 0) if (y > 0)
return (long)((double)(y) / m_scaleY + 0.5); return (long)((double)(y) / m_scaleY + 0.5);
else else
return (long)((double)(y) / m_scaleY - 0.5); return (long)((double)(y) / m_scaleY - 0.5);
} }
long XLOG2DEV(long x) const long XLOG2DEV(long x) const
{ {
long new_x = x - m_logicalOriginX; long new_x = x - m_logicalOriginX;
if (new_x > 0) if (new_x > 0)
return (long)((double)(new_x) * m_scaleX + 0.5) * m_signX + m_deviceOriginX; return (long)((double)(new_x) * m_scaleX + 0.5) * m_signX + m_deviceOriginX;
else else
return (long)((double)(new_x) * m_scaleX - 0.5) * m_signX + m_deviceOriginX; return (long)((double)(new_x) * m_scaleX - 0.5) * m_signX + m_deviceOriginX;
} }
long XLOG2DEVREL(long x) const long XLOG2DEVREL(long x) const
{ {
if (x > 0) if (x > 0)
return (long)((double)(x) * m_scaleX + 0.5); return (long)((double)(x) * m_scaleX + 0.5);
else else
return (long)((double)(x) * m_scaleX - 0.5); return (long)((double)(x) * m_scaleX - 0.5);
} }
long YLOG2DEV(long y) const long YLOG2DEV(long y) const
{ {
long new_y = y - m_logicalOriginY; long new_y = y - m_logicalOriginY;
if (new_y > 0) if (new_y > 0)
return (long)((double)(new_y) * m_scaleY + 0.5) * m_signY + m_deviceOriginY; return (long)((double)(new_y) * m_scaleY + 0.5) * m_signY + m_deviceOriginY;
else else
return (long)((double)(new_y) * m_scaleY - 0.5) * m_signY + m_deviceOriginY; return (long)((double)(new_y) * m_scaleY - 0.5) * m_signY + m_deviceOriginY;
} }
long YLOG2DEVREL(long y) const long YLOG2DEVREL(long y) const
{ {
if (y > 0) if (y > 0)
return (long)((double)(y) * m_scaleY + 0.5); return (long)((double)(y) * m_scaleY + 0.5);
else else
return (long)((double)(y) * m_scaleY - 0.5); return (long)((double)(y) * m_scaleY - 0.5);
} }
public: public:

View File

@@ -4,7 +4,7 @@
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
// Copyright: (c) 1998 Robert Roebling // Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////

View File

@@ -4,7 +4,7 @@
// Author: Robert Roebling // Author: Robert Roebling
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) 1998 Robert Roebling // Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////

View File

@@ -4,7 +4,7 @@
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@@ -47,30 +47,29 @@ class wxFont: public wxGDIObject
DECLARE_DYNAMIC_CLASS(wxFont) DECLARE_DYNAMIC_CLASS(wxFont)
public: public:
wxFont(void); wxFont();
wxFont( int PointSize, int FontIdOrFamily, int Style, int Weight, wxFont( int PointSize, int FontIdOrFamily, int Style, int Weight,
bool underlined = FALSE, const char *Face= ( const char *) NULL ); bool underlined = FALSE, const char *Face = ( const char *) NULL );
wxFont( int PointSize, const char *Face, int Family, int Style, int Weight, wxFont( int PointSize, const char *Face, int Family,
bool underlined = FALSE ); int Style, int Weight, bool underlined = FALSE );
wxFont( const wxFont& font ); wxFont( const wxFont& font );
wxFont( const wxFont* font ); ~wxFont();
~wxFont(void);
wxFont& operator = ( const wxFont& font ); wxFont& operator = ( const wxFont& font );
bool operator == ( const wxFont& font ); bool operator == ( const wxFont& font );
bool operator != ( const wxFont& font ); bool operator != ( const wxFont& font );
bool Ok() const; bool Ok() const;
int GetPointSize(void) const; int GetPointSize() const;
wxString GetFaceName(void) const; wxString GetFaceName() const;
int GetFamily(void) const; int GetFamily() const;
wxString GetFamilyString(void) const; wxString GetFamilyString() const;
int GetFontId(void) const; int GetFontId() const;
wxString GetFaceString(void) const; wxString GetFaceString() const;
int GetStyle(void) const; int GetStyle() const;
wxString GetStyleString(void) const; wxString GetStyleString() const;
int GetWeight(void) const; int GetWeight() const;
wxString GetWeightString(void) const; wxString GetWeightString() const;
bool GetUnderlined(void) const; bool GetUnderlined() const;
wxFont( char *xFontName ); wxFont( char *xFontName );
@@ -90,10 +89,10 @@ class wxFontNameDirectory: public wxObject
DECLARE_DYNAMIC_CLASS(wxFontNameDirectory) DECLARE_DYNAMIC_CLASS(wxFontNameDirectory)
public: public:
wxFontNameDirectory(void); wxFontNameDirectory();
~wxFontNameDirectory(); ~wxFontNameDirectory();
void Initialize(void); void Initialize();
void Initialize(int fontid, int family, const char *name); void Initialize(int fontid, int family, const char *name);
int FindOrCreateFontId(const char *name, int family); int FindOrCreateFontId(const char *name, int family);
@@ -101,11 +100,10 @@ class wxFontNameDirectory: public wxObject
int GetFamily(int fontid); int GetFamily(int fontid);
int GetFontId(const char *name); int GetFontId(const char *name);
char* GetFontName(int fontid); char* GetFontName(int fontid);
int GetNewFontId(void); int GetNewFontId();
char* GetPostScriptName(int fontid, int weight, int style); char* GetPostScriptName(int fontid, int weight, int style);
char* GetScreenName(int fontid, int weight, int style); char* GetScreenName(int fontid, int weight, int style);
class wxHashTable *table; class wxHashTable *table;
int nextFontId; int nextFontId;
}; };

View File

@@ -4,7 +4,7 @@
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
// Copyright: (c) 1998 Robert Roebling // Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@@ -35,9 +35,8 @@ class wxIcon: public wxBitmap
public: public:
wxIcon(void); wxIcon();
wxIcon( const wxIcon& icon); wxIcon( const wxIcon& icon);
wxIcon( const wxIcon* icon);
wxIcon( const char **bits, int width=-1, int height=-1 ); wxIcon( const char **bits, int width=-1, int height=-1 );
wxIcon( char **bits, int width=-1, int height=-1 ); wxIcon( char **bits, int width=-1, int height=-1 );

View File

@@ -50,7 +50,9 @@ public:
// the item's text = name // the item's text = name
void SetName(const wxString& str); void SetName(const wxString& str);
void SetText(const wxString& str) { SetName(str); } // compatibility
const wxString& GetName() const { return m_text; } const wxString& GetName() const { return m_text; }
const wxString& GetText() const { return GetName(); }
// what kind of menu item we are // what kind of menu item we are
void SetCheckable(bool checkable) { m_isCheckMenu = checkable; } void SetCheckable(bool checkable) { m_isCheckMenu = checkable; }

View File

@@ -5,7 +5,7 @@
// Created: 01/02/97 // Created: 01/02/97
// Id: // Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@@ -37,15 +37,14 @@ class wxPalette: public wxGDIObject
public: public:
wxPalette(void); wxPalette();
wxPalette( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue ); wxPalette( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue );
wxPalette( const wxPalette& palette ); wxPalette( const wxPalette& palette );
wxPalette( const wxPalette* palette ); ~wxPalette();
~wxPalette(void);
wxPalette& operator = ( const wxPalette& palette ); wxPalette& operator = ( const wxPalette& palette );
bool operator == ( const wxPalette& palette ); bool operator == ( const wxPalette& palette );
bool operator != ( const wxPalette& palette ); bool operator != ( const wxPalette& palette );
bool Ok(void) const; bool Ok() const;
bool Create( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue); bool Create( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
int GetPixel( const unsigned char red, const unsigned char green, const unsigned char blue ) const; int GetPixel( const unsigned char red, const unsigned char green, const unsigned char blue ) const;

View File

@@ -4,7 +4,7 @@
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
// Copyright: (c) 1998 Robert Roebling // Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@@ -37,11 +37,10 @@ class wxPen: public wxGDIObject
public: public:
wxPen(void); wxPen();
wxPen( const wxColour &colour, int width, int style ); wxPen( const wxColour &colour, int width, int style );
wxPen( const wxPen& pen ); wxPen( const wxPen& pen );
wxPen( const wxPen* pen ); ~wxPen();
~wxPen(void);
wxPen& operator = ( const wxPen& pen ); wxPen& operator = ( const wxPen& pen );
bool operator == ( const wxPen& pen ); bool operator == ( const wxPen& pen );
bool operator != ( const wxPen& pen ); bool operator != ( const wxPen& pen );
@@ -52,14 +51,14 @@ class wxPen: public wxGDIObject
void SetJoin( int joinStyle ); void SetJoin( int joinStyle );
void SetStyle( int style ); void SetStyle( int style );
void SetWidth( int width ); void SetWidth( int width );
wxColour &GetColour(void) const; wxColour &GetColour() const;
int GetCap(void) const; int GetCap() const;
int GetJoin(void) const; int GetJoin() const;
int GetStyle(void) const; int GetStyle() const;
int GetWidth(void) const; int GetWidth() const;
bool Ok(void) const; bool Ok() const;
void Unshare(void); void Unshare();
// no data :-) // no data :-)
}; };

View File

@@ -155,7 +155,8 @@ public:
virtual bool OnClose(); virtual bool OnClose();
virtual void AddChild( wxWindow *child ); virtual void AddChild( wxWindow *child );
wxList& GetChildren() const; wxList& GetChildren() { return m_children; }
virtual void RemoveChild( wxWindow *child ); virtual void RemoveChild( wxWindow *child );
void SetReturnCode( int retCode ); void SetReturnCode( int retCode );
int GetReturnCode(); int GetReturnCode();
@@ -167,7 +168,7 @@ public:
{ m_parent = p; } { m_parent = p; }
virtual wxWindow *ReParent( wxWindow *newParent ); virtual wxWindow *ReParent( wxWindow *newParent );
wxEvtHandler *GetEventHandler(); wxEvtHandler *GetEventHandler() const;
void SetEventHandler( wxEvtHandler *handler ); void SetEventHandler( wxEvtHandler *handler );
void PushEventHandler( wxEvtHandler *handler ); void PushEventHandler( wxEvtHandler *handler );
wxEvtHandler *PopEventHandler( bool deleteHandler = FALSE ); wxEvtHandler *PopEventHandler( bool deleteHandler = FALSE );
@@ -187,7 +188,7 @@ public:
bool IsBeingDeleted(); bool IsBeingDeleted();
void SetId( wxWindowID id ); void SetId( wxWindowID id );
wxWindowID GetId(); wxWindowID GetId() const;
void SetCursor( const wxCursor &cursor ); void SetCursor( const wxCursor &cursor );
@@ -213,13 +214,13 @@ public:
const wxFont *theFont = (const wxFont *) NULL, bool use16 = FALSE) const; const wxFont *theFont = (const wxFont *) NULL, bool use16 = FALSE) const;
virtual void SetFont( const wxFont &font ); virtual void SetFont( const wxFont &font );
virtual wxFont *GetFont(); virtual const wxFont& GetFont() { return m_font; }
// For backward compatibility // For backward compatibility
inline virtual void SetButtonFont(const wxFont& font) { SetFont(font); } inline virtual void SetButtonFont(const wxFont& font) { SetFont(font); }
inline virtual void SetLabelFont(const wxFont& font) { SetFont(font); } inline virtual void SetLabelFont(const wxFont& font) { SetFont(font); }
inline virtual wxFont *GetLabelFont() { return GetFont(); }; inline virtual const wxFont& GetLabelFont() { return GetFont(); };
inline virtual wxFont *GetButtonFont() { return GetFont(); }; inline virtual const wxFont& GetButtonFont() { return GetFont(); };
virtual void SetWindowStyleFlag( long flag ); virtual void SetWindowStyleFlag( long flag );
virtual long GetWindowStyleFlag() const; virtual long GetWindowStyleFlag() const;

View File

@@ -75,7 +75,6 @@ public:
wxBitmap( const char **bits ); wxBitmap( const char **bits );
wxBitmap( char **bits ); wxBitmap( char **bits );
wxBitmap( const wxBitmap& bmp ); wxBitmap( const wxBitmap& bmp );
wxBitmap( const wxBitmap* bmp );
wxBitmap( const wxString &filename, int type = wxBITMAP_TYPE_XPM ); wxBitmap( const wxString &filename, int type = wxBITMAP_TYPE_XPM );
~wxBitmap(); ~wxBitmap();
wxBitmap& operator = ( const wxBitmap& bmp ); wxBitmap& operator = ( const wxBitmap& bmp );

View File

@@ -4,7 +4,7 @@
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
// Copyright: (c) 1998 Robert Roebling // Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@@ -37,20 +37,19 @@ class wxBrush: public wxGDIObject
public: public:
wxBrush(void); wxBrush();
wxBrush( const wxColour &colour, int style ); wxBrush( const wxColour &colour, int style );
wxBrush( const wxBitmap &stippleBitmap ); wxBrush( const wxBitmap &stippleBitmap );
wxBrush( const wxBrush &brush ); wxBrush( const wxBrush &brush );
wxBrush( const wxBrush *brush ); ~wxBrush();
~wxBrush(void);
wxBrush& operator = ( const wxBrush& brush ); wxBrush& operator = ( const wxBrush& brush );
bool operator == ( const wxBrush& brush ); bool operator == ( const wxBrush& brush );
bool operator != ( const wxBrush& brush ); bool operator != ( const wxBrush& brush );
bool Ok(void) const; bool Ok() const;
int GetStyle(void) const; int GetStyle() const;
wxColour &GetColour(void) const; wxColour &GetColour() const;
wxBitmap *GetStipple(void) const; wxBitmap *GetStipple() const;
void SetColour( const wxColour& col ); void SetColour( const wxColour& col );
@@ -58,7 +57,7 @@ class wxBrush: public wxGDIObject
void SetStyle( int style ); void SetStyle( int style );
void SetStipple( const wxBitmap& stipple ); void SetStipple( const wxBitmap& stipple );
void Unshare(void); void Unshare();
// no data :-) // no data :-)
}; };

View File

@@ -4,7 +4,7 @@
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
// Copyright: (c) 1998 Robert Roebling // Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@@ -50,7 +50,6 @@ public:
// copy ctors and assignment operators // copy ctors and assignment operators
wxColour( const wxColour& col ); wxColour( const wxColour& col );
wxColour( const wxColour* col );
wxColour& operator = ( const wxColour& col ); wxColour& operator = ( const wxColour& col );
// dtor // dtor

View File

@@ -4,7 +4,7 @@
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
// Copyright: (c) 1998 Robert Roebling // Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@@ -19,14 +19,6 @@
#include "wx/object.h" #include "wx/object.h"
#include "wx/gdicmn.h" #include "wx/gdicmn.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxWindow;
class wxCursor;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// wxCursor // wxCursor
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -37,22 +29,16 @@ class wxCursor: public wxObject
public: public:
wxCursor(void); wxCursor();
wxCursor( int cursorId ); wxCursor( int cursorId );
wxCursor( const wxCursor &cursor ); wxCursor( const wxCursor &cursor );
wxCursor( const wxCursor *cursor ); ~wxCursor();
~wxCursor(void);
wxCursor& operator = ( const wxCursor& cursor ); wxCursor& operator = ( const wxCursor& cursor );
bool operator == ( const wxCursor& cursor ); bool operator == ( const wxCursor& cursor ) const;
bool operator != ( const wxCursor& cursor ); bool operator != ( const wxCursor& cursor ) const;
bool Ok(void) const; bool Ok() const;
private: GdkCursor *GetCursor() const;
public:
friend wxWindow;
GdkCursor *GetCursor(void) const;
// no data :-) // no data :-)
}; };

View File

@@ -4,7 +4,7 @@
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
// Copyright: (c) 1998 Robert Roebling // Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@@ -34,14 +34,14 @@ class wxDC;
// constants // constants
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#define MM_TEXT 0 #define MM_TEXT 0
#define MM_ISOTROPIC 1 #define MM_ISOTROPIC 1
#define MM_ANISOTROPIC 2 #define MM_ANISOTROPIC 2
#define MM_LOMETRIC 3 #define MM_LOMETRIC 3
#define MM_HIMETRIC 4 #define MM_HIMETRIC 4
#define MM_TWIPS 5 #define MM_TWIPS 5
#define MM_POINTS 6 #define MM_POINTS 6
#define MM_METRIC 7 #define MM_METRIC 7
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// global variables // global variables
@@ -158,15 +158,15 @@ public:
virtual bool Blit( long xdest, long ydest, virtual bool Blit( long xdest, long ydest,
long width, long height, long width, long height,
wxDC *source, wxDC *source,
long xsrc, long ysrc, long xsrc, long ysrc,
int logical_func=wxCOPY, int logical_func=wxCOPY,
bool useMask=FALSE ) = 0; bool useMask=FALSE ) = 0;
inline bool Blit( const wxPoint& destPt, inline bool Blit( const wxPoint& destPt,
const wxSize& sz, const wxSize& sz,
wxDC *source, wxDC *source,
const wxPoint& srcPt, const wxPoint& srcPt,
int rop = wxCOPY, int rop = wxCOPY,
bool useMask=FALSE) bool useMask=FALSE)
{ {
return Blit(destPt.x, destPt.y, sz.x, sz.y, source, srcPt.x, srcPt.y, rop, useMask); return Blit(destPt.x, destPt.y, sz.x, sz.y, source, srcPt.x, srcPt.y, rop, useMask);
} }
@@ -180,25 +180,25 @@ public:
virtual void GetTextExtent( const wxString &string, virtual void GetTextExtent( const wxString &string,
long *width, long *height, long *width, long *height,
long *descent = (long *) NULL, long *descent = (long *) NULL,
long *externalLeading = (long *) NULL, long *externalLeading = (long *) NULL,
wxFont *theFont = (wxFont *) NULL, wxFont *theFont = (wxFont *) NULL,
bool use16 = FALSE ) = 0; bool use16 = FALSE ) = 0;
virtual long GetCharWidth(void) = 0; virtual long GetCharWidth(void) = 0;
virtual long GetCharHeight(void) = 0; virtual long GetCharHeight(void) = 0;
virtual void Clear() = 0; virtual void Clear() = 0;
virtual void SetFont( const wxFont &font ) = 0; virtual void SetFont( const wxFont &font ) = 0;
virtual wxFont *GetFont() { return &m_font; }; virtual const wxFont& GetFont() const { return m_font; };
virtual void SetPen( const wxPen &pen ) = 0; virtual void SetPen( const wxPen &pen ) = 0;
virtual wxPen *GetPen() { return &m_pen; }; virtual const wxPen& GetPen() const { return m_pen; };
virtual void SetBrush( const wxBrush &brush ) = 0; virtual void SetBrush( const wxBrush &brush ) = 0;
virtual wxBrush *GetBrush() { return &m_brush; }; virtual const wxBrush& GetBrush() const { return m_brush; };
virtual void SetBackground( const wxBrush &brush ) = 0; virtual void SetBackground( const wxBrush &brush ) = 0;
virtual wxBrush *GetBackground() { return &m_backgroundBrush; }; virtual const wxBrush& GetBackground() const { return m_backgroundBrush; };
virtual void SetLogicalFunction( int function ) = 0; virtual void SetLogicalFunction( int function ) = 0;
virtual int GetLogicalFunction() { return m_logicalFunction; }; virtual int GetLogicalFunction() { return m_logicalFunction; };
@@ -267,65 +267,65 @@ public:
void ComputeScaleAndOrigin(); void ComputeScaleAndOrigin();
long XDEV2LOG(long x) const long XDEV2LOG(long x) const
{ {
long new_x = x - m_deviceOriginX; long new_x = x - m_deviceOriginX;
if (new_x > 0) if (new_x > 0)
return (long)((double)(new_x) / m_scaleX + 0.5) * m_signX + m_logicalOriginX; return (long)((double)(new_x) / m_scaleX + 0.5) * m_signX + m_logicalOriginX;
else else
return (long)((double)(new_x) / m_scaleX - 0.5) * m_signX + m_logicalOriginX; return (long)((double)(new_x) / m_scaleX - 0.5) * m_signX + m_logicalOriginX;
} }
long XDEV2LOGREL(long x) const long XDEV2LOGREL(long x) const
{ {
if (x > 0) if (x > 0)
return (long)((double)(x) / m_scaleX + 0.5); return (long)((double)(x) / m_scaleX + 0.5);
else else
return (long)((double)(x) / m_scaleX - 0.5); return (long)((double)(x) / m_scaleX - 0.5);
} }
long YDEV2LOG(long y) const long YDEV2LOG(long y) const
{ {
long new_y = y - m_deviceOriginY; long new_y = y - m_deviceOriginY;
if (new_y > 0) if (new_y > 0)
return (long)((double)(new_y) / m_scaleY + 0.5) * m_signY + m_logicalOriginY; return (long)((double)(new_y) / m_scaleY + 0.5) * m_signY + m_logicalOriginY;
else else
return (long)((double)(new_y) / m_scaleY - 0.5) * m_signY + m_logicalOriginY; return (long)((double)(new_y) / m_scaleY - 0.5) * m_signY + m_logicalOriginY;
} }
long YDEV2LOGREL(long y) const long YDEV2LOGREL(long y) const
{ {
if (y > 0) if (y > 0)
return (long)((double)(y) / m_scaleY + 0.5); return (long)((double)(y) / m_scaleY + 0.5);
else else
return (long)((double)(y) / m_scaleY - 0.5); return (long)((double)(y) / m_scaleY - 0.5);
} }
long XLOG2DEV(long x) const long XLOG2DEV(long x) const
{ {
long new_x = x - m_logicalOriginX; long new_x = x - m_logicalOriginX;
if (new_x > 0) if (new_x > 0)
return (long)((double)(new_x) * m_scaleX + 0.5) * m_signX + m_deviceOriginX; return (long)((double)(new_x) * m_scaleX + 0.5) * m_signX + m_deviceOriginX;
else else
return (long)((double)(new_x) * m_scaleX - 0.5) * m_signX + m_deviceOriginX; return (long)((double)(new_x) * m_scaleX - 0.5) * m_signX + m_deviceOriginX;
} }
long XLOG2DEVREL(long x) const long XLOG2DEVREL(long x) const
{ {
if (x > 0) if (x > 0)
return (long)((double)(x) * m_scaleX + 0.5); return (long)((double)(x) * m_scaleX + 0.5);
else else
return (long)((double)(x) * m_scaleX - 0.5); return (long)((double)(x) * m_scaleX - 0.5);
} }
long YLOG2DEV(long y) const long YLOG2DEV(long y) const
{ {
long new_y = y - m_logicalOriginY; long new_y = y - m_logicalOriginY;
if (new_y > 0) if (new_y > 0)
return (long)((double)(new_y) * m_scaleY + 0.5) * m_signY + m_deviceOriginY; return (long)((double)(new_y) * m_scaleY + 0.5) * m_signY + m_deviceOriginY;
else else
return (long)((double)(new_y) * m_scaleY - 0.5) * m_signY + m_deviceOriginY; return (long)((double)(new_y) * m_scaleY - 0.5) * m_signY + m_deviceOriginY;
} }
long YLOG2DEVREL(long y) const long YLOG2DEVREL(long y) const
{ {
if (y > 0) if (y > 0)
return (long)((double)(y) * m_scaleY + 0.5); return (long)((double)(y) * m_scaleY + 0.5);
else else
return (long)((double)(y) * m_scaleY - 0.5); return (long)((double)(y) * m_scaleY - 0.5);
} }
public: public:

View File

@@ -4,7 +4,7 @@
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
// Copyright: (c) 1998 Robert Roebling // Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////

View File

@@ -4,7 +4,7 @@
// Author: Robert Roebling // Author: Robert Roebling
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) 1998 Robert Roebling // Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////

View File

@@ -4,7 +4,7 @@
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@@ -47,30 +47,29 @@ class wxFont: public wxGDIObject
DECLARE_DYNAMIC_CLASS(wxFont) DECLARE_DYNAMIC_CLASS(wxFont)
public: public:
wxFont(void); wxFont();
wxFont( int PointSize, int FontIdOrFamily, int Style, int Weight, wxFont( int PointSize, int FontIdOrFamily, int Style, int Weight,
bool underlined = FALSE, const char *Face= ( const char *) NULL ); bool underlined = FALSE, const char *Face = ( const char *) NULL );
wxFont( int PointSize, const char *Face, int Family, int Style, int Weight, wxFont( int PointSize, const char *Face, int Family,
bool underlined = FALSE ); int Style, int Weight, bool underlined = FALSE );
wxFont( const wxFont& font ); wxFont( const wxFont& font );
wxFont( const wxFont* font ); ~wxFont();
~wxFont(void);
wxFont& operator = ( const wxFont& font ); wxFont& operator = ( const wxFont& font );
bool operator == ( const wxFont& font ); bool operator == ( const wxFont& font );
bool operator != ( const wxFont& font ); bool operator != ( const wxFont& font );
bool Ok() const; bool Ok() const;
int GetPointSize(void) const; int GetPointSize() const;
wxString GetFaceName(void) const; wxString GetFaceName() const;
int GetFamily(void) const; int GetFamily() const;
wxString GetFamilyString(void) const; wxString GetFamilyString() const;
int GetFontId(void) const; int GetFontId() const;
wxString GetFaceString(void) const; wxString GetFaceString() const;
int GetStyle(void) const; int GetStyle() const;
wxString GetStyleString(void) const; wxString GetStyleString() const;
int GetWeight(void) const; int GetWeight() const;
wxString GetWeightString(void) const; wxString GetWeightString() const;
bool GetUnderlined(void) const; bool GetUnderlined() const;
wxFont( char *xFontName ); wxFont( char *xFontName );
@@ -90,10 +89,10 @@ class wxFontNameDirectory: public wxObject
DECLARE_DYNAMIC_CLASS(wxFontNameDirectory) DECLARE_DYNAMIC_CLASS(wxFontNameDirectory)
public: public:
wxFontNameDirectory(void); wxFontNameDirectory();
~wxFontNameDirectory(); ~wxFontNameDirectory();
void Initialize(void); void Initialize();
void Initialize(int fontid, int family, const char *name); void Initialize(int fontid, int family, const char *name);
int FindOrCreateFontId(const char *name, int family); int FindOrCreateFontId(const char *name, int family);
@@ -101,11 +100,10 @@ class wxFontNameDirectory: public wxObject
int GetFamily(int fontid); int GetFamily(int fontid);
int GetFontId(const char *name); int GetFontId(const char *name);
char* GetFontName(int fontid); char* GetFontName(int fontid);
int GetNewFontId(void); int GetNewFontId();
char* GetPostScriptName(int fontid, int weight, int style); char* GetPostScriptName(int fontid, int weight, int style);
char* GetScreenName(int fontid, int weight, int style); char* GetScreenName(int fontid, int weight, int style);
class wxHashTable *table; class wxHashTable *table;
int nextFontId; int nextFontId;
}; };

View File

@@ -4,7 +4,7 @@
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
// Copyright: (c) 1998 Robert Roebling // Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@@ -35,9 +35,8 @@ class wxIcon: public wxBitmap
public: public:
wxIcon(void); wxIcon();
wxIcon( const wxIcon& icon); wxIcon( const wxIcon& icon);
wxIcon( const wxIcon* icon);
wxIcon( const char **bits, int width=-1, int height=-1 ); wxIcon( const char **bits, int width=-1, int height=-1 );
wxIcon( char **bits, int width=-1, int height=-1 ); wxIcon( char **bits, int width=-1, int height=-1 );

View File

@@ -50,7 +50,9 @@ public:
// the item's text = name // the item's text = name
void SetName(const wxString& str); void SetName(const wxString& str);
void SetText(const wxString& str) { SetName(str); } // compatibility
const wxString& GetName() const { return m_text; } const wxString& GetName() const { return m_text; }
const wxString& GetText() const { return GetName(); }
// what kind of menu item we are // what kind of menu item we are
void SetCheckable(bool checkable) { m_isCheckMenu = checkable; } void SetCheckable(bool checkable) { m_isCheckMenu = checkable; }

View File

@@ -5,7 +5,7 @@
// Created: 01/02/97 // Created: 01/02/97
// Id: // Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@@ -37,15 +37,14 @@ class wxPalette: public wxGDIObject
public: public:
wxPalette(void); wxPalette();
wxPalette( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue ); wxPalette( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue );
wxPalette( const wxPalette& palette ); wxPalette( const wxPalette& palette );
wxPalette( const wxPalette* palette ); ~wxPalette();
~wxPalette(void);
wxPalette& operator = ( const wxPalette& palette ); wxPalette& operator = ( const wxPalette& palette );
bool operator == ( const wxPalette& palette ); bool operator == ( const wxPalette& palette );
bool operator != ( const wxPalette& palette ); bool operator != ( const wxPalette& palette );
bool Ok(void) const; bool Ok() const;
bool Create( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue); bool Create( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
int GetPixel( const unsigned char red, const unsigned char green, const unsigned char blue ) const; int GetPixel( const unsigned char red, const unsigned char green, const unsigned char blue ) const;

View File

@@ -4,7 +4,7 @@
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
// Copyright: (c) 1998 Robert Roebling // Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@@ -37,11 +37,10 @@ class wxPen: public wxGDIObject
public: public:
wxPen(void); wxPen();
wxPen( const wxColour &colour, int width, int style ); wxPen( const wxColour &colour, int width, int style );
wxPen( const wxPen& pen ); wxPen( const wxPen& pen );
wxPen( const wxPen* pen ); ~wxPen();
~wxPen(void);
wxPen& operator = ( const wxPen& pen ); wxPen& operator = ( const wxPen& pen );
bool operator == ( const wxPen& pen ); bool operator == ( const wxPen& pen );
bool operator != ( const wxPen& pen ); bool operator != ( const wxPen& pen );
@@ -52,14 +51,14 @@ class wxPen: public wxGDIObject
void SetJoin( int joinStyle ); void SetJoin( int joinStyle );
void SetStyle( int style ); void SetStyle( int style );
void SetWidth( int width ); void SetWidth( int width );
wxColour &GetColour(void) const; wxColour &GetColour() const;
int GetCap(void) const; int GetCap() const;
int GetJoin(void) const; int GetJoin() const;
int GetStyle(void) const; int GetStyle() const;
int GetWidth(void) const; int GetWidth() const;
bool Ok(void) const; bool Ok() const;
void Unshare(void); void Unshare();
// no data :-) // no data :-)
}; };

View File

@@ -155,7 +155,8 @@ public:
virtual bool OnClose(); virtual bool OnClose();
virtual void AddChild( wxWindow *child ); virtual void AddChild( wxWindow *child );
wxList& GetChildren() const; wxList& GetChildren() { return m_children; }
virtual void RemoveChild( wxWindow *child ); virtual void RemoveChild( wxWindow *child );
void SetReturnCode( int retCode ); void SetReturnCode( int retCode );
int GetReturnCode(); int GetReturnCode();
@@ -167,7 +168,7 @@ public:
{ m_parent = p; } { m_parent = p; }
virtual wxWindow *ReParent( wxWindow *newParent ); virtual wxWindow *ReParent( wxWindow *newParent );
wxEvtHandler *GetEventHandler(); wxEvtHandler *GetEventHandler() const;
void SetEventHandler( wxEvtHandler *handler ); void SetEventHandler( wxEvtHandler *handler );
void PushEventHandler( wxEvtHandler *handler ); void PushEventHandler( wxEvtHandler *handler );
wxEvtHandler *PopEventHandler( bool deleteHandler = FALSE ); wxEvtHandler *PopEventHandler( bool deleteHandler = FALSE );
@@ -187,7 +188,7 @@ public:
bool IsBeingDeleted(); bool IsBeingDeleted();
void SetId( wxWindowID id ); void SetId( wxWindowID id );
wxWindowID GetId(); wxWindowID GetId() const;
void SetCursor( const wxCursor &cursor ); void SetCursor( const wxCursor &cursor );
@@ -213,13 +214,13 @@ public:
const wxFont *theFont = (const wxFont *) NULL, bool use16 = FALSE) const; const wxFont *theFont = (const wxFont *) NULL, bool use16 = FALSE) const;
virtual void SetFont( const wxFont &font ); virtual void SetFont( const wxFont &font );
virtual wxFont *GetFont(); virtual const wxFont& GetFont() { return m_font; }
// For backward compatibility // For backward compatibility
inline virtual void SetButtonFont(const wxFont& font) { SetFont(font); } inline virtual void SetButtonFont(const wxFont& font) { SetFont(font); }
inline virtual void SetLabelFont(const wxFont& font) { SetFont(font); } inline virtual void SetLabelFont(const wxFont& font) { SetFont(font); }
inline virtual wxFont *GetLabelFont() { return GetFont(); }; inline virtual const wxFont& GetLabelFont() { return GetFont(); };
inline virtual wxFont *GetButtonFont() { return GetFont(); }; inline virtual const wxFont& GetButtonFont() { return GetFont(); };
virtual void SetWindowStyleFlag( long flag ); virtual void SetWindowStyleFlag( long flag );
virtual long GetWindowStyleFlag() const; virtual long GetWindowStyleFlag() const;

View File

@@ -4,9 +4,9 @@
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
// Created: 04/01/98 // Created: 04/01/98
// RCS-ID: // RCS-ID: $Id$
// Copyright: // Copyright:
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h" #include "wx/wxprec.h"
@@ -123,7 +123,7 @@ BEGIN_EVENT_TABLE(DnDFrame, wxFrame)
END_EVENT_TABLE() END_EVENT_TABLE()
// `Main program' equivalent, creating windows and returning main app frame // `Main program' equivalent, creating windows and returning main app frame
bool DnDApp::OnInit(void) bool DnDApp::OnInit()
{ {
// create the main frame window // create the main frame window
DnDFrame *frame = new DnDFrame((wxFrame *) NULL, "Drag & Drop wxWindows App", DnDFrame *frame = new DnDFrame((wxFrame *) NULL, "Drag & Drop wxWindows App",
@@ -195,8 +195,8 @@ DnDFrame::DnDFrame(wxFrame *frame, char *title, int x, int y, int w, int h)
// Top-left listbox // Top-left listbox
c = new wxLayoutConstraints; c = new wxLayoutConstraints;
c->left.SameAs (this, wxLeft); c->left.SameAs(this, wxLeft);
c->top.SameAs (this, wxTop); c->top.SameAs(this, wxTop);
c->right.PercentOf(this, wxRight, 50); c->right.PercentOf(this, wxRight, 50);
c->height.PercentOf(this, wxHeight, 40); c->height.PercentOf(this, wxHeight, 40);
m_ctrlFile->SetConstraints(c); m_ctrlFile->SetConstraints(c);
@@ -291,7 +291,7 @@ void DnDFrame::OnHelp(wxCommandEvent& /* event */)
void DnDFrame::OnLogClear(wxCommandEvent& /* event */ ) void DnDFrame::OnLogClear(wxCommandEvent& /* event */ )
{ {
// m_ctrlLog->Clear(); m_ctrlLog->Clear();
} }
bool DnDFrame::OnClose() bool DnDFrame::OnClose()

View File

@@ -21,6 +21,8 @@
#endif #endif
#include "wx/toolbar.h" #include "wx/toolbar.h"
#include <wx/log.h>
#include "test.h" #include "test.h"
#if defined(__WXGTK__) || defined(__WXMOTIF__) #if defined(__WXGTK__) || defined(__WXMOTIF__)
@@ -38,7 +40,6 @@
IMPLEMENT_APP(MyApp) IMPLEMENT_APP(MyApp)
// The `main program' equivalent, creating the windows and returning the // The `main program' equivalent, creating the windows and returning the
// main frame // main frame
bool MyApp::OnInit(void) bool MyApp::OnInit(void)
@@ -51,11 +52,7 @@ bool MyApp::OnInit(void)
frame->CreateStatusBar(); frame->CreateStatusBar();
// Give it an icon // Give it an icon
#ifdef __WXMSW__ frame->SetIcon(wxICON(mondrian));
frame->SetIcon(wxIcon("mondrian"));
#else
frame->SetIcon( wxIcon(mondrian_xpm) );
#endif
// Make a menubar // Make a menubar
wxMenu *fileMenu = new wxMenu; wxMenu *fileMenu = new wxMenu;
@@ -92,8 +89,6 @@ bool MyApp::OnInit(void)
bool MyApp::InitToolbar(wxToolBar* toolBar) bool MyApp::InitToolbar(wxToolBar* toolBar)
{ {
toolBar->SetMargins(5, 5);
// Set up toolbar // Set up toolbar
wxBitmap* toolBarBitmaps[8]; wxBitmap* toolBarBitmaps[8];
@@ -167,7 +162,7 @@ END_EVENT_TABLE()
// Define my frame constructor // Define my frame constructor
MyFrame::MyFrame(wxFrame* parent, wxWindowID id, const wxString& title, const wxPoint& pos, MyFrame::MyFrame(wxFrame* parent, wxWindowID id, const wxString& title, const wxPoint& pos,
const wxSize& size, long style): const wxSize& size, long style):
wxFrame(parent, id, title, pos, size, style) wxFrame(parent, id, title, pos, size, style), m_timer(this)
{ {
m_textWindow = new wxTextCtrl(this, -1, "", wxPoint(0, 0), wxSize(-1, -1), wxTE_MULTILINE); m_textWindow = new wxTextCtrl(this, -1, "", wxPoint(0, 0), wxSize(-1, -1), wxTE_MULTILINE);
} }
@@ -179,7 +174,10 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{ {
(void)wxMessageBox("wxWindows wxToolBar demo\n", "About wxToolBar"); // (void)wxMessageBox("wxWindows wxToolBar demo\n", "About wxToolBar");
wxLogStatus("Started timer.");
m_timer.Start(500, TRUE);
} }
// Define the behaviour for the frame closing // Define the behaviour for the frame closing

View File

@@ -17,6 +17,17 @@ class MyApp: public wxApp
bool InitToolbar(wxToolBar* toolBar); bool InitToolbar(wxToolBar* toolBar);
}; };
class MyTimer : public wxTimer
{
public:
MyTimer(wxFrame *frame) { m_frame = frame; }
virtual void Notify() { wxLogStatus(m_frame, "Timer arrived!"); }
private:
wxFrame *m_frame;
};
// Define a new frame // Define a new frame
class MyFrame: public wxFrame class MyFrame: public wxFrame
{ {
@@ -34,6 +45,8 @@ public:
private: private:
wxTextCtrl* m_textWindow; wxTextCtrl* m_textWindow;
MyTimer m_timer;
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
}; };

View File

@@ -6,7 +6,7 @@
// Created: 01/02/97 // Created: 01/02/97
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) Julian Smart and Markus Holzem // Copyright: (c) Julian Smart and Markus Holzem
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__ #ifdef __GNUG__
@@ -50,7 +50,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxColourData, wxObject)
* wxColourData * wxColourData
*/ */
wxColourData::wxColourData(void) wxColourData::wxColourData()
{ {
int i; int i;
for (i = 0; i < 16; i++) for (i = 0; i < 16; i++)
@@ -60,7 +60,7 @@ wxColourData::wxColourData(void)
dataColour.Set(0,0,0); dataColour.Set(0,0,0);
} }
wxColourData::~wxColourData(void) wxColourData::~wxColourData()
{ {
} }
@@ -94,7 +94,7 @@ void wxColourData::operator=(const wxColourData& data)
* Font data * Font data
*/ */
wxFontData::wxFontData(void) wxFontData::wxFontData()
{ {
// Intialize colour to black. // Intialize colour to black.
fontColour.Set(0, 0, 0); fontColour.Set(0, 0, 0);
@@ -106,7 +106,7 @@ wxFontData::wxFontData(void)
maxSize = 0; maxSize = 0;
} }
wxFontData::~wxFontData(void) wxFontData::~wxFontData()
{ {
} }
@@ -126,7 +126,7 @@ void wxFontData::operator=(const wxFontData& data)
* Print data * Print data
*/ */
wxPrintData::wxPrintData(void) wxPrintData::wxPrintData()
{ {
#ifdef __WXMSW__ #ifdef __WXMSW__
printData = NULL; printData = NULL;
@@ -147,7 +147,7 @@ wxPrintData::wxPrintData(void)
printSetupDialog = FALSE; printSetupDialog = FALSE;
} }
wxPrintData::~wxPrintData(void) wxPrintData::~wxPrintData()
{ {
#ifdef __WXMSW__ #ifdef __WXMSW__
PRINTDLG *pd = (PRINTDLG *)printData; PRINTDLG *pd = (PRINTDLG *)printData;
@@ -159,7 +159,7 @@ wxPrintData::~wxPrintData(void)
} }
#ifdef __WXMSW__ #ifdef __WXMSW__
void wxPrintData::ConvertToNative(void) void wxPrintData::ConvertToNative()
{ {
PRINTDLG *pd = (PRINTDLG*) printData; PRINTDLG *pd = (PRINTDLG*) printData;
if ( pd == NULL ) if ( pd == NULL )
@@ -174,8 +174,6 @@ void wxPrintData::ConvertToNative(void)
pd->hDevMode = NULL; // Will be created by PrintDlg pd->hDevMode = NULL; // Will be created by PrintDlg
pd->hDevNames = NULL; // Ditto pd->hDevNames = NULL; // Ditto
// Why had I put this #ifdef in?? Seems fine to me.
#if 1
pd->Flags = PD_RETURNDEFAULT; pd->Flags = PD_RETURNDEFAULT;
pd->nCopies = 1; pd->nCopies = 1;
@@ -196,7 +194,6 @@ void wxPrintData::ConvertToNative(void)
GlobalFree(pd->hDevNames); GlobalFree(pd->hDevNames);
pd->hDevNames = NULL; pd->hDevNames = NULL;
} }
#endif
} }
if ( pd->hDevMode ) if ( pd->hDevMode )
@@ -245,7 +242,7 @@ void wxPrintData::ConvertToNative(void)
pd->Flags |= PD_PRINTSETUP; pd->Flags |= PD_PRINTSETUP;
} }
void wxPrintData::ConvertFromNative(void) void wxPrintData::ConvertFromNative()
{ {
PRINTDLG *pd = (PRINTDLG*) printData; PRINTDLG *pd = (PRINTDLG*) printData;
if ( pd == NULL ) if ( pd == NULL )
@@ -308,7 +305,7 @@ void wxPrintData::operator=(const wxPrintData& data)
* wxPageSetupData * wxPageSetupData
*/ */
wxPageSetupData::wxPageSetupData(void) wxPageSetupData::wxPageSetupData()
{ {
#if defined(__WIN95__) #if defined(__WIN95__)
m_pageSetupData = NULL; m_pageSetupData = NULL;
@@ -330,7 +327,7 @@ wxPageSetupData::wxPageSetupData(void)
m_getDefaultInfo = FALSE; m_getDefaultInfo = FALSE;
} }
wxPageSetupData::~wxPageSetupData(void) wxPageSetupData::~wxPageSetupData()
{ {
#if defined(__WIN95__) && defined(__WXMSW__) #if defined(__WIN95__) && defined(__WXMSW__)
PAGESETUPDLG *pd = (PAGESETUPDLG *)m_pageSetupData; PAGESETUPDLG *pd = (PAGESETUPDLG *)m_pageSetupData;
@@ -360,7 +357,7 @@ void wxPageSetupData::operator=(const wxPageSetupData& data)
} }
#if defined(__WXMSW__) && defined(__WIN95__) #if defined(__WXMSW__) && defined(__WIN95__)
void wxPageSetupData::ConvertToNative(void) void wxPageSetupData::ConvertToNative()
{ {
PAGESETUPDLG *pd = (PAGESETUPDLG*) m_pageSetupData; PAGESETUPDLG *pd = (PAGESETUPDLG*) m_pageSetupData;
if ( m_pageSetupData == NULL ) if ( m_pageSetupData == NULL )
@@ -422,7 +419,7 @@ void wxPageSetupData::ConvertToNative(void)
} }
} }
void wxPageSetupData::ConvertFromNative(void) void wxPageSetupData::ConvertFromNative()
{ {
PAGESETUPDLG *pd = (PAGESETUPDLG *) m_pageSetupData ; PAGESETUPDLG *pd = (PAGESETUPDLG *) m_pageSetupData ;
if ( !pd ) if ( !pd )

View File

@@ -211,15 +211,14 @@ bool wxConfigBase::Write(const wxString& key, bool value)
} }
wxString wxConfigBase::ExpandEnvVars(const wxString& str) const wxString wxConfigBase::ExpandEnvVars(const wxString& str) const
{ {
wxString tmp; // Required for BC++ wxString tmp; // Required for BC++
if (IsExpandingEnvVars()) if (IsExpandingEnvVars())
tmp = wxExpandEnvVars(str); tmp = wxExpandEnvVars(str);
else else
tmp = str; tmp = str;
return tmp; return tmp;
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxConfigPathChanger // wxConfigPathChanger
@@ -410,5 +409,3 @@ void wxSplitPath(wxArrayString& aParts, const char *sz)
pc++; pc++;
} }
} }

View File

@@ -6,7 +6,7 @@
// Created: 01/02/97 // Created: 01/02/97
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) Julian Smart and Markus Holzem // Copyright: (c) Julian Smart and Markus Holzem
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__ #ifdef __GNUG__
@@ -327,13 +327,13 @@ wxString wxColourDatabase::FindName (const wxColour& colour) const
wxColour *col = (wxColour *) node->Data (); wxColour *col = (wxColour *) node->Data ();
if (col->Red () == red && col->Green () == green && col->Blue () == blue) if (col->Red () == red && col->Green () == green && col->Blue () == blue)
{ {
const char *found = node->GetKeyString(); const char *found = node->GetKeyString();
if (found) if (found)
return wxString(found); return wxString(found);
} }
} }
return wxString(""); // Not Found return wxString(""); // Not Found
} }
@@ -393,8 +393,7 @@ void wxInitializeStockObjects ()
wxCROSS_CURSOR = new wxCursor (wxCURSOR_CROSS); wxCROSS_CURSOR = new wxCursor (wxCURSOR_CROSS);
} }
void void wxDeleteStockObjects ()
wxDeleteStockObjects ()
{ {
wxDELETE(wxNORMAL_FONT); wxDELETE(wxNORMAL_FONT);
wxDELETE(wxSMALL_FONT); wxDELETE(wxSMALL_FONT);
@@ -494,12 +493,12 @@ wxPen *wxPenList::FindOrCreatePen (const wxColour& colour, int width, int style)
{ {
wxPen *each_pen = (wxPen *) node->Data (); wxPen *each_pen = (wxPen *) node->Data ();
if (each_pen && each_pen->GetVisible() && if (each_pen && each_pen->GetVisible() &&
each_pen->GetWidth () == width && each_pen->GetWidth () == width &&
each_pen->GetStyle () == style && each_pen->GetStyle () == style &&
each_pen->GetColour ().Red () == colour.Red () && each_pen->GetColour ().Red () == colour.Red () &&
each_pen->GetColour ().Green () == colour.Green () && each_pen->GetColour ().Green () == colour.Green () &&
each_pen->GetColour ().Blue () == colour.Blue ()) each_pen->GetColour ().Blue () == colour.Blue ())
return each_pen; return each_pen;
} }
wxPen *pen = new wxPen (colour, width, style); wxPen *pen = new wxPen (colour, width, style);
@@ -537,11 +536,11 @@ wxBrush *wxBrushList::FindOrCreateBrush (const wxColour& colour, int style)
{ {
wxBrush *each_brush = (wxBrush *) node->Data (); wxBrush *each_brush = (wxBrush *) node->Data ();
if (each_brush && each_brush->GetVisible() && if (each_brush && each_brush->GetVisible() &&
each_brush->GetStyle () == style && each_brush->GetStyle () == style &&
each_brush->GetColour ().Red () == colour.Red () && each_brush->GetColour ().Red () == colour.Red () &&
each_brush->GetColour ().Green () == colour.Green () && each_brush->GetColour ().Green () == colour.Green () &&
each_brush->GetColour ().Blue () == colour.Blue ()) each_brush->GetColour ().Blue () == colour.Blue ())
return each_brush; return each_brush;
} }
// Yes, we can return a pointer to this in a later FindOrCreateBrush call, // Yes, we can return a pointer to this in a later FindOrCreateBrush call,
// because we created it within FindOrCreateBrush. Safeguards against // because we created it within FindOrCreateBrush. Safeguards against
@@ -562,14 +561,14 @@ wxFontList::~wxFontList ()
wxNode *node = First (); wxNode *node = First ();
while (node) while (node)
{ {
// Only delete objects that are 'visible', i.e. // Only delete objects that are 'visible', i.e.
// that have been created using FindOrCreate..., // that have been created using FindOrCreate...,
// where the pointers are expected to be shared // where the pointers are expected to be shared
// (and therefore not deleted by any one part of an app). // (and therefore not deleted by any one part of an app).
wxFont *font = (wxFont *) node->Data (); wxFont *font = (wxFont *) node->Data ();
wxNode *next = node->Next (); wxNode *next = node->Next ();
if (font->GetVisible()) if (font->GetVisible())
delete font; delete font;
node = next; node = next;
} }
} }
@@ -585,23 +584,23 @@ void wxFontList::RemoveFont (wxFont * font)
} }
wxFont *wxFontList:: wxFont *wxFontList::
FindOrCreateFont (int PointSize, int FamilyOrFontId, int Style, int Weight, bool underline, const wxString& Face) FindOrCreateFont (int PointSize, int FamilyOrFontId, int Style, int Weight, bool underline, const wxString& Face)
{ {
for (wxNode * node = First (); node; node = node->Next ()) for (wxNode * node = First (); node; node = node->Next ())
{ {
wxFont *each_font = (wxFont *) node->Data (); wxFont *each_font = (wxFont *) node->Data ();
if (each_font && each_font->GetVisible() && each_font->Ok() && if (each_font && each_font->GetVisible() && each_font->Ok() &&
each_font->GetPointSize () == PointSize && each_font->GetPointSize () == PointSize &&
each_font->GetStyle () == Style && each_font->GetStyle () == Style &&
each_font->GetWeight () == Weight && each_font->GetWeight () == Weight &&
each_font->GetUnderlined () == underline && each_font->GetUnderlined () == underline &&
//#if defined(__X__) //#if defined(__X__)
// each_font->GetFontId () == FamilyOrFontId) /* New font system */ // each_font->GetFontId () == FamilyOrFontId) /* New font system */
//#else //#else
each_font->GetFamily () == FamilyOrFontId && each_font->GetFamily () == FamilyOrFontId &&
(!each_font->GetFaceName() || each_font->GetFaceName() == Face)) (!each_font->GetFaceName() || each_font->GetFaceName() == Face))
//#endif //#endif
return each_font; return each_font;
} }
wxFont *font = new wxFont (PointSize, FamilyOrFontId, Style, Weight, underline, Face); wxFont *font = new wxFont (PointSize, FamilyOrFontId, Style, Weight, underline, Face);
font->SetVisible(TRUE); font->SetVisible(TRUE);
@@ -609,9 +608,14 @@ wxFont *wxFontList::
} }
void wxBitmapList::AddBitmap(wxBitmap *bitmap) void wxBitmapList::AddBitmap(wxBitmap *bitmap)
{ Append(bitmap); } {
Append(bitmap);
}
void wxBitmapList::RemoveBitmap(wxBitmap *bitmap) void wxBitmapList::RemoveBitmap(wxBitmap *bitmap)
{ DeleteObject(bitmap); } {
DeleteObject(bitmap);
}
wxSize wxGetDisplaySize() wxSize wxGetDisplaySize()
{ {
@@ -620,7 +624,8 @@ wxSize wxGetDisplaySize()
return wxSize(x, y); return wxSize(x, y);
} }
wxResourceCache::~wxResourceCache () { wxResourceCache::~wxResourceCache ()
{
wxNode *node = First (); wxNode *node = First ();
while (node) { while (node) {
wxGDIObject *item = (wxGDIObject *)node->Data(); wxGDIObject *item = (wxGDIObject *)node->Data();

View File

@@ -2102,7 +2102,7 @@ wxBitmap wxResourceCreateBitmap(const wxString& resource, wxResourceTable *table
{ {
wxLogWarning(_("Failed to find XBM resource %s.\n" wxLogWarning(_("Failed to find XBM resource %s.\n"
"Forgot to use wxResourceLoadBitmapData?"), (const char*) name); "Forgot to use wxResourceLoadBitmapData?"), (const char*) name);
return (wxBitmap *) NULL; return wxNullBitmap;
} }
return wxBitmap(item->GetValue1(), (int)item->GetValue2(), (int)item->GetValue3()) ; return wxBitmap(item->GetValue1(), (int)item->GetValue2(), (int)item->GetValue3()) ;
#else #else
@@ -2118,7 +2118,7 @@ wxBitmap wxResourceCreateBitmap(const wxString& resource, wxResourceTable *table
{ {
wxLogWarning(_("Failed to find XPM resource %s.\n" wxLogWarning(_("Failed to find XPM resource %s.\n"
"Forgot to use wxResourceLoadBitmapData?"), (const char*) name); "Forgot to use wxResourceLoadBitmapData?"), (const char*) name);
return (wxBitmap *) NULL; return wxNullBitmap;
} }
return wxBitmap(item->GetValue1()); return wxBitmap(item->GetValue1());
#else #else
@@ -2257,7 +2257,7 @@ wxIcon wxResourceCreateIcon(const wxString& resource, wxResourceTable *table)
{ {
wxLogWarning(_("Failed to find XBM resource %s.\n" wxLogWarning(_("Failed to find XBM resource %s.\n"
"Forgot to use wxResourceLoadIconData?"), (const char*) name); "Forgot to use wxResourceLoadIconData?"), (const char*) name);
return (wxIcon *) NULL; return wxNullIcon;
} }
return wxIcon((const char **)item->GetValue1(), (int)item->GetValue2(), (int)item->GetValue3()); return wxIcon((const char **)item->GetValue1(), (int)item->GetValue2(), (int)item->GetValue3());
#else #else

View File

@@ -4,7 +4,7 @@
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
// Copyright: (c) 1998 Robert Roebling, Julian Smart // Copyright: (c) 1998 Robert Roebling, Julian Smart
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__ #ifdef __GNUG__
@@ -213,8 +213,8 @@ bool wxApp::SendIdleEvents(void)
wxNode* node = wxTopLevelWindows.First(); wxNode* node = wxTopLevelWindows.First();
while (node) while (node)
{ {
wxWindow* win = (wxWindow*) node->Data(); wxWindow* win = (wxWindow*) node->Data();
if (SendIdleEvents(win)) if (SendIdleEvents(win))
needMore = TRUE; needMore = TRUE;
node = node->Next(); node = node->Next();
} }
@@ -225,22 +225,22 @@ bool wxApp::SendIdleEvents( wxWindow* win )
{ {
bool needMore = FALSE; bool needMore = FALSE;
wxIdleEvent event; wxIdleEvent event;
event.SetEventObject(win); event.SetEventObject(win);
win->ProcessEvent(event); win->ProcessEvent(event);
if (event.MoreRequested()) if (event.MoreRequested())
needMore = TRUE; needMore = TRUE;
wxNode* node = win->GetChildren()->First(); wxNode* node = win->GetChildren().First();
while (node) while (node)
{ {
wxWindow* win = (wxWindow*) node->Data(); wxWindow* win = (wxWindow*) node->Data();
if (SendIdleEvents(win)) if (SendIdleEvents(win))
needMore = TRUE; needMore = TRUE;
node = node->Next(); node = node->Next();
} }
return needMore ; return needMore ;
} }

View File

@@ -4,7 +4,7 @@
// Author: Robert Roebling // Author: Robert Roebling
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) 1998 Robert Roebling // Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__ #ifdef __GNUG__
@@ -24,7 +24,7 @@
IMPLEMENT_DYNAMIC_CLASS(wxMask,wxObject) IMPLEMENT_DYNAMIC_CLASS(wxMask,wxObject)
wxMask::wxMask(void) wxMask::wxMask()
{ {
m_bitmap = (GdkBitmap *) NULL; m_bitmap = (GdkBitmap *) NULL;
} }
@@ -41,7 +41,7 @@ wxMask::wxMask( const wxBitmap& WXUNUSED(bitmap) )
{ {
} }
wxMask::~wxMask(void) wxMask::~wxMask()
{ {
if (m_bitmap) gdk_bitmap_unref( m_bitmap ); if (m_bitmap) gdk_bitmap_unref( m_bitmap );
} }
@@ -70,7 +70,7 @@ public:
wxPalette *m_palette; wxPalette *m_palette;
}; };
wxBitmapRefData::wxBitmapRefData(void) wxBitmapRefData::wxBitmapRefData()
{ {
m_pixmap = (GdkPixmap *) NULL; m_pixmap = (GdkPixmap *) NULL;
m_bitmap = (GdkBitmap *) NULL; m_bitmap = (GdkBitmap *) NULL;
@@ -81,7 +81,7 @@ wxBitmapRefData::wxBitmapRefData(void)
m_palette = (wxPalette *) NULL; m_palette = (wxPalette *) NULL;
} }
wxBitmapRefData::~wxBitmapRefData(void) wxBitmapRefData::~wxBitmapRefData()
{ {
if (m_pixmap) gdk_pixmap_unref( m_pixmap ); if (m_pixmap) gdk_pixmap_unref( m_pixmap );
if (m_bitmap) gdk_bitmap_unref( m_bitmap ); if (m_bitmap) gdk_bitmap_unref( m_bitmap );
@@ -95,7 +95,7 @@ wxBitmapRefData::~wxBitmapRefData(void)
IMPLEMENT_DYNAMIC_CLASS(wxBitmap,wxGDIObject) IMPLEMENT_DYNAMIC_CLASS(wxBitmap,wxGDIObject)
wxBitmap::wxBitmap(void) wxBitmap::wxBitmap()
{ {
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this); if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
} }
@@ -173,13 +173,6 @@ wxBitmap::wxBitmap( const wxBitmap& bmp )
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this); if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
} }
wxBitmap::wxBitmap( const wxBitmap* bmp )
{
if (bmp) Ref( *bmp );
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
}
wxBitmap::wxBitmap( const wxString &filename, int type ) wxBitmap::wxBitmap( const wxString &filename, int type )
{ {
LoadFile( filename, type ); LoadFile( filename, type );
@@ -203,7 +196,7 @@ wxBitmap::wxBitmap( const char bits[], int width, int height, int WXUNUSED(depth
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this); if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
} }
wxBitmap::~wxBitmap(void) wxBitmap::~wxBitmap()
{ {
if (wxTheBitmapList) wxTheBitmapList->DeleteObject(this); if (wxTheBitmapList) wxTheBitmapList->DeleteObject(this);
} }

View File

@@ -21,7 +21,7 @@ class wxBrushRefData: public wxObjectRefData
{ {
public: public:
wxBrushRefData(void); wxBrushRefData();
wxBrushRefData( const wxBrushRefData& data ); wxBrushRefData( const wxBrushRefData& data );
int m_style; int m_style;
@@ -29,7 +29,7 @@ class wxBrushRefData: public wxObjectRefData
wxColour m_colour; wxColour m_colour;
}; };
wxBrushRefData::wxBrushRefData(void) wxBrushRefData::wxBrushRefData()
{ {
m_style = 0; m_style = 0;
} }
@@ -47,7 +47,7 @@ wxBrushRefData::wxBrushRefData( const wxBrushRefData& data )
IMPLEMENT_DYNAMIC_CLASS(wxBrush,wxGDIObject) IMPLEMENT_DYNAMIC_CLASS(wxBrush,wxGDIObject)
wxBrush::wxBrush(void) wxBrush::wxBrush()
{ {
if (wxTheBrushList) wxTheBrushList->AddBrush( this ); if (wxTheBrushList) wxTheBrushList->AddBrush( this );
} }
@@ -78,14 +78,7 @@ wxBrush::wxBrush( const wxBrush &brush )
if (wxTheBrushList) wxTheBrushList->AddBrush( this ); if (wxTheBrushList) wxTheBrushList->AddBrush( this );
} }
wxBrush::wxBrush( const wxBrush *brush ) wxBrush::~wxBrush()
{
if (brush) Ref( *brush );
if (wxTheBrushList) wxTheBrushList->Append( this );
}
wxBrush::~wxBrush(void)
{ {
if (wxTheBrushList) wxTheBrushList->RemoveBrush( this ); if (wxTheBrushList) wxTheBrushList->RemoveBrush( this );
} }
@@ -107,12 +100,12 @@ bool wxBrush::operator != ( const wxBrush& brush )
return m_refData != brush.m_refData; return m_refData != brush.m_refData;
} }
bool wxBrush::Ok(void) const bool wxBrush::Ok() const
{ {
return ((m_refData) && M_BRUSHDATA->m_colour.Ok()); return ((m_refData) && M_BRUSHDATA->m_colour.Ok());
} }
int wxBrush::GetStyle(void) const int wxBrush::GetStyle() const
{ {
if (m_refData == NULL) if (m_refData == NULL)
{ {
@@ -123,7 +116,7 @@ int wxBrush::GetStyle(void) const
return M_BRUSHDATA->m_style; return M_BRUSHDATA->m_style;
} }
wxColour &wxBrush::GetColour(void) const wxColour &wxBrush::GetColour() const
{ {
if (m_refData == NULL) if (m_refData == NULL)
{ {
@@ -134,7 +127,7 @@ wxColour &wxBrush::GetColour(void) const
return M_BRUSHDATA->m_colour; return M_BRUSHDATA->m_colour;
} }
wxBitmap *wxBrush::GetStipple(void) const wxBitmap *wxBrush::GetStipple() const
{ {
if (m_refData == NULL) if (m_refData == NULL)
{ {
@@ -169,7 +162,7 @@ void wxBrush::SetStipple( const wxBitmap& stipple )
M_BRUSHDATA->m_stipple = stipple; M_BRUSHDATA->m_stipple = stipple;
} }
void wxBrush::Unshare(void) void wxBrush::Unshare()
{ {
if (!m_refData) if (!m_refData)
{ {

View File

@@ -4,7 +4,7 @@
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
// Copyright: (c) 1998 Robert Roebling // Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@@ -102,11 +102,6 @@ wxColour::wxColour( const wxColour& col )
Ref( col ); Ref( col );
} }
wxColour::wxColour( const wxColour* col )
{
if (col) Ref( *col );
}
wxColour::~wxColour() wxColour::~wxColour()
{ {
} }

View File

@@ -4,7 +4,7 @@
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
// Copyright: (c) 1998 Robert Roebling // Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@@ -22,18 +22,18 @@ class wxCursorRefData: public wxObjectRefData
{ {
public: public:
wxCursorRefData(void); wxCursorRefData();
~wxCursorRefData(void); ~wxCursorRefData();
GdkCursor *m_cursor; GdkCursor *m_cursor;
}; };
wxCursorRefData::wxCursorRefData(void) wxCursorRefData::wxCursorRefData()
{ {
m_cursor = (GdkCursor *) NULL; m_cursor = (GdkCursor *) NULL;
} }
wxCursorRefData::~wxCursorRefData(void) wxCursorRefData::~wxCursorRefData()
{ {
if (m_cursor) gdk_cursor_destroy( m_cursor ); if (m_cursor) gdk_cursor_destroy( m_cursor );
} }
@@ -44,7 +44,7 @@ wxCursorRefData::~wxCursorRefData(void)
IMPLEMENT_DYNAMIC_CLASS(wxCursor,wxObject) IMPLEMENT_DYNAMIC_CLASS(wxCursor,wxObject)
wxCursor::wxCursor(void) wxCursor::wxCursor()
{ {
} }
@@ -103,13 +103,7 @@ wxCursor::wxCursor( const wxCursor &cursor )
Ref( cursor ); Ref( cursor );
} }
wxCursor::wxCursor( const wxCursor *cursor ) wxCursor::~wxCursor()
{
UnRef();
if (cursor) Ref( *cursor );
}
wxCursor::~wxCursor(void)
{ {
} }
@@ -120,22 +114,22 @@ wxCursor& wxCursor::operator = ( const wxCursor& cursor )
return *this; return *this;
} }
bool wxCursor::operator == ( const wxCursor& cursor ) bool wxCursor::operator == ( const wxCursor& cursor ) const
{ {
return m_refData == cursor.m_refData; return m_refData == cursor.m_refData;
} }
bool wxCursor::operator != ( const wxCursor& cursor ) bool wxCursor::operator != ( const wxCursor& cursor ) const
{ {
return m_refData != cursor.m_refData; return m_refData != cursor.m_refData;
} }
bool wxCursor::Ok(void) const bool wxCursor::Ok() const
{ {
return (m_refData != NULL); return (m_refData != NULL);
} }
GdkCursor *wxCursor::GetCursor(void) const GdkCursor *wxCursor::GetCursor() const
{ {
return M_CURSORDATA->m_cursor; return M_CURSORDATA->m_cursor;
} }
@@ -146,7 +140,7 @@ GdkCursor *wxCursor::GetCursor(void) const
bool g_isBusy = FALSE; bool g_isBusy = FALSE;
void wxEndBusyCursor(void) void wxEndBusyCursor()
{ {
g_isBusy = FALSE; g_isBusy = FALSE;
} }
@@ -156,7 +150,7 @@ void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) )
g_isBusy = TRUE; g_isBusy = TRUE;
} }
bool wxIsBusy(void) bool wxIsBusy()
{ {
return g_isBusy; return g_isBusy;
} }

File diff suppressed because it is too large Load Diff

View File

@@ -190,10 +190,10 @@ bool wxFrame::Show( bool show )
if (show && !m_sizeSet) if (show && !m_sizeSet)
{ {
// by calling GtkOnSize here, we don't have to call // by calling GtkOnSize here, we don't have to call
// either after showing the frame, which would entail // either after showing the frame, which would entail
// much ugly flicker nor from within the size_allocate // much ugly flicker nor from within the size_allocate
// handler, because GTK 1.1.X forbids that. // handler, because GTK 1.1.X forbids that.
GtkOnSize( m_x, m_y, m_width, m_height ); GtkOnSize( m_x, m_y, m_width, m_height );
} }
@@ -382,9 +382,9 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height
if (m_frameMenuBar) if (m_frameMenuBar)
{ {
int xx = m_miniEdge; int xx = m_miniEdge;
int yy = m_miniEdge + m_miniTitle; int yy = m_miniEdge + m_miniTitle;
int ww = m_width - 2*m_miniEdge; int ww = m_width - 2*m_miniEdge;
int hh = wxMENU_HEIGHT; int hh = wxMENU_HEIGHT;
m_frameMenuBar->m_x = xx; m_frameMenuBar->m_x = xx;
m_frameMenuBar->m_y = yy; m_frameMenuBar->m_y = yy;
m_frameMenuBar->m_width = ww; m_frameMenuBar->m_width = ww;
@@ -397,9 +397,9 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height
if (m_frameToolBar) if (m_frameToolBar)
{ {
int xx = m_miniEdge; int xx = m_miniEdge;
int yy = m_miniEdge + m_miniTitle; int yy = m_miniEdge + m_miniTitle;
if (m_frameMenuBar) yy += wxMENU_HEIGHT; if (m_frameMenuBar) yy += wxMENU_HEIGHT;
int ww = m_width - 2*m_miniEdge; int ww = m_width - 2*m_miniEdge;
int hh = m_frameToolBar->m_height; int hh = m_frameToolBar->m_height;
m_frameToolBar->m_x = xx; m_frameToolBar->m_x = xx;
@@ -414,9 +414,9 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height
if (m_frameStatusBar) if (m_frameStatusBar)
{ {
int xx = 0 + m_miniEdge; int xx = 0 + m_miniEdge;
int yy = m_height - wxSTATUS_HEIGHT - m_miniEdge; int yy = m_height - wxSTATUS_HEIGHT - m_miniEdge;
int ww = m_width - 2*m_miniEdge; int ww = m_width - 2*m_miniEdge;
int hh = wxSTATUS_HEIGHT; int hh = wxSTATUS_HEIGHT;
m_frameStatusBar->m_x = xx; m_frameStatusBar->m_x = xx;
m_frameStatusBar->m_y = yy; m_frameStatusBar->m_y = yy;
@@ -470,7 +470,7 @@ void wxFrame::OnSize( wxSizeEvent &WXUNUSED(event) )
#endif #endif
) )
{ {
// it's the second one: do nothing // it's the second one: do nothing
if (child) return; if (child) return;
child = win; child = win;
} }
@@ -524,7 +524,7 @@ void wxFrame::SetMenuBar( wxMenuBar *menuBar )
if (m_sizeSet) GtkOnSize( m_x, m_y, m_width, m_height ); if (m_sizeSet) GtkOnSize( m_x, m_y, m_width, m_height );
} }
wxMenuBar *wxFrame::GetMenuBar(void) const wxMenuBar *wxFrame::GetMenuBar() const
{ {
return m_frameMenuBar; return m_frameMenuBar;
} }
@@ -549,7 +549,7 @@ wxToolBar* wxFrame::OnCreateToolBar( long style, wxWindowID id, const wxString&
return new wxToolBar( this, id, wxDefaultPosition, wxDefaultSize, style, name ); return new wxToolBar( this, id, wxDefaultPosition, wxDefaultSize, style, name );
} }
wxToolBar *wxFrame::GetToolBar(void) const wxToolBar *wxFrame::GetToolBar() const
{ {
return m_frameToolBar; return m_frameToolBar;
} }
@@ -575,7 +575,7 @@ wxStatusBar *wxFrame::OnCreateStatusBar( int number, long style, wxWindowID id,
// Set the height according to the font and the border size // Set the height according to the font and the border size
wxClientDC dc(statusBar); wxClientDC dc(statusBar);
dc.SetFont( *statusBar->GetFont() ); dc.SetFont( statusBar->GetFont() );
long x, y; long x, y;
dc.GetTextExtent( "X", &x, &y ); dc.GetTextExtent( "X", &x, &y );
@@ -606,7 +606,7 @@ void wxFrame::SetStatusWidths(int n, const int widths_field[] )
m_frameStatusBar->SetStatusWidths(n, widths_field); m_frameStatusBar->SetStatusWidths(n, widths_field);
} }
wxStatusBar *wxFrame::GetStatusBar(void) const wxStatusBar *wxFrame::GetStatusBar() const
{ {
return m_frameStatusBar; return m_frameStatusBar;
} }

View File

@@ -38,11 +38,6 @@ wxIcon::wxIcon( const wxIcon& icon ) : wxBitmap()
Ref(icon); Ref(icon);
} }
wxIcon::wxIcon( const wxIcon* icon ) : wxBitmap()
{
if (icon) Ref(*icon);
}
wxIcon& wxIcon::operator = ( const wxIcon& icon ) wxIcon& wxIcon::operator = ( const wxIcon& icon )
{ {
if (*this == icon) return (*this); if (*this == icon) return (*this);

View File

@@ -218,10 +218,9 @@ wxMenuItem::wxMenuItem()
m_menuItem = (GtkWidget *) NULL; m_menuItem = (GtkWidget *) NULL;
} }
// it's valid for this function to be called even if m_menuItem == NULL
void wxMenuItem::SetName(const wxString& str) void wxMenuItem::SetName(const wxString& str)
{ {
wxCHECK_RET( m_menuItem, "invalid menu item" );
m_text = ""; m_text = "";
for ( const char *pc = str; *pc != '\0'; pc++ ) for ( const char *pc = str; *pc != '\0'; pc++ )
{ {
@@ -231,9 +230,12 @@ void wxMenuItem::SetName(const wxString& str)
m_text << *pc; m_text << *pc;
} }
GtkLabel *label = GTK_LABEL( GTK_BIN(m_menuItem)->child ); if ( m_menuItem )
{
GtkLabel *label = GTK_LABEL( GTK_BIN(m_menuItem)->child );
gtk_label_set( label, m_text.c_str()); gtk_label_set( label, m_text.c_str());
}
} }
void wxMenuItem::Check( bool check ) void wxMenuItem::Check( bool check )

View File

@@ -29,12 +29,12 @@ class wxPaletteRefData: public wxObjectRefData
GdkColormap *m_colormap; GdkColormap *m_colormap;
}; };
wxPaletteRefData::wxPaletteRefData(void) wxPaletteRefData::wxPaletteRefData()
{ {
m_colormap = (GdkColormap *) NULL; m_colormap = (GdkColormap *) NULL;
}; };
wxPaletteRefData::~wxPaletteRefData(void) wxPaletteRefData::~wxPaletteRefData()
{ {
if (m_colormap) gdk_colormap_unref( m_colormap ); if (m_colormap) gdk_colormap_unref( m_colormap );
}; };
@@ -45,7 +45,7 @@ wxPaletteRefData::~wxPaletteRefData(void)
IMPLEMENT_DYNAMIC_CLASS(wxPalette,wxGDIObject) IMPLEMENT_DYNAMIC_CLASS(wxPalette,wxGDIObject)
wxPalette::wxPalette(void) wxPalette::wxPalette()
{ {
}; };
@@ -60,13 +60,7 @@ wxPalette::wxPalette( const wxPalette& palette )
Ref( palette ); Ref( palette );
}; };
wxPalette::wxPalette( const wxPalette* palette ) wxPalette::~wxPalette()
{
UnRef();
if (palette) Ref( *palette );
};
wxPalette::~wxPalette(void)
{ {
}; };

View File

@@ -4,7 +4,7 @@
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
// Copyright: (c) 1998 Robert Roebling // Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@@ -55,7 +55,7 @@ wxPenRefData::wxPenRefData( const wxPenRefData& data )
IMPLEMENT_DYNAMIC_CLASS(wxPen,wxGDIObject) IMPLEMENT_DYNAMIC_CLASS(wxPen,wxGDIObject)
wxPen::wxPen(void) wxPen::wxPen()
{ {
if (wxThePenList) wxThePenList->AddPen( this ); if (wxThePenList) wxThePenList->AddPen( this );
} }
@@ -76,14 +76,6 @@ wxPen::wxPen( const wxPen& pen )
if (wxThePenList) wxThePenList->AddPen( this ); if (wxThePenList) wxThePenList->AddPen( this );
} }
wxPen::wxPen( const wxPen* pen )
{
UnRef();
if (pen) Ref( *pen );
if (wxThePenList) wxThePenList->AddPen( this );
}
wxPen::~wxPen() wxPen::~wxPen()
{ {
if (wxThePenList) wxThePenList->RemovePen( this ); if (wxThePenList) wxThePenList->RemovePen( this );

View File

@@ -109,7 +109,7 @@ static char *GetIniFile(char *dest, const char *filename)
return dest; return dest;
} }
static void wxXMergeDatabases(void) static void wxXMergeDatabases()
{ {
XrmDatabase homeDB, serverDB, applicationDB; XrmDatabase homeDB, serverDB, applicationDB;
char filenamebuf[1024]; char filenamebuf[1024];
@@ -159,7 +159,7 @@ static void wxXMergeDatabases(void)
// called on application exit // called on application exit
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void wxFlushResources(void) void wxFlushResources()
{ {
char nameBuffer[512]; char nameBuffer[512];

View File

@@ -1655,7 +1655,7 @@ void wxWindow::Fit()
int maxX = 0; int maxX = 0;
int maxY = 0; int maxY = 0;
wxNode *node = m_childrenFirst(); wxNode *node = m_children.First();
while ( node ) while ( node )
{ {
wxWindow *win = (wxWindow *)node->Data(); wxWindow *win = (wxWindow *)node->Data();
@@ -1803,11 +1803,6 @@ void wxWindow::AddChild( wxWindow *child )
m_children.Append( child ); m_children.Append( child );
} }
wxList& wxWindow::GetChildren() const
{
return m_children;
}
wxWindow *wxWindow::ReParent( wxWindow *newParent ) wxWindow *wxWindow::ReParent( wxWindow *newParent )
{ {
wxWindow *oldParent = GetParent(); wxWindow *oldParent = GetParent();
@@ -1855,7 +1850,7 @@ void wxWindow::Lower()
if (m_widget) gdk_window_lower( m_widget->window ); if (m_widget) gdk_window_lower( m_widget->window );
} }
wxEvtHandler *wxWindow::GetEventHandler() wxEvtHandler *wxWindow::GetEventHandler() const
{ {
return m_eventHandler; return m_eventHandler;
} }
@@ -1934,7 +1929,7 @@ void wxWindow::SetId( wxWindowID id )
m_windowId = id; m_windowId = id;
} }
wxWindowID wxWindow::GetId() wxWindowID wxWindow::GetId() const
{ {
return m_windowId; return m_windowId;
} }
@@ -1951,7 +1946,8 @@ void wxWindow::SetCursor( const wxCursor &cursor )
if (cursor.Ok()) if (cursor.Ok())
{ {
if (*((wxCursor*)&cursor) == m_cursor) return; if ( cursor == *m_cursor )
return;
*m_cursor = cursor; *m_cursor = cursor;
} }
else else
@@ -2278,11 +2274,6 @@ void wxWindow::SetFont( const wxFont &font )
ApplyWidgetStyle(); ApplyWidgetStyle();
} }
wxFont *wxWindow::GetFont()
{
return &m_font;
}
void wxWindow::SetWindowStyleFlag( long flag ) void wxWindow::SetWindowStyleFlag( long flag )
{ {
m_windowStyle = flag; m_windowStyle = flag;
@@ -2795,7 +2786,7 @@ bool wxWindow::DoPhase(int phase)
{ {
noChanges = 0; noChanges = 0;
noFailures = 0; noFailures = 0;
wxNode *node = m_children.first(); wxNode *node = m_children.First();
while (node) while (node)
{ {
wxWindow *child = (wxWindow *)node->Data(); wxWindow *child = (wxWindow *)node->Data();

View File

@@ -4,7 +4,7 @@
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
// Copyright: (c) 1998 Robert Roebling, Julian Smart // Copyright: (c) 1998 Robert Roebling, Julian Smart
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__ #ifdef __GNUG__
@@ -213,8 +213,8 @@ bool wxApp::SendIdleEvents(void)
wxNode* node = wxTopLevelWindows.First(); wxNode* node = wxTopLevelWindows.First();
while (node) while (node)
{ {
wxWindow* win = (wxWindow*) node->Data(); wxWindow* win = (wxWindow*) node->Data();
if (SendIdleEvents(win)) if (SendIdleEvents(win))
needMore = TRUE; needMore = TRUE;
node = node->Next(); node = node->Next();
} }
@@ -225,22 +225,22 @@ bool wxApp::SendIdleEvents( wxWindow* win )
{ {
bool needMore = FALSE; bool needMore = FALSE;
wxIdleEvent event; wxIdleEvent event;
event.SetEventObject(win); event.SetEventObject(win);
win->ProcessEvent(event); win->ProcessEvent(event);
if (event.MoreRequested()) if (event.MoreRequested())
needMore = TRUE; needMore = TRUE;
wxNode* node = win->GetChildren()->First(); wxNode* node = win->GetChildren().First();
while (node) while (node)
{ {
wxWindow* win = (wxWindow*) node->Data(); wxWindow* win = (wxWindow*) node->Data();
if (SendIdleEvents(win)) if (SendIdleEvents(win))
needMore = TRUE; needMore = TRUE;
node = node->Next(); node = node->Next();
} }
return needMore ; return needMore ;
} }

View File

@@ -4,7 +4,7 @@
// Author: Robert Roebling // Author: Robert Roebling
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) 1998 Robert Roebling // Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__ #ifdef __GNUG__
@@ -24,7 +24,7 @@
IMPLEMENT_DYNAMIC_CLASS(wxMask,wxObject) IMPLEMENT_DYNAMIC_CLASS(wxMask,wxObject)
wxMask::wxMask(void) wxMask::wxMask()
{ {
m_bitmap = (GdkBitmap *) NULL; m_bitmap = (GdkBitmap *) NULL;
} }
@@ -41,7 +41,7 @@ wxMask::wxMask( const wxBitmap& WXUNUSED(bitmap) )
{ {
} }
wxMask::~wxMask(void) wxMask::~wxMask()
{ {
if (m_bitmap) gdk_bitmap_unref( m_bitmap ); if (m_bitmap) gdk_bitmap_unref( m_bitmap );
} }
@@ -70,7 +70,7 @@ public:
wxPalette *m_palette; wxPalette *m_palette;
}; };
wxBitmapRefData::wxBitmapRefData(void) wxBitmapRefData::wxBitmapRefData()
{ {
m_pixmap = (GdkPixmap *) NULL; m_pixmap = (GdkPixmap *) NULL;
m_bitmap = (GdkBitmap *) NULL; m_bitmap = (GdkBitmap *) NULL;
@@ -81,7 +81,7 @@ wxBitmapRefData::wxBitmapRefData(void)
m_palette = (wxPalette *) NULL; m_palette = (wxPalette *) NULL;
} }
wxBitmapRefData::~wxBitmapRefData(void) wxBitmapRefData::~wxBitmapRefData()
{ {
if (m_pixmap) gdk_pixmap_unref( m_pixmap ); if (m_pixmap) gdk_pixmap_unref( m_pixmap );
if (m_bitmap) gdk_bitmap_unref( m_bitmap ); if (m_bitmap) gdk_bitmap_unref( m_bitmap );
@@ -95,7 +95,7 @@ wxBitmapRefData::~wxBitmapRefData(void)
IMPLEMENT_DYNAMIC_CLASS(wxBitmap,wxGDIObject) IMPLEMENT_DYNAMIC_CLASS(wxBitmap,wxGDIObject)
wxBitmap::wxBitmap(void) wxBitmap::wxBitmap()
{ {
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this); if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
} }
@@ -173,13 +173,6 @@ wxBitmap::wxBitmap( const wxBitmap& bmp )
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this); if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
} }
wxBitmap::wxBitmap( const wxBitmap* bmp )
{
if (bmp) Ref( *bmp );
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
}
wxBitmap::wxBitmap( const wxString &filename, int type ) wxBitmap::wxBitmap( const wxString &filename, int type )
{ {
LoadFile( filename, type ); LoadFile( filename, type );
@@ -203,7 +196,7 @@ wxBitmap::wxBitmap( const char bits[], int width, int height, int WXUNUSED(depth
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this); if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
} }
wxBitmap::~wxBitmap(void) wxBitmap::~wxBitmap()
{ {
if (wxTheBitmapList) wxTheBitmapList->DeleteObject(this); if (wxTheBitmapList) wxTheBitmapList->DeleteObject(this);
} }

View File

@@ -21,7 +21,7 @@ class wxBrushRefData: public wxObjectRefData
{ {
public: public:
wxBrushRefData(void); wxBrushRefData();
wxBrushRefData( const wxBrushRefData& data ); wxBrushRefData( const wxBrushRefData& data );
int m_style; int m_style;
@@ -29,7 +29,7 @@ class wxBrushRefData: public wxObjectRefData
wxColour m_colour; wxColour m_colour;
}; };
wxBrushRefData::wxBrushRefData(void) wxBrushRefData::wxBrushRefData()
{ {
m_style = 0; m_style = 0;
} }
@@ -47,7 +47,7 @@ wxBrushRefData::wxBrushRefData( const wxBrushRefData& data )
IMPLEMENT_DYNAMIC_CLASS(wxBrush,wxGDIObject) IMPLEMENT_DYNAMIC_CLASS(wxBrush,wxGDIObject)
wxBrush::wxBrush(void) wxBrush::wxBrush()
{ {
if (wxTheBrushList) wxTheBrushList->AddBrush( this ); if (wxTheBrushList) wxTheBrushList->AddBrush( this );
} }
@@ -78,14 +78,7 @@ wxBrush::wxBrush( const wxBrush &brush )
if (wxTheBrushList) wxTheBrushList->AddBrush( this ); if (wxTheBrushList) wxTheBrushList->AddBrush( this );
} }
wxBrush::wxBrush( const wxBrush *brush ) wxBrush::~wxBrush()
{
if (brush) Ref( *brush );
if (wxTheBrushList) wxTheBrushList->Append( this );
}
wxBrush::~wxBrush(void)
{ {
if (wxTheBrushList) wxTheBrushList->RemoveBrush( this ); if (wxTheBrushList) wxTheBrushList->RemoveBrush( this );
} }
@@ -107,12 +100,12 @@ bool wxBrush::operator != ( const wxBrush& brush )
return m_refData != brush.m_refData; return m_refData != brush.m_refData;
} }
bool wxBrush::Ok(void) const bool wxBrush::Ok() const
{ {
return ((m_refData) && M_BRUSHDATA->m_colour.Ok()); return ((m_refData) && M_BRUSHDATA->m_colour.Ok());
} }
int wxBrush::GetStyle(void) const int wxBrush::GetStyle() const
{ {
if (m_refData == NULL) if (m_refData == NULL)
{ {
@@ -123,7 +116,7 @@ int wxBrush::GetStyle(void) const
return M_BRUSHDATA->m_style; return M_BRUSHDATA->m_style;
} }
wxColour &wxBrush::GetColour(void) const wxColour &wxBrush::GetColour() const
{ {
if (m_refData == NULL) if (m_refData == NULL)
{ {
@@ -134,7 +127,7 @@ wxColour &wxBrush::GetColour(void) const
return M_BRUSHDATA->m_colour; return M_BRUSHDATA->m_colour;
} }
wxBitmap *wxBrush::GetStipple(void) const wxBitmap *wxBrush::GetStipple() const
{ {
if (m_refData == NULL) if (m_refData == NULL)
{ {
@@ -169,7 +162,7 @@ void wxBrush::SetStipple( const wxBitmap& stipple )
M_BRUSHDATA->m_stipple = stipple; M_BRUSHDATA->m_stipple = stipple;
} }
void wxBrush::Unshare(void) void wxBrush::Unshare()
{ {
if (!m_refData) if (!m_refData)
{ {

View File

@@ -4,7 +4,7 @@
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
// Copyright: (c) 1998 Robert Roebling // Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@@ -102,11 +102,6 @@ wxColour::wxColour( const wxColour& col )
Ref( col ); Ref( col );
} }
wxColour::wxColour( const wxColour* col )
{
if (col) Ref( *col );
}
wxColour::~wxColour() wxColour::~wxColour()
{ {
} }

View File

@@ -4,7 +4,7 @@
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
// Copyright: (c) 1998 Robert Roebling // Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@@ -22,18 +22,18 @@ class wxCursorRefData: public wxObjectRefData
{ {
public: public:
wxCursorRefData(void); wxCursorRefData();
~wxCursorRefData(void); ~wxCursorRefData();
GdkCursor *m_cursor; GdkCursor *m_cursor;
}; };
wxCursorRefData::wxCursorRefData(void) wxCursorRefData::wxCursorRefData()
{ {
m_cursor = (GdkCursor *) NULL; m_cursor = (GdkCursor *) NULL;
} }
wxCursorRefData::~wxCursorRefData(void) wxCursorRefData::~wxCursorRefData()
{ {
if (m_cursor) gdk_cursor_destroy( m_cursor ); if (m_cursor) gdk_cursor_destroy( m_cursor );
} }
@@ -44,7 +44,7 @@ wxCursorRefData::~wxCursorRefData(void)
IMPLEMENT_DYNAMIC_CLASS(wxCursor,wxObject) IMPLEMENT_DYNAMIC_CLASS(wxCursor,wxObject)
wxCursor::wxCursor(void) wxCursor::wxCursor()
{ {
} }
@@ -103,13 +103,7 @@ wxCursor::wxCursor( const wxCursor &cursor )
Ref( cursor ); Ref( cursor );
} }
wxCursor::wxCursor( const wxCursor *cursor ) wxCursor::~wxCursor()
{
UnRef();
if (cursor) Ref( *cursor );
}
wxCursor::~wxCursor(void)
{ {
} }
@@ -120,22 +114,22 @@ wxCursor& wxCursor::operator = ( const wxCursor& cursor )
return *this; return *this;
} }
bool wxCursor::operator == ( const wxCursor& cursor ) bool wxCursor::operator == ( const wxCursor& cursor ) const
{ {
return m_refData == cursor.m_refData; return m_refData == cursor.m_refData;
} }
bool wxCursor::operator != ( const wxCursor& cursor ) bool wxCursor::operator != ( const wxCursor& cursor ) const
{ {
return m_refData != cursor.m_refData; return m_refData != cursor.m_refData;
} }
bool wxCursor::Ok(void) const bool wxCursor::Ok() const
{ {
return (m_refData != NULL); return (m_refData != NULL);
} }
GdkCursor *wxCursor::GetCursor(void) const GdkCursor *wxCursor::GetCursor() const
{ {
return M_CURSORDATA->m_cursor; return M_CURSORDATA->m_cursor;
} }
@@ -146,7 +140,7 @@ GdkCursor *wxCursor::GetCursor(void) const
bool g_isBusy = FALSE; bool g_isBusy = FALSE;
void wxEndBusyCursor(void) void wxEndBusyCursor()
{ {
g_isBusy = FALSE; g_isBusy = FALSE;
} }
@@ -156,7 +150,7 @@ void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) )
g_isBusy = TRUE; g_isBusy = TRUE;
} }
bool wxIsBusy(void) bool wxIsBusy()
{ {
return g_isBusy; return g_isBusy;
} }

File diff suppressed because it is too large Load Diff

View File

@@ -190,10 +190,10 @@ bool wxFrame::Show( bool show )
if (show && !m_sizeSet) if (show && !m_sizeSet)
{ {
// by calling GtkOnSize here, we don't have to call // by calling GtkOnSize here, we don't have to call
// either after showing the frame, which would entail // either after showing the frame, which would entail
// much ugly flicker nor from within the size_allocate // much ugly flicker nor from within the size_allocate
// handler, because GTK 1.1.X forbids that. // handler, because GTK 1.1.X forbids that.
GtkOnSize( m_x, m_y, m_width, m_height ); GtkOnSize( m_x, m_y, m_width, m_height );
} }
@@ -382,9 +382,9 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height
if (m_frameMenuBar) if (m_frameMenuBar)
{ {
int xx = m_miniEdge; int xx = m_miniEdge;
int yy = m_miniEdge + m_miniTitle; int yy = m_miniEdge + m_miniTitle;
int ww = m_width - 2*m_miniEdge; int ww = m_width - 2*m_miniEdge;
int hh = wxMENU_HEIGHT; int hh = wxMENU_HEIGHT;
m_frameMenuBar->m_x = xx; m_frameMenuBar->m_x = xx;
m_frameMenuBar->m_y = yy; m_frameMenuBar->m_y = yy;
m_frameMenuBar->m_width = ww; m_frameMenuBar->m_width = ww;
@@ -397,9 +397,9 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height
if (m_frameToolBar) if (m_frameToolBar)
{ {
int xx = m_miniEdge; int xx = m_miniEdge;
int yy = m_miniEdge + m_miniTitle; int yy = m_miniEdge + m_miniTitle;
if (m_frameMenuBar) yy += wxMENU_HEIGHT; if (m_frameMenuBar) yy += wxMENU_HEIGHT;
int ww = m_width - 2*m_miniEdge; int ww = m_width - 2*m_miniEdge;
int hh = m_frameToolBar->m_height; int hh = m_frameToolBar->m_height;
m_frameToolBar->m_x = xx; m_frameToolBar->m_x = xx;
@@ -414,9 +414,9 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height
if (m_frameStatusBar) if (m_frameStatusBar)
{ {
int xx = 0 + m_miniEdge; int xx = 0 + m_miniEdge;
int yy = m_height - wxSTATUS_HEIGHT - m_miniEdge; int yy = m_height - wxSTATUS_HEIGHT - m_miniEdge;
int ww = m_width - 2*m_miniEdge; int ww = m_width - 2*m_miniEdge;
int hh = wxSTATUS_HEIGHT; int hh = wxSTATUS_HEIGHT;
m_frameStatusBar->m_x = xx; m_frameStatusBar->m_x = xx;
m_frameStatusBar->m_y = yy; m_frameStatusBar->m_y = yy;
@@ -470,7 +470,7 @@ void wxFrame::OnSize( wxSizeEvent &WXUNUSED(event) )
#endif #endif
) )
{ {
// it's the second one: do nothing // it's the second one: do nothing
if (child) return; if (child) return;
child = win; child = win;
} }
@@ -524,7 +524,7 @@ void wxFrame::SetMenuBar( wxMenuBar *menuBar )
if (m_sizeSet) GtkOnSize( m_x, m_y, m_width, m_height ); if (m_sizeSet) GtkOnSize( m_x, m_y, m_width, m_height );
} }
wxMenuBar *wxFrame::GetMenuBar(void) const wxMenuBar *wxFrame::GetMenuBar() const
{ {
return m_frameMenuBar; return m_frameMenuBar;
} }
@@ -549,7 +549,7 @@ wxToolBar* wxFrame::OnCreateToolBar( long style, wxWindowID id, const wxString&
return new wxToolBar( this, id, wxDefaultPosition, wxDefaultSize, style, name ); return new wxToolBar( this, id, wxDefaultPosition, wxDefaultSize, style, name );
} }
wxToolBar *wxFrame::GetToolBar(void) const wxToolBar *wxFrame::GetToolBar() const
{ {
return m_frameToolBar; return m_frameToolBar;
} }
@@ -575,7 +575,7 @@ wxStatusBar *wxFrame::OnCreateStatusBar( int number, long style, wxWindowID id,
// Set the height according to the font and the border size // Set the height according to the font and the border size
wxClientDC dc(statusBar); wxClientDC dc(statusBar);
dc.SetFont( *statusBar->GetFont() ); dc.SetFont( statusBar->GetFont() );
long x, y; long x, y;
dc.GetTextExtent( "X", &x, &y ); dc.GetTextExtent( "X", &x, &y );
@@ -606,7 +606,7 @@ void wxFrame::SetStatusWidths(int n, const int widths_field[] )
m_frameStatusBar->SetStatusWidths(n, widths_field); m_frameStatusBar->SetStatusWidths(n, widths_field);
} }
wxStatusBar *wxFrame::GetStatusBar(void) const wxStatusBar *wxFrame::GetStatusBar() const
{ {
return m_frameStatusBar; return m_frameStatusBar;
} }

View File

@@ -38,11 +38,6 @@ wxIcon::wxIcon( const wxIcon& icon ) : wxBitmap()
Ref(icon); Ref(icon);
} }
wxIcon::wxIcon( const wxIcon* icon ) : wxBitmap()
{
if (icon) Ref(*icon);
}
wxIcon& wxIcon::operator = ( const wxIcon& icon ) wxIcon& wxIcon::operator = ( const wxIcon& icon )
{ {
if (*this == icon) return (*this); if (*this == icon) return (*this);

View File

@@ -218,10 +218,9 @@ wxMenuItem::wxMenuItem()
m_menuItem = (GtkWidget *) NULL; m_menuItem = (GtkWidget *) NULL;
} }
// it's valid for this function to be called even if m_menuItem == NULL
void wxMenuItem::SetName(const wxString& str) void wxMenuItem::SetName(const wxString& str)
{ {
wxCHECK_RET( m_menuItem, "invalid menu item" );
m_text = ""; m_text = "";
for ( const char *pc = str; *pc != '\0'; pc++ ) for ( const char *pc = str; *pc != '\0'; pc++ )
{ {
@@ -231,9 +230,12 @@ void wxMenuItem::SetName(const wxString& str)
m_text << *pc; m_text << *pc;
} }
GtkLabel *label = GTK_LABEL( GTK_BIN(m_menuItem)->child ); if ( m_menuItem )
{
GtkLabel *label = GTK_LABEL( GTK_BIN(m_menuItem)->child );
gtk_label_set( label, m_text.c_str()); gtk_label_set( label, m_text.c_str());
}
} }
void wxMenuItem::Check( bool check ) void wxMenuItem::Check( bool check )

View File

@@ -29,12 +29,12 @@ class wxPaletteRefData: public wxObjectRefData
GdkColormap *m_colormap; GdkColormap *m_colormap;
}; };
wxPaletteRefData::wxPaletteRefData(void) wxPaletteRefData::wxPaletteRefData()
{ {
m_colormap = (GdkColormap *) NULL; m_colormap = (GdkColormap *) NULL;
}; };
wxPaletteRefData::~wxPaletteRefData(void) wxPaletteRefData::~wxPaletteRefData()
{ {
if (m_colormap) gdk_colormap_unref( m_colormap ); if (m_colormap) gdk_colormap_unref( m_colormap );
}; };
@@ -45,7 +45,7 @@ wxPaletteRefData::~wxPaletteRefData(void)
IMPLEMENT_DYNAMIC_CLASS(wxPalette,wxGDIObject) IMPLEMENT_DYNAMIC_CLASS(wxPalette,wxGDIObject)
wxPalette::wxPalette(void) wxPalette::wxPalette()
{ {
}; };
@@ -60,13 +60,7 @@ wxPalette::wxPalette( const wxPalette& palette )
Ref( palette ); Ref( palette );
}; };
wxPalette::wxPalette( const wxPalette* palette ) wxPalette::~wxPalette()
{
UnRef();
if (palette) Ref( *palette );
};
wxPalette::~wxPalette(void)
{ {
}; };

View File

@@ -4,7 +4,7 @@
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
// Copyright: (c) 1998 Robert Roebling // Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@@ -55,7 +55,7 @@ wxPenRefData::wxPenRefData( const wxPenRefData& data )
IMPLEMENT_DYNAMIC_CLASS(wxPen,wxGDIObject) IMPLEMENT_DYNAMIC_CLASS(wxPen,wxGDIObject)
wxPen::wxPen(void) wxPen::wxPen()
{ {
if (wxThePenList) wxThePenList->AddPen( this ); if (wxThePenList) wxThePenList->AddPen( this );
} }
@@ -76,14 +76,6 @@ wxPen::wxPen( const wxPen& pen )
if (wxThePenList) wxThePenList->AddPen( this ); if (wxThePenList) wxThePenList->AddPen( this );
} }
wxPen::wxPen( const wxPen* pen )
{
UnRef();
if (pen) Ref( *pen );
if (wxThePenList) wxThePenList->AddPen( this );
}
wxPen::~wxPen() wxPen::~wxPen()
{ {
if (wxThePenList) wxThePenList->RemovePen( this ); if (wxThePenList) wxThePenList->RemovePen( this );

View File

@@ -109,7 +109,7 @@ static char *GetIniFile(char *dest, const char *filename)
return dest; return dest;
} }
static void wxXMergeDatabases(void) static void wxXMergeDatabases()
{ {
XrmDatabase homeDB, serverDB, applicationDB; XrmDatabase homeDB, serverDB, applicationDB;
char filenamebuf[1024]; char filenamebuf[1024];
@@ -159,7 +159,7 @@ static void wxXMergeDatabases(void)
// called on application exit // called on application exit
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void wxFlushResources(void) void wxFlushResources()
{ {
char nameBuffer[512]; char nameBuffer[512];

View File

@@ -1655,7 +1655,7 @@ void wxWindow::Fit()
int maxX = 0; int maxX = 0;
int maxY = 0; int maxY = 0;
wxNode *node = m_childrenFirst(); wxNode *node = m_children.First();
while ( node ) while ( node )
{ {
wxWindow *win = (wxWindow *)node->Data(); wxWindow *win = (wxWindow *)node->Data();
@@ -1803,11 +1803,6 @@ void wxWindow::AddChild( wxWindow *child )
m_children.Append( child ); m_children.Append( child );
} }
wxList& wxWindow::GetChildren() const
{
return m_children;
}
wxWindow *wxWindow::ReParent( wxWindow *newParent ) wxWindow *wxWindow::ReParent( wxWindow *newParent )
{ {
wxWindow *oldParent = GetParent(); wxWindow *oldParent = GetParent();
@@ -1855,7 +1850,7 @@ void wxWindow::Lower()
if (m_widget) gdk_window_lower( m_widget->window ); if (m_widget) gdk_window_lower( m_widget->window );
} }
wxEvtHandler *wxWindow::GetEventHandler() wxEvtHandler *wxWindow::GetEventHandler() const
{ {
return m_eventHandler; return m_eventHandler;
} }
@@ -1934,7 +1929,7 @@ void wxWindow::SetId( wxWindowID id )
m_windowId = id; m_windowId = id;
} }
wxWindowID wxWindow::GetId() wxWindowID wxWindow::GetId() const
{ {
return m_windowId; return m_windowId;
} }
@@ -1951,7 +1946,8 @@ void wxWindow::SetCursor( const wxCursor &cursor )
if (cursor.Ok()) if (cursor.Ok())
{ {
if (*((wxCursor*)&cursor) == m_cursor) return; if ( cursor == *m_cursor )
return;
*m_cursor = cursor; *m_cursor = cursor;
} }
else else
@@ -2278,11 +2274,6 @@ void wxWindow::SetFont( const wxFont &font )
ApplyWidgetStyle(); ApplyWidgetStyle();
} }
wxFont *wxWindow::GetFont()
{
return &m_font;
}
void wxWindow::SetWindowStyleFlag( long flag ) void wxWindow::SetWindowStyleFlag( long flag )
{ {
m_windowStyle = flag; m_windowStyle = flag;
@@ -2795,7 +2786,7 @@ bool wxWindow::DoPhase(int phase)
{ {
noChanges = 0; noChanges = 0;
noFailures = 0; noFailures = 0;
wxNode *node = m_children.first(); wxNode *node = m_children.First();
while (node) while (node)
{ {
wxWindow *child = (wxWindow *)node->Data(); wxWindow *child = (wxWindow *)node->Data();

View File

@@ -8,8 +8,7 @@
########################### Programs ################################# ########################### Programs #################################
# Replace this with your own path if necessary # Replace this with your own path if necessary
#WXDIR = /home/karl/wxWindows WXDIR = $(wx)
WXDIR = /home/jacs/wx2
# C++ compiler # C++ compiler
CC = g++ CC = g++