///////////////////////////////////////////////////////////////////////////// // Name: _bitmap.i // Purpose: SWIG interface for wxBitmap and wxMask // // Author: Robin Dunn // // Created: 7-July-1997 // RCS-ID: $Id$ // Copyright: (c) 2003 by Total Control Software // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// // Not a %module //--------------------------------------------------------------------------- %{ #include static char** ConvertListOfStrings(PyObject* listOfStrings) { char** cArray = NULL; int count; if (!PyList_Check(listOfStrings)) { PyErr_SetString(PyExc_TypeError, "Expected a list of strings."); return NULL; } count = PyList_Size(listOfStrings); cArray = new char*[count]; for(int x=0; xSetMask(mask); } } // def SetMaskColour(self, colour): // mask = wxMaskColour(self, colour) // self.SetMask(mask) virtual wxBitmap GetSubBitmap(const wxRect& rect) const; virtual bool SaveFile(const wxString &name, wxBitmapType type, wxPalette *palette = (wxPalette *)NULL); virtual bool LoadFile(const wxString &name, wxBitmapType type); #if wxUSE_PALETTE virtual wxPalette *GetPalette() const; virtual void SetPalette(const wxPalette& palette); #endif // copies the contents and mask of the given (colour) icon to the bitmap virtual bool CopyFromIcon(const wxIcon& icon); virtual void SetHeight(int height); virtual void SetWidth(int width); virtual void SetDepth(int depth); #ifdef __WXMSW__ bool CopyFromCursor(const wxCursor& cursor); int GetQuality(); void SetQuality(int q); #endif %pythoncode { def __nonzero__(self): return self.Ok() } }; //--------------------------------------------------------------------------- class wxMask : public wxObject { public: wxMask(const wxBitmap& bitmap); %name(MaskColour) wxMask(const wxBitmap& bitmap, const wxColour& colour); //~wxMask(); }; //--------------------------------------------------------------------------- //---------------------------------------------------------------------------