]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/_textctrl.i
Handle terminating NULL correctly
[wxWidgets.git] / wxPython / src / _textctrl.i
index 7924ad77caf5e543ce14f75ff8c7114039328108..f1e89934f5653f56742034d248e1c2084481d5f1 100644 (file)
@@ -105,9 +105,7 @@ enum wxTextCtrlHitTestResult
 class wxTextAttr
 {
 public:    
-    %nokwargs wxTextAttr;
-    wxTextAttr();
-    wxTextAttr(const wxColour& colText,
+    wxTextAttr(const wxColour& colText = wxNullColour,
                const wxColour& colBack = wxNullColour,
                const wxFont& font = wxNullFont,
                wxTextAttrAlignment alignment = wxTEXT_ALIGNMENT_DEFAULT);
@@ -167,8 +165,9 @@ class wxTextCtrl : public wxControl
 public:
     %pythonAppend wxTextCtrl         "self._setOORInfo(self)"
     %pythonAppend wxTextCtrl()       ""
+    %typemap(out) wxTextCtrl*;    // turn off this typemap
 
-    wxTextCtrl(wxWindow* parent, wxWindowID id,
+    wxTextCtrl(wxWindow* parent, wxWindowID id=-1,
                const wxString& value = wxPyEmptyString,
                const wxPoint& pos = wxDefaultPosition,
                const wxSize& size = wxDefaultSize,
@@ -177,7 +176,10 @@ public:
                const wxString& name = wxPyTextCtrlNameStr);
     %name(PreTextCtrl)wxTextCtrl();
 
-    bool Create(wxWindow* parent, wxWindowID id,
+    // Turn it back on again
+    %typemap(out) wxTextCtrl* { $result = wxPyMake_wxObject($1, $owner); }
+
+    bool Create(wxWindow* parent, wxWindowID id=-1,
                const wxString& value = wxPyEmptyString,
                const wxPoint& pos = wxDefaultPosition,
                const wxSize& size = wxDefaultSize,