2004-03-23 12:35:05 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: imaglist.h
|
2005-03-29 06:39:46 -05:00
|
|
|
// Purpose:
|
|
|
|
// Author: Robert Roebling, Stefan Csomor
|
|
|
|
// Created: 01/02/97
|
|
|
|
// Id:
|
|
|
|
// Copyright: (c) 1998 Robert Roebling and Julian Smart
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
2004-03-23 12:35:05 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_IMAGLIST_H_
|
|
|
|
#define _WX_IMAGLIST_H_
|
|
|
|
|
2005-03-29 06:39:46 -05:00
|
|
|
#include "wx/defs.h"
|
|
|
|
#include "wx/list.h"
|
|
|
|
#include "wx/icon.h"
|
|
|
|
|
2007-07-09 06:09:52 -04:00
|
|
|
class WXDLLIMPEXP_FWD_CORE wxDC;
|
|
|
|
class WXDLLIMPEXP_FWD_CORE wxBitmap;
|
|
|
|
class WXDLLIMPEXP_FWD_CORE wxColour;
|
2004-03-23 12:35:05 -05:00
|
|
|
|
|
|
|
class WXDLLEXPORT wxImageList: public wxObject
|
|
|
|
{
|
2005-03-29 06:39:46 -05:00
|
|
|
public:
|
|
|
|
wxImageList() { m_width = m_height = 0; }
|
|
|
|
wxImageList( int width, int height, bool mask = true, int initialCount = 1 );
|
2006-09-05 16:47:48 -04:00
|
|
|
virtual ~wxImageList();
|
2005-03-29 06:39:46 -05:00
|
|
|
bool Create( int width, int height, bool mask = true, int initialCount = 1 );
|
|
|
|
bool Create();
|
|
|
|
|
|
|
|
virtual int GetImageCount() const;
|
|
|
|
virtual bool GetSize( int index, int &width, int &height ) const;
|
|
|
|
|
|
|
|
int Add( const wxIcon& bitmap );
|
|
|
|
int Add( const wxBitmap& bitmap );
|
|
|
|
int Add( const wxBitmap& bitmap, const wxBitmap& mask );
|
|
|
|
int Add( const wxBitmap& bitmap, const wxColour& maskColour );
|
|
|
|
wxBitmap GetBitmap(int index) const;
|
|
|
|
wxIcon GetIcon(int index) const;
|
|
|
|
bool Replace( int index, const wxIcon &bitmap );
|
|
|
|
bool Replace( int index, const wxBitmap &bitmap );
|
2006-04-30 07:58:40 -04:00
|
|
|
bool Replace( int index, const wxBitmap &bitmap, const wxBitmap &mask );
|
2005-03-29 06:39:46 -05:00
|
|
|
bool Remove( int index );
|
|
|
|
bool RemoveAll();
|
|
|
|
|
|
|
|
virtual bool Draw(int index, wxDC& dc, int x, int y,
|
|
|
|
int flags = wxIMAGELIST_DRAW_NORMAL,
|
|
|
|
bool solidBackground = false);
|
|
|
|
|
|
|
|
private:
|
|
|
|
wxList m_images;
|
|
|
|
|
|
|
|
int m_width;
|
|
|
|
int m_height;
|
|
|
|
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxImageList)
|
2004-03-23 12:35:05 -05:00
|
|
|
};
|
|
|
|
|
2005-03-29 06:39:46 -05:00
|
|
|
#endif // _WX_IMAGLIST_H_
|
|
|
|
|