///////////////////////////////////////////////////////////////////////////// // Name: _pen.i // Purpose: SWIG interface for wxPen // // Author: Robin Dunn // // Created: 7-July-1997 // RCS-ID: $Id$ // Copyright: (c) 2003 by Total Control Software // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// // Not a %module //--------------------------------------------------------------------------- // wxDash is a signed char, byte is unsigned char... %typemap(in) (int dashes, wxDash* dashes_array ) { $1 = PyList_Size($input); $2 = (wxDash*)byte_LIST_helper($input); if ($2 == NULL) SWIG_fail; } %typemap(freearg) (int dashes, wxDash* dashes_array ) { if ($2) delete [] $2; } //--------------------------------------------------------------------------- %newgroup class wxPen : public wxGDIObject { public: wxPen(wxColour& colour, int width=1, int style=wxSOLID); ~wxPen(); int GetCap(); wxColour GetColour(); int GetJoin(); int GetStyle(); int GetWidth(); bool Ok(); void SetCap(int cap_style); void SetColour(wxColour& colour); void SetJoin(int join_style); void SetStyle(int style); void SetWidth(int width); void SetDashes(int dashes, wxDash* dashes_array); //int GetDashes(wxDash **dashes); %extend { PyObject* GetDashes() { wxDash* dashes; int count = self->GetDashes(&dashes); bool blocked = wxPyBeginBlockThreads(); PyObject* retval = PyList_New(0); for (int x=0; x