Turned wxIcon inline constructors to real constructors
Removed warning from dcclient Added wxTheFontList->Add(this) somewhere in wxFont CleanUp() now printfs the number of members in wxTheBitmapList git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@572 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -36,13 +36,11 @@ class wxIcon: public wxBitmap
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
wxIcon(void) {};
|
wxIcon(void);
|
||||||
|
wxIcon(const wxIcon& icon);
|
||||||
inline wxIcon(const wxIcon& icon) { Ref(icon); }
|
wxIcon(const wxIcon* icon);
|
||||||
inline wxIcon(const wxIcon* icon) { if (icon) Ref(*icon); }
|
|
||||||
wxIcon( char **bits, int width=-1, int height=-1 );
|
wxIcon( char **bits, int width=-1, int height=-1 );
|
||||||
|
|
||||||
inline wxIcon& operator = (const wxIcon& icon) { if (*this == icon) return (*this); Ref(icon); return *this; }
|
|
||||||
inline bool operator == (const wxIcon& icon) { return m_refData == icon.m_refData; }
|
inline bool operator == (const wxIcon& icon) { return m_refData == icon.m_refData; }
|
||||||
inline bool operator != (const wxIcon& icon) { return m_refData != icon.m_refData; }
|
inline bool operator != (const wxIcon& icon) { return m_refData != icon.m_refData; }
|
||||||
};
|
};
|
||||||
|
@@ -36,13 +36,11 @@ class wxIcon: public wxBitmap
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
wxIcon(void) {};
|
wxIcon(void);
|
||||||
|
wxIcon(const wxIcon& icon);
|
||||||
inline wxIcon(const wxIcon& icon) { Ref(icon); }
|
wxIcon(const wxIcon* icon);
|
||||||
inline wxIcon(const wxIcon* icon) { if (icon) Ref(*icon); }
|
|
||||||
wxIcon( char **bits, int width=-1, int height=-1 );
|
wxIcon( char **bits, int width=-1, int height=-1 );
|
||||||
|
|
||||||
inline wxIcon& operator = (const wxIcon& icon) { if (*this == icon) return (*this); Ref(icon); return *this; }
|
|
||||||
inline bool operator == (const wxIcon& icon) { return m_refData == icon.m_refData; }
|
inline bool operator == (const wxIcon& icon) { return m_refData == icon.m_refData; }
|
||||||
inline bool operator != (const wxIcon& icon) { return m_refData != icon.m_refData; }
|
inline bool operator != (const wxIcon& icon) { return m_refData != icon.m_refData; }
|
||||||
};
|
};
|
||||||
|
@@ -60,6 +60,8 @@ bool MyApp::OnInit(void)
|
|||||||
// Give it an icon (this is ignored in MDI mode: uses resources)
|
// Give it an icon (this is ignored in MDI mode: uses resources)
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
frame->SetIcon(wxIcon("mdi_icn"));
|
frame->SetIcon(wxIcon("mdi_icn"));
|
||||||
|
#else
|
||||||
|
frame->SetIcon(wxIcon( mondrian_xpm ));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Make a menubar
|
// Make a menubar
|
||||||
@@ -142,8 +144,6 @@ void MyFrame::OnNewWindow(wxCommandEvent& WXUNUSED(event) )
|
|||||||
// Give it an icon (this is ignored in MDI mode: uses resources)
|
// Give it an icon (this is ignored in MDI mode: uses resources)
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
subframe->SetIcon(wxIcon("chrt_icn"));
|
subframe->SetIcon(wxIcon("chrt_icn"));
|
||||||
#else
|
|
||||||
subframe->SetIcon(wxIcon(mondrian_xpm));
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Give it a status line
|
// Give it a status line
|
||||||
|
@@ -437,6 +437,8 @@ wxBitmapList::wxBitmapList ()
|
|||||||
|
|
||||||
wxBitmapList::~wxBitmapList ()
|
wxBitmapList::~wxBitmapList ()
|
||||||
{
|
{
|
||||||
|
printf( "Count: %d.\n", Number() );
|
||||||
|
|
||||||
wxNode *node = First ();
|
wxNode *node = First ();
|
||||||
while (node)
|
while (node)
|
||||||
{
|
{
|
||||||
|
@@ -13,6 +13,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/bitmap.h"
|
#include "wx/bitmap.h"
|
||||||
|
#include "wx/icon.h"
|
||||||
#include "gdk/gdkprivate.h"
|
#include "gdk/gdkprivate.h"
|
||||||
|
|
||||||
#ifdef USE_GDK_IMLIB
|
#ifdef USE_GDK_IMLIB
|
||||||
|
@@ -115,9 +115,6 @@ wxPaintDC::wxPaintDC( wxWindow *window )
|
|||||||
m_isDrawable = TRUE;
|
m_isDrawable = TRUE;
|
||||||
|
|
||||||
SetUpDC();
|
SetUpDC();
|
||||||
|
|
||||||
long x = 0;
|
|
||||||
long y = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxPaintDC::~wxPaintDC(void)
|
wxPaintDC::~wxPaintDC(void)
|
||||||
|
@@ -153,12 +153,16 @@ wxFont::wxFont(int PointSize, const char *Face, int Family, int Style,
|
|||||||
wxFont::wxFont( const wxFont& font )
|
wxFont::wxFont( const wxFont& font )
|
||||||
{
|
{
|
||||||
Ref( font );
|
Ref( font );
|
||||||
|
|
||||||
|
if (wxTheFontList) wxTheFontList->Append( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFont::wxFont( const wxFont* font )
|
wxFont::wxFont( const wxFont* font )
|
||||||
{
|
{
|
||||||
UnRef();
|
UnRef();
|
||||||
if (font) Ref( *font );
|
if (font) Ref( *font );
|
||||||
|
|
||||||
|
if (wxTheFontList) wxTheFontList->Append( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFont::~wxFont(void)
|
wxFont::~wxFont(void)
|
||||||
|
@@ -21,7 +21,28 @@
|
|||||||
IMPLEMENT_DYNAMIC_CLASS(wxIcon,wxBitmap)
|
IMPLEMENT_DYNAMIC_CLASS(wxIcon,wxBitmap)
|
||||||
|
|
||||||
wxIcon::wxIcon( char **bits, int WXUNUSED(width), int WXUNUSED(height) ) :
|
wxIcon::wxIcon( char **bits, int WXUNUSED(width), int WXUNUSED(height) ) :
|
||||||
wxBitmap( bits )
|
wxBitmap( bits )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxIcon::wxIcon() : wxBitmap()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
wxIcon::wxIcon(const wxIcon& icon) : wxBitmap()
|
||||||
|
{
|
||||||
|
Ref(icon);
|
||||||
|
}
|
||||||
|
|
||||||
|
wxIcon::wxIcon(const wxIcon* icon) : wxBitmap()
|
||||||
|
{
|
||||||
|
if (icon) Ref(*icon);
|
||||||
|
}
|
||||||
|
|
||||||
|
wxIcon& wxIcon::operator = (const wxIcon& icon)
|
||||||
|
{
|
||||||
|
if (*this == icon) return (*this);
|
||||||
|
Ref(icon);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -57,6 +57,7 @@ wxPen::wxPen( const wxColour &colour, int width, int style )
|
|||||||
M_PENDATA->m_width = width;
|
M_PENDATA->m_width = width;
|
||||||
M_PENDATA->m_style = style;
|
M_PENDATA->m_style = style;
|
||||||
M_PENDATA->m_colour = colour;
|
M_PENDATA->m_colour = colour;
|
||||||
|
|
||||||
if (wxThePenList) wxThePenList->AddPen( this );
|
if (wxThePenList) wxThePenList->AddPen( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,6 +67,7 @@ wxPen::wxPen( const wxString &colourName, int width, int style )
|
|||||||
M_PENDATA->m_width = width;
|
M_PENDATA->m_width = width;
|
||||||
M_PENDATA->m_style = style;
|
M_PENDATA->m_style = style;
|
||||||
M_PENDATA->m_colour = colourName;
|
M_PENDATA->m_colour = colourName;
|
||||||
|
|
||||||
if (wxThePenList) wxThePenList->AddPen( this );
|
if (wxThePenList) wxThePenList->AddPen( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -79,6 +81,7 @@ wxPen::wxPen( const wxPen* pen )
|
|||||||
{
|
{
|
||||||
UnRef();
|
UnRef();
|
||||||
if (pen) Ref( *pen );
|
if (pen) Ref( *pen );
|
||||||
|
|
||||||
if (wxThePenList) wxThePenList->AddPen( this );
|
if (wxThePenList) wxThePenList->AddPen( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -13,6 +13,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/bitmap.h"
|
#include "wx/bitmap.h"
|
||||||
|
#include "wx/icon.h"
|
||||||
#include "gdk/gdkprivate.h"
|
#include "gdk/gdkprivate.h"
|
||||||
|
|
||||||
#ifdef USE_GDK_IMLIB
|
#ifdef USE_GDK_IMLIB
|
||||||
|
@@ -115,9 +115,6 @@ wxPaintDC::wxPaintDC( wxWindow *window )
|
|||||||
m_isDrawable = TRUE;
|
m_isDrawable = TRUE;
|
||||||
|
|
||||||
SetUpDC();
|
SetUpDC();
|
||||||
|
|
||||||
long x = 0;
|
|
||||||
long y = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxPaintDC::~wxPaintDC(void)
|
wxPaintDC::~wxPaintDC(void)
|
||||||
|
@@ -153,12 +153,16 @@ wxFont::wxFont(int PointSize, const char *Face, int Family, int Style,
|
|||||||
wxFont::wxFont( const wxFont& font )
|
wxFont::wxFont( const wxFont& font )
|
||||||
{
|
{
|
||||||
Ref( font );
|
Ref( font );
|
||||||
|
|
||||||
|
if (wxTheFontList) wxTheFontList->Append( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFont::wxFont( const wxFont* font )
|
wxFont::wxFont( const wxFont* font )
|
||||||
{
|
{
|
||||||
UnRef();
|
UnRef();
|
||||||
if (font) Ref( *font );
|
if (font) Ref( *font );
|
||||||
|
|
||||||
|
if (wxTheFontList) wxTheFontList->Append( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFont::~wxFont(void)
|
wxFont::~wxFont(void)
|
||||||
|
@@ -21,7 +21,28 @@
|
|||||||
IMPLEMENT_DYNAMIC_CLASS(wxIcon,wxBitmap)
|
IMPLEMENT_DYNAMIC_CLASS(wxIcon,wxBitmap)
|
||||||
|
|
||||||
wxIcon::wxIcon( char **bits, int WXUNUSED(width), int WXUNUSED(height) ) :
|
wxIcon::wxIcon( char **bits, int WXUNUSED(width), int WXUNUSED(height) ) :
|
||||||
wxBitmap( bits )
|
wxBitmap( bits )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxIcon::wxIcon() : wxBitmap()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
wxIcon::wxIcon(const wxIcon& icon) : wxBitmap()
|
||||||
|
{
|
||||||
|
Ref(icon);
|
||||||
|
}
|
||||||
|
|
||||||
|
wxIcon::wxIcon(const wxIcon* icon) : wxBitmap()
|
||||||
|
{
|
||||||
|
if (icon) Ref(*icon);
|
||||||
|
}
|
||||||
|
|
||||||
|
wxIcon& wxIcon::operator = (const wxIcon& icon)
|
||||||
|
{
|
||||||
|
if (*this == icon) return (*this);
|
||||||
|
Ref(icon);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -57,6 +57,7 @@ wxPen::wxPen( const wxColour &colour, int width, int style )
|
|||||||
M_PENDATA->m_width = width;
|
M_PENDATA->m_width = width;
|
||||||
M_PENDATA->m_style = style;
|
M_PENDATA->m_style = style;
|
||||||
M_PENDATA->m_colour = colour;
|
M_PENDATA->m_colour = colour;
|
||||||
|
|
||||||
if (wxThePenList) wxThePenList->AddPen( this );
|
if (wxThePenList) wxThePenList->AddPen( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,6 +67,7 @@ wxPen::wxPen( const wxString &colourName, int width, int style )
|
|||||||
M_PENDATA->m_width = width;
|
M_PENDATA->m_width = width;
|
||||||
M_PENDATA->m_style = style;
|
M_PENDATA->m_style = style;
|
||||||
M_PENDATA->m_colour = colourName;
|
M_PENDATA->m_colour = colourName;
|
||||||
|
|
||||||
if (wxThePenList) wxThePenList->AddPen( this );
|
if (wxThePenList) wxThePenList->AddPen( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -79,6 +81,7 @@ wxPen::wxPen( const wxPen* pen )
|
|||||||
{
|
{
|
||||||
UnRef();
|
UnRef();
|
||||||
if (pen) Ref( *pen );
|
if (pen) Ref( *pen );
|
||||||
|
|
||||||
if (wxThePenList) wxThePenList->AddPen( this );
|
if (wxThePenList) wxThePenList->AddPen( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user