]> git.saurik.com Git - wxWidgets.git/commitdiff
Beginings of wxX11 support. Much more to do but I have no more time
authorRobin Dunn <robin@alldunn.com>
Fri, 9 Jan 2004 18:34:52 +0000 (18:34 +0000)
committerRobin Dunn <robin@alldunn.com>
Fri, 9 Jan 2004 18:34:52 +0000 (18:34 +0000)
for it today.

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

18 files changed:
wxPython/.cvsignore
wxPython/include/wx/wxPython/pyclasses.h
wxPython/setup.py
wxPython/src/_choice.i
wxPython/src/_dataobj.i
wxPython/src/_dnd.i
wxPython/src/_icon.i
wxPython/src/_listbox.i
wxPython/src/_misc.i
wxPython/src/_tglbtn.i
wxPython/src/_toplvl.i
wxPython/src/_window.i
wxPython/src/gtk/controls_wrap.cpp
wxPython/src/gtk/gdi.py
wxPython/src/gtk/gdi_wrap.cpp
wxPython/src/gtk/misc_wrap.cpp
wxPython/src/gtk/windows.py
wxPython/src/gtk/windows_wrap.cpp

index 6e3d362030a64809e6f686122ceaa262adeaf944..6ccf93a8aa3460257b1e7acb68f1419df7d59a53 100644 (file)
@@ -12,6 +12,7 @@ build-gtk2-dbg.unicode
 build-gtk2.unicode
 build-pkg
 build-pkg-debug
+build-x11
 build.local
 build.unicode
 dist
index c74f8cacf94ee835a71387e13d29b3a12a99566f..b89991a098572f8e87aae52860972094c5ae25b7 100644 (file)
@@ -123,6 +123,7 @@ public:
 
 //---------------------------------------------------------------------------
 
+#ifndef __WXX11__
 class wxPyDropSource : public wxDropSource {
 public:
 #ifndef __WXGTK__
@@ -176,7 +177,7 @@ public:
     PYPRIVATE;
 };
 
-
+#endif
 
 
 //---------------------------------------------------------------------------
index 0c42993d779cb83341d44dcc1f8e4ac2202661d0..645b2502e5db21d4959011650db90a828d305631 100755 (executable)
@@ -223,7 +223,10 @@ def Verify_WX_CONFIG():
         else:
             uf = ''
         ver2 = "%s.%s" % (VER_MAJOR, VER_MINOR)
-        WX_CONFIG = 'wx%s%s%s-%s-config' % (WXPORT, uf, df, ver2)
+        port = WXPORT
+        if port == "x11":
+            port = "x11univ"
+        WX_CONFIG = 'wx%s%s%s-%s-config' % (port, uf, df, ver2)
 
         searchpath = os.environ["PATH"]
         for p in searchpath.split(':'):
index 366cc4e3082cfc4e0b67604d31f8b5e1a30845bc..49eec5186f7319b935432d140eb85bceae924034 100644 (file)
@@ -44,8 +44,10 @@ public:
              const wxValidator& validator = wxDefaultValidator,
              const wxString& name = wxPyChoiceNameStr);
 
+#ifndef __WXX11__
     int GetColumns();
     void SetColumns(const int n = 1);
+#endif
     void SetSelection(const int n);
     void SetStringSelection(const wxString& string);
     void SetString(int n, const wxString& s);
index 191ca7a74bfbbd05de8e47bd6e60c16cabc82b09..2f0896a2080aafa780d8cebc148dccfc331f5701 100644 (file)
@@ -424,7 +424,7 @@ public:
 
 //---------------------------------------------------------------------------
 
-#ifndef __WXGTK__
+#if !defined(__WXGTK__) && !defined(__WXX11__)
 
 %{
 #include <wx/metafile.h>
index 15f0f187776fd814111ad906c736bce90df3f2ef..20d64d671bbcf6b85a8a6bc3c6c7ec6c78e41cea 100644 (file)
 
 
 //---------------------------------------------------------------------------
+#ifndef __WXX11__
 
-%{
-%}
-
-//---------------------------------------------------------------------------
 %newgroup
 
 // flags for wxDropSource::DoDragDrop()
@@ -265,3 +262,5 @@ public:
     wxPyPtrTypeMap_Add("wxFileDropTarget", "wxPyFileDropTarget");
 %}
 //---------------------------------------------------------------------------
+
+#endif
index 2fcaadd9e07c71894230ec86e7882328d4dfd0aa..cfcdd02a39038d57cc1765bba38dff53960cb806 100644 (file)
@@ -23,7 +23,7 @@
 class wxIcon : public wxGDIObject
 {
 public:
-    wxIcon(const wxString& name, long flags,
+    wxIcon(const wxString& name, wxBitmapType type,
            int desiredWidth = -1, int desiredHeight = -1);
     ~wxIcon();
 
@@ -51,7 +51,7 @@ public:
 
     
 #ifndef __WXMAC__
-    bool LoadFile(const wxString& name, long flags);
+    bool LoadFile(const wxString& name, wxBitmapType type);
 #endif
 
     // wxGDIImage methods
index 05d03382a5f237c3a04fb89021baba0e4bdc5178..ebef42f095b4789b8770bfb76d76eb5fda151829 100644 (file)
@@ -137,7 +137,7 @@ public:
     bool  IsChecked(int index);
     void  Check(int index, int check = True);
 
-#ifndef __WXMAC__
+#if !defined(__WXMAC__) && !defined(__WXX11__)
     int GetItemHeight();
 #endif
 
index 54a6812e358c5e78b68a037bd1d3bd3551fb231b..e7f675a5dbc85cfafb5171e88f6ea7c066e9e83f 100644 (file)
@@ -18,6 +18,7 @@
 %newgroup
 
 
+#ifndef __WXX11__
 class wxToolTip : public wxObject {
 public:
     wxToolTip(const wxString &tip);
@@ -30,6 +31,7 @@ public:
     static void Enable(bool flag);
     static void SetDelay(long milliseconds);
 };
+#endif
 
 //---------------------------------------------------------------------------
 
index 2cf934ce844f42779c588451893bce4801a9b12f..1b5dabacc1211a9bde9aa9721b8febc7191ba9e7 100644 (file)
@@ -22,7 +22,7 @@ MAKE_CONST_WXSTRING2(ToggleButtonNameStr, _T("wxToggleButton"));
 
 
 %{
-#ifdef __WXMAC__
+#if defined(__WXMAC__) || defined(__WXX11__)
 // implement dummy classes and such for wxMac
 
 #define wxEVT_COMMAND_TOGGLEBUTTON_CLICKED 0
@@ -66,7 +66,7 @@ public:
                    const wxString& name = wxPyToggleButtonNameStr);
     %name(PreToggleButton)wxToggleButton();
 
-#ifndef __WXMAC__
+#if !defined(__WXMAC__) && !defined(__WXX11__)
     bool Create(wxWindow *parent,
                    wxWindowID id,
                    const wxString& label,
index 5f782c7a0f576c4f00f9ba01fb6ceb0a5a43acfb..1e23183f42c341fcd94a70bd4b37da489e33281d 100644 (file)
@@ -250,7 +250,9 @@ public:
     wxSizer *CreateButtonSizer( long flags );
 
 
-    void SetModal(bool flag);
+    //void SetModal(bool flag);
+
+    // is the dialog in modal state right now?
     virtual bool IsModal() const;
 
     // Shows the dialog and starts a nested event loop that returns when
index 34c35b37035aee9f247ca30da07769905447fcd8..b446de9d06412db6a14219817d2cc06eaff44b5f 100644 (file)
@@ -660,7 +660,7 @@ public:
     wxString GetHelpText() const;
 
 
-
+#ifndef __WXX11__
     // tooltips
     // --------
 
@@ -673,9 +673,11 @@ public:
     // get the associated tooltip or NULL if none
     wxToolTip* GetToolTip() const;
     // LINK ERROR --> wxString GetToolTipText() const;
+#endif
 
 
-
+    
+#ifndef __WXX11__
     // drag and drop
     // -------------
 
@@ -688,7 +690,8 @@ public:
 #ifdef __WXMSW__  // TODO:  should I drop-kick this?
     void DragAcceptFiles(bool accept);
 #endif
-
+#endif
+    
 
     // constraints and sizers
     // ----------------------
index 2097fec01765f8918bae689efcdd5696dd7a21ba..acf7a3ad5680724f29c2733d50e84e11b2518dcd 100644 (file)
@@ -390,7 +390,7 @@ int wxRadioBox_GetNextItem(wxRadioBox const *self,int item,wxDirection dir,long
  static const wxString wxPySliderNameStr(wxSliderNameStr); 
  static const wxString wxPyToggleButtonNameStr(_T("wxToggleButton")); 
 
-#ifdef __WXMAC__
+#if defined(__WXMAC__) || defined(__WXX11__)
 // implement dummy classes and such for wxMac
 
 #define wxEVT_COMMAND_TOGGLEBUTTON_CLICKED 0
index c7f79a81923ba9bb6b69b1991cd87fd1dad51dc3..6a705589c4f90379c81211a7486f7c81d0e91fc1 100644 (file)
@@ -579,7 +579,7 @@ class Icon(GDIObject):
     def __repr__(self):
         return "<%s.%s; proxy of C++ wxIcon instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
     def __init__(self, *args, **kwargs):
-        """__init__(String name, long flags, int desiredWidth=-1, int desiredHeight=-1) -> Icon"""
+        """__init__(String name, int type, int desiredWidth=-1, int desiredHeight=-1) -> Icon"""
         newobj = _gdi.new_Icon(*args, **kwargs)
         self.this = newobj.this
         self.thisown = 1
@@ -591,7 +591,7 @@ class Icon(GDIObject):
         except: pass
 
     def LoadFile(*args, **kwargs):
-        """LoadFile(String name, long flags) -> bool"""
+        """LoadFile(String name, int type) -> bool"""
         return _gdi.Icon_LoadFile(*args, **kwargs)
 
     def Ok(*args, **kwargs):
index 1362c86dd4fc5c14e8f94556bf10bab4ab69e241..534027e2b8ce4edaa92148ddbdcb061bcf3aa188 100644 (file)
@@ -2844,17 +2844,17 @@ static PyObject * Mask_swigregister(PyObject *self, PyObject *args) {
 static PyObject *_wrap_new_Icon(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
     wxString *arg1 = 0 ;
-    long arg2 ;
+    int arg2 ;
     int arg3 = (int) -1 ;
     int arg4 = (int) -1 ;
     wxIcon *result;
     bool temp1 = False ;
     PyObject * obj0 = 0 ;
     char *kwnames[] = {
-        (char *) "name",(char *) "flags",(char *) "desiredWidth",(char *) "desiredHeight", NULL 
+        (char *) "name",(char *) "type",(char *) "desiredWidth",(char *) "desiredHeight", NULL 
     };
     
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Ol|ii:new_Icon",kwnames,&obj0,&arg2,&arg3,&arg4)) goto fail;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oi|ii:new_Icon",kwnames,&obj0,&arg2,&arg3,&arg4)) goto fail;
     {
         arg1 = wxString_in_helper(obj0);
         if (arg1 == NULL) SWIG_fail;
@@ -2862,7 +2862,7 @@ static PyObject *_wrap_new_Icon(PyObject *self, PyObject *args, PyObject *kwargs
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
-        result = (wxIcon *)new wxIcon((wxString const &)*arg1,arg2,arg3,arg4);
+        result = (wxIcon *)new wxIcon((wxString const &)*arg1,(wxBitmapType )arg2,arg3,arg4);
         
         wxPyEndAllowThreads(__tstate);
         if (PyErr_Occurred()) SWIG_fail;
@@ -3013,16 +3013,16 @@ static PyObject *_wrap_Icon_LoadFile(PyObject *self, PyObject *args, PyObject *k
     PyObject *resultobj;
     wxIcon *arg1 = (wxIcon *) 0 ;
     wxString *arg2 = 0 ;
-    long arg3 ;
+    int arg3 ;
     bool result;
     bool temp2 = False ;
     PyObject * obj0 = 0 ;
     PyObject * obj1 = 0 ;
     char *kwnames[] = {
-        (char *) "self",(char *) "name",(char *) "flags", NULL 
+        (char *) "self",(char *) "name",(char *) "type", NULL 
     };
     
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOl:Icon_LoadFile",kwnames,&obj0,&obj1,&arg3)) goto fail;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOi:Icon_LoadFile",kwnames,&obj0,&obj1,&arg3)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxIcon,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     {
         arg2 = wxString_in_helper(obj1);
@@ -3031,7 +3031,7 @@ static PyObject *_wrap_Icon_LoadFile(PyObject *self, PyObject *args, PyObject *k
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
-        result = (bool)(arg1)->LoadFile((wxString const &)*arg2,arg3);
+        result = (bool)(arg1)->LoadFile((wxString const &)*arg2,(wxBitmapType )arg3);
         
         wxPyEndAllowThreads(__tstate);
         if (PyErr_Occurred()) SWIG_fail;
index 43c93bbf9e47c6e72b5cdd33ba55dbd73f6b0512..13992b7db4f29b5fc9ed13dbeb43b94467b5963b 100644 (file)
@@ -1056,8 +1056,6 @@ public:
 };    
 
 
-
-
 IMP_PYCALLBACK_BOOL_DR(wxPyDropSource, wxDropSource, GiveFeedback);
 
 
index aaaa0903a9d3de22528243ec49566a1bc095c289..6d1cb29f7883d44c1bfb84468f977dcf29b8225c 100644 (file)
@@ -414,10 +414,6 @@ class Dialog(TopLevelWindow):
         """CreateButtonSizer(long flags) -> Sizer"""
         return _windows.Dialog_CreateButtonSizer(*args, **kwargs)
 
-    def SetModal(*args, **kwargs):
-        """SetModal(bool flag)"""
-        return _windows.Dialog_SetModal(*args, **kwargs)
-
     def IsModal(*args, **kwargs):
         """IsModal() -> bool"""
         return _windows.Dialog_IsModal(*args, **kwargs)
index 23433aff964a0c0ae319245259940a553978552e..3c5aa870ca612e32e2a5c98bb8593d61f23af6d1 100644 (file)
@@ -3600,34 +3600,6 @@ static PyObject *_wrap_Dialog_CreateButtonSizer(PyObject *self, PyObject *args,
 }
 
 
-static PyObject *_wrap_Dialog_SetModal(PyObject *self, PyObject *args, PyObject *kwargs) {
-    PyObject *resultobj;
-    wxDialog *arg1 = (wxDialog *) 0 ;
-    bool arg2 ;
-    PyObject * obj0 = 0 ;
-    PyObject * obj1 = 0 ;
-    char *kwnames[] = {
-        (char *) "self",(char *) "flag", NULL 
-    };
-    
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Dialog_SetModal",kwnames,&obj0,&obj1)) goto fail;
-    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxDialog,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
-    {
-        PyThreadState* __tstate = wxPyBeginAllowThreads();
-        (arg1)->SetModal(arg2);
-        
-        wxPyEndAllowThreads(__tstate);
-        if (PyErr_Occurred()) SWIG_fail;
-    }
-    Py_INCREF(Py_None); resultobj = Py_None;
-    return resultobj;
-    fail:
-    return NULL;
-}
-
-
 static PyObject *_wrap_Dialog_IsModal(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
     wxDialog *arg1 = (wxDialog *) 0 ;
@@ -20998,7 +20970,6 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"Dialog_GetReturnCode", (PyCFunction) _wrap_Dialog_GetReturnCode, METH_VARARGS | METH_KEYWORDS },
         { (char *)"Dialog_CreateTextSizer", (PyCFunction) _wrap_Dialog_CreateTextSizer, METH_VARARGS | METH_KEYWORDS },
         { (char *)"Dialog_CreateButtonSizer", (PyCFunction) _wrap_Dialog_CreateButtonSizer, METH_VARARGS | METH_KEYWORDS },
-        { (char *)"Dialog_SetModal", (PyCFunction) _wrap_Dialog_SetModal, METH_VARARGS | METH_KEYWORDS },
         { (char *)"Dialog_IsModal", (PyCFunction) _wrap_Dialog_IsModal, METH_VARARGS | METH_KEYWORDS },
         { (char *)"Dialog_ShowModal", (PyCFunction) _wrap_Dialog_ShowModal, METH_VARARGS | METH_KEYWORDS },
         { (char *)"Dialog_EndModal", (PyCFunction) _wrap_Dialog_EndModal, METH_VARARGS | METH_KEYWORDS },