diff --git a/utils/wxPython/CHANGES.txt b/utils/wxPython/CHANGES.txt index 127a1441f9..76adc14a28 100644 --- a/utils/wxPython/CHANGES.txt +++ b/utils/wxPython/CHANGES.txt @@ -38,6 +38,22 @@ method calls, properties, etc., and if the class or a mix-in has matching method names, then the COM events will be propogated back to them. +Created a typemap that allows a string to be used for parameters +expecting a wxColour type. The string is either a colour name as +defined in the wxColourDatabase, or a colour spec of the form +"#RRGGBB". See the wxStyledTextCtrl demo for an example. + +I almost forgot to mention the wxStyledTextCtrl! Yes, the +wxStyledTextCtrl is finally in wxPython!! (And the crowd goes +wild...) There's no documentaTion yet (the crowd boos and hisses...) +but I've included a very readable source file in the +wxPython/demo/data directory, a couple fairly good examples, and you +can also refer to the Scintilla documentaion at +http://www.scintilla.org/ScintillaDoc.html to help fill in the gaps +until the docs are done. (The croud murmers contentedly as the tool +provider smiles convincingly and removes his flame-proof suit.) + + What's new in 2.1.13 diff --git a/utils/wxPython/README.txt b/utils/wxPython/README.txt index 6222375387..a913060bc7 100644 --- a/utils/wxPython/README.txt +++ b/utils/wxPython/README.txt @@ -37,11 +37,11 @@ various sources of help, but probably the best source is the wxPython-users mail list. You can view the archive or subscribe by going to - http://starship.python.net/mailman/listinfo/wxpython-users + http://wxwindows.org/mailman/listinfo/wxpython-users Or you can send mail directly to the list using this address: - wxpython-users@starship.python.net + wxpython-users@wxwindows.org Other Info diff --git a/utils/wxPython/demo/ActiveXWrapper_Acrobat.py b/utils/wxPython/demo/ActiveXWrapper_Acrobat.py index 3115ba0879..e8c1bca10b 100644 --- a/utils/wxPython/demo/ActiveXWrapper_Acrobat.py +++ b/utils/wxPython/demo/ActiveXWrapper_Acrobat.py @@ -1,4 +1,16 @@ """ +
+This demo shows how to embed an ActiveX control in a wxPython application, (Win32 only.) ++The MakeActiveXClass function dynamically builds a new Class on the fly, that has the +same signature and semantics as wxWindow. This means that when you call the function +you get back a new class that you can use just like wxWindow, (set the size and position, +use in a sizer, etc.) except its contents will be the COM control. +
+This demo embeds the Adobe Acrobat Reader, and gives you some buttons for opening a PDF +file, changing pages, etc. that show how to call methods on the COM object. If you don't +have Acrobat Reader 4.0 installed it won't work. + """ from wxPython.wx import * diff --git a/utils/wxPython/demo/ActiveXWrapper_IE.py b/utils/wxPython/demo/ActiveXWrapper_IE.py index a5c1d9062b..a30ad632b3 100644 --- a/utils/wxPython/demo/ActiveXWrapper_IE.py +++ b/utils/wxPython/demo/ActiveXWrapper_IE.py @@ -1,4 +1,16 @@ """ +
+This demo shows how to embed an ActiveX control in a wxPython application, (Win32 only.) ++The MakeActiveXClass function dynamically builds a new Class on the fly, that has the +same signature and semantics as wxWindow. This means that when you call the function +you get back a new class that you can use just like wxWindow, (set the size and position, +use in a sizer, etc.) except its contents will be the COM control. +
+This demo embeds the Internet Exploer WebBrowser control, and shows how to receive events
+from the COM control. (The title bar and status bar are updated as pages change, in addition
+to the log messages being shown.)
+
"""
from wxPython.wx import *
@@ -38,8 +50,12 @@ class TestPanel(wxWindow):
self.ie = theClass(self, -1, style=wxSUNKEN_BORDER)
- btn = wxButton(self, wxNewId(), " Open ")
- EVT_BUTTON(self, btn.GetId(), self.OnOpenButton)
+ #btn = wxButton(self, wxNewId(), " Open ")
+ #EVT_BUTTON(self, btn.GetId(), self.OnOpenButton)
+ #btnSizer.Add(btn, 0, wxEXPAND|wxALL, 5)
+
+ btn = wxButton(self, wxNewId(), " Home ")
+ EVT_BUTTON(self, btn.GetId(), self.OnHomeButton)
btnSizer.Add(btn, 0, wxEXPAND|wxALL, 5)
btn = wxButton(self, wxNewId(), " <-- ")
@@ -104,6 +120,8 @@ class TestPanel(wxWindow):
self.ie.Navigate(self.current)
dlg.Destroy()
+ def OnHomeButton(self, event):
+ self.ie.GoHome() ## ET Phone Home!
def OnPrevPageButton(self, event):
self.ie.GoBack()
diff --git a/utils/wxPython/demo/Main.py b/utils/wxPython/demo/Main.py
index 7758152502..a7a1b42e0e 100644
--- a/utils/wxPython/demo/Main.py
+++ b/utils/wxPython/demo/Main.py
@@ -14,6 +14,7 @@
import sys, os
from wxPython.wx import *
from wxPython.lib.splashscreen import SplashScreen
+from wxPython.html import wxHtmlWindow
#---------------------------------------------------------------------------
@@ -21,7 +22,7 @@ _useSplitter = true
_useNestedSplitter = true
_treeList = [
- ('New since last release', ['wxGrid', 'wxStyledTextCtrl',
+ ('New since last release', ['wxGrid', 'wxStyledTextCtrl_1',
'ActiveXWrapper_Acrobat', 'ActiveXWrapper_IE',
'FileBrowseButton', 'wxCalendar']),
@@ -157,12 +158,13 @@ class wxPythonDemo(wxFrame):
EVT_TREE_ITEM_EXPANDED (self.tree, tID, self.OnItemExpanded)
EVT_TREE_ITEM_COLLAPSED (self.tree, tID, self.OnItemCollapsed)
EVT_TREE_SEL_CHANGED (self.tree, tID, self.OnSelChanged)
+ EVT_LEFT_DOWN (self.tree, self.OnTreeLeftDown)
# Create a Notebook
self.nb = wxNotebook(nbParent, -1)
# Set up a TextCtrl on the Overview Notebook page
- self.ovr = wxTextCtrl(self.nb, -1, style = wxTE_MULTILINE|wxTE_READONLY)
+ self.ovr = wxHtmlWindow(self.nb, -1)
self.nb.AddPage(self.ovr, "Overview")
@@ -241,6 +243,16 @@ class wxPythonDemo(wxFrame):
item = event.GetItem()
self.log.WriteText("OnItemCollapsed: %s\n" % self.tree.GetItemText(item))
+
+ #---------------------------------------------
+ def OnTreeLeftDown(self, event):
+ pt = event.GetPosition();
+ item, flags = self.tree.HitTest(pt)
+ if item == self.tree.GetSelection():
+ self.SetOverview(self.tree.GetItemText(item), self.curOverview)
+ else:
+ event.Skip()
+
#---------------------------------------------
def OnSelChanged(self, event):
if self.dying:
@@ -284,7 +296,7 @@ class wxPythonDemo(wxFrame):
self.nb.SetSelection(2)
else:
- self.ovr.Clear()
+ self.ovr.SetPage("")
self.txt.Clear()
self.window = None
@@ -307,11 +319,13 @@ class wxPythonDemo(wxFrame):
#---------------------------------------------
def SetOverview(self, name, text):
- self.ovr.Clear()
- self.ovr.WriteText(text)
+ self.curOverview = text
+ lead = text[:6]
+ if lead != '' and lead != '')
+ #text = '' + text + '
'
+ self.ovr.SetPage(text)
self.nb.SetPageText(0, name)
- self.ovr.SetInsertionPoint(0)
- self.ovr.ShowPosition(0)
#---------------------------------------------
# Menu methods
@@ -399,29 +413,27 @@ def main():
overview = """\
-Python
-------------
+
Python combines remarkable power with very clear syntax. It has modules, classes, exceptions, very high level dynamic data types, and dynamic typing. There are interfaces to many system calls and libraries, and new built-in modules are easily written in C or C++. Python is also usable as an extension language for applications that need a programmable interface. - -wxWindows --------------------- +
+
wxWindows is a set of libraries that allows C++ applications to compile and run on several different types of computers, with minimal source code changes. There is one library per supported GUI (such as Motif, or Windows). As well as providing a common API (Application Programming Interface) for GUI functionality, it provides functionality for accessing some commonly-used operating system facilities, such as copying or deleting files. wxWindows is a 'framework' in the sense that it provides a lot of built-in functionality, which the application can use or replace as required, thus saving a great deal of coding effort. Basic data structures such as strings, linked lists and hash tables are also supported. - -wxPython ----------------- +
+
The wxPython extension module attempts to mirror the class heiarchy of wxWindows as closely as possible. This means that there is a wxFrame class in wxPython that looks, smells, tastes and acts almost the same as the wxFrame class in the C++ version. Unfortunately, because of differences in the languages, wxPython doesn't match wxWindows exactly, but the differences should be easy to absorb because they are natural to Python. For example, some methods that return multiple values via argument pointers in C++ will return a tuple of values in Python. - +
There is still much to be done for wxPython, many classes still need to be mirrored. Also, wxWindows is still somewhat of a moving target so it is a bit of an effort just keeping wxPython up to date. On the other hand, there are enough of the core classes completed that useful applications can be written. - +
wxPython is close enough to the C++ version that the majority of the wxPython documentation is actually just notes attached to the C++ documents that describe the places where wxPython is different. There is also a series of sample programs included, and a series of documentation pages that assist the programmer in getting started with wxPython. """ diff --git a/utils/wxPython/demo/wxCalendar.py b/utils/wxPython/demo/wxCalendar.py index cf49fc2d9f..27e6f631c2 100644 --- a/utils/wxPython/demo/wxCalendar.py +++ b/utils/wxPython/demo/wxCalendar.py @@ -715,6 +715,7 @@ def runTest(frame, nb, log): overview = """\ This control provides a calendar control class for displaying and selecting dates. In addition, the class is extended and can now be used for printing/previewing. + Additional features include weekend highlighting and business type Monday-Sunday format. See example for various methods used to set display month, year, and highlighted dates (different font and background colours). diff --git a/utils/wxPython/demo/wxGrid.py b/utils/wxPython/demo/wxGrid.py index f4baf69d71..cdb508bf30 100644 --- a/utils/wxPython/demo/wxGrid.py +++ b/utils/wxPython/demo/wxGrid.py @@ -55,5 +55,32 @@ def runTest(frame, nb, log): overview = """\ -This demo shows various ways of using the ** NEW ** wxGrid. For more details see wxPython/demo/Grid*.py. +
++You can look at the sources for these samples to learn a lot about how the new classes work. +
+
+
+
+
+You can also look at the SWIG interface file used to generate
+the grid module for a lot more clues as to how things work.
+
"""
+
diff --git a/utils/wxPython/demo/wxStyledTextCtrl_1.py b/utils/wxPython/demo/wxStyledTextCtrl_1.py
new file mode 100644
index 0000000000..563a8b2750
--- /dev/null
+++ b/utils/wxPython/demo/wxStyledTextCtrl_1.py
@@ -0,0 +1,81 @@
+
+from wxPython.wx import *
+from wxPython.stc import *
+
+#----------------------------------------------------------------------
+
+demoText = """\
+
+This editor is provided by a class named wxStyledTextCtrl. As
+the name suggests, you can define styles that can be applied to
+sections of text. This will typically be used for things like
+syntax highlighting code editors, but I'm sure that there are other
+applications as well. A style is a combination of font, point size,
+forground and background colours. The editor can handle
+proportional fonts just as easily as monospaced fonts, and various
+styles can use different sized fonts.
+
+There are a few canned language lexers and colourizers included,
+(see the next demo) or you can handle the colourization yourself.
+If you do you can simply register an event handler and the editor
+will let you know when the visible portion of the text needs
+styling.
+
+wxStyledTextEditor also supports setting markers in the margin...
+
+
+
+
+...and indicators within the text. You can use these for whatever
+you want in your application. Drag and Drop of text works, as well
+as virtually unlimited Undo and Redo capabilities, (right click to
+try it out.)
+
+"""
+
+
+#----------------------------------------------------------------------
+
+def runTest(frame, nb, log):
+ ed = wxStyledTextCtrl(nb, -1)
+
+ ed.SetText(demoText)
+
+ ed.SetMarginType(0, wxSTC_MARGIN_NUMBER)
+ ed.SetMarginWidth(0, 22)
+ ed.StyleSetSpec(wxSTC_STYLE_LINENUMBER, "size:6,face:Ariel")
+
+ ed.SetMarginType(1, wxSTC_MARGIN_SYMBOL)
+ ed.MarkerDefine(0, wxSTC_MARK_ROUNDRECT, "#DD0FCC", "RED")
+ ed.MarkerDefine(1, wxSTC_MARK_CIRCLE, "FOREST GREEN", "SIENNA")
+ ed.MarkerDefine(2, wxSTC_MARK_SHORTARROW, "blue", "blue")
+ ed.MarkerDefine(3, wxSTC_MARK_ARROW, "#00FF00", "#00FF00")
+
+ ed.MarkerAdd(17, 0)
+ ed.MarkerAdd(18, 1)
+ ed.MarkerAdd(19, 2)
+ ed.MarkerAdd(20, 3)
+ ed.MarkerAdd(20, 0)
+
+
+ return ed
+
+
+
+#----------------------------------------------------------------------
+
+
+overview = """\
+"""
+
+
+
+if __name__ == '__main__':
+ import sys
+ app = wxPySimpleApp()
+ frame = wxFrame(None, -1, "Tester...", size=(640, 480))
+ win = runTest(frame, frame, sys.stdout)
+ frame.Show(true)
+ app.MainLoop()
+
+
diff --git a/utils/wxPython/modules/stc/stc.cpp b/utils/wxPython/modules/stc/stc.cpp
index 1b7ea8ad9d..5d08a25e27 100644
--- a/utils/wxPython/modules/stc/stc.cpp
+++ b/utils/wxPython/modules/stc/stc.cpp
@@ -140,18 +140,17 @@ static PyObject *_wrap_new_wxStyledTextCtrl(PyObject *self, PyObject *args, PyOb
wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition;
wxSize * _arg3 = (wxSize *) &wxDefaultSize;
long _arg4 = (long ) 0;
- wxString * _arg5 = (wxString *) &(wxSTCNameStr);
+ char * _arg5 = (char *) (wxSTCNameStr);
PyObject * _argo0 = 0;
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,"Oi|OOlO:new_wxStyledTextCtrl",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_obj5))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOls:new_wxStyledTextCtrl",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_arg5))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -171,18 +170,10 @@ static PyObject *_wrap_new_wxStyledTextCtrl(PyObject *self, PyObject *args, PyOb
_arg3 = &temp0;
if (! wxSize_helper(_obj3, &_arg3))
return NULL;
-}
- if (_obj5)
-{
- if (!PyString_Check(_obj5)) {
- PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
- return NULL;
- }
- _arg5 = new wxString(PyString_AsString(_obj5), PyString_Size(_obj5));
}
{
wxPy_BEGIN_ALLOW_THREADS;
- _result = (wxStyledTextCtrl *)new_wxStyledTextCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5);
+ _result = (wxStyledTextCtrl *)new_wxStyledTextCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5);
wxPy_END_ALLOW_THREADS;
} if (_result) {
@@ -192,10 +183,6 @@ static PyObject *_wrap_new_wxStyledTextCtrl(PyObject *self, PyObject *args, PyOb
Py_INCREF(Py_None);
_resultobj = Py_None;
}
-{
- if (_obj5)
- delete _arg5;
-}
return _resultobj;
}
@@ -2683,11 +2670,12 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleSetForeground(PyObject *self, PyObj
int _arg1;
wxColour * _arg2;
PyObject * _argo0 = 0;
- PyObject * _argo2 = 0;
+ wxColour temp;
+ PyObject * _obj2 = 0;
char *_kwnames[] = { "self","styleNum","colour", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxStyledTextCtrl_StyleSetForeground",_kwnames,&_argo0,&_arg1,&_argo2))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxStyledTextCtrl_StyleSetForeground",_kwnames,&_argo0,&_arg1,&_obj2))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -2696,13 +2684,11 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleSetForeground(PyObject *self, PyObj
return NULL;
}
}
- if (_argo2) {
- if (_argo2 == Py_None) { _arg2 = NULL; }
- else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxColour_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxStyledTextCtrl_StyleSetForeground. Expected _wxColour_p.");
+{
+ _arg2 = &temp;
+ if (! wxColour_helper(_obj2, &_arg2))
return NULL;
- }
- }
+}
{
wxPy_BEGIN_ALLOW_THREADS;
wxStyledTextCtrl_StyleSetForeground(_arg0,_arg1,*_arg2);
@@ -2720,11 +2706,12 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleSetBackground(PyObject *self, PyObj
int _arg1;
wxColour * _arg2;
PyObject * _argo0 = 0;
- PyObject * _argo2 = 0;
+ wxColour temp;
+ PyObject * _obj2 = 0;
char *_kwnames[] = { "self","styleNum","colour", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxStyledTextCtrl_StyleSetBackground",_kwnames,&_argo0,&_arg1,&_argo2))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxStyledTextCtrl_StyleSetBackground",_kwnames,&_argo0,&_arg1,&_obj2))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -2733,13 +2720,11 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleSetBackground(PyObject *self, PyObj
return NULL;
}
}
- if (_argo2) {
- if (_argo2 == Py_None) { _arg2 = NULL; }
- else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxColour_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxStyledTextCtrl_StyleSetBackground. Expected _wxColour_p.");
+{
+ _arg2 = &temp;
+ if (! wxColour_helper(_obj2, &_arg2))
return NULL;
- }
- }
+}
{
wxPy_BEGIN_ALLOW_THREADS;
wxStyledTextCtrl_StyleSetBackground(_arg0,_arg1,*_arg2);
@@ -3317,11 +3302,12 @@ static PyObject *_wrap_wxStyledTextCtrl_SetSelectionForeground(PyObject *self, P
wxStyledTextCtrl * _arg0;
wxColour * _arg1;
PyObject * _argo0 = 0;
- PyObject * _argo1 = 0;
+ wxColour temp;
+ PyObject * _obj1 = 0;
char *_kwnames[] = { "self","colour", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxStyledTextCtrl_SetSelectionForeground",_kwnames,&_argo0,&_argo1))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxStyledTextCtrl_SetSelectionForeground",_kwnames,&_argo0,&_obj1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -3330,13 +3316,11 @@ static PyObject *_wrap_wxStyledTextCtrl_SetSelectionForeground(PyObject *self, P
return NULL;
}
}
- if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxStyledTextCtrl_SetSelectionForeground. Expected _wxColour_p.");
+{
+ _arg1 = &temp;
+ if (! wxColour_helper(_obj1, &_arg1))
return NULL;
- }
- }
+}
{
wxPy_BEGIN_ALLOW_THREADS;
wxStyledTextCtrl_SetSelectionForeground(_arg0,*_arg1);
@@ -3353,11 +3337,12 @@ static PyObject *_wrap_wxStyledTextCtrl_SetSelectionBackground(PyObject *self, P
wxStyledTextCtrl * _arg0;
wxColour * _arg1;
PyObject * _argo0 = 0;
- PyObject * _argo1 = 0;
+ wxColour temp;
+ PyObject * _obj1 = 0;
char *_kwnames[] = { "self","colour", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxStyledTextCtrl_SetSelectionBackground",_kwnames,&_argo0,&_argo1))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxStyledTextCtrl_SetSelectionBackground",_kwnames,&_argo0,&_obj1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -3366,13 +3351,11 @@ static PyObject *_wrap_wxStyledTextCtrl_SetSelectionBackground(PyObject *self, P
return NULL;
}
}
- if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxStyledTextCtrl_SetSelectionBackground. Expected _wxColour_p.");
+{
+ _arg1 = &temp;
+ if (! wxColour_helper(_obj1, &_arg1))
return NULL;
- }
- }
+}
{
wxPy_BEGIN_ALLOW_THREADS;
wxStyledTextCtrl_SetSelectionBackground(_arg0,*_arg1);
@@ -3389,11 +3372,12 @@ static PyObject *_wrap_wxStyledTextCtrl_SetCaretForeground(PyObject *self, PyObj
wxStyledTextCtrl * _arg0;
wxColour * _arg1;
PyObject * _argo0 = 0;
- PyObject * _argo1 = 0;
+ wxColour temp;
+ PyObject * _obj1 = 0;
char *_kwnames[] = { "self","colour", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxStyledTextCtrl_SetCaretForeground",_kwnames,&_argo0,&_argo1))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxStyledTextCtrl_SetCaretForeground",_kwnames,&_argo0,&_obj1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -3402,13 +3386,11 @@ static PyObject *_wrap_wxStyledTextCtrl_SetCaretForeground(PyObject *self, PyObj
return NULL;
}
}
- if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxStyledTextCtrl_SetCaretForeground. Expected _wxColour_p.");
+{
+ _arg1 = &temp;
+ if (! wxColour_helper(_obj1, &_arg1))
return NULL;
- }
- }
+}
{
wxPy_BEGIN_ALLOW_THREADS;
wxStyledTextCtrl_SetCaretForeground(_arg0,*_arg1);
@@ -3667,12 +3649,14 @@ static PyObject *_wrap_wxStyledTextCtrl_MarkerDefine(PyObject *self, PyObject *a
wxColour * _arg3;
wxColour * _arg4;
PyObject * _argo0 = 0;
- PyObject * _argo3 = 0;
- PyObject * _argo4 = 0;
+ wxColour temp;
+ PyObject * _obj3 = 0;
+ wxColour temp0;
+ PyObject * _obj4 = 0;
char *_kwnames[] = { "self","markerNumber","markerSymbol","foreground","background", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiOO:wxStyledTextCtrl_MarkerDefine",_kwnames,&_argo0,&_arg1,&_arg2,&_argo3,&_argo4))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiOO:wxStyledTextCtrl_MarkerDefine",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3,&_obj4))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -3681,20 +3665,16 @@ static PyObject *_wrap_wxStyledTextCtrl_MarkerDefine(PyObject *self, PyObject *a
return NULL;
}
}
- if (_argo3) {
- if (_argo3 == Py_None) { _arg3 = NULL; }
- else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxColour_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxStyledTextCtrl_MarkerDefine. Expected _wxColour_p.");
+{
+ _arg3 = &temp;
+ if (! wxColour_helper(_obj3, &_arg3))
return NULL;
- }
- }
- if (_argo4) {
- if (_argo4 == Py_None) { _arg4 = NULL; }
- else if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_wxColour_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of wxStyledTextCtrl_MarkerDefine. Expected _wxColour_p.");
+}
+{
+ _arg4 = &temp0;
+ if (! wxColour_helper(_obj4, &_arg4))
return NULL;
- }
- }
+}
{
wxPy_BEGIN_ALLOW_THREADS;
wxStyledTextCtrl_MarkerDefine(_arg0,_arg1,_arg2,*_arg3,*_arg4);
@@ -3741,11 +3721,12 @@ static PyObject *_wrap_wxStyledTextCtrl_MarkerSetForeground(PyObject *self, PyOb
int _arg1;
wxColour * _arg2;
PyObject * _argo0 = 0;
- PyObject * _argo2 = 0;
+ wxColour temp;
+ PyObject * _obj2 = 0;
char *_kwnames[] = { "self","markerNumber","colour", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxStyledTextCtrl_MarkerSetForeground",_kwnames,&_argo0,&_arg1,&_argo2))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxStyledTextCtrl_MarkerSetForeground",_kwnames,&_argo0,&_arg1,&_obj2))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -3754,13 +3735,11 @@ static PyObject *_wrap_wxStyledTextCtrl_MarkerSetForeground(PyObject *self, PyOb
return NULL;
}
}
- if (_argo2) {
- if (_argo2 == Py_None) { _arg2 = NULL; }
- else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxColour_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxStyledTextCtrl_MarkerSetForeground. Expected _wxColour_p.");
+{
+ _arg2 = &temp;
+ if (! wxColour_helper(_obj2, &_arg2))
return NULL;
- }
- }
+}
{
wxPy_BEGIN_ALLOW_THREADS;
wxStyledTextCtrl_MarkerSetForeground(_arg0,_arg1,*_arg2);
@@ -3778,11 +3757,12 @@ static PyObject *_wrap_wxStyledTextCtrl_MarkerSetBackground(PyObject *self, PyOb
int _arg1;
wxColour * _arg2;
PyObject * _argo0 = 0;
- PyObject * _argo2 = 0;
+ wxColour temp;
+ PyObject * _obj2 = 0;
char *_kwnames[] = { "self","markerNumber","colour", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxStyledTextCtrl_MarkerSetBackground",_kwnames,&_argo0,&_arg1,&_argo2))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxStyledTextCtrl_MarkerSetBackground",_kwnames,&_argo0,&_arg1,&_obj2))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -3791,13 +3771,11 @@ static PyObject *_wrap_wxStyledTextCtrl_MarkerSetBackground(PyObject *self, PyOb
return NULL;
}
}
- if (_argo2) {
- if (_argo2 == Py_None) { _arg2 = NULL; }
- else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxColour_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxStyledTextCtrl_MarkerSetBackground. Expected _wxColour_p.");
+{
+ _arg2 = &temp;
+ if (! wxColour_helper(_obj2, &_arg2))
return NULL;
- }
- }
+}
{
wxPy_BEGIN_ALLOW_THREADS;
wxStyledTextCtrl_MarkerSetBackground(_arg0,_arg1,*_arg2);
@@ -4100,11 +4078,12 @@ static PyObject *_wrap_wxStyledTextCtrl_IndicatorSetColour(PyObject *self, PyObj
int _arg1;
wxColour * _arg2;
PyObject * _argo0 = 0;
- PyObject * _argo2 = 0;
+ wxColour temp;
+ PyObject * _obj2 = 0;
char *_kwnames[] = { "self","indicNum","colour", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxStyledTextCtrl_IndicatorSetColour",_kwnames,&_argo0,&_arg1,&_argo2))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxStyledTextCtrl_IndicatorSetColour",_kwnames,&_argo0,&_arg1,&_obj2))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -4113,13 +4092,11 @@ static PyObject *_wrap_wxStyledTextCtrl_IndicatorSetColour(PyObject *self, PyObj
return NULL;
}
}
- if (_argo2) {
- if (_argo2 == Py_None) { _arg2 = NULL; }
- else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxColour_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxStyledTextCtrl_IndicatorSetColour. Expected _wxColour_p.");
+{
+ _arg2 = &temp;
+ if (! wxColour_helper(_obj2, &_arg2))
return NULL;
- }
- }
+}
{
wxPy_BEGIN_ALLOW_THREADS;
wxStyledTextCtrl_IndicatorSetColour(_arg0,_arg1,*_arg2);
@@ -4475,11 +4452,12 @@ static PyObject *_wrap_wxStyledTextCtrl_CallTipSetBackground(PyObject *self, PyO
wxStyledTextCtrl * _arg0;
wxColour * _arg1;
PyObject * _argo0 = 0;
- PyObject * _argo1 = 0;
+ wxColour temp;
+ PyObject * _obj1 = 0;
char *_kwnames[] = { "self","colour", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxStyledTextCtrl_CallTipSetBackground",_kwnames,&_argo0,&_argo1))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxStyledTextCtrl_CallTipSetBackground",_kwnames,&_argo0,&_obj1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -4488,13 +4466,11 @@ static PyObject *_wrap_wxStyledTextCtrl_CallTipSetBackground(PyObject *self, PyO
return NULL;
}
}
- if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxStyledTextCtrl_CallTipSetBackground. Expected _wxColour_p.");
+{
+ _arg1 = &temp;
+ if (! wxColour_helper(_obj1, &_arg1))
return NULL;
- }
- }
+}
{
wxPy_BEGIN_ALLOW_THREADS;
wxStyledTextCtrl_CallTipSetBackground(_arg0,*_arg1);
@@ -5267,11 +5243,12 @@ static PyObject *_wrap_wxStyledTextCtrl_SetEdgeColour(PyObject *self, PyObject *
wxStyledTextCtrl * _arg0;
wxColour * _arg1;
PyObject * _argo0 = 0;
- PyObject * _argo1 = 0;
+ wxColour temp;
+ PyObject * _obj1 = 0;
char *_kwnames[] = { "self","colour", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxStyledTextCtrl_SetEdgeColour",_kwnames,&_argo0,&_argo1))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxStyledTextCtrl_SetEdgeColour",_kwnames,&_argo0,&_obj1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -5280,13 +5257,11 @@ static PyObject *_wrap_wxStyledTextCtrl_SetEdgeColour(PyObject *self, PyObject *
return NULL;
}
}
- if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxStyledTextCtrl_SetEdgeColour. Expected _wxColour_p.");
+{
+ _arg1 = &temp;
+ if (! wxColour_helper(_obj1, &_arg1))
return NULL;
- }
- }
+}
{
wxPy_BEGIN_ALLOW_THREADS;
wxStyledTextCtrl_SetEdgeColour(_arg0,*_arg1);
@@ -7142,6 +7117,11 @@ SWIGEXPORT(void) initstcc() {
PyDict_SetItemString(d,"wxSTC_CMD_ZOOMOUT", PyInt_FromLong((long) wxSTC_CMD_ZOOMOUT));
PyDict_SetItemString(d,"wxSTC_CMD_DELWORDLEFT", PyInt_FromLong((long) wxSTC_CMD_DELWORDLEFT));
PyDict_SetItemString(d,"wxSTC_CMD_DELWORDRIGHT", PyInt_FromLong((long) wxSTC_CMD_DELWORDRIGHT));
+ PyDict_SetItemString(d,"wxSTC_CMD_LINECUT", PyInt_FromLong((long) wxSTC_CMD_LINECUT));
+ PyDict_SetItemString(d,"wxSTC_CMD_LINEDELETE", PyInt_FromLong((long) wxSTC_CMD_LINEDELETE));
+ PyDict_SetItemString(d,"wxSTC_CMD_LINETRANSPOSE", PyInt_FromLong((long) wxSTC_CMD_LINETRANSPOSE));
+ PyDict_SetItemString(d,"wxSTC_CMD_LOWERCASE", PyInt_FromLong((long) wxSTC_CMD_LOWERCASE));
+ PyDict_SetItemString(d,"wxSTC_CMD_UPPERCASE", PyInt_FromLong((long) wxSTC_CMD_UPPERCASE));
PyDict_SetItemString(d,"wxSTC_LEX_CONTAINER", PyInt_FromLong((long) wxSTC_LEX_CONTAINER));
PyDict_SetItemString(d,"wxSTC_LEX_NULL", PyInt_FromLong((long) wxSTC_LEX_NULL));
PyDict_SetItemString(d,"wxSTC_LEX_PYTHON", PyInt_FromLong((long) wxSTC_LEX_PYTHON));
diff --git a/utils/wxPython/modules/stc/stc.i b/utils/wxPython/modules/stc/stc.i
index aaaa78803f..7dd3437945 100644
--- a/utils/wxPython/modules/stc/stc.i
+++ b/utils/wxPython/modules/stc/stc.i
@@ -117,7 +117,12 @@ enum {
wxSTC_CMD_ZOOMIN,
wxSTC_CMD_ZOOMOUT,
wxSTC_CMD_DELWORDLEFT,
- wxSTC_CMD_DELWORDRIGHT
+ wxSTC_CMD_DELWORDRIGHT,
+ wxSTC_CMD_LINECUT,
+ wxSTC_CMD_LINEDELETE,
+ wxSTC_CMD_LINETRANSPOSE,
+ wxSTC_CMD_LOWERCASE,
+ wxSTC_CMD_UPPERCASE
};
@@ -163,7 +168,7 @@ public:
wxStyledTextCtrl(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
- const wxString& name = wxSTCNameStr);
+ const char* name = wxSTCNameStr);
//~wxStyledTextCtrl();
diff --git a/utils/wxPython/modules/stc/stc.py b/utils/wxPython/modules/stc/stc.py
index a65871038e..0bcb9a1a88 100644
--- a/utils/wxPython/modules/stc/stc.py
+++ b/utils/wxPython/modules/stc/stc.py
@@ -784,6 +784,11 @@ wxSTC_CMD_ZOOMIN = stcc.wxSTC_CMD_ZOOMIN
wxSTC_CMD_ZOOMOUT = stcc.wxSTC_CMD_ZOOMOUT
wxSTC_CMD_DELWORDLEFT = stcc.wxSTC_CMD_DELWORDLEFT
wxSTC_CMD_DELWORDRIGHT = stcc.wxSTC_CMD_DELWORDRIGHT
+wxSTC_CMD_LINECUT = stcc.wxSTC_CMD_LINECUT
+wxSTC_CMD_LINEDELETE = stcc.wxSTC_CMD_LINEDELETE
+wxSTC_CMD_LINETRANSPOSE = stcc.wxSTC_CMD_LINETRANSPOSE
+wxSTC_CMD_LOWERCASE = stcc.wxSTC_CMD_LOWERCASE
+wxSTC_CMD_UPPERCASE = stcc.wxSTC_CMD_UPPERCASE
wxSTC_LEX_CONTAINER = stcc.wxSTC_LEX_CONTAINER
wxSTC_LEX_NULL = stcc.wxSTC_LEX_NULL
wxSTC_LEX_PYTHON = stcc.wxSTC_LEX_PYTHON
diff --git a/utils/wxPython/src/controls2.i b/utils/wxPython/src/controls2.i
index 91293f3622..f424df14a7 100644
--- a/utils/wxPython/src/controls2.i
+++ b/utils/wxPython/src/controls2.i
@@ -378,6 +378,11 @@ public:
~wxTreeItemId();
bool IsOk();
+ %addmethods {
+ int __cmp__(wxTreeItemId* other) {
+ return *self != *other;
+ }
+ }
};
diff --git a/utils/wxPython/src/grid.i b/utils/wxPython/src/grid.i
index c6d4bb27e2..d3165104b5 100644
--- a/utils/wxPython/src/grid.i
+++ b/utils/wxPython/src/grid.i
@@ -4,7 +4,7 @@
//
// Author: Robin Dunn
//
-// Created: 6/2/98
+// Created: 17-March-2000
// RCS-ID: $Id$
// Copyright: (c) 1998 by Total Control Software
// Licence: wxWindows license
@@ -1345,6 +1345,7 @@ public:
void DisableCellEditControl();
bool CanEnableCellControl() const;
bool IsCellEditControlEnabled() const;
+ bool IsCellEditControlShown() const;
bool IsCurrentCellReadOnly() const;
diff --git a/utils/wxPython/src/helpers.cpp b/utils/wxPython/src/helpers.cpp
index 14ce153771..2df0ad24d6 100644
--- a/utils/wxPython/src/helpers.cpp
+++ b/utils/wxPython/src/helpers.cpp
@@ -928,6 +928,39 @@ bool wxRect_helper(PyObject* source, wxRect** obj) {
+bool wxColour_helper(PyObject* source, wxColour** obj) {
+
+ // If source is an object instance then it may already be the right type
+ if (PyInstance_Check(source)) {
+ wxColour* ptr;
+ if (SWIG_GetPtrObj(source, (void **)&ptr, "_wxColour_p"))
+ goto error;
+ *obj = ptr;
+ return TRUE;
+ }
+ // otherwise a string is expected
+ else if (PyString_Check(source)) {
+ wxString spec = PyString_AS_STRING(source);
+ if (spec[0] == '#' && spec.Length() == 7) { // It's #RRGGBB
+ char* junk;
+ int red = strtol(spec.Mid(1,2), &junk, 16);
+ int green = strtol(spec.Mid(3,2), &junk, 16);
+ int blue = strtol(spec.Mid(5,2), &junk, 16);
+ **obj = wxColour(red, green, blue);
+ return TRUE;
+ }
+ else { // it's a colour name
+ **obj = wxColour(spec);
+ return TRUE;
+ }
+ }
+
+ error:
+ PyErr_SetString(PyExc_TypeError, "Expected a wxColour object or a string containing a colour name or #RRGGBB.");
+ return FALSE;
+}
+
+
//----------------------------------------------------------------------
//----------------------------------------------------------------------
//----------------------------------------------------------------------
diff --git a/utils/wxPython/src/helpers.h b/utils/wxPython/src/helpers.h
index 45e6d1aeaf..87335078b2 100644
--- a/utils/wxPython/src/helpers.h
+++ b/utils/wxPython/src/helpers.h
@@ -102,6 +102,7 @@ HELPEREXPORT bool wxSize_helper(PyObject* source, wxSize** obj);
HELPEREXPORT bool wxPoint_helper(PyObject* source, wxPoint** obj);
HELPEREXPORT bool wxRealPoint_helper(PyObject* source, wxRealPoint** obj);
HELPEREXPORT bool wxRect_helper(PyObject* source, wxRect** obj);
+HELPEREXPORT bool wxColour_helper(PyObject* source, wxColour** obj);
//----------------------------------------------------------------------
diff --git a/utils/wxPython/src/msw/cmndlgs.cpp b/utils/wxPython/src/msw/cmndlgs.cpp
index d70f92c95b..06b503691b 100644
--- a/utils/wxPython/src/msw/cmndlgs.cpp
+++ b/utils/wxPython/src/msw/cmndlgs.cpp
@@ -288,11 +288,12 @@ static PyObject *_wrap_wxColourData_SetColour(PyObject *self, PyObject *args, Py
wxColourData * _arg0;
wxColour * _arg1;
PyObject * _argo0 = 0;
- PyObject * _argo1 = 0;
+ wxColour temp;
+ PyObject * _obj1 = 0;
char *_kwnames[] = { "self","colour", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxColourData_SetColour",_kwnames,&_argo0,&_argo1))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxColourData_SetColour",_kwnames,&_argo0,&_obj1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -301,13 +302,11 @@ static PyObject *_wrap_wxColourData_SetColour(PyObject *self, PyObject *args, Py
return NULL;
}
}
- if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxColourData_SetColour. Expected _wxColour_p.");
+{
+ _arg1 = &temp;
+ if (! wxColour_helper(_obj1, &_arg1))
return NULL;
- }
- }
+}
{
wxPy_BEGIN_ALLOW_THREADS;
wxColourData_SetColour(_arg0,*_arg1);
@@ -325,11 +324,12 @@ static PyObject *_wrap_wxColourData_SetCustomColour(PyObject *self, PyObject *ar
int _arg1;
wxColour * _arg2;
PyObject * _argo0 = 0;
- PyObject * _argo2 = 0;
+ wxColour temp;
+ PyObject * _obj2 = 0;
char *_kwnames[] = { "self","i","colour", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxColourData_SetCustomColour",_kwnames,&_argo0,&_arg1,&_argo2))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxColourData_SetCustomColour",_kwnames,&_argo0,&_arg1,&_obj2))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -338,13 +338,11 @@ static PyObject *_wrap_wxColourData_SetCustomColour(PyObject *self, PyObject *ar
return NULL;
}
}
- if (_argo2) {
- if (_argo2 == Py_None) { _arg2 = NULL; }
- else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxColour_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxColourData_SetCustomColour. Expected _wxColour_p.");
+{
+ _arg2 = &temp;
+ if (! wxColour_helper(_obj2, &_arg2))
return NULL;
- }
- }
+}
{
wxPy_BEGIN_ALLOW_THREADS;
wxColourData_SetCustomColour(_arg0,_arg1,*_arg2);
@@ -2092,11 +2090,12 @@ static PyObject *_wrap_wxFontData_SetColour(PyObject *self, PyObject *args, PyOb
wxFontData * _arg0;
wxColour * _arg1;
PyObject * _argo0 = 0;
- PyObject * _argo1 = 0;
+ wxColour temp;
+ PyObject * _obj1 = 0;
char *_kwnames[] = { "self","colour", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFontData_SetColour",_kwnames,&_argo0,&_argo1))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFontData_SetColour",_kwnames,&_argo0,&_obj1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -2105,13 +2104,11 @@ static PyObject *_wrap_wxFontData_SetColour(PyObject *self, PyObject *args, PyOb
return NULL;
}
}
- if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFontData_SetColour. Expected _wxColour_p.");
+{
+ _arg1 = &temp;
+ if (! wxColour_helper(_obj1, &_arg1))
return NULL;
- }
- }
+}
{
wxPy_BEGIN_ALLOW_THREADS;
wxFontData_SetColour(_arg0,*_arg1);
diff --git a/utils/wxPython/src/msw/controls.cpp b/utils/wxPython/src/msw/controls.cpp
index c0a2ac8a20..0a8888568f 100644
--- a/utils/wxPython/src/msw/controls.cpp
+++ b/utils/wxPython/src/msw/controls.cpp
@@ -484,11 +484,12 @@ static PyObject *_wrap_wxButton_SetBackgroundColour(PyObject *self, PyObject *ar
wxButton * _arg0;
wxColour * _arg1;
PyObject * _argo0 = 0;
- PyObject * _argo1 = 0;
+ wxColour temp;
+ PyObject * _obj1 = 0;
char *_kwnames[] = { "self","colour", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxButton_SetBackgroundColour",_kwnames,&_argo0,&_argo1))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxButton_SetBackgroundColour",_kwnames,&_argo0,&_obj1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -497,13 +498,11 @@ static PyObject *_wrap_wxButton_SetBackgroundColour(PyObject *self, PyObject *ar
return NULL;
}
}
- if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxButton_SetBackgroundColour. Expected _wxColour_p.");
+{
+ _arg1 = &temp;
+ if (! wxColour_helper(_obj1, &_arg1))
return NULL;
- }
- }
+}
{
wxPy_BEGIN_ALLOW_THREADS;
wxButton_SetBackgroundColour(_arg0,*_arg1);
@@ -520,11 +519,12 @@ static PyObject *_wrap_wxButton_SetForegroundColour(PyObject *self, PyObject *ar
wxButton * _arg0;
wxColour * _arg1;
PyObject * _argo0 = 0;
- PyObject * _argo1 = 0;
+ wxColour temp;
+ PyObject * _obj1 = 0;
char *_kwnames[] = { "self","colour", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxButton_SetForegroundColour",_kwnames,&_argo0,&_argo1))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxButton_SetForegroundColour",_kwnames,&_argo0,&_obj1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -533,13 +533,11 @@ static PyObject *_wrap_wxButton_SetForegroundColour(PyObject *self, PyObject *ar
return NULL;
}
}
- if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxButton_SetForegroundColour. Expected _wxColour_p.");
+{
+ _arg1 = &temp;
+ if (! wxColour_helper(_obj1, &_arg1))
return NULL;
- }
- }
+}
{
wxPy_BEGIN_ALLOW_THREADS;
wxButton_SetForegroundColour(_arg0,*_arg1);
diff --git a/utils/wxPython/src/msw/controls2.cpp b/utils/wxPython/src/msw/controls2.cpp
index 5445b5d7e0..5d0972aeeb 100644
--- a/utils/wxPython/src/msw/controls2.cpp
+++ b/utils/wxPython/src/msw/controls2.cpp
@@ -191,11 +191,12 @@ static PyObject *_wrap_wxListItemAttr_SetTextColour(PyObject *self, PyObject *ar
wxListItemAttr * _arg0;
wxColour * _arg1;
PyObject * _argo0 = 0;
- PyObject * _argo1 = 0;
+ wxColour temp;
+ PyObject * _obj1 = 0;
char *_kwnames[] = { "self","colText", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxListItemAttr_SetTextColour",_kwnames,&_argo0,&_argo1))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxListItemAttr_SetTextColour",_kwnames,&_argo0,&_obj1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -204,13 +205,11 @@ static PyObject *_wrap_wxListItemAttr_SetTextColour(PyObject *self, PyObject *ar
return NULL;
}
}
- if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxListItemAttr_SetTextColour. Expected _wxColour_p.");
+{
+ _arg1 = &temp;
+ if (! wxColour_helper(_obj1, &_arg1))
return NULL;
- }
- }
+}
{
wxPy_BEGIN_ALLOW_THREADS;
wxListItemAttr_SetTextColour(_arg0,*_arg1);
@@ -227,11 +226,12 @@ static PyObject *_wrap_wxListItemAttr_SetBackgroundColour(PyObject *self, PyObje
wxListItemAttr * _arg0;
wxColour * _arg1;
PyObject * _argo0 = 0;
- PyObject * _argo1 = 0;
+ wxColour temp;
+ PyObject * _obj1 = 0;
char *_kwnames[] = { "self","colBack", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxListItemAttr_SetBackgroundColour",_kwnames,&_argo0,&_argo1))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxListItemAttr_SetBackgroundColour",_kwnames,&_argo0,&_obj1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -240,13 +240,11 @@ static PyObject *_wrap_wxListItemAttr_SetBackgroundColour(PyObject *self, PyObje
return NULL;
}
}
- if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxListItemAttr_SetBackgroundColour. Expected _wxColour_p.");
+{
+ _arg1 = &temp;
+ if (! wxColour_helper(_obj1, &_arg1))
return NULL;
- }
- }
+}
{
wxPy_BEGIN_ALLOW_THREADS;
wxListItemAttr_SetBackgroundColour(_arg0,*_arg1);
@@ -883,11 +881,12 @@ static PyObject *_wrap_wxListItem_SetTextColour(PyObject *self, PyObject *args,
wxListItem * _arg0;
wxColour * _arg1;
PyObject * _argo0 = 0;
- PyObject * _argo1 = 0;
+ wxColour temp;
+ PyObject * _obj1 = 0;
char *_kwnames[] = { "self","colText", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxListItem_SetTextColour",_kwnames,&_argo0,&_argo1))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxListItem_SetTextColour",_kwnames,&_argo0,&_obj1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -896,13 +895,11 @@ static PyObject *_wrap_wxListItem_SetTextColour(PyObject *self, PyObject *args,
return NULL;
}
}
- if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxListItem_SetTextColour. Expected _wxColour_p.");
+{
+ _arg1 = &temp;
+ if (! wxColour_helper(_obj1, &_arg1))
return NULL;
- }
- }
+}
{
wxPy_BEGIN_ALLOW_THREADS;
wxListItem_SetTextColour(_arg0,*_arg1);
@@ -919,11 +916,12 @@ static PyObject *_wrap_wxListItem_SetBackgroundColour(PyObject *self, PyObject *
wxListItem * _arg0;
wxColour * _arg1;
PyObject * _argo0 = 0;
- PyObject * _argo1 = 0;
+ wxColour temp;
+ PyObject * _obj1 = 0;
char *_kwnames[] = { "self","colBack", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxListItem_SetBackgroundColour",_kwnames,&_argo0,&_argo1))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxListItem_SetBackgroundColour",_kwnames,&_argo0,&_obj1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -932,13 +930,11 @@ static PyObject *_wrap_wxListItem_SetBackgroundColour(PyObject *self, PyObject *
return NULL;
}
}
- if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxListItem_SetBackgroundColour. Expected _wxColour_p.");
+{
+ _arg1 = &temp;
+ if (! wxColour_helper(_obj1, &_arg1))
return NULL;
- }
- }
+}
{
wxPy_BEGIN_ALLOW_THREADS;
wxListItem_SetBackgroundColour(_arg0,*_arg1);
@@ -3736,11 +3732,12 @@ static PyObject *_wrap_wxListCtrl_SetTextColour(PyObject *self, PyObject *args,
wxListCtrl * _arg0;
wxColour * _arg1;
PyObject * _argo0 = 0;
- PyObject * _argo1 = 0;
+ wxColour temp;
+ PyObject * _obj1 = 0;
char *_kwnames[] = { "self","col", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxListCtrl_SetTextColour",_kwnames,&_argo0,&_argo1))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxListCtrl_SetTextColour",_kwnames,&_argo0,&_obj1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -3749,13 +3746,11 @@ static PyObject *_wrap_wxListCtrl_SetTextColour(PyObject *self, PyObject *args,
return NULL;
}
}
- if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxListCtrl_SetTextColour. Expected _wxColour_p.");
+{
+ _arg1 = &temp;
+ if (! wxColour_helper(_obj1, &_arg1))
return NULL;
- }
- }
+}
{
wxPy_BEGIN_ALLOW_THREADS;
wxListCtrl_SetTextColour(_arg0,*_arg1);
@@ -4101,11 +4096,12 @@ static PyObject *_wrap_wxListCtrl_SetBackgroundColour(PyObject *self, PyObject *
wxListCtrl * _arg0;
wxColour * _arg1;
PyObject * _argo0 = 0;
- PyObject * _argo1 = 0;
+ wxColour temp;
+ PyObject * _obj1 = 0;
char *_kwnames[] = { "self","col", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxListCtrl_SetBackgroundColour",_kwnames,&_argo0,&_argo1))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxListCtrl_SetBackgroundColour",_kwnames,&_argo0,&_obj1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -4114,13 +4110,11 @@ static PyObject *_wrap_wxListCtrl_SetBackgroundColour(PyObject *self, PyObject *
return NULL;
}
}
- if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxListCtrl_SetBackgroundColour. Expected _wxColour_p.");
+{
+ _arg1 = &temp;
+ if (! wxColour_helper(_obj1, &_arg1))
return NULL;
- }
- }
+}
{
wxPy_BEGIN_ALLOW_THREADS;
wxListCtrl_SetBackgroundColour(_arg0,*_arg1);
@@ -4654,6 +4648,44 @@ static PyObject *_wrap_wxTreeItemId_IsOk(PyObject *self, PyObject *args, PyObjec
return _resultobj;
}
+static int wxTreeItemId___cmp__(wxTreeItemId *self,wxTreeItemId * other) {
+ return *self != *other;
+ }
+static PyObject *_wrap_wxTreeItemId___cmp__(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ int _result;
+ wxTreeItemId * _arg0;
+ wxTreeItemId * _arg1;
+ PyObject * _argo0 = 0;
+ PyObject * _argo1 = 0;
+ char *_kwnames[] = { "self","other", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTreeItemId___cmp__",_kwnames,&_argo0,&_argo1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeItemId_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeItemId___cmp__. Expected _wxTreeItemId_p.");
+ return NULL;
+ }
+ }
+ if (_argo1) {
+ if (_argo1 == Py_None) { _arg1 = NULL; }
+ else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeItemId___cmp__. Expected _wxTreeItemId_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (int )wxTreeItemId___cmp__(_arg0,_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+} _resultobj = Py_BuildValue("i",_result);
+ return _resultobj;
+}
+
#define new_wxTreeItemData(_swigarg0) (new wxPyTreeItemData(_swigarg0))
static PyObject *_wrap_new_wxTreeItemData(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@@ -7388,11 +7420,12 @@ static PyObject *_wrap_wxTreeCtrl_SetItemTextColour(PyObject *self, PyObject *ar
wxColour * _arg2;
PyObject * _argo0 = 0;
PyObject * _argo1 = 0;
- PyObject * _argo2 = 0;
+ wxColour temp;
+ PyObject * _obj2 = 0;
char *_kwnames[] = { "self","item","col", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxTreeCtrl_SetItemTextColour",_kwnames,&_argo0,&_argo1,&_argo2))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxTreeCtrl_SetItemTextColour",_kwnames,&_argo0,&_argo1,&_obj2))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -7408,13 +7441,11 @@ static PyObject *_wrap_wxTreeCtrl_SetItemTextColour(PyObject *self, PyObject *ar
return NULL;
}
}
- if (_argo2) {
- if (_argo2 == Py_None) { _arg2 = NULL; }
- else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxColour_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxTreeCtrl_SetItemTextColour. Expected _wxColour_p.");
+{
+ _arg2 = &temp;
+ if (! wxColour_helper(_obj2, &_arg2))
return NULL;
- }
- }
+}
{
wxPy_BEGIN_ALLOW_THREADS;
wxTreeCtrl_SetItemTextColour(_arg0,*_arg1,*_arg2);
@@ -7433,11 +7464,12 @@ static PyObject *_wrap_wxTreeCtrl_SetItemBackgroundColour(PyObject *self, PyObje
wxColour * _arg2;
PyObject * _argo0 = 0;
PyObject * _argo1 = 0;
- PyObject * _argo2 = 0;
+ wxColour temp;
+ PyObject * _obj2 = 0;
char *_kwnames[] = { "self","item","col", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxTreeCtrl_SetItemBackgroundColour",_kwnames,&_argo0,&_argo1,&_argo2))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxTreeCtrl_SetItemBackgroundColour",_kwnames,&_argo0,&_argo1,&_obj2))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -7453,13 +7485,11 @@ static PyObject *_wrap_wxTreeCtrl_SetItemBackgroundColour(PyObject *self, PyObje
return NULL;
}
}
- if (_argo2) {
- if (_argo2 == Py_None) { _arg2 = NULL; }
- else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxColour_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxTreeCtrl_SetItemBackgroundColour. Expected _wxColour_p.");
+{
+ _arg2 = &temp;
+ if (! wxColour_helper(_obj2, &_arg2))
return NULL;
- }
- }
+}
{
wxPy_BEGIN_ALLOW_THREADS;
wxTreeCtrl_SetItemBackgroundColour(_arg0,*_arg1,*_arg2);
@@ -7681,6 +7711,7 @@ static PyMethodDef controls2cMethods[] = {
{ "wxTreeItemData_SetData", (PyCFunction) _wrap_wxTreeItemData_SetData, METH_VARARGS | METH_KEYWORDS },
{ "wxTreeItemData_GetData", (PyCFunction) _wrap_wxTreeItemData_GetData, METH_VARARGS | METH_KEYWORDS },
{ "new_wxTreeItemData", (PyCFunction) _wrap_new_wxTreeItemData, METH_VARARGS | METH_KEYWORDS },
+ { "wxTreeItemId___cmp__", (PyCFunction) _wrap_wxTreeItemId___cmp__, METH_VARARGS | METH_KEYWORDS },
{ "wxTreeItemId_IsOk", (PyCFunction) _wrap_wxTreeItemId_IsOk, METH_VARARGS | METH_KEYWORDS },
{ "delete_wxTreeItemId", (PyCFunction) _wrap_delete_wxTreeItemId, METH_VARARGS | METH_KEYWORDS },
{ "new_wxTreeItemId", (PyCFunction) _wrap_new_wxTreeItemId, METH_VARARGS | METH_KEYWORDS },
diff --git a/utils/wxPython/src/msw/controls2.py b/utils/wxPython/src/msw/controls2.py
index 3814192950..bbb4b11a7f 100644
--- a/utils/wxPython/src/msw/controls2.py
+++ b/utils/wxPython/src/msw/controls2.py
@@ -500,6 +500,9 @@ class wxTreeItemIdPtr :
def IsOk(self, *_args, **_kwargs):
val = apply(controls2c.wxTreeItemId_IsOk,(self,) + _args, _kwargs)
return val
+ def __cmp__(self, *_args, **_kwargs):
+ val = apply(controls2c.wxTreeItemId___cmp__,(self,) + _args, _kwargs)
+ return val
def __repr__(self):
return "