]> git.saurik.com Git - wxWidgets.git/commitdiff
A better way to handle the OOR wxPyListCtrl --> wxLIstCtrl thing
authorRobin Dunn <robin@alldunn.com>
Fri, 14 Sep 2001 16:14:56 +0000 (16:14 +0000)
committerRobin Dunn <robin@alldunn.com>
Fri, 14 Sep 2001 16:14:56 +0000 (16:14 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11601 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/src/_extras.py
wxPython/src/_htmlextras.py
wxPython/src/controls2.i
wxPython/src/msw/controls2.cpp
wxPython/src/msw/html.py
wxPython/src/msw/wx.cpp
wxPython/src/msw/wx.py
wxPython/src/wx.i

index 48bdc72a0d992b2d699ac17035d8e51e63d3e0f6..01c385eeb5395578f29aa1e09e274d64f0e9de9a 100644 (file)
@@ -580,11 +580,6 @@ NULL = None  # For backwards compatibility only.  You should really be
 wxColor      = wxColour
 wxNamedColor = wxNamedColour
 
-wxPyListCtrlPtr       = wxListCtrlPtr
-wxPyTreeCtrlPtr       = wxTreeCtrlPtr
-wxGenericDragImagePtr = wxDragImagePtr
-wxPyProcessPtr        = wxProcessPtr
-
 
 # backwards compatibility
 wxNoRefBitmap       = wxBitmap
@@ -592,6 +587,7 @@ wxPyDefaultPosition = wxDefaultPosition
 wxPyDefaultSize     = wxDefaultSize
 
 
+#----------------------------------------------------------------------
 # wxGTK sets the locale when initialized.  Doing this at the Python
 # level should set it up to match what GTK is doing at the C level.
 try:
@@ -601,6 +597,19 @@ except:
     pass
 
 
+
+#----------------------------------------------------------------------
+# wxWindows version numbers.  wxPython version is in __version__.
+
+wxMAJOR_VERSION   = wxc.wxMAJOR_VERSION
+wxMINOR_VERSION   = wxc.wxMINOR_VERSION
+wxRELEASE_NUMBER  = wxc.wxRELEASE_NUMBER
+wxVERSION_STRING  = wxc.wxVERSION_STRING
+wxVERSION_NUMBER  = wxc.wxVERSION_NUMBER
+
+wxVERSION = (wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER)
+
+
 #----------------------------------------------------------------------
 # This helper function will take a wxPython object and convert it to
 # another wxPython object type.  This will not be able to create objects
index 0428033548bc73856760037ebbee1102563cc699..88f8b12ba69568c108039ae05cafa393aae17ae9 100644 (file)
@@ -12,6 +12,3 @@ wx.wxHtmlWidgetCellPtr      = wxHtmlWidgetCellPtr
 wx.wxHtmlWindowPtr          = wxHtmlWindowPtr
 wx.wxHtmlLinkInfoPtr        = wxHtmlLinkInfoPtr
 
-wx.wxPyHtmlTagHandlerPtr    = wxHtmlTagHandlerPtr
-wx.wxPyHtmlWinTagHandlerPtr = wxHtmlWinTagHandlerPtr
-wx.wxPyHtmlWindowPtr        = wxHtmlWindowPtr
index 5d4c15d07e5b2ffdc63e4c948c9b17bb5afb766f..f13ab3524bc46363bbb66fc06dd87e0f60f00367 100644 (file)
@@ -1272,8 +1272,10 @@ public:
 //----------------------------------------------------------------------
 
 %init %{
+    // Map renamed classes back to their common name for OOR
     wxPyPtrTypeMap_Add("wxTreeItemData", "wxPyTreeItemData");
     wxPyPtrTypeMap_Add("wxTreeCtrl", "wxPyTreeCtrl");
+    wxPyPtrTypeMap_Add("wxListCtrl", "wxPyListCtrl");
 %}
 
 //----------------------------------------------------------------------
index d524e6a98149be9779eeb1587cf799c2184c9c4e..4ab402f7d98a1ba851e9dbddc96e67e703dda2af 100644 (file)
@@ -10183,8 +10183,10 @@ SWIGEXPORT(void) initcontrols2c() {
         PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK", PyInt_FromLong((long) wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK));
         PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_END_DRAG", PyInt_FromLong((long) wxEVT_COMMAND_TREE_END_DRAG));
 
+    // Map renamed classes back to their common name for OOR
     wxPyPtrTypeMap_Add("wxTreeItemData", "wxPyTreeItemData");
     wxPyPtrTypeMap_Add("wxTreeCtrl", "wxPyTreeCtrl");
+    wxPyPtrTypeMap_Add("wxListCtrl", "wxPyListCtrl");
 {
    int i;
    for (i = 0; _swig_mapping[i].n1; i++)
index fef3a04ba26b6e066b9cf4f56c24ae2cb6123fe4..9f06c597e89a2b6e02631a7baf1cd9ef0e525130 100644 (file)
@@ -757,6 +757,3 @@ wx.wxHtmlWidgetCellPtr      = wxHtmlWidgetCellPtr
 wx.wxHtmlWindowPtr          = wxHtmlWindowPtr
 wx.wxHtmlLinkInfoPtr        = wxHtmlLinkInfoPtr
 
-wx.wxPyHtmlTagHandlerPtr    = wxHtmlTagHandlerPtr
-wx.wxPyHtmlWinTagHandlerPtr = wxHtmlWinTagHandlerPtr
-wx.wxPyHtmlWindowPtr        = wxHtmlWindowPtr
index 0ffb2560bdb40bd407406e8ee99ba7cc7efa5d09..2f83d89d75a50f383c3fdf661aff6c6c77f3e0f5 100644 (file)
@@ -2582,6 +2582,14 @@ SWIGEXPORT(void) initwxc() {
     initstreamsc();
     initfilesysc();
 
+
+    PyDict_SetItemString(d,"wxMAJOR_VERSION", PyInt_FromLong((long)wxMAJOR_VERSION ));
+    PyDict_SetItemString(d,"wxMINOR_VERSION", PyInt_FromLong((long)wxMINOR_VERSION ));
+    PyDict_SetItemString(d,"wxRELEASE_NUMBER", PyInt_FromLong((long)wxRELEASE_NUMBER ));
+    PyDict_SetItemString(d,"wxVERSION_NUMBER", PyInt_FromLong((long)wxVERSION_NUMBER ));
+    PyDict_SetItemString(d,"wxVERSION_STRING", PyString_FromString(wxVERSION_STRING));
+
+
 {
    int i;
    for (i = 0; _swig_mapping[i].n1; i++)
index be6a63ccaa79fc0f58ce67d11f57c34ec0346838..39b9db97e5ec80aeee97bdd3984a839ff31d0fa1 100644 (file)
@@ -1400,11 +1400,6 @@ NULL = None  # For backwards compatibility only.  You should really be
 wxColor      = wxColour
 wxNamedColor = wxNamedColour
 
-wxPyListCtrlPtr       = wxListCtrlPtr
-wxPyTreeCtrlPtr       = wxTreeCtrlPtr
-wxGenericDragImagePtr = wxDragImagePtr
-wxPyProcessPtr        = wxProcessPtr
-
 
 # backwards compatibility
 wxNoRefBitmap       = wxBitmap
@@ -1412,6 +1407,7 @@ wxPyDefaultPosition = wxDefaultPosition
 wxPyDefaultSize     = wxDefaultSize
 
 
+#----------------------------------------------------------------------
 # wxGTK sets the locale when initialized.  Doing this at the Python
 # level should set it up to match what GTK is doing at the C level.
 try:
@@ -1421,6 +1417,19 @@ except:
     pass
 
 
+
+#----------------------------------------------------------------------
+# wxWindows version numbers.  wxPython version is in __version__.
+
+wxMAJOR_VERSION   = wxc.wxMAJOR_VERSION
+wxMINOR_VERSION   = wxc.wxMINOR_VERSION
+wxRELEASE_NUMBER  = wxc.wxRELEASE_NUMBER
+wxVERSION_STRING  = wxc.wxVERSION_STRING
+wxVERSION_NUMBER  = wxc.wxVERSION_NUMBER
+
+wxVERSION = (wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER)
+
+
 #----------------------------------------------------------------------
 # This helper function will take a wxPython object and convert it to
 # another wxPython object type.  This will not be able to create objects
index 30dcfe2d2b9fe81fa194a9dcbb0f19ef4ac01aa7..da1553eb921e525f19e2b8be5e0be1f4a434fa87 100644 (file)
@@ -231,6 +231,14 @@ static wxPyCoreAPI API = {
     initstreamsc();
     initfilesysc();
 
+
+    PyDict_SetItemString(d,"wxMAJOR_VERSION", PyInt_FromLong((long)wxMAJOR_VERSION ));
+    PyDict_SetItemString(d,"wxMINOR_VERSION", PyInt_FromLong((long)wxMINOR_VERSION ));
+    PyDict_SetItemString(d,"wxRELEASE_NUMBER", PyInt_FromLong((long)wxRELEASE_NUMBER ));
+    PyDict_SetItemString(d,"wxVERSION_NUMBER", PyInt_FromLong((long)wxVERSION_NUMBER ));
+    PyDict_SetItemString(d,"wxVERSION_STRING", PyString_FromString(wxVERSION_STRING));
+
+
 %}
 
 //----------------------------------------------------------------------