]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/_statctrls.i
fixed deadlock when calling wxPostEvent() from worker thread
[wxWidgets.git] / wxPython / src / _statctrls.i
index f2f726e60b24d3cf9770db752df40e6d74bcb15d..b3be54e9609a4e82827516049c6e4dca0ee6eec6 100644 (file)
@@ -19,6 +19,7 @@
 MAKE_CONST_WXSTRING(StaticBitmapNameStr);
 MAKE_CONST_WXSTRING(StaticBoxNameStr);
 MAKE_CONST_WXSTRING(StaticTextNameStr);
+MAKE_CONST_WXSTRING(StaticLineNameStr);
 
 //---------------------------------------------------------------------------
 %newgroup
@@ -29,15 +30,21 @@ class wxStaticBox : public wxControl {
 public:
     %pythonAppend wxStaticBox         "self._setOORInfo(self)"
     %pythonAppend wxStaticBox()       ""
+    %typemap(out) wxStaticBox*;    // turn off this typemap
 
-    wxStaticBox(wxWindow* parent, wxWindowID id, const wxString& label,
+    wxStaticBox(wxWindow* parent, wxWindowID id=-1,
+                const wxString& label = wxPyEmptyString,
                 const wxPoint& pos = wxDefaultPosition,
                 const wxSize& size = wxDefaultSize,
                 long style = 0,
                 const wxString& name = wxPyStaticBoxNameStr);
-    %name(PreStaticBox)wxStaticBox();
+    %RenameCtor(PreStaticBox, wxStaticBox());
 
-    bool Create(wxWindow* parent, wxWindowID id, const wxString& label,
+    // Turn it back on again
+    %typemap(out) wxStaticBox* { $result = wxPyMake_wxObject($1, $owner); }
+
+    bool Create(wxWindow* parent, wxWindowID id=-1,
+                const wxString& label = wxPyEmptyString,
                 const wxPoint& pos = wxDefaultPosition,
                 const wxSize& size = wxDefaultSize,
                 long style = 0,
@@ -59,18 +66,18 @@ public:
     %pythonAppend wxStaticLine         "self._setOORInfo(self)"
     %pythonAppend wxStaticLine()       ""
 
-    wxStaticLine( wxWindow *parent, wxWindowID id,
+    wxStaticLine( wxWindow *parent, wxWindowID id=-1,
                   const wxPoint &pos = wxDefaultPosition,
                   const wxSize &size = wxDefaultSize,
                   long style = wxLI_HORIZONTAL,
-                  const wxString& name = wxPyStaticTextNameStr);
-    %name(PreStaticLine)wxStaticLine();
+                  const wxString& name = wxPyStaticLineNameStr);
+    %RenameCtor(PreStaticLine, wxStaticLine());
 
-    bool Create( wxWindow *parent, wxWindowID id,
+    bool Create( wxWindow *parent, wxWindowID id=-1,
                   const wxPoint &pos = wxDefaultPosition,
                   const wxSize &size = wxDefaultSize,
                   long style = wxLI_HORIZONTAL,
-                  const wxString& name = wxPyStaticTextNameStr);
+                  const wxString& name = wxPyStaticLineNameStr);
 
     // is the line vertical?
     bool IsVertical() const;
@@ -93,19 +100,29 @@ public:
     %pythonAppend wxStaticText         "self._setOORInfo(self)"
     %pythonAppend wxStaticText()       ""
 
-    wxStaticText(wxWindow* parent, wxWindowID id, const wxString& label,
+    wxStaticText(wxWindow* parent, wxWindowID id=-1,
+                 const wxString& label = wxPyEmptyString,
                  const wxPoint& pos = wxDefaultPosition,
                  const wxSize& size = wxDefaultSize,
                  long style = 0,
                  const wxString& name = wxPyStaticTextNameStr);
-    %name(PreStaticText)wxStaticText();
+    %RenameCtor(PreStaticText, wxStaticText());
 
-    bool Create(wxWindow* parent, wxWindowID id, const wxString& label,
+    bool Create(wxWindow* parent, wxWindowID id=-1,
+                const wxString& label = wxPyEmptyString,
                  const wxPoint& pos = wxDefaultPosition,
                  const wxSize& size = wxDefaultSize,
                  long style = 0,
                  const wxString& name = wxPyStaticTextNameStr);
 
+    DocDeclStr(
+        void , Wrap(int width),
+        "This functions wraps the control's label so that each of its lines
+becomes at most ``width`` pixels wide if possible (the lines are
+broken at words boundaries so it might not be the case if words are
+too long). If ``width`` is negative, no wrapping is done.", "");
+    
+    
     static wxVisualAttributes
     GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 };
@@ -120,16 +137,16 @@ public:
     %pythonAppend wxStaticBitmap         "self._setOORInfo(self)"
     %pythonAppend wxStaticBitmap()       ""
 
-    wxStaticBitmap(wxWindow* parent, wxWindowID id,
-                   const wxBitmap& bitmap,
+    wxStaticBitmap(wxWindow* parent, wxWindowID id=-1,
+                   const wxBitmap& bitmap = wxNullBitmap,
                    const wxPoint& pos = wxDefaultPosition,
                    const wxSize& size = wxDefaultSize,
                    long style = 0,
                    const wxString& name = wxPyStaticBitmapNameStr);
-    %name(PreStaticBitmap)wxStaticBitmap();
+    %RenameCtor(PreStaticBitmap, wxStaticBitmap());
 
-    bool Create(wxWindow* parent, wxWindowID id,
-                   const wxBitmap& bitmap,
+    bool Create(wxWindow* parent, wxWindowID id=-1,
+                   const wxBitmap& bitmap = wxNullBitmap,
                    const wxPoint& pos = wxDefaultPosition,
                    const wxSize& size = wxDefaultSize,
                    long style = 0,