};
-
-%typemap(in) (int widths, int* widths_field) {
- $1 = PyList_Size($input);
- $2 = int_LIST_helper($input);
- if ($2 == NULL) SWIG_fail;
-}
-
-%typemap(freearg) (int widths, int* widths_field) {
- if ($2) delete [] $2;
-}
-
-
//---------------------------------------------------------------------------
class wxTopLevelWindow : public wxWindow
public:
%pythonAppend wxFrame "self._setOORInfo(self)"
%pythonAppend wxFrame() ""
+ %typemap(out) wxFrame*; // turn off this typemap
wxFrame(wxWindow* parent, const wxWindowID id=-1,
const wxString& title = wxPyEmptyString,
const wxString& name = wxPyFrameNameStr);
%name(PreFrame)wxFrame();
+ // Turn it back on again
+ %typemap(out) wxFrame* { $result = wxPyMake_wxObject($1, $owner); }
+
+
bool Create(wxWindow* parent, const wxWindowID id=-1,
const wxString& title = wxPyEmptyString,
const wxPoint& pos = wxDefaultPosition,
// sends a size event to the window using its current size -- this has an
// effect of refreshing the window layout
//
- virtual void SendSizeEvent() { }
+ virtual void SendSizeEvent();
// menu bar functions
public:
%pythonAppend wxDialog "self._setOORInfo(self)"
%pythonAppend wxDialog() ""
+ %typemap(out) wxDialog*; // turn off this typemap
wxDialog(wxWindow* parent,
const wxWindowID id=-1,
const wxString& name = wxPyDialogNameStr);
%name(PreDialog)wxDialog();
+ // Turn it back on again
+ %typemap(out) wxDialog* { $result = wxPyMake_wxObject($1, $owner); }
+
bool Create(wxWindow* parent,
const wxWindowID id=-1,
const wxString& title = wxPyEmptyString,
// the modal dialogs have a return code - usually the id of the last
// pressed button
- void SetReturnCode(int returnCode) { m_returnCode = returnCode; }
- int GetReturnCode() const { return m_returnCode; }
+ void SetReturnCode(int returnCode);
+ int GetReturnCode() const;
// splits text up at newlines and places the
// lines into a vertical wxBoxSizer
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
+
+ %pythoncode {
+ def SendSizeEvent(self):
+ self.ProcessEvent(wx.SizeEvent((-1,-1)))
+ }
};
//---------------------------------------------------------------------------