//----------------------------------------------------------------------
+%{
+ // Put some wx default wxChar* values into wxStrings.
+ static const wxChar* wxPrintoutTitleStr = wxT("Printout");
+ DECLARE_DEF_STRING(PrintoutTitleStr);
+
+ DECLARE_DEF_STRING(FrameNameStr);
+%}
+
+//----------------------------------------------------------------------
+
%include typemaps.i
%include my_typemaps.i
bool hadErr = FALSE;
bool found;
- wxPyTState* state = wxPyBeginBlockThreads();
+ wxPyBeginBlockThreads();
if ((found = m_myInst.findCallback("GetPageInfo"))) {
PyObject* result = m_myInst.callCallbackObj(Py_BuildValue("()"));
if (result && PyTuple_Check(result) && PyTuple_Size(result) == 4) {
}
Py_DECREF(result);
}
- wxPyEndBlockThreads(state);
+ wxPyEndBlockThreads();
if (! found)
wxPrintout::GetPageInfo(minPage, maxPage, pageFrom, pageTo);
}
// Now define the custom class for SWIGging
%name(wxPrintout) class wxPyPrintout : public wxObject {
public:
- wxPyPrintout(const char* title = "Printout");
+ wxPyPrintout(const wxString& title = wxPyPrintoutTitleStr);
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPrintout)"
wxPrintDialogData& GetPrintDialogData();
bool Print(wxWindow *parent, wxPyPrintout *printout, int prompt=TRUE);
wxDC* PrintDialog(wxWindow *parent);
- void ReportError(wxWindow *parent, wxPyPrintout *printout, char* message);
+ void ReportError(wxWindow *parent, wxPyPrintout *printout, const wxString& message);
bool Setup(wxWindow *parent);
};
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
- char* name = "frame");
+ const wxString& name = wxPyFrameNameStr);
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"