]> git.saurik.com Git - wxWidgets.git/commitdiff
Added wxChildFocusEvent
authorRobin Dunn <robin@alldunn.com>
Wed, 28 Nov 2001 09:47:53 +0000 (09:47 +0000)
committerRobin Dunn <robin@alldunn.com>
Wed, 28 Nov 2001 09:47:53 +0000 (09:47 +0000)
Updated wxHtmlWindow

Added wxEditableListBox

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12739 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

22 files changed:
wxPython/contrib/gizmos/gizmos.cpp
wxPython/contrib/gizmos/gizmos.i
wxPython/contrib/gizmos/gizmos.py
wxPython/demo/Main.py
wxPython/demo/wxEditableListBox.py [new file with mode: 0644]
wxPython/src/_defs.i
wxPython/src/_extras.py
wxPython/src/events.i
wxPython/src/export.h
wxPython/src/helpers.h
wxPython/src/html.i
wxPython/src/msw/events.cpp
wxPython/src/msw/events.py
wxPython/src/msw/html.cpp
wxPython/src/msw/html.py
wxPython/src/msw/windows.cpp
wxPython/src/msw/windows.py
wxPython/src/msw/wx.cpp
wxPython/src/msw/wx.py
wxPython/src/windows.i
wxPython/src/wx.i
wxPython/wxPython/.cvsignore

index 65cb5bad2af0ffa10350152a41f3972034494b9f..cb9d8ac35d8433603cc5b4c6c06732837e87df53 100644 (file)
@@ -57,6 +57,7 @@ extern PyObject *SWIG_newvarlink(void);
 
 #include "export.h"
 #include "wx/gizmos/dynamicsash.h"
+#include "wx/gizmos/editlbox.h"
 
 
 static PyObject* t_output_helper(PyObject* target, PyObject* o) {
@@ -456,7 +457,201 @@ static PyObject *_wrap_wxDynamicSashWindow_GetVScrollBar(PyObject *self, PyObjec
     return _resultobj;
 }
 
+static void *SwigwxEditableListBoxTowxPanel(void *ptr) {
+    wxEditableListBox *src;
+    wxPanel *dest;
+    src = (wxEditableListBox *) ptr;
+    dest = (wxPanel *) src;
+    return (void *) dest;
+}
+
+static void *SwigwxEditableListBoxTowxWindow(void *ptr) {
+    wxEditableListBox *src;
+    wxWindow *dest;
+    src = (wxEditableListBox *) ptr;
+    dest = (wxWindow *) src;
+    return (void *) dest;
+}
+
+static void *SwigwxEditableListBoxTowxEvtHandler(void *ptr) {
+    wxEditableListBox *src;
+    wxEvtHandler *dest;
+    src = (wxEditableListBox *) ptr;
+    dest = (wxEvtHandler *) src;
+    return (void *) dest;
+}
+
+static void *SwigwxEditableListBoxTowxObject(void *ptr) {
+    wxEditableListBox *src;
+    wxObject *dest;
+    src = (wxEditableListBox *) ptr;
+    dest = (wxObject *) src;
+    return (void *) dest;
+}
+
+#define new_wxEditableListBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxEditableListBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5))
+static PyObject *_wrap_new_wxEditableListBox(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject * _resultobj;
+    wxEditableListBox * _result;
+    wxWindow * _arg0;
+    wxWindowID  _arg1;
+    wxString * _arg2;
+    wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition;
+    wxSize * _arg4 = (wxSize *) &wxDefaultSize;
+    char * _arg5 = (char *) "editableListBox";
+    PyObject * _argo0 = 0;
+    PyObject * _obj2 = 0;
+    wxPoint  temp;
+    PyObject * _obj3 = 0;
+    wxSize  temp0;
+    PyObject * _obj4 = 0;
+    char *_kwnames[] = { "parent","id","label","pos","size","name", NULL };
+    char _ptemp[128];
+
+    self = self;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO|OOs:new_wxEditableListBox",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_obj4,&_arg5)) 
+        return NULL;
+    if (_argo0) {
+        if (_argo0 == Py_None) { _arg0 = NULL; }
+        else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxEditableListBox. Expected _wxWindow_p.");
+        return NULL;
+        }
+    }
+{
+#if PYTHON_API_VERSION >= 1009
+    char* tmpPtr; int tmpSize;
+    if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
+        PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+        return NULL;
+    }
+    if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
+        return NULL;
+    _arg2 = new wxString(tmpPtr, tmpSize);
+#else
+    if (!PyString_Check(_obj2)) {
+        PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+        return NULL;
+    }
+    _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2));
+#endif
+}
+    if (_obj3)
+{
+    _arg3 = &temp;
+    if (! wxPoint_helper(_obj3, &_arg3))
+        return NULL;
+}
+    if (_obj4)
+{
+    _arg4 = &temp0;
+    if (! wxSize_helper(_obj4, &_arg4))
+        return NULL;
+}
+{
+    wxPy_BEGIN_ALLOW_THREADS;
+        _result = (wxEditableListBox *)new_wxEditableListBox(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5);
+
+    wxPy_END_ALLOW_THREADS;
+}    if (_result) {
+        SWIG_MakePtr(_ptemp, (char *) _result,"_wxEditableListBox_p");
+        _resultobj = Py_BuildValue("s",_ptemp);
+    } else {
+        Py_INCREF(Py_None);
+        _resultobj = Py_None;
+    }
+{
+    if (_obj2)
+        delete _arg2;
+}
+    return _resultobj;
+}
+
+#define wxEditableListBox_SetStrings(_swigobj,_swigarg0)  (_swigobj->SetStrings(_swigarg0))
+static PyObject *_wrap_wxEditableListBox_SetStrings(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject * _resultobj;
+    wxEditableListBox * _arg0;
+    wxArrayString * _arg1;
+    PyObject * _argo0 = 0;
+    PyObject * _obj1 = 0;
+    char *_kwnames[] = { "self","strings", NULL };
+
+    self = self;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxEditableListBox_SetStrings",_kwnames,&_argo0,&_obj1)) 
+        return NULL;
+    if (_argo0) {
+        if (_argo0 == Py_None) { _arg0 = NULL; }
+        else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxEditableListBox_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEditableListBox_SetStrings. Expected _wxEditableListBox_p.");
+        return NULL;
+        }
+    }
+{
+    if (! PySequence_Check(_obj1)) {
+        PyErr_SetString(PyExc_TypeError, "Sequence of strings expected.");
+        return NULL;
+    }
+    _arg1 = new wxArrayString;
+    int i, len=PySequence_Length(_obj1);
+    for (i=0; i<len; i++) {
+        PyObject* item = PySequence_GetItem(_obj1, i);
+        PyObject* str  = PyObject_Str(item);
+        _arg1->Add(PyString_AsString(item));
+        Py_DECREF(item);
+        Py_DECREF(str);
+    }
+}
+{
+    wxPy_BEGIN_ALLOW_THREADS;
+        wxEditableListBox_SetStrings(_arg0,*_arg1);
+
+    wxPy_END_ALLOW_THREADS;
+}    Py_INCREF(Py_None);
+    _resultobj = Py_None;
+{
+    if (_obj1)
+        delete _arg1;
+}
+    return _resultobj;
+}
+
+static PyObject * wxEditableListBox_GetStrings(wxEditableListBox *self) {
+            wxArrayString strings;
+            self->GetStrings(strings);
+            return wxArrayString2PyList_helper(strings);
+        }
+static PyObject *_wrap_wxEditableListBox_GetStrings(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject * _resultobj;
+    PyObject * _result;
+    wxEditableListBox * _arg0;
+    PyObject * _argo0 = 0;
+    char *_kwnames[] = { "self", NULL };
+
+    self = self;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxEditableListBox_GetStrings",_kwnames,&_argo0)) 
+        return NULL;
+    if (_argo0) {
+        if (_argo0 == Py_None) { _arg0 = NULL; }
+        else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxEditableListBox_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEditableListBox_GetStrings. Expected _wxEditableListBox_p.");
+        return NULL;
+        }
+    }
+{
+    wxPy_BEGIN_ALLOW_THREADS;
+        _result = (PyObject *)wxEditableListBox_GetStrings(_arg0);
+
+    wxPy_END_ALLOW_THREADS;
+}{
+  _resultobj = _result;
+}
+    return _resultobj;
+}
+
 static PyMethodDef gizmoscMethods[] = {
+        { "wxEditableListBox_GetStrings", (PyCFunction) _wrap_wxEditableListBox_GetStrings, METH_VARARGS | METH_KEYWORDS },
+        { "wxEditableListBox_SetStrings", (PyCFunction) _wrap_wxEditableListBox_SetStrings, METH_VARARGS | METH_KEYWORDS },
+        { "new_wxEditableListBox", (PyCFunction) _wrap_new_wxEditableListBox, METH_VARARGS | METH_KEYWORDS },
         { "wxDynamicSashWindow_GetVScrollBar", (PyCFunction) _wrap_wxDynamicSashWindow_GetVScrollBar, METH_VARARGS | METH_KEYWORDS },
         { "wxDynamicSashWindow_GetHScrollBar", (PyCFunction) _wrap_wxDynamicSashWindow_GetHScrollBar, METH_VARARGS | METH_KEYWORDS },
         { "wxDynamicSashWindow_Create", (PyCFunction) _wrap_wxDynamicSashWindow_Create, METH_VARARGS | METH_KEYWORDS },
@@ -495,6 +690,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
     { "_size_t","_int",0},
     { "_size_t","_wxWindowID",0},
     { "_size_t","_uint",0},
+    { "_wxPanel","_wxEditableListBox",SwigwxEditableListBoxTowxPanel},
     { "_uint","_wxCoord",0},
     { "_uint","_wxPrintQuality",0},
     { "_uint","_time_t",0},
@@ -526,6 +722,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
     { "_unsigned_short","_wxDateTime_t",0},
     { "_unsigned_short","_WXTYPE",0},
     { "_unsigned_short","_short",0},
+    { "_wxObject","_wxEditableListBox",SwigwxEditableListBoxTowxObject},
     { "_wxObject","_wxDynamicSashWindow",SwigwxDynamicSashWindowTowxObject},
     { "_wxObject","_wxDynamicSashUnifyEvent",SwigwxDynamicSashUnifyEventTowxObject},
     { "_wxObject","_wxDynamicSashSplitEvent",SwigwxDynamicSashSplitEventTowxObject},
@@ -580,7 +777,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
     { "_wxCoord","_size_t",0},
     { "_wxCoord","_time_t",0},
     { "_wxCoord","_wxPrintQuality",0},
+    { "_wxEvtHandler","_wxEditableListBox",SwigwxEditableListBoxTowxEvtHandler},
     { "_wxEvtHandler","_wxDynamicSashWindow",SwigwxDynamicSashWindowTowxEvtHandler},
+    { "_wxWindow","_wxEditableListBox",SwigwxEditableListBoxTowxWindow},
     { "_wxWindow","_wxDynamicSashWindow",SwigwxDynamicSashWindowTowxWindow},
 {0,0,0}};
 
index 36a475aab75545939c9c44da592ef52c44f73fe3..2702de80b8a2527064dbd27ed8ab9c6684448159 100644 (file)
@@ -16,6 +16,7 @@
 %{
 #include "export.h"
 #include "wx/gizmos/dynamicsash.h"
+#include "wx/gizmos/editlbox.h"
 %}
 
 //---------------------------------------------------------------------------
@@ -149,6 +150,35 @@ def EVT_DYNAMIC_SASH_UNIFY(win, id, func):
     win.Connect(id, -1, wxEVT_DYNAMIC_SASH_UNIFY, func)
 "
 
+//----------------------------------------------------------------------
+//----------------------------------------------------------------------
+
+
+// This class provides a composite control that lets the
+// user easily enter list of strings
+class wxEditableListBox : public wxPanel
+{
+public:
+    wxEditableListBox(wxWindow *parent, wxWindowID id,
+                      const wxString& label,
+                      const wxPoint& pos = wxDefaultPosition,
+                      const wxSize& size = wxDefaultSize,
+                      const char* name = "editableListBox");
+
+    void SetStrings(const wxArrayString& strings);
+
+    //void GetStrings(wxArrayString& strings);
+    %addmethods {
+        PyObject* GetStrings() {
+            wxArrayString strings;
+            self->GetStrings(strings);
+            return wxArrayString2PyList_helper(strings);
+        }
+    }
+};
+
+
+
 //----------------------------------------------------------------------
 
 %init %{
@@ -159,8 +189,6 @@ def EVT_DYNAMIC_SASH_UNIFY(win, id, func):
 %}
 
 
-//----------------------------------------------------------------------
-
 %pragma(python) include="_gizmoextras.py";
 
 //----------------------------------------------------------------------
index 35c80ee5f8873d5924e0fd9a56200cf78b07af59..7828ecd390027e44d00e268365b91ac418a0c506 100644 (file)
@@ -107,6 +107,26 @@ def wxPreDynamicSashWindow(*_args,**_kwargs):
     return val
 
 
+class wxEditableListBoxPtr(wxPanelPtr):
+    def __init__(self,this):
+        self.this = this
+        self.thisown = 0
+    def SetStrings(self, *_args, **_kwargs):
+        val = apply(gizmosc.wxEditableListBox_SetStrings,(self,) + _args, _kwargs)
+        return val
+    def GetStrings(self, *_args, **_kwargs):
+        val = apply(gizmosc.wxEditableListBox_GetStrings,(self,) + _args, _kwargs)
+        return val
+    def __repr__(self):
+        return "<C wxEditableListBox instance at %s>" % (self.this,)
+class wxEditableListBox(wxEditableListBoxPtr):
+    def __init__(self,*_args,**_kwargs):
+        self.this = apply(gizmosc.new_wxEditableListBox,_args,_kwargs)
+        self.thisown = 1
+
+
+
+
 
 
 #-------------- FUNCTION WRAPPERS ------------------
index 07e93efb9ab3f30d1ccd4324af94ed629f6045e5..2b4f3eae840d450c9693a490743d74bef654318e 100644 (file)
@@ -37,6 +37,7 @@ _treeList = [
                                 'wxMimeTypesManager',
                                 'wxPopupWindow',
                                 'wxDynamicSashWindow',
+                                'wxEditableListBox',
                                 ]),
 
     ('Windows', ['wxFrame', 'wxDialog', 'wxMiniFrame',
@@ -60,6 +61,7 @@ _treeList = [
                   'wxTreeCtrl', 'wxSpinButton', 'wxSpinCtrl', 'wxStaticText',
                   'wxStaticBitmap', 'wxRadioBox', 'wxSlider', 'wxToolBar',
                   'wxCalendarCtrl', 'wxToggleButton',
+                  'wxEditableListBox',
                   ]),
 
     ('Window Layout', ['wxLayoutConstraints', 'LayoutAnchors', 'Sizers', 'XML_Resource']),
diff --git a/wxPython/demo/wxEditableListBox.py b/wxPython/demo/wxEditableListBox.py
new file mode 100644 (file)
index 0000000..6dab278
--- /dev/null
@@ -0,0 +1,40 @@
+from wxPython.wx import *
+from wxPython.gizmos import *
+
+#----------------------------------------------------------------------
+
+class TestPanel(wxPanel):
+    def __init__(self, parent, log):
+        wxPanel.__init__(self, parent, -1)
+        self.log = log
+
+        self.elb = wxEditableListBox(self, -1, "List of Stuff",
+                                     (50,50), (250, 250))
+
+        self.elb.SetStrings(["This is a nifty ListBox widget",
+                             "that is editable by the user.",
+                             "",
+                             "Use the buttons above to",
+                             "manipulate items in the list",
+                             "Or to add new ones.",
+                             ])
+
+
+
+#----------------------------------------------------------------------
+
+def runTest(frame, nb, log):
+    win = TestPanel(nb, log)
+    return win
+
+
+#----------------------------------------------------------------------
+
+
+
+
+
+overview = """\
+This class provides a composite control that lets the
+user easily enter list of strings.
+"""
index 41f9c3e94da523030b57f3515a7800ad03733532..4e393463b1cf0a1c3b6e7a6d6d02fdbb95ff598b 100644 (file)
@@ -886,6 +886,7 @@ enum wxEventType {
  wxEVT_COMMAND_TOOL_ENTER,
  wxEVT_SET_FOCUS,
  wxEVT_KILL_FOCUS,
+ wxEVT_CHILD_FOCUS,
  wxEVT_MOUSEWHEEL,
 
 /* Mouse event types */
index 0e8da6d20e07f1ba6358c4c538d2a7f6b80a253a..851e4557c521193981ff8a7814a0ce67a3ea22f8 100644 (file)
@@ -75,6 +75,9 @@ def EVT_SET_FOCUS(win, func):
 def EVT_KILL_FOCUS(win, func):
     win.Connect(-1, -1, wxEVT_KILL_FOCUS, func)
 
+def EVT_CHILD_FOCUS(win, func):
+    win.Connect(-1, -1, wxEVT_CHILD_FOCUS, func)
+
 def EVT_ACTIVATE(win, func):
     win.Connect(-1, -1, wxEVT_ACTIVATE, func)
 
index 8e4190a2ccf78bff3c4919ea1b206a52ded901ac..9b1ef3743193319848d2ed638a59d9ded2557295 100644 (file)
@@ -269,6 +269,18 @@ public:
     wxFocusEvent(WXTYPE eventType = 0, int id = 0);
 };
 
+//---------------------------------------------------------------------------
+
+// wxChildFocusEvent notifies the parent that a child has got the focus: unlike
+// wxFocusEvent it is propgated upwards the window chain
+class  wxChildFocusEvent : public wxCommandEvent
+{
+public:
+    wxChildFocusEvent(wxWindow *win = NULL);
+    wxWindow *GetWindow() const;
+};
+
+
 //---------------------------------------------------------------------------
 
 class wxActivateEvent: public wxEvent{
index a1b172ebba5e701f7a3cb830c4ce468cdb6d4814..97587e9d2122320a2b67293d5c834b58f60f3265 100644 (file)
@@ -64,6 +64,8 @@ static void wxPyCoreAPI_IMPORT() {
 #define wxPyMake_wxObject2(a,b)         (wxPyCoreAPIPtr->p_wxPyMake_wxObject(a,b))
 #define wxPyMake_wxSizer(a)             (wxPyCoreAPIPtr->p_wxPyMake_wxSizer(a))
 #define wxPyPtrTypeMap_Add(a, b)        (wxPyCoreAPIPtr->p_wxPyPtrTypeMap_Add(a, b))
+#define wxArrayString2PyList_helper(a)  (wxPyCoreAPIPtr->p_wxArrayString2PyList_helper(a))
+
 
 
 // This one is special.  It's the first function called in SWIG generated
index 318d202842d2603b3b229fbecc7e7a505a832bb3..3eb8574c2223dd1609c496f8eb47d22c95471d65 100644 (file)
@@ -152,7 +152,7 @@ bool _2int_seq_helper(PyObject* source, int* i1, int* i2);
 bool _4int_seq_helper(PyObject* source, int* i1, int* i2, int* i3, int* i4);
 
 
-PyObject* wxArrayString2PyList_helper(const wxArrayString& app);
+PyObject* wxArrayString2PyList_helper(const wxArrayString& arr);
 
 
 #define RETURN_NONE()   { Py_INCREF(Py_None); return Py_None; }
@@ -288,7 +288,7 @@ struct wxPyCoreAPI {
     PyObject*   (*p_wxPyMake_wxObject)(wxObject* source, bool checkEvtHandler);
     PyObject*   (*p_wxPyMake_wxSizer)(wxSizer* source);
     void        (*p_wxPyPtrTypeMap_Add)(const char* commonName, const char* ptrName);
-
+    PyObject*   (*p_wxArrayString2PyList_helper)(const wxArrayString& arr);
 };
 
 #ifdef wxPyUSE_EXPORT
index 5cc5a2530492fedcb3dcb2a03603c7f8895f8d44..1b4f46ef924c012262669f3ba3d064739bc23ef3 100644 (file)
@@ -419,6 +419,7 @@ public:
                    long style = wxHW_SCROLLBAR_AUTO,
                    const wxString& name = "htmlWindow")
         : wxHtmlWindow(parent, id, pos, size, style, name)  {};
+    wxPyHtmlWindow() : wxHtmlWindow() {};
 
     void OnLinkClicked(const wxHtmlLinkInfo& link);
     void base_OnLinkClicked(const wxHtmlLinkInfo& link);
@@ -462,11 +463,19 @@ public:
                  wxSize& size = wxDefaultSize,
                  int flags=wxHW_SCROLLBAR_AUTO,
                  char* name = "htmlWindow");
+    %name(wxPreHtmlWindow)wxPyHtmlWindow();
+
+    bool Create(wxWindow *parent, int id = -1,
+                wxPoint& pos = wxDefaultPosition,
+                wxSize& size = wxDefaultSize,
+                int flags=wxHW_SCROLLBAR_AUTO,
+                char* name = "htmlWindow");
+
 
     void _setCallbackInfo(PyObject* self, PyObject* _class);
     %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxHtmlWindow)"
-
     %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
+    %pragma(python) addtomethod = "wxPreHtmlWindow:val._setOORInfo(val)"
 
     bool SetPage(const wxString& source);
     bool LoadPage(const wxString& location);
index f926938d6d192ceba93f39f0cc74205503d541e5..ca6551994a8563b27cbe2ead19ef041796ea83c7 100644 (file)
@@ -4459,6 +4459,93 @@ static PyObject *_wrap_new_wxFocusEvent(PyObject *self, PyObject *args, PyObject
     return _resultobj;
 }
 
+static void *SwigwxChildFocusEventTowxCommandEvent(void *ptr) {
+    wxChildFocusEvent *src;
+    wxCommandEvent *dest;
+    src = (wxChildFocusEvent *) ptr;
+    dest = (wxCommandEvent *) src;
+    return (void *) dest;
+}
+
+static void *SwigwxChildFocusEventTowxEvent(void *ptr) {
+    wxChildFocusEvent *src;
+    wxEvent *dest;
+    src = (wxChildFocusEvent *) ptr;
+    dest = (wxEvent *) src;
+    return (void *) dest;
+}
+
+static void *SwigwxChildFocusEventTowxObject(void *ptr) {
+    wxChildFocusEvent *src;
+    wxObject *dest;
+    src = (wxChildFocusEvent *) ptr;
+    dest = (wxObject *) src;
+    return (void *) dest;
+}
+
+#define new_wxChildFocusEvent(_swigarg0) (new wxChildFocusEvent(_swigarg0))
+static PyObject *_wrap_new_wxChildFocusEvent(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject * _resultobj;
+    wxChildFocusEvent * _result;
+    wxWindow * _arg0 = (wxWindow *) NULL;
+    PyObject * _argo0 = 0;
+    char *_kwnames[] = { "win", NULL };
+    char _ptemp[128];
+
+    self = self;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:new_wxChildFocusEvent",_kwnames,&_argo0)) 
+        return NULL;
+    if (_argo0) {
+        if (_argo0 == Py_None) { _arg0 = NULL; }
+        else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxChildFocusEvent. Expected _wxWindow_p.");
+        return NULL;
+        }
+    }
+{
+    wxPy_BEGIN_ALLOW_THREADS;
+        _result = (wxChildFocusEvent *)new_wxChildFocusEvent(_arg0);
+
+    wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
+}    if (_result) {
+        SWIG_MakePtr(_ptemp, (char *) _result,"_wxChildFocusEvent_p");
+        _resultobj = Py_BuildValue("s",_ptemp);
+    } else {
+        Py_INCREF(Py_None);
+        _resultobj = Py_None;
+    }
+    return _resultobj;
+}
+
+#define wxChildFocusEvent_GetWindow(_swigobj)  (_swigobj->GetWindow())
+static PyObject *_wrap_wxChildFocusEvent_GetWindow(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject * _resultobj;
+    wxWindow * _result;
+    wxChildFocusEvent * _arg0;
+    PyObject * _argo0 = 0;
+    char *_kwnames[] = { "self", NULL };
+
+    self = self;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxChildFocusEvent_GetWindow",_kwnames,&_argo0)) 
+        return NULL;
+    if (_argo0) {
+        if (_argo0 == Py_None) { _arg0 = NULL; }
+        else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxChildFocusEvent_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxChildFocusEvent_GetWindow. Expected _wxChildFocusEvent_p.");
+        return NULL;
+        }
+    }
+{
+    wxPy_BEGIN_ALLOW_THREADS;
+        _result = (wxWindow *)wxChildFocusEvent_GetWindow(_arg0);
+
+    wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
+}{ _resultobj = wxPyMake_wxObject(_result); }
+    return _resultobj;
+}
+
 static void *SwigwxActivateEventTowxEvent(void *ptr) {
     wxActivateEvent *src;
     wxEvent *dest;
@@ -7059,6 +7146,8 @@ static PyMethodDef eventscMethods[] = {
         { "new_wxInitDialogEvent", (PyCFunction) _wrap_new_wxInitDialogEvent, METH_VARARGS | METH_KEYWORDS },
         { "wxActivateEvent_GetActive", (PyCFunction) _wrap_wxActivateEvent_GetActive, METH_VARARGS | METH_KEYWORDS },
         { "new_wxActivateEvent", (PyCFunction) _wrap_new_wxActivateEvent, METH_VARARGS | METH_KEYWORDS },
+        { "wxChildFocusEvent_GetWindow", (PyCFunction) _wrap_wxChildFocusEvent_GetWindow, METH_VARARGS | METH_KEYWORDS },
+        { "new_wxChildFocusEvent", (PyCFunction) _wrap_new_wxChildFocusEvent, METH_VARARGS | METH_KEYWORDS },
         { "new_wxFocusEvent", (PyCFunction) _wrap_new_wxFocusEvent, METH_VARARGS | METH_KEYWORDS },
         { "wxEraseEvent_GetDC", (PyCFunction) _wrap_wxEraseEvent_GetDC, METH_VARARGS | METH_KEYWORDS },
         { "new_wxEraseEvent", (PyCFunction) _wrap_new_wxEraseEvent, METH_VARARGS | METH_KEYWORDS },
@@ -7229,6 +7318,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
     { "_wxEvent","_wxMenuEvent",SwigwxMenuEventTowxEvent},
     { "_wxEvent","_wxInitDialogEvent",SwigwxInitDialogEventTowxEvent},
     { "_wxEvent","_wxActivateEvent",SwigwxActivateEventTowxEvent},
+    { "_wxEvent","_wxChildFocusEvent",SwigwxChildFocusEventTowxEvent},
     { "_wxEvent","_wxFocusEvent",SwigwxFocusEventTowxEvent},
     { "_wxEvent","_wxEraseEvent",SwigwxEraseEventTowxEvent},
     { "_wxEvent","_wxPaintEvent",SwigwxPaintEventTowxEvent},
@@ -7275,6 +7365,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
     { "_wxCommandEvent","_wxWindowDestroyEvent",SwigwxWindowDestroyEventTowxCommandEvent},
     { "_wxCommandEvent","_wxWindowCreateEvent",SwigwxWindowCreateEventTowxCommandEvent},
     { "_wxCommandEvent","_wxNotifyEvent",SwigwxNotifyEventTowxCommandEvent},
+    { "_wxCommandEvent","_wxChildFocusEvent",SwigwxChildFocusEventTowxCommandEvent},
     { "_wxCommandEvent","_wxSpinEvent",SwigwxSpinEventTowxCommandEvent},
     { "_wxCommandEvent","_wxScrollEvent",SwigwxScrollEventTowxCommandEvent},
     { "_char","_wxChar",0},
@@ -7317,6 +7408,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
     { "_wxObject","_wxMenuEvent",SwigwxMenuEventTowxObject},
     { "_wxObject","_wxInitDialogEvent",SwigwxInitDialogEventTowxObject},
     { "_wxObject","_wxActivateEvent",SwigwxActivateEventTowxObject},
+    { "_wxObject","_wxChildFocusEvent",SwigwxChildFocusEventTowxObject},
     { "_wxObject","_wxFocusEvent",SwigwxFocusEventTowxObject},
     { "_wxObject","_wxEraseEvent",SwigwxEraseEventTowxObject},
     { "_wxObject","_wxPaintEvent",SwigwxPaintEventTowxObject},
index a50e4f988c7dcb6c82589a6c07cf033078690d51..03051a07027f94c9fb2e221f96b5987f4f317030 100644 (file)
@@ -574,6 +574,23 @@ class wxFocusEvent(wxFocusEventPtr):
 
 
 
+class wxChildFocusEventPtr(wxCommandEventPtr):
+    def __init__(self,this):
+        self.this = this
+        self.thisown = 0
+    def GetWindow(self, *_args, **_kwargs):
+        val = apply(eventsc.wxChildFocusEvent_GetWindow,(self,) + _args, _kwargs)
+        return val
+    def __repr__(self):
+        return "<C wxChildFocusEvent instance at %s>" % (self.this,)
+class wxChildFocusEvent(wxChildFocusEventPtr):
+    def __init__(self,*_args,**_kwargs):
+        self.this = apply(eventsc.new_wxChildFocusEvent,_args,_kwargs)
+        self.thisown = 1
+
+
+
+
 class wxActivateEventPtr(wxEventPtr):
     def __init__(self,this):
         self.this = this
index fa722814e8b099a9a115c4881f984cc239810bb7..c240f45c0658c21e06f9302cc07c4bb0abd6eac4 100644 (file)
@@ -201,6 +201,7 @@ public:
                    long style = wxHW_SCROLLBAR_AUTO,
                    const wxString& name = "htmlWindow")
         : wxHtmlWindow(parent, id, pos, size, style, name)  {};
+    wxPyHtmlWindow() : wxHtmlWindow() {};
 
     void OnLinkClicked(const wxHtmlLinkInfo& link);
     void base_OnLinkClicked(const wxHtmlLinkInfo& link);
@@ -4076,6 +4077,88 @@ static PyObject *_wrap_new_wxHtmlWindow(PyObject *self, PyObject *args, PyObject
     return _resultobj;
 }
 
+#define new_wxPreHtmlWindow() (new wxPyHtmlWindow())
+static PyObject *_wrap_new_wxPreHtmlWindow(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject * _resultobj;
+    wxPyHtmlWindow * _result;
+    char *_kwnames[] = {  NULL };
+    char _ptemp[128];
+
+    self = self;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreHtmlWindow",_kwnames)) 
+        return NULL;
+{
+    wxPy_BEGIN_ALLOW_THREADS;
+        _result = (wxPyHtmlWindow *)new_wxPreHtmlWindow();
+
+    wxPy_END_ALLOW_THREADS;
+}    if (_result) {
+        SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyHtmlWindow_p");
+        _resultobj = Py_BuildValue("s",_ptemp);
+    } else {
+        Py_INCREF(Py_None);
+        _resultobj = Py_None;
+    }
+    return _resultobj;
+}
+
+#define wxHtmlWindow_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)  (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5))
+static PyObject *_wrap_wxHtmlWindow_Create(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject * _resultobj;
+    bool  _result;
+    wxPyHtmlWindow * _arg0;
+    wxWindow * _arg1;
+    int  _arg2 = (int ) -1;
+    wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition;
+    wxSize * _arg4 = (wxSize *) &wxDefaultSize;
+    int  _arg5 = (int ) wxHW_SCROLLBAR_AUTO;
+    char * _arg6 = (char *) "htmlWindow";
+    PyObject * _argo0 = 0;
+    PyObject * _argo1 = 0;
+    wxPoint  temp;
+    PyObject * _obj3 = 0;
+    wxSize  temp0;
+    PyObject * _obj4 = 0;
+    char *_kwnames[] = { "self","parent","id","pos","size","flags","name", NULL };
+
+    self = self;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|iOOis:wxHtmlWindow_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6)) 
+        return NULL;
+    if (_argo0) {
+        if (_argo0 == Py_None) { _arg0 = NULL; }
+        else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlWindow_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWindow_Create. Expected _wxPyHtmlWindow_p.");
+        return NULL;
+        }
+    }
+    if (_argo1) {
+        if (_argo1 == Py_None) { _arg1 = NULL; }
+        else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlWindow_Create. Expected _wxWindow_p.");
+        return NULL;
+        }
+    }
+    if (_obj3)
+{
+    _arg3 = &temp;
+    if (! wxPoint_helper(_obj3, &_arg3))
+        return NULL;
+}
+    if (_obj4)
+{
+    _arg4 = &temp0;
+    if (! wxSize_helper(_obj4, &_arg4))
+        return NULL;
+}
+{
+    wxPy_BEGIN_ALLOW_THREADS;
+        _result = (bool )wxHtmlWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6);
+
+    wxPy_END_ALLOW_THREADS;
+}    _resultobj = Py_BuildValue("i",_result);
+    return _resultobj;
+}
+
 #define wxHtmlWindow__setCallbackInfo(_swigobj,_swigarg0,_swigarg1)  (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1))
 static PyObject *_wrap_wxHtmlWindow__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
@@ -6266,6 +6349,8 @@ static PyMethodDef htmlcMethods[] = {
         { "wxHtmlWindow_LoadPage", (PyCFunction) _wrap_wxHtmlWindow_LoadPage, METH_VARARGS | METH_KEYWORDS },
         { "wxHtmlWindow_SetPage", (PyCFunction) _wrap_wxHtmlWindow_SetPage, METH_VARARGS | METH_KEYWORDS },
         { "wxHtmlWindow__setCallbackInfo", (PyCFunction) _wrap_wxHtmlWindow__setCallbackInfo, METH_VARARGS | METH_KEYWORDS },
+        { "wxHtmlWindow_Create", (PyCFunction) _wrap_wxHtmlWindow_Create, METH_VARARGS | METH_KEYWORDS },
+        { "new_wxPreHtmlWindow", (PyCFunction) _wrap_new_wxPreHtmlWindow, METH_VARARGS | METH_KEYWORDS },
         { "new_wxHtmlWindow", (PyCFunction) _wrap_new_wxHtmlWindow, METH_VARARGS | METH_KEYWORDS },
         { "new_wxHtmlWidgetCell", (PyCFunction) _wrap_new_wxHtmlWidgetCell, METH_VARARGS | METH_KEYWORDS },
         { "new_wxHtmlFontCell", (PyCFunction) _wrap_new_wxHtmlFontCell, METH_VARARGS | METH_KEYWORDS },
index b2db058c73552c22c849e2c6335ce25c35fc9b85..030ed6b2b8f6777784fdceab813d4d29859de4b5 100644 (file)
@@ -511,6 +511,9 @@ class wxHtmlWindowPtr(wxScrolledWindowPtr):
     def __init__(self,this):
         self.this = this
         self.thisown = 0
+    def Create(self, *_args, **_kwargs):
+        val = apply(htmlc.wxHtmlWindow_Create,(self,) + _args, _kwargs)
+        return val
     def _setCallbackInfo(self, *_args, **_kwargs):
         val = apply(htmlc.wxHtmlWindow__setCallbackInfo,(self,) + _args, _kwargs)
         return val
@@ -602,6 +605,12 @@ class wxHtmlWindow(wxHtmlWindowPtr):
 
 
 
+def wxPreHtmlWindow(*_args,**_kwargs):
+    val = wxHtmlWindowPtr(apply(htmlc.new_wxPreHtmlWindow,_args,_kwargs))
+    val.thisown = 1
+    val._setOORInfo(val)
+    return val
+
 
 class wxHtmlDCRendererPtr(wxObjectPtr):
     def __init__(self,this):
index 817c0970c80aa187f6ee5d6ba8b9f67afdfbfda1..4ac2d168ac47e2108d2174e61f703ce15af88503 100644 (file)
@@ -4595,13 +4595,13 @@ static PyObject *_wrap_wxWindow_Show(PyObject *self, PyObject *args, PyObject *k
     PyObject * _resultobj;
     bool  _result;
     wxWindow * _arg0;
-    bool  _arg1;
+    bool  _arg1 = (bool ) TRUE;
     PyObject * _argo0 = 0;
-    int tempbool1;
+    int tempbool1 = (int) TRUE;
     char *_kwnames[] = { "self","show", NULL };
 
     self = self;
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxWindow_Show",_kwnames,&_argo0,&tempbool1)) 
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxWindow_Show",_kwnames,&_argo0,&tempbool1)) 
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
index 0a66bdd9aac2448a7d472178483bb295ac94f65e..e874ed06edf7ab8f569094a33ca5a9edf477c082 100644 (file)
@@ -609,6 +609,7 @@ class wxPanel(wxPanelPtr):
 def wxPrePanel(*_args,**_kwargs):
     val = wxPanelPtr(apply(windowsc.new_wxPrePanel,_args,_kwargs))
     val.thisown = 1
+    val._setOORInfo(val)
     return val
 
 
index d180d84759914a3210c9a446ccc03a6191d749de..11a4f295bbdf07e20be5b49ab22de7beb3e2e503 100644 (file)
@@ -674,6 +674,7 @@ static wxPyCoreAPI API = {
     wxPyMake_wxObject,
     wxPyMake_wxSizer,
     wxPyPtrTypeMap_Add,
+    wxArrayString2PyList_helper
 };
 
 
@@ -2507,6 +2508,7 @@ SWIGEXPORT(void) initwxc() {
         PyDict_SetItemString(d,"wxEVT_COMMAND_TOOL_ENTER", PyInt_FromLong((long) wxEVT_COMMAND_TOOL_ENTER));
         PyDict_SetItemString(d,"wxEVT_SET_FOCUS", PyInt_FromLong((long) wxEVT_SET_FOCUS));
         PyDict_SetItemString(d,"wxEVT_KILL_FOCUS", PyInt_FromLong((long) wxEVT_KILL_FOCUS));
+        PyDict_SetItemString(d,"wxEVT_CHILD_FOCUS", PyInt_FromLong((long) wxEVT_CHILD_FOCUS));
         PyDict_SetItemString(d,"wxEVT_MOUSEWHEEL", PyInt_FromLong((long) wxEVT_MOUSEWHEEL));
         PyDict_SetItemString(d,"wxEVT_LEFT_DOWN", PyInt_FromLong((long) wxEVT_LEFT_DOWN));
         PyDict_SetItemString(d,"wxEVT_LEFT_UP", PyInt_FromLong((long) wxEVT_LEFT_UP));
index 120679b4803c193f8f8038e151801365ee4d01b2..149b6822397d3eac924c21dc8374628131e5d1ee 100644 (file)
@@ -771,6 +771,7 @@ wxEVT_COMMAND_TOOL_RCLICKED = wxc.wxEVT_COMMAND_TOOL_RCLICKED
 wxEVT_COMMAND_TOOL_ENTER = wxc.wxEVT_COMMAND_TOOL_ENTER
 wxEVT_SET_FOCUS = wxc.wxEVT_SET_FOCUS
 wxEVT_KILL_FOCUS = wxc.wxEVT_KILL_FOCUS
+wxEVT_CHILD_FOCUS = wxc.wxEVT_CHILD_FOCUS
 wxEVT_MOUSEWHEEL = wxc.wxEVT_MOUSEWHEEL
 wxEVT_LEFT_DOWN = wxc.wxEVT_LEFT_DOWN
 wxEVT_LEFT_UP = wxc.wxEVT_LEFT_UP
@@ -947,6 +948,9 @@ def EVT_SET_FOCUS(win, func):
 def EVT_KILL_FOCUS(win, func):
     win.Connect(-1, -1, wxEVT_KILL_FOCUS, func)
 
+def EVT_CHILD_FOCUS(win, func):
+    win.Connect(-1, -1, wxEVT_CHILD_FOCUS, func)
+
 def EVT_ACTIVATE(win, func):
     win.Connect(-1, -1, wxEVT_ACTIVATE, func)
 
index 53d137d72bc0bdeef3f5178d3848538eaa8674ef..c941ed2e6d91c1cf7562d0708c5c0b7a751bc34b 100644 (file)
@@ -336,7 +336,7 @@ public:
     void SetEventHandler(wxEvtHandler* handler);
     void SetExtraStyle(long exStyle);
     void SetTitle(const wxString& title);
-    bool Show(bool show);
+    bool Show(bool show=TRUE);
     bool TransferDataFromWindow();
     bool TransferDataToWindow();
     bool Validate();
@@ -452,7 +452,7 @@ public:
                 const char* name = "panel");
 
     %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
-    %pragma(python) addtomethod = "XXX:val._setOORInfo(self)"
+    %pragma(python) addtomethod = "wxPrePanel:val._setOORInfo(val)"
 
     void InitDialog();
     wxButton* GetDefaultItem();
index 4fdfa903e93dff567b5ee108ba4db2bac59b10b6..6b45c74e3f95e72c0137e885d4943d65dd21256f 100644 (file)
@@ -192,6 +192,7 @@ static wxPyCoreAPI API = {
     wxPyMake_wxObject,
     wxPyMake_wxSizer,
     wxPyPtrTypeMap_Add,
+    wxArrayString2PyList_helper
 };
 
 
index 8550dc66c9808233230f31d78efcc18402c1d64c..3ca2ed886a9ac466e227dd28093cd21ca9d47215 100644 (file)
@@ -1,39 +1,3 @@
 *.pyc
 *.pyd
-__init__.py
-__version__.py
-calendar.py
-clip_dnd.py
-cmndlgs.py
-controls.py
-controls2.py
-events.py
-filesys.py
-frames.py
-gdi.py
-glcanvas.py
-grid.py
-help.py
-html.py
-htmlhelp.py
-image.py
-mdi.py
-misc.py
-misc2.py
-ogl.py
-oglbasic.py
-oglcanvas.py
-oglshapes.py
-oglshapes2.py
-printfw.py
-sizers.py
-stattool.py
-stc.py
-stc_.py
-streams.py
-utils.py
-windows.py
-windows2.py
-windows3.py
-wx.py
-xrc.py
+*.py