wxImageList ctor now takes the same arguments as the MSW version (but it's

still not implemented)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@161 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1998-07-01 15:43:03 +00:00
parent 74bedbeb40
commit 0423b68518
2 changed files with 22 additions and 21 deletions

View File

@@ -46,17 +46,18 @@ class wxImageList: public wxObject
public: public:
wxImageList(void); wxImageList::wxImageList() { }
~wxImageList(void); wxImageList(int width, int height, bool mask = TRUE, int initialCount = 1);
bool Create(void); ~wxImageList();
int GetImageCount(void) const; bool Create();
int GetImageCount() const;
int Add( const wxBitmap &bitmap ); int Add( const wxBitmap &bitmap );
bool Replace( const int index, const wxBitmap &bitmap ); bool Replace( int index, const wxBitmap &bitmap );
bool Remove( const int index ); bool Remove( int index );
bool RemoveAll(void); bool RemoveAll();
bool GetSize( const int index, int &width, int &height ) const; bool GetSize( int index, int &width, int &height ) const;
bool Draw(const int index, wxDC& dc, const int x, const int y, bool Draw(int index, wxDC& dc, int x, int y,
const int flags = wxIMAGELIST_DRAW_NORMAL, const bool solidBackground = FALSE ); int flags = wxIMAGELIST_DRAW_NORMAL, const bool solidBackground = FALSE );
private: private:

View File

@@ -20,21 +20,21 @@
IMPLEMENT_DYNAMIC_CLASS(wxImageList, wxObject) IMPLEMENT_DYNAMIC_CLASS(wxImageList, wxObject)
wxImageList::wxImageList(void) wxImageList::wxImageList(int width, int height, bool mask, int initialCount)
{ {
Create(); Create();
}; };
wxImageList::~wxImageList(void) wxImageList::~wxImageList()
{ {
}; };
int wxImageList::GetImageCount(void) const int wxImageList::GetImageCount() const
{ {
return m_images.Number(); return m_images.Number();
}; };
bool wxImageList::Create(void) bool wxImageList::Create()
{ {
m_images.DeleteContents( TRUE ); m_images.DeleteContents( TRUE );
return TRUE; return TRUE;
@@ -46,7 +46,7 @@ int wxImageList::Add( const wxBitmap &bitmap )
return m_images.Number(); return m_images.Number();
}; };
bool wxImageList::Replace( const int index, const wxBitmap &bitmap ) bool wxImageList::Replace( int index, const wxBitmap &bitmap )
{ {
wxNode *node = m_images.Nth( index ); wxNode *node = m_images.Nth( index );
if (!node) return FALSE; if (!node) return FALSE;
@@ -66,20 +66,20 @@ bool wxImageList::Replace( const int index, const wxBitmap &bitmap )
return TRUE; return TRUE;
}; };
bool wxImageList::Remove( const int index ) bool wxImageList::Remove( int index )
{ {
wxNode *node = m_images.Nth( index ); wxNode *node = m_images.Nth( index );
if (node) m_images.DeleteNode( node ); if (node) m_images.DeleteNode( node );
return (node != NULL); return (node != NULL);
}; };
bool wxImageList::RemoveAll(void) bool wxImageList::RemoveAll()
{ {
m_images.Clear(); m_images.Clear();
return TRUE; return TRUE;
}; };
bool wxImageList::GetSize( const int index, int &width, int &height ) const bool wxImageList::GetSize( int index, int &width, int &height ) const
{ {
wxNode *node = m_images.Nth( index ); wxNode *node = m_images.Nth( index );
if (node) if (node)
@@ -97,9 +97,9 @@ bool wxImageList::GetSize( const int index, int &width, int &height ) const
}; };
}; };
bool wxImageList::Draw( const int index, wxDC &dc, bool wxImageList::Draw( int index, wxDC &dc,
const int x, const int y, int x, int y,
const int WXUNUSED(flags), const bool WXUNUSED(solidBackground) ) int WXUNUSED(flags), const bool WXUNUSED(solidBackground) )
{ {
wxNode *node = m_images.Nth( index ); wxNode *node = m_images.Nth( index );
if (!node) return FALSE; if (!node) return FALSE;