GTK1 fixes after wxObject-derived classes copy ctors/assignment operators simplifications (patch 1428863)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37441 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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; }
|
||||
|
@@ -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;
|
||||
|
@@ -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)
|
||||
};
|
||||
|
@@ -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); }
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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());
|
||||
}
|
||||
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user