]> git.saurik.com Git - wxWidgets.git/commitdiff
Add pos, size and style parameters to the window constructors
authorRobin Dunn <robin@alldunn.com>
Sat, 6 Jul 2002 00:42:51 +0000 (00:42 +0000)
committerRobin Dunn <robin@alldunn.com>
Sat, 6 Jul 2002 00:42:51 +0000 (00:42 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16051 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/contrib/iewin/IEHtmlWin.cpp
wxPython/contrib/iewin/IEHtmlWin.h
wxPython/contrib/iewin/iewin.cpp
wxPython/contrib/iewin/iewin.i
wxPython/contrib/iewin/wxactivex.cpp
wxPython/contrib/iewin/wxactivex.h

index ac4131569f981b8afda04c391ff6c9fb3998dadd..ae566bb1b2da2eccc1957363ea9897b799c82d56 100644 (file)
@@ -177,8 +177,12 @@ static const CLSID CLSID_MozillaBrowser =
 //#define PROGID L"SoftwareFX.ChartFX.20"
 
 
-wxIEHtmlWin::wxIEHtmlWin(wxWindow * parent, wxWindowID id)
-       : wxActiveX(parent, PROGID, id)
+wxIEHtmlWin::wxIEHtmlWin(wxWindow * parent, wxWindowID id,
+              const wxPoint& pos,
+              const wxSize& size,
+              long style,
+              const wxString& name)
+       : wxActiveX(parent, PROGID, id, pos, size, style, name)
 {
     SetupBrowser();
 }
index c62f1d7b8ddf1dd6381c9f488e4f7509f11cf4d6..a7635817ff471c73818cdd112a965d0803055be7 100644 (file)
@@ -62,7 +62,11 @@ enum wxIEHtmlRefreshLevel {
 class wxIEHtmlWin : public wxActiveX
 {
 public:
-    wxIEHtmlWin(wxWindow * parent, wxWindowID id = -1);
+    wxIEHtmlWin(wxWindow * parent, wxWindowID id = -1,
+                const wxPoint& pos = wxDefaultPosition,
+                const wxSize& size = wxDefaultSize,
+                long style = 0,
+                const wxString& name = wxPanelNameStr);
     virtual ~wxIEHtmlWin();
 
     void LoadUrl(const wxString&);
index 9ef26c1bc4ce4bfcff28ecba22741fe56367027c..ea84cf4f8e166c6b68a6f9229bc52d1c4e06c1e6 100644 (file)
@@ -84,6 +84,9 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
     }
     return target;
 }
+
+    // Put some wx default wxChar* values into wxStrings.
+    DECLARE_DEF_STRING(PanelNameStr);
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -264,18 +267,27 @@ static void *SwigwxIEHtmlWinTowxObject(void *ptr) {
     return (void *) dest;
 }
 
-#define new_wxIEHtmlWin(_swigarg0,_swigarg1) (new wxIEHtmlWin(_swigarg0,_swigarg1))
+#define new_wxIEHtmlWin(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxIEHtmlWin(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5))
 static PyObject *_wrap_new_wxIEHtmlWin(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
     wxIEHtmlWin * _result;
     wxWindow * _arg0;
     wxWindowID  _arg1 = (wxWindowID ) -1;
+    wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition;
+    wxSize * _arg3 = (wxSize *) &wxDefaultSize;
+    long  _arg4 = (long ) 0;
+    wxString * _arg5 = (wxString *) &wxPyPanelNameStr;
     PyObject * _argo0 = 0;
-    char *_kwnames[] = { "parent","id", NULL };
+    wxPoint  temp;
+    PyObject * _obj2 = 0;
+    wxSize  temp0;
+    PyObject * _obj3 = 0;
+    PyObject * _obj5 = 0;
+    char *_kwnames[] = { "parent","id","pos","size","style","name", NULL };
     char _ptemp[128];
 
     self = self;
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:new_wxIEHtmlWin",_kwnames,&_argo0,&_arg1)) 
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOlO:new_wxIEHtmlWin",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_obj5)) 
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -284,9 +296,27 @@ static PyObject *_wrap_new_wxIEHtmlWin(PyObject *self, PyObject *args, PyObject
         return NULL;
         }
     }
+    if (_obj2)
+{
+    _arg2 = &temp;
+    if (! wxPoint_helper(_obj2, &_arg2))
+        return NULL;
+}
+    if (_obj3)
+{
+    _arg3 = &temp0;
+    if (! wxSize_helper(_obj3, &_arg3))
+        return NULL;
+}
+    if (_obj5)
+{
+    _arg5 = wxString_in_helper(_obj5);
+    if (_arg5 == NULL)
+        return NULL;
+}
 {
     PyThreadState* __tstate = wxPyBeginAllowThreads();
-    _result = (wxIEHtmlWin *)new_wxIEHtmlWin(_arg0,_arg1);
+    _result = (wxIEHtmlWin *)new_wxIEHtmlWin(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5);
 
     wxPyEndAllowThreads(__tstate);
     if (PyErr_Occurred()) return NULL;
@@ -297,6 +327,10 @@ static PyObject *_wrap_new_wxIEHtmlWin(PyObject *self, PyObject *args, PyObject
         Py_INCREF(Py_None);
         _resultobj = Py_None;
     }
+{
+    if (_obj5)
+        delete _arg5;
+}
     return _resultobj;
 }
 
index 0259c427a2f7294fc9113e2266790b01909816f9..ee39c836a8cd44d229f155958de32af180fc247f 100644 (file)
 
 //---------------------------------------------------------------------------
 
+%{
+    // Put some wx default wxChar* values into wxStrings.
+    DECLARE_DEF_STRING(PanelNameStr);
+%}
+
+//---------------------------------------------------------------------------
+
 class wxMSHTMLEvent : public wxNotifyEvent
 {
 public:
@@ -86,7 +93,11 @@ enum wxIEHtmlRefreshLevel {
 class wxIEHtmlWin : public wxWindow /* wxActiveX */
 {
 public:
-    wxIEHtmlWin(wxWindow * parent, wxWindowID id = -1);
+    wxIEHtmlWin(wxWindow * parent, wxWindowID id = -1,
+                const wxPoint& pos = wxDefaultPosition,
+                const wxSize& size = wxDefaultSize,
+                long style = 0,
+                const wxString& name = wxPyPanelNameStr);
 
     void LoadUrl(const wxString&);
     bool LoadString(wxString html);
index 9e7d716b9d4e2b9fd89e60e4185446b7c67d1bae..c58e2ee90c4eefb2f6c556e04be44a76ea1d2f7e 100644 (file)
@@ -185,16 +185,24 @@ DEFINE_OLE_TABLE(FrameSite)
 END_OLE_TABLE;
 
 
-wxActiveX::wxActiveX(wxWindow * parent, REFCLSID clsid, wxWindowID id) :
-       wxWindow(parent, id)
+wxActiveX::wxActiveX(wxWindow * parent, REFCLSID clsid, wxWindowID id,
+              const wxPoint& pos,
+              const wxSize& size,
+              long style,
+              const wxString& name) :
+       wxWindow(parent, id, pos, size, style, name)
 {
        m_bAmbientUserMode = true;
     m_docAdviseCookie = 0;
        CreateActiveX(clsid);
 }
 
-wxActiveX::wxActiveX(wxWindow * parent, wxString progId, wxWindowID id) :
-       wxWindow(parent, id)
+wxActiveX::wxActiveX(wxWindow * parent, wxString progId, wxWindowID id,
+              const wxPoint& pos,
+              const wxSize& size,
+              long style,
+              const wxString& name) :
+       wxWindow(parent, id, pos, size, style, name)
 {
        m_bAmbientUserMode = true;
     m_docAdviseCookie = 0;
index 2d36e37541f24d1ca3fa8d51321fe6d763bcc99c..abe779aa0a7415f64d473cc4363f771ce9e4d00a 100644 (file)
@@ -258,20 +258,29 @@ class wxOleInit
 
 class wxActiveX : public wxWindow {
 public:
-       wxActiveX(wxWindow * parent, REFCLSID clsid, wxWindowID id = -1);
-    wxActiveX(wxWindow * parent, wxString progId, wxWindowID id = -1);
-       virtual ~wxActiveX();
-
-       void CreateActiveX(REFCLSID clsid);
+    wxActiveX(wxWindow * parent, REFCLSID clsid, wxWindowID id = -1,
+              const wxPoint& pos = wxDefaultPosition,
+              const wxSize& size = wxDefaultSize,
+              long style = 0,
+              const wxString& name = wxPanelNameStr);
+    wxActiveX(wxWindow * parent, wxString progId, wxWindowID id = -1,
+              const wxPoint& pos = wxDefaultPosition,
+              const wxSize& size = wxDefaultSize,
+              long style = 0,
+              const wxString& name = wxPanelNameStr);
+
+    virtual ~wxActiveX();
+
+    void CreateActiveX(REFCLSID clsid);
     void CreateActiveX(LPOLESTR progId);
 
-       HRESULT ConnectAdvise(REFIID riid, IUnknown *eventSink);
+    HRESULT ConnectAdvise(REFIID riid, IUnknown *eventSink);
 
-       void OnSize(wxSizeEvent&);
-       void OnSetFocus(wxFocusEvent&);
+    void OnSize(wxSizeEvent&);
+    void OnSetFocus(wxFocusEvent&);
     void OnKillFocus(wxFocusEvent&);
 
-       DECLARE_EVENT_TABLE();
+    DECLARE_EVENT_TABLE();
 
 protected:
     friend class FrameSite;