wxbitmaphandlerthis is the base class for implementing bitmap file loading/saving, and bitmap creation from data. it is used within wxbitmap and is not normally seen by the application. if you wish to extend the capabilities of wxbitmap, derive a class from wxbitmaphandler and add the handler using wxbitmap::addhandler in your application initialisation. derived from include files <wx/bitmap.h> see also members
wxbitmaphandler::wxbitmaphandler
wxbitmaphandler::wxbitmaphandlerwxbitmaphandler() default constructor. in your own default constructor, initialise the members m_name, m_extension and m_type.
wxbitmaphandler::~wxbitmaphandler~wxbitmaphandler() destroys the wxbitmaphandler object.
wxbitmaphandler::createvirtual bool create(wxbitmap* bitmap, const void* data, int type, int width, int height, int depth = -1) creates a bitmap from the given data, which can be of arbitrary type. the wxbitmap object bitmap is manipulated by this function. parameters bitmap
width
height
depth
data
type
return value true if the call succeeded, false otherwise (the default).
wxbitmaphandler::getnameconst wxstring& getname() const gets the name of this handler.
wxbitmaphandler::getextensionconst wxstring& getextension() const gets the file extension associated with this handler.
wxbitmaphandler::gettypelong gettype() const gets the bitmap type associated with this handler.
wxbitmaphandler::loadfilebool loadfile(wxbitmap* bitmap, const wxstring& name, long type) loads a bitmap from a file or resource, putting the resulting data into bitmap. parameters bitmap
name
type
return value true if the operation succeeded, false otherwise. see also
wxbitmap::loadfile
wxbitmaphandler::savefilebool savefile(wxbitmap* bitmap, const wxstring& name, int type, wxpalette* palette = null) saves a bitmap in the named file. parameters bitmap
name
type
palette
return value true if the operation succeeded, false otherwise. see also
wxbitmap::loadfile
wxbitmaphandler::setnamevoid setname(const wxstring& name) sets the handler name. parameters name
wxbitmaphandler::setextensionvoid setextension(const wxstring& extension) sets the handler extension. parameters extension
wxbitmaphandler::settypevoid settype(long type) sets the handler type. parameters name
|