///////////////////////////////////////////////////////////////////////////// // Name: cmndlgs.i // Purpose: SWIG definitions for the Common Dialog Classes // // Author: Robin Dunn // // Created: 7/25/98 // RCS-ID: $Id$ // Copyright: (c) 1998 by Total Control Software // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// %module cmndlgs %{ #include "helpers.h" #include #include #include #include #include %} //---------------------------------------------------------------------- %include typemaps.i %include my_typemaps.i // Import some definitions of other classes, etc. %import _defs.i %import misc.i %import gdi.i %import windows.i %import events.i %import frames.i %pragma(python) code = "import wx" //---------------------------------------------------------------------- class wxColourData : public wxObject { public: wxColourData(); ~wxColourData(); bool GetChooseFull(); wxColour GetColour(); wxColour GetCustomColour(int i); void SetChooseFull(int flag); void SetColour(const wxColour& colour); void SetCustomColour(int i, const wxColour& colour); }; class wxColourDialog : public wxDialog { public: wxColourDialog(wxWindow* parent, wxColourData* data = NULL); %pragma(python) addtomethod = "__init__:self._setOORInfo(self)" wxColourData& GetColourData(); int ShowModal(); }; //---------------------------------------------------------------------- class wxDirDialog : public wxDialog { public: wxDirDialog(wxWindow* parent, char* message = "Choose a directory", char* defaultPath = "", long style = 0, const wxPoint& pos = wxDefaultPosition); %pragma(python) addtomethod = "__init__:self._setOORInfo(self)" wxString GetPath(); wxString GetMessage(); long GetStyle(); void SetMessage(const wxString& message); void SetPath(const wxString& path); int ShowModal(); }; //---------------------------------------------------------------------- class wxFileDialog : public wxDialog { public: wxFileDialog(wxWindow* parent, char* message = "Choose a file", char* defaultDir = "", char* defaultFile = "", char* wildcard = "*.*", long style = 0, const wxPoint& pos = wxDefaultPosition); %pragma(python) addtomethod = "__init__:self._setOORInfo(self)" wxString GetDirectory(); wxString GetFilename(); int GetFilterIndex(); wxString GetMessage(); wxString GetPath(); long GetStyle(); wxString GetWildcard(); void SetDirectory(const wxString& directory); void SetFilename(const wxString& setfilename); void SetFilterIndex(int filterIndex); void SetMessage(const wxString& message); void SetPath(const wxString& path); void SetStyle(long style); void SetWildcard(const wxString& wildCard); int ShowModal(); %addmethods { PyObject* GetFilenames() { wxArrayString arr; self->GetFilenames(arr); size_t count = arr.GetCount(); PyObject* listObj = PyList_New(0); for(size_t x=0; xGetPaths(arr); size_t count = arr.GetCount(); PyObject* listObj = PyList_New(0); for(size_t x=0; x