Some Python 2.0 related fixes
Some little fixes and tweaks here and there Some distrib stuff git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8643 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -42,6 +42,12 @@ Changed the build to make one big extension module instead of one for
|
|||||||
the core and each contrib. This allowed me to do away with the
|
the core and each contrib. This allowed me to do away with the
|
||||||
libwxPyHelpers.so on unix systems.
|
libwxPyHelpers.so on unix systems.
|
||||||
|
|
||||||
|
Lots of little fixes here and there.
|
||||||
|
|
||||||
|
Some hacks on wxGTK to try and make the AutoComplete listbox in the
|
||||||
|
wxStyledTextCtrl to behave better. It's still not as nice as on
|
||||||
|
wxMSW, but at least it's a bit more usable now.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -13,8 +13,9 @@ class MyAboutBox(wxDialog):
|
|||||||
<center><table bgcolor="#458154" width="100%%" cellspacing="0"
|
<center><table bgcolor="#458154" width="100%%" cellspacing="0"
|
||||||
cellpadding="0" border="1">
|
cellpadding="0" border="1">
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center"><h1>wxPython %s</h1>
|
<td align="center">
|
||||||
Running on Python %s
|
<h1>wxPython %s</h1>
|
||||||
|
Running on Python %s<br>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@@ -1,9 +1,16 @@
|
|||||||
|
|
||||||
import string
|
import string, sys
|
||||||
|
|
||||||
|
py2 = sys.version[0] == '2'
|
||||||
|
|
||||||
from wxPython.wx import *
|
from wxPython.wx import *
|
||||||
try:
|
try:
|
||||||
|
if py2:
|
||||||
|
from xml.parsers import expat
|
||||||
|
parsermodule = expat
|
||||||
|
else:
|
||||||
from xml.parsers import pyexpat
|
from xml.parsers import pyexpat
|
||||||
|
parsermodule = pyexpat
|
||||||
haveXML = true
|
haveXML = true
|
||||||
except ImportError:
|
except ImportError:
|
||||||
haveXML = false
|
haveXML = false
|
||||||
@@ -12,7 +19,8 @@ except ImportError:
|
|||||||
|
|
||||||
if not haveXML:
|
if not haveXML:
|
||||||
def runTest(frame, nb, log):
|
def runTest(frame, nb, log):
|
||||||
dlg = wxMessageDialog(frame, 'This demo requires the XML package. See http://www.python.org/sigs/xml-sig/',
|
dlg = wxMessageDialog(frame, 'This demo requires the XML package. '
|
||||||
|
'See http://www.python.org/sigs/xml-sig/',
|
||||||
'Sorry', wxOK | wxICON_INFORMATION)
|
'Sorry', wxOK | wxICON_INFORMATION)
|
||||||
dlg.ShowModal()
|
dlg.ShowModal()
|
||||||
dlg.Destroy()
|
dlg.Destroy()
|
||||||
@@ -26,6 +34,8 @@ else:
|
|||||||
|
|
||||||
# Define a handler for start element events
|
# Define a handler for start element events
|
||||||
def StartElement(self, name, attrs ):
|
def StartElement(self, name, attrs ):
|
||||||
|
if py2:
|
||||||
|
name = name.encode()
|
||||||
id = self.AppendItem(self.nodeStack[-1], name)
|
id = self.AppendItem(self.nodeStack[-1], name)
|
||||||
self.nodeStack.append(id)
|
self.nodeStack.append(id)
|
||||||
|
|
||||||
@@ -34,12 +44,14 @@ else:
|
|||||||
|
|
||||||
def CharacterData(self, data ):
|
def CharacterData(self, data ):
|
||||||
if string.strip(data):
|
if string.strip(data):
|
||||||
|
if py2:
|
||||||
|
data = data.encode()
|
||||||
self.AppendItem(self.nodeStack[-1], data)
|
self.AppendItem(self.nodeStack[-1], data)
|
||||||
|
|
||||||
|
|
||||||
def LoadTree(self, filename):
|
def LoadTree(self, filename):
|
||||||
# Create a parser
|
# Create a parser
|
||||||
Parser = pyexpat.ParserCreate()
|
Parser = parsermodule.ParserCreate()
|
||||||
|
|
||||||
# Tell the parser what the start element handler is
|
# Tell the parser what the start element handler is
|
||||||
Parser.StartElementHandler = self.StartElement
|
Parser.StartElementHandler = self.StartElement
|
||||||
|
@@ -81,6 +81,9 @@ class MyCanvas(wxScrolledWindow):
|
|||||||
dc.DrawRectangle(50,500,50,50)
|
dc.DrawRectangle(50,500,50,50)
|
||||||
dc.DrawRectangle(100,500,50,50)
|
dc.DrawRectangle(100,500,50,50)
|
||||||
|
|
||||||
|
dc.SetPen(pen1)
|
||||||
|
dc.DrawEllipticArc(200, 500, 50, 75, 0, 90)
|
||||||
|
|
||||||
#from wxPython import dch
|
#from wxPython import dch
|
||||||
#dch.FillRect(dc, wxRect(50, 400, 50, 50), wxBLACK)
|
#dch.FillRect(dc, wxRect(50, 400, 50, 50), wxBLACK)
|
||||||
|
|
||||||
|
Binary file not shown.
@@ -81,6 +81,10 @@ item: Set Variable
|
|||||||
Variable=PYTHONVER
|
Variable=PYTHONVER
|
||||||
Value=1.5
|
Value=1.5
|
||||||
end
|
end
|
||||||
|
item: Set Variable
|
||||||
|
Variable=SAMEDIR
|
||||||
|
Value=1
|
||||||
|
end
|
||||||
item: Remark
|
item: Remark
|
||||||
end
|
end
|
||||||
item: Get Registry Key Value
|
item: Get Registry Key Value
|
||||||
@@ -813,11 +817,24 @@ item: Install File
|
|||||||
Destination=%SYS%\Msvcrt.dll
|
Destination=%SYS%\Msvcrt.dll
|
||||||
Flags=0000001010000011
|
Flags=0000001010000011
|
||||||
end
|
end
|
||||||
|
item: If/While Statement
|
||||||
|
Variable=SAMEDIR
|
||||||
|
Value=0
|
||||||
|
end
|
||||||
item: Install File
|
item: Install File
|
||||||
Source=c:\projects\wx\lib\wx22_2.dll
|
Source=c:\projects\wx\lib\wx22_2.dll
|
||||||
Destination=%SYS%\wx22_2.dll
|
Destination=%SYS%\wx22_2.dll
|
||||||
Flags=0000001010010010
|
Flags=0000001010010010
|
||||||
end
|
end
|
||||||
|
item: Else Statement
|
||||||
|
end
|
||||||
|
item: Install File
|
||||||
|
Source=c:\projects\wx\lib\wx22_2.dll
|
||||||
|
Destination=%MAINDIR%\wxPython\wx22_2.dll
|
||||||
|
Flags=0000000010010010
|
||||||
|
end
|
||||||
|
item: End Block
|
||||||
|
end
|
||||||
item: Install File
|
item: Install File
|
||||||
Source=c:\Projects\wx\wxPython\wxPython\*.py
|
Source=c:\Projects\wx\wxPython\wxPython\*.py
|
||||||
Destination=%MAINDIR%\wxPython
|
Destination=%MAINDIR%\wxPython
|
||||||
@@ -1332,7 +1349,7 @@ item: Custom Dialog Set
|
|||||||
end
|
end
|
||||||
item: Push Button
|
item: Push Button
|
||||||
Rectangle=90 68 153 82
|
Rectangle=90 68 153 82
|
||||||
Alternate=0%MAINDIR%\wxPython\README.txt
|
Alternate=0%MAINDIR%\wxPython\docs\README.txt
|
||||||
Action=6
|
Action=6
|
||||||
Enabled Color=00000000000000001111111111111111
|
Enabled Color=00000000000000001111111111111111
|
||||||
Create Flags=01010000000000010000000000000000
|
Create Flags=01010000000000010000000000000000
|
||||||
|
@@ -4,24 +4,25 @@ rem **** Make a directory to build up a distribution tree
|
|||||||
md _distrib_zip
|
md _distrib_zip
|
||||||
md _distrib_zip\wxPython-%1
|
md _distrib_zip\wxPython-%1
|
||||||
|
|
||||||
rem **** Copy the license files
|
REM rem **** Copy the license files
|
||||||
copy %WXWIN%\docs\gpl.txt _distrib_zip\wxPython-%1
|
REM copy %WXWIN%\docs\gpl.txt _distrib_zip\wxPython-%1
|
||||||
copy %WXWIN%\docs\lgpl.txt _distrib_zip\wxPython-%1
|
REM copy %WXWIN%\docs\lgpl.txt _distrib_zip\wxPython-%1
|
||||||
copy %WXWIN%\docs\licence.txt _distrib_zip\wxPython-%1
|
REM copy %WXWIN%\docs\licence.txt _distrib_zip\wxPython-%1
|
||||||
copy %WXWIN%\docs\licendoc.txt _distrib_zip\wxPython-%1
|
REM copy %WXWIN%\docs\licendoc.txt _distrib_zip\wxPython-%1
|
||||||
copy %WXWIN%\docs\preamble.txt _distrib_zip\wxPython-%1
|
REM copy %WXWIN%\docs\preamble.txt _distrib_zip\wxPython-%1
|
||||||
|
|
||||||
rem **** Make a zip fron the live files
|
REM rem **** Make a zip fron the live files
|
||||||
zip -@ -r _distrib_zip\temp.zip < distrib\wxPython.rsp
|
REM zip -@ -r _distrib_zip\temp.zip < distrib\wxPython.rsp
|
||||||
|
|
||||||
rem **** Unzip it in our build dir
|
REM rem **** Unzip it in our build dir
|
||||||
cd _distrib_zip\wxPython-%1
|
REM cd _distrib_zip\wxPython-%1
|
||||||
unzip ..\temp.zip
|
REM unzip ..\temp.zip
|
||||||
|
|
||||||
rem **** zip up the build dir
|
REM rem **** zip up the build dir
|
||||||
cd ..
|
REM cd ..
|
||||||
zip -r ..\distrib\wxPython-src-%1.zip wxPython-%1
|
REM zip -r ..\distrib\wxPython-src-%1.zip wxPython-%1
|
||||||
|
|
||||||
|
cd _distrib_zip
|
||||||
|
|
||||||
rem **** copy the docs into the tree
|
rem **** copy the docs into the tree
|
||||||
md wxPython-%1\docs
|
md wxPython-%1\docs
|
||||||
|
@@ -796,23 +796,6 @@ public:
|
|||||||
wxGridCellChoiceEditor(int LCOUNT = 0,
|
wxGridCellChoiceEditor(int LCOUNT = 0,
|
||||||
const wxString* choices = NULL,
|
const wxString* choices = NULL,
|
||||||
bool allowOthers = FALSE);
|
bool allowOthers = FALSE);
|
||||||
#ifdef PRE2115
|
|
||||||
%addmethods {
|
|
||||||
wxGridCellChoiceEditor(PyObject* choices,
|
|
||||||
bool allowOthers = FALSE) {
|
|
||||||
|
|
||||||
const char** temp = string_LIST_helper(choices);
|
|
||||||
if (temp) {
|
|
||||||
int count = PyList_Size(choices);
|
|
||||||
wxGridCellChoiceEditor* ret;
|
|
||||||
ret = new wxGridCellChoiceEditor(count, temp, allowOthers);
|
|
||||||
delete [] temp;
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
@@ -574,23 +574,6 @@ static PyObject *_wrap_wxYield(PyObject *self, PyObject *args, PyObject *kwargs)
|
|||||||
return _resultobj;
|
return _resultobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *_wrap_wxSafeYield(PyObject *self, PyObject *args, PyObject *kwargs) {
|
|
||||||
PyObject * _resultobj;
|
|
||||||
bool _result;
|
|
||||||
char *_kwnames[] = { NULL };
|
|
||||||
|
|
||||||
self = self;
|
|
||||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxSafeYield",_kwnames))
|
|
||||||
return NULL;
|
|
||||||
{
|
|
||||||
wxPy_BEGIN_ALLOW_THREADS;
|
|
||||||
_result = (bool )wxSafeYield();
|
|
||||||
|
|
||||||
wxPy_END_ALLOW_THREADS;
|
|
||||||
} _resultobj = Py_BuildValue("i",_result);
|
|
||||||
return _resultobj;
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyObject *_wrap_wxEnableTopLevelWindows(PyObject *self, PyObject *args, PyObject *kwargs) {
|
static PyObject *_wrap_wxEnableTopLevelWindows(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
PyObject * _resultobj;
|
PyObject * _resultobj;
|
||||||
bool _arg0;
|
bool _arg0;
|
||||||
@@ -4923,7 +4906,6 @@ static PyMethodDef misccMethods[] = {
|
|||||||
{ "wxStripMenuCodes", (PyCFunction) _wrap_wxStripMenuCodes, METH_VARARGS | METH_KEYWORDS },
|
{ "wxStripMenuCodes", (PyCFunction) _wrap_wxStripMenuCodes, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxGetResource", (PyCFunction) _wrap_wxGetResource, METH_VARARGS | METH_KEYWORDS },
|
{ "wxGetResource", (PyCFunction) _wrap_wxGetResource, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxEnableTopLevelWindows", (PyCFunction) _wrap_wxEnableTopLevelWindows, METH_VARARGS | METH_KEYWORDS },
|
{ "wxEnableTopLevelWindows", (PyCFunction) _wrap_wxEnableTopLevelWindows, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxSafeYield", (PyCFunction) _wrap_wxSafeYield, METH_VARARGS | METH_KEYWORDS },
|
|
||||||
{ "wxYield", (PyCFunction) _wrap_wxYield, METH_VARARGS | METH_KEYWORDS },
|
{ "wxYield", (PyCFunction) _wrap_wxYield, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxUsleep", (PyCFunction) _wrap_wxUsleep, METH_VARARGS | METH_KEYWORDS },
|
{ "wxUsleep", (PyCFunction) _wrap_wxUsleep, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxSleep", (PyCFunction) _wrap_wxSleep, METH_VARARGS | METH_KEYWORDS },
|
{ "wxSleep", (PyCFunction) _wrap_wxSleep, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
@@ -649,8 +649,6 @@ wxUsleep = miscc.wxUsleep
|
|||||||
|
|
||||||
wxYield = miscc.wxYield
|
wxYield = miscc.wxYield
|
||||||
|
|
||||||
wxSafeYield = miscc.wxSafeYield
|
|
||||||
|
|
||||||
wxEnableTopLevelWindows = miscc.wxEnableTopLevelWindows
|
wxEnableTopLevelWindows = miscc.wxEnableTopLevelWindows
|
||||||
|
|
||||||
wxGetResource = miscc.wxGetResource
|
wxGetResource = miscc.wxGetResource
|
||||||
|
@@ -1207,6 +1207,32 @@ static PyObject *_wrap_wxWakeUpIdle(PyObject *self, PyObject *args, PyObject *kw
|
|||||||
return _resultobj;
|
return _resultobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static PyObject *_wrap_wxSafeYield(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
bool _result;
|
||||||
|
wxWindow * _arg0 = (wxWindow *) NULL;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
char *_kwnames[] = { "win", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:wxSafeYield",_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 wxSafeYield. Expected _wxWindow_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
|
_result = (bool )wxSafeYield(_arg0);
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
} _resultobj = Py_BuildValue("i",_result);
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
static PyObject *_wrap_wxShowTip(PyObject *self, PyObject *args, PyObject *kwargs) {
|
static PyObject *_wrap_wxShowTip(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
PyObject * _resultobj;
|
PyObject * _resultobj;
|
||||||
bool _result;
|
bool _result;
|
||||||
@@ -4944,6 +4970,7 @@ static PyMethodDef misc2cMethods[] = {
|
|||||||
{ "wxDragIcon", (PyCFunction) _wrap_wxDragIcon, METH_VARARGS | METH_KEYWORDS },
|
{ "wxDragIcon", (PyCFunction) _wrap_wxDragIcon, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxCreateFileTipProvider", (PyCFunction) _wrap_wxCreateFileTipProvider, METH_VARARGS | METH_KEYWORDS },
|
{ "wxCreateFileTipProvider", (PyCFunction) _wrap_wxCreateFileTipProvider, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxShowTip", (PyCFunction) _wrap_wxShowTip, METH_VARARGS | METH_KEYWORDS },
|
{ "wxShowTip", (PyCFunction) _wrap_wxShowTip, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxSafeYield", (PyCFunction) _wrap_wxSafeYield, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxWakeUpIdle", (PyCFunction) _wrap_wxWakeUpIdle, METH_VARARGS | METH_KEYWORDS },
|
{ "wxWakeUpIdle", (PyCFunction) _wrap_wxWakeUpIdle, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxPostEvent", (PyCFunction) _wrap_wxPostEvent, METH_VARARGS | METH_KEYWORDS },
|
{ "wxPostEvent", (PyCFunction) _wrap_wxPostEvent, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxCaret_SetBlinkTime", (PyCFunction) _wrap_wxCaret_SetBlinkTime, METH_VARARGS | METH_KEYWORDS },
|
{ "wxCaret_SetBlinkTime", (PyCFunction) _wrap_wxCaret_SetBlinkTime, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
@@ -561,6 +561,8 @@ wxPostEvent = misc2c.wxPostEvent
|
|||||||
|
|
||||||
wxWakeUpIdle = misc2c.wxWakeUpIdle
|
wxWakeUpIdle = misc2c.wxWakeUpIdle
|
||||||
|
|
||||||
|
wxSafeYield = misc2c.wxSafeYield
|
||||||
|
|
||||||
wxShowTip = misc2c.wxShowTip
|
wxShowTip = misc2c.wxShowTip
|
||||||
|
|
||||||
def wxCreateFileTipProvider(*_args, **_kwargs):
|
def wxCreateFileTipProvider(*_args, **_kwargs):
|
||||||
|
@@ -292,7 +292,6 @@ wxString wxGetOsDescription();
|
|||||||
void wxSleep(int secs);
|
void wxSleep(int secs);
|
||||||
void wxUsleep(unsigned long milliseconds);
|
void wxUsleep(unsigned long milliseconds);
|
||||||
bool wxYield();
|
bool wxYield();
|
||||||
bool wxSafeYield();
|
|
||||||
void wxEnableTopLevelWindows(bool enable);
|
void wxEnableTopLevelWindows(bool enable);
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
|
@@ -366,6 +366,8 @@ public:
|
|||||||
void wxPostEvent(wxEvtHandler *dest, wxEvent& event);
|
void wxPostEvent(wxEvtHandler *dest, wxEvent& event);
|
||||||
void wxWakeUpIdle();
|
void wxWakeUpIdle();
|
||||||
|
|
||||||
|
bool wxSafeYield(wxWindow* win=NULL);
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
@@ -591,23 +591,6 @@ static PyObject *_wrap_wxYield(PyObject *self, PyObject *args, PyObject *kwargs)
|
|||||||
return _resultobj;
|
return _resultobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *_wrap_wxSafeYield(PyObject *self, PyObject *args, PyObject *kwargs) {
|
|
||||||
PyObject * _resultobj;
|
|
||||||
bool _result;
|
|
||||||
char *_kwnames[] = { NULL };
|
|
||||||
|
|
||||||
self = self;
|
|
||||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxSafeYield",_kwnames))
|
|
||||||
return NULL;
|
|
||||||
{
|
|
||||||
wxPy_BEGIN_ALLOW_THREADS;
|
|
||||||
_result = (bool )wxSafeYield();
|
|
||||||
|
|
||||||
wxPy_END_ALLOW_THREADS;
|
|
||||||
} _resultobj = Py_BuildValue("i",_result);
|
|
||||||
return _resultobj;
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyObject *_wrap_wxEnableTopLevelWindows(PyObject *self, PyObject *args, PyObject *kwargs) {
|
static PyObject *_wrap_wxEnableTopLevelWindows(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
PyObject * _resultobj;
|
PyObject * _resultobj;
|
||||||
bool _arg0;
|
bool _arg0;
|
||||||
@@ -4940,7 +4923,6 @@ static PyMethodDef misccMethods[] = {
|
|||||||
{ "wxStripMenuCodes", (PyCFunction) _wrap_wxStripMenuCodes, METH_VARARGS | METH_KEYWORDS },
|
{ "wxStripMenuCodes", (PyCFunction) _wrap_wxStripMenuCodes, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxGetResource", (PyCFunction) _wrap_wxGetResource, METH_VARARGS | METH_KEYWORDS },
|
{ "wxGetResource", (PyCFunction) _wrap_wxGetResource, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxEnableTopLevelWindows", (PyCFunction) _wrap_wxEnableTopLevelWindows, METH_VARARGS | METH_KEYWORDS },
|
{ "wxEnableTopLevelWindows", (PyCFunction) _wrap_wxEnableTopLevelWindows, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxSafeYield", (PyCFunction) _wrap_wxSafeYield, METH_VARARGS | METH_KEYWORDS },
|
|
||||||
{ "wxYield", (PyCFunction) _wrap_wxYield, METH_VARARGS | METH_KEYWORDS },
|
{ "wxYield", (PyCFunction) _wrap_wxYield, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxUsleep", (PyCFunction) _wrap_wxUsleep, METH_VARARGS | METH_KEYWORDS },
|
{ "wxUsleep", (PyCFunction) _wrap_wxUsleep, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxSleep", (PyCFunction) _wrap_wxSleep, METH_VARARGS | METH_KEYWORDS },
|
{ "wxSleep", (PyCFunction) _wrap_wxSleep, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
@@ -651,8 +651,6 @@ wxUsleep = miscc.wxUsleep
|
|||||||
|
|
||||||
wxYield = miscc.wxYield
|
wxYield = miscc.wxYield
|
||||||
|
|
||||||
wxSafeYield = miscc.wxSafeYield
|
|
||||||
|
|
||||||
wxEnableTopLevelWindows = miscc.wxEnableTopLevelWindows
|
wxEnableTopLevelWindows = miscc.wxEnableTopLevelWindows
|
||||||
|
|
||||||
wxGetResource = miscc.wxGetResource
|
wxGetResource = miscc.wxGetResource
|
||||||
|
@@ -1207,6 +1207,32 @@ static PyObject *_wrap_wxWakeUpIdle(PyObject *self, PyObject *args, PyObject *kw
|
|||||||
return _resultobj;
|
return _resultobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static PyObject *_wrap_wxSafeYield(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
bool _result;
|
||||||
|
wxWindow * _arg0 = (wxWindow *) NULL;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
char *_kwnames[] = { "win", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:wxSafeYield",_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 wxSafeYield. Expected _wxWindow_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
|
_result = (bool )wxSafeYield(_arg0);
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
} _resultobj = Py_BuildValue("i",_result);
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
static PyObject *_wrap_wxShowTip(PyObject *self, PyObject *args, PyObject *kwargs) {
|
static PyObject *_wrap_wxShowTip(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
PyObject * _resultobj;
|
PyObject * _resultobj;
|
||||||
bool _result;
|
bool _result;
|
||||||
@@ -4944,6 +4970,7 @@ static PyMethodDef misc2cMethods[] = {
|
|||||||
{ "wxDragIcon", (PyCFunction) _wrap_wxDragIcon, METH_VARARGS | METH_KEYWORDS },
|
{ "wxDragIcon", (PyCFunction) _wrap_wxDragIcon, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxCreateFileTipProvider", (PyCFunction) _wrap_wxCreateFileTipProvider, METH_VARARGS | METH_KEYWORDS },
|
{ "wxCreateFileTipProvider", (PyCFunction) _wrap_wxCreateFileTipProvider, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxShowTip", (PyCFunction) _wrap_wxShowTip, METH_VARARGS | METH_KEYWORDS },
|
{ "wxShowTip", (PyCFunction) _wrap_wxShowTip, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxSafeYield", (PyCFunction) _wrap_wxSafeYield, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxWakeUpIdle", (PyCFunction) _wrap_wxWakeUpIdle, METH_VARARGS | METH_KEYWORDS },
|
{ "wxWakeUpIdle", (PyCFunction) _wrap_wxWakeUpIdle, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxPostEvent", (PyCFunction) _wrap_wxPostEvent, METH_VARARGS | METH_KEYWORDS },
|
{ "wxPostEvent", (PyCFunction) _wrap_wxPostEvent, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxCaret_SetBlinkTime", (PyCFunction) _wrap_wxCaret_SetBlinkTime, METH_VARARGS | METH_KEYWORDS },
|
{ "wxCaret_SetBlinkTime", (PyCFunction) _wrap_wxCaret_SetBlinkTime, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
@@ -561,6 +561,8 @@ wxPostEvent = misc2c.wxPostEvent
|
|||||||
|
|
||||||
wxWakeUpIdle = misc2c.wxWakeUpIdle
|
wxWakeUpIdle = misc2c.wxWakeUpIdle
|
||||||
|
|
||||||
|
wxSafeYield = misc2c.wxSafeYield
|
||||||
|
|
||||||
wxShowTip = misc2c.wxShowTip
|
wxShowTip = misc2c.wxShowTip
|
||||||
|
|
||||||
def wxCreateFileTipProvider(*_args, **_kwargs):
|
def wxCreateFileTipProvider(*_args, **_kwargs):
|
||||||
|
@@ -646,6 +646,10 @@ extern "C" SWIGEXPORT(void) inithtmlhelpc();
|
|||||||
extern "C" SWIGEXPORT(void) initcalendarc();
|
extern "C" SWIGEXPORT(void) initcalendarc();
|
||||||
extern "C" SWIGEXPORT(void) initstreamsc();
|
extern "C" SWIGEXPORT(void) initstreamsc();
|
||||||
extern "C" SWIGEXPORT(void) initfilesysc();
|
extern "C" SWIGEXPORT(void) initfilesysc();
|
||||||
|
|
||||||
|
extern "C" SWIGEXPORT(void) initglcanvasc();
|
||||||
|
extern "C" SWIGEXPORT(void) initoglc();
|
||||||
|
extern "C" SWIGEXPORT(void) initstc_c();
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
@@ -2966,6 +2970,10 @@ SWIGEXPORT(void) initwxc() {
|
|||||||
inithtmlc();
|
inithtmlc();
|
||||||
inithtmlhelpc();
|
inithtmlhelpc();
|
||||||
initcalendarc();
|
initcalendarc();
|
||||||
|
|
||||||
|
initglcanvasc();
|
||||||
|
initoglc();
|
||||||
|
initstc_c();
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; _swig_mapping[i].n1; i++)
|
for (i = 0; _swig_mapping[i].n1; i++)
|
||||||
|
@@ -616,7 +616,7 @@ class TreePainter(Painter):
|
|||||||
dc.SetPen(self.linepen)
|
dc.SetPen(self.linepen)
|
||||||
dc.SetBrush(self.bgbrush)
|
dc.SetBrush(self.bgbrush)
|
||||||
dc.DrawRectangle(px -4, py-4, 9, 9)
|
dc.DrawRectangle(px -4, py-4, 9, 9)
|
||||||
self.knobs.append(kid, Rect(px -4, py -4, 9, 9))
|
self.knobs.append( (kid, Rect(px -4, py -4, 9, 9)) )
|
||||||
dc.SetPen(self.textpen)
|
dc.SetPen(self.textpen)
|
||||||
if not kid.expanded:
|
if not kid.expanded:
|
||||||
dc.DrawLine(px, py -2, px, py + 3)
|
dc.DrawLine(px, py -2, px, py + 3)
|
||||||
@@ -627,7 +627,7 @@ class TreePainter(Painter):
|
|||||||
dc.SetPen(self.linepen)
|
dc.SetPen(self.linepen)
|
||||||
dc.SetBrush(self.bgbrush)
|
dc.SetBrush(self.bgbrush)
|
||||||
dc.DrawRectangle(px -4, py-4, 9, 9)
|
dc.DrawRectangle(px -4, py-4, 9, 9)
|
||||||
self.knobs.append(node, Rect(px -4, py -4, 9, 9))
|
self.knobs.append( (node, Rect(px -4, py -4, 9, 9)) )
|
||||||
dc.SetPen(self.textpen)
|
dc.SetPen(self.textpen)
|
||||||
if not node.expanded:
|
if not node.expanded:
|
||||||
dc.DrawLine(px, py -2, px, py + 3)
|
dc.DrawLine(px, py -2, px, py + 3)
|
||||||
|
@@ -342,7 +342,7 @@ class PlotCanvas(wx.wxWindow):
|
|||||||
ticks = []
|
ticks = []
|
||||||
t = -grid*Numeric.floor(-lower/grid)
|
t = -grid*Numeric.floor(-lower/grid)
|
||||||
while t <= upper:
|
while t <= upper:
|
||||||
ticks.append(t, format % (t,))
|
ticks.append( (t, format % (t,)) )
|
||||||
t = t + grid
|
t = t + grid
|
||||||
return ticks
|
return ticks
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user