]> git.saurik.com Git - wxWidgets.git/commitdiff
GTK1 fixes after wxObject-derived classes copy ctors/assignment operators simplificat...
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 10 Feb 2006 15:41:06 +0000 (15:41 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 10 Feb 2006 15:41:06 +0000 (15:41 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37441 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 files changed:
include/wx/gtk1/bitmap.h
include/wx/gtk1/brush.h
include/wx/gtk1/colour.h
include/wx/gtk1/cursor.h
include/wx/gtk1/font.h
include/wx/gtk1/icon.h
include/wx/gtk1/pen.h
include/wx/gtk1/region.h
src/gtk1/bitmap.cpp
src/gtk1/cursor.cpp
src/gtk1/font.cpp
src/gtk1/icon.cpp

index 8168c9a9d8c435e86ef8cc3d0dd6aea536f1c590..8640396da07e0bb23ca08b20095cd759dbb4f43c 100644 (file)
@@ -69,11 +69,9 @@ public:
     wxBitmap( const char bits[], int width, int height, int depth = 1 );
     wxBitmap( const char **bits ) { (void)CreateFromXpm(bits); }
     wxBitmap( char **bits ) { (void)CreateFromXpm((const char **)bits); }
-    wxBitmap( const wxBitmap& bmp );
     wxBitmap( const wxString &filename, wxBitmapType type = wxBITMAP_TYPE_XPM );
     wxBitmap( const wxImage& image, int depth = -1 ) { (void)CreateFromImage(image, depth); }
     ~wxBitmap();
-    wxBitmap& operator = ( const wxBitmap& bmp );
     bool operator == ( const wxBitmap& bmp ) const;
     bool operator != ( const wxBitmap& bmp ) const;
     bool Ok() const;
index ecdfe463981e55686594dcba1ce547b08e321546..eb425d067e0acd7fb8882df02aaade6b41237310 100644 (file)
@@ -36,11 +36,6 @@ public:
     wxBrush( const wxBitmap &stippleBitmap );
     ~wxBrush();
 
-    wxBrush( const wxBrush &brush )
-        : wxBrushBase()
-        { Ref(brush); }
-    wxBrush& operator = ( const wxBrush& brush ) { Ref(brush); return *this; }
-
     bool Ok() const { return m_refData != NULL; }
 
     bool operator == ( const wxBrush& brush ) const;
index dab437e7b318efd90d76d9d44ad6514e44317561..7bd893b32281de731587155b8cb28d19b2136801 100644 (file)
@@ -53,12 +53,6 @@ public:
     wxColour( const wxChar *colourName ) { InitFromName( wxString(colourName) ); }
 #endif
 
-
-    wxColour( const wxColour& col )
-        : wxGDIObject()
-        { Ref(col); }
-    wxColour& operator = ( const wxColour& col ) { Ref(col); return *this; }
-
     ~wxColour();
 
     bool Ok() const { return m_refData != NULL; }
index 67eabdb5de910f48d805a098f73dda5023318fcd..963a26182d625376252ed02e4d5fe7d8bcc3d506 100644 (file)
@@ -28,7 +28,6 @@ public:
 
     wxCursor();
     wxCursor( int cursorId );
-    wxCursor( const wxCursor &cursor );
 #if wxUSE_IMAGE
     wxCursor( const wxImage & image );
 #endif
@@ -36,7 +35,6 @@ public:
               int hotSpotX=-1, int hotSpotY=-1,
               const char maskBits[]=0, wxColour *fg=0, wxColour *bg=0 );
     ~wxCursor();
-    wxCursor& operator = ( const wxCursor& cursor );
     bool operator == ( const wxCursor& cursor ) const;
     bool operator != ( const wxCursor& cursor ) const;
     bool Ok() const;
index 3f7611781f4a914fb987b1f008bdc3933ff278a6..ca0c71af87b29754e6363a4cffb20ff0202d9290 100644 (file)
@@ -30,14 +30,11 @@ class WXDLLIMPEXP_CORE wxFont : public wxFontBase
 {
 public:
     // ctors and such
-    wxFont() { Init(); }
-    wxFont(const wxFont& font) : wxFontBase() { Init(); Ref(font); }
+    wxFont() { }
 
     // wxGTK-specific
     wxFont(const wxString& fontname)
     {
-        Init();
-
         Create(fontname);
     }
 
@@ -51,8 +48,6 @@ public:
            const wxString& face = wxEmptyString,
            wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
     {
-        Init();
-
         (void)Create(size, family, style, weight, underlined, face, encoding);
     }
 
@@ -69,9 +64,6 @@ public:
 
     ~wxFont();
 
-    // assignment
-    wxFont& operator=(const wxFont& font);
-
     // implement base class pure virtuals
     virtual int GetPointSize() const;
     virtual int GetFamily() const;
@@ -104,9 +96,6 @@ public:
 protected:
     virtual void DoSetNativeFontInfo( const wxNativeFontInfo& info );
 
-    // common part of all ctors
-    void Init();
-
 private:
     DECLARE_DYNAMIC_CLASS(wxFont)
 };
index 38019ae2ef796dfb43d485c1add664dbfa393e8c..f93b45ac128d47ae0c463af0310992b654485076 100644 (file)
@@ -28,7 +28,6 @@ class WXDLLIMPEXP_CORE wxIcon: public wxBitmap
 {
 public:
     wxIcon();
-    wxIcon( const wxIcon& icon);
     wxIcon( const char **bits, int width=-1, int height=-1 );
 
     // For compatibility with wxMSW where desired size is sometimes required to
@@ -45,7 +44,6 @@ public:
     {
     }
 
-    wxIcon& operator=(const wxIcon& icon);
     bool operator==(const wxIcon& icon) const { return m_refData == icon.m_refData; }
     bool operator!=(const wxIcon& icon) const { return !(*this == icon); }
 
index aef98775637fe05f364d68339e4f346ce990d980..fe95ad1003513a813e9134bbfd84dd643a5d430f 100644 (file)
@@ -40,11 +40,6 @@ public:
     wxPen( const wxColour &colour, int width = 1, int style = wxSOLID );
     ~wxPen();
 
-    wxPen( const wxPen& pen )
-        : wxGDIObject()
-        { Ref(pen); }
-    wxPen& operator = ( const wxPen& pen ) { Ref(pen); return *this; }
-
     bool Ok() const { return m_refData != NULL; }
 
     bool operator == ( const wxPen& pen ) const;
index 5319f14975c6bd1f5d894cc17fae8ce82ee20c5a..217b37195f03ceb40d241d47898c059e81d92b88 100644 (file)
@@ -80,11 +80,6 @@ public:
 
     ~wxRegion();
 
-    wxRegion( const wxRegion& region )
-        : wxGDIObject()
-        { Ref(region); }
-    wxRegion& operator = ( const wxRegion& region ) { Ref(region); return *this; }
-
     bool Ok() const { return m_refData != NULL; }
 
     bool operator == ( const wxRegion& region ) const;
index f8e9bd35eeb279af424c5f7e32329039b8021dcc..8237eaa33872cebf2df221282294d19928f56e79 100644 (file)
@@ -1038,12 +1038,6 @@ wxImage wxBitmap::ConvertToImage() const
     return image;
 }
 
-wxBitmap::wxBitmap( const wxBitmap& bmp )
-        : wxBitmapBase()
-{
-    Ref( bmp );
-}
-
 wxBitmap::wxBitmap( const wxString &filename, wxBitmapType type )
 {
     LoadFile( filename, type );
@@ -1075,14 +1069,6 @@ wxBitmap::~wxBitmap()
 {
 }
 
-wxBitmap& wxBitmap::operator = ( const wxBitmap& bmp )
-{
-    if ( m_refData != bmp.m_refData )
-        Ref( bmp );
-
-    return *this;
-}
-
 bool wxBitmap::operator == ( const wxBitmap& bmp ) const
 {
     return m_refData == bmp.m_refData;
index f277f4b0c9750e88cc65fd94dd00eeb5fcc01290..cac9e5aabaf90133d213c87801704288c94ca4e4 100644 (file)
@@ -153,13 +153,6 @@ wxCursor::wxCursor(const char bits[], int width, int  height,
     gdk_bitmap_unref( mask );
 }
 
-
-wxCursor::wxCursor( const wxCursor &cursor )
-    : wxObject()
-{
-    Ref( cursor );
-}
-
 #if wxUSE_IMAGE
 
 wxCursor::wxCursor( const wxImage & image )
@@ -320,16 +313,6 @@ wxCursor::~wxCursor()
 {
 }
 
-wxCursor& wxCursor::operator = ( const wxCursor& cursor )
-{
-    if (*this == cursor)
-        return (*this);
-
-    Ref( cursor );
-
-    return *this;
-}
-
 bool wxCursor::operator == ( const wxCursor& cursor ) const
 {
     return m_refData == cursor.m_refData;
index 35a7060ab64f837481d5e49d24029b514f883386..4d3e493fdd8206d3d6f8a25032c677ad6b48910c 100644 (file)
@@ -474,14 +474,8 @@ void wxFontRefData::SetNativeFontInfo(const wxNativeFontInfo& info)
 
 IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject)
 
-void wxFont::Init()
-{
-}
-
 wxFont::wxFont(const wxNativeFontInfo& info)
 {
-    Init();
-
     (void) Create(info.GetXFontName());
 }
 
index 776adeb423c7e036ece9217e5a2598d99f9e836b..0d82d6830b2c755e12f86e6bf867909d0a55371c 100644 (file)
@@ -32,18 +32,6 @@ wxIcon::wxIcon() :  wxBitmap()
 {
 }
 
-wxIcon::wxIcon( const wxIcon& icon ) : wxBitmap()
-{
-    Ref(icon);
-}
-
-wxIcon& wxIcon::operator = ( const wxIcon& icon )
-{
-    if (*this == icon) return (*this);
-    Ref(icon);
-    return *this;
-}
-
 void wxIcon::CopyFromBitmap(const wxBitmap& bmp)
 {
     wxIcon *icon = (wxIcon*)(&bmp);