reSWIGged

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25891 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2004-02-21 01:58:17 +00:00
parent 6ad421ae90
commit b88bce5f07
7 changed files with 848 additions and 337 deletions
+78 -22
View File
@@ -417,15 +417,21 @@ def PreChoice(*args, **kwargs):
#---------------------------------------------------------------------------
class ComboBox(core.Control,core.ItemContainer):
"""
A combobox is like a combination of an edit control and a listbox. It can be
displayed as static list with editable or read-only text field; or a drop-down
list with text field.
"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxComboBox instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
"""
__init__(Window parent, int id, String value=EmptyString, Point pos=DefaultPosition,
Size size=DefaultSize,
wxArrayString choices=wxPyEmptyStringArray,
long style=0, Validator validator=DefaultValidator,
String name=ComboBoxNameStr) -> ComboBox
__init__(Window parent, int id, String value=EmptyString,
Point pos=DefaultPosition, Size size=DefaultSize,
List choices=[], long style=0, Validator validator=DefaultValidator,
String name=ComboBoxNameStr) -> ComboBox
Constructor, creates and shows a ComboBox control.
"""
newobj = _controls.new_ComboBox(*args, **kwargs)
self.this = newobj.this
@@ -435,16 +441,21 @@ class ComboBox(core.Control,core.ItemContainer):
def Create(*args, **kwargs):
"""
Create(Window parent, int id, String value=EmptyString, Point pos=DefaultPosition,
Size size=DefaultSize,
wxArrayString choices=wxPyEmptyStringArray,
long style=0, Validator validator=DefaultValidator,
String name=ComboBoxNameStr) -> bool
Create(Window parent, int id, String value=EmptyString,
Point pos=DefaultPosition, Size size=DefaultSize,
List choices=[], long style=0, Validator validator=DefaultValidator,
String name=ChoiceNameStr) -> bool
Actually create the GUI Choice control for 2-phase creation
"""
return _controls.ComboBox_Create(*args, **kwargs)
def GetValue(*args, **kwargs):
"""GetValue() -> String"""
"""
GetValue() -> String
Returns the current value in the combobox text field.
"""
return _controls.ComboBox_GetValue(*args, **kwargs)
def SetValue(*args, **kwargs):
@@ -452,35 +463,68 @@ class ComboBox(core.Control,core.ItemContainer):
return _controls.ComboBox_SetValue(*args, **kwargs)
def Copy(*args, **kwargs):
"""Copy()"""
"""
Copy()
Copies the selected text to the clipboard.
"""
return _controls.ComboBox_Copy(*args, **kwargs)
def Cut(*args, **kwargs):
"""Cut()"""
"""
Cut()
Copies the selected text to the clipboard and removes the selection.
"""
return _controls.ComboBox_Cut(*args, **kwargs)
def Paste(*args, **kwargs):
"""Paste()"""
"""
Paste()
Pastes text from the clipboard to the text field.
"""
return _controls.ComboBox_Paste(*args, **kwargs)
def SetInsertionPoint(*args, **kwargs):
"""SetInsertionPoint(long pos)"""
"""
SetInsertionPoint(long pos)
Sets the insertion point in the combobox text field.
"""
return _controls.ComboBox_SetInsertionPoint(*args, **kwargs)
def GetInsertionPoint(*args, **kwargs):
"""GetInsertionPoint() -> long"""
"""
GetInsertionPoint() -> long
Returns the insertion point for the combobox's text field.
"""
return _controls.ComboBox_GetInsertionPoint(*args, **kwargs)
def GetLastPosition(*args, **kwargs):
"""GetLastPosition() -> long"""
"""
GetLastPosition() -> long
Returns the last position in the combobox text field.
"""
return _controls.ComboBox_GetLastPosition(*args, **kwargs)
def Replace(*args, **kwargs):
"""Replace(long from, long to, String value)"""
"""
Replace(long from, long to, String value)
Replaces the text between two positions with the given text, in the
combobox text field.
"""
return _controls.ComboBox_Replace(*args, **kwargs)
def SetSelection(*args, **kwargs):
"""SetSelection(int n)"""
"""
SetSelection(int n)
Selects the text between the two positions, in the combobox text field.
"""
return _controls.ComboBox_SetSelection(*args, **kwargs)
def SetMark(*args, **kwargs):
@@ -492,11 +536,19 @@ class ComboBox(core.Control,core.ItemContainer):
return _controls.ComboBox_SetEditable(*args, **kwargs)
def SetInsertionPointEnd(*args, **kwargs):
"""SetInsertionPointEnd()"""
"""
SetInsertionPointEnd()
Sets the insertion point at the end of the combobox text field.
"""
return _controls.ComboBox_SetInsertionPointEnd(*args, **kwargs)
def Remove(*args, **kwargs):
"""Remove(long from, long to)"""
"""
Remove(long from, long to)
Removes the text between the two positions in the combobox text field.
"""
return _controls.ComboBox_Remove(*args, **kwargs)
@@ -509,7 +561,11 @@ _controls.ComboBox_swigregister(ComboBoxPtr)
ComboBoxNameStr = cvar.ComboBoxNameStr
def PreComboBox(*args, **kwargs):
"""PreComboBox() -> ComboBox"""
"""
PreComboBox() -> ComboBox
Precreate a ComboBox control for 2-phase creation.
"""
val = _controls.new_PreComboBox(*args, **kwargs)
val.thisown = 1
return val
+1 -1
View File
@@ -2784,7 +2784,7 @@ static PyObject *_wrap_ComboBox_Create(PyObject *self, PyObject *args, PyObject
long arg8 = (long) 0 ;
wxValidator const &arg9_defvalue = wxDefaultValidator ;
wxValidator *arg9 = (wxValidator *) &arg9_defvalue ;
wxString const &arg10_defvalue = wxPyComboBoxNameStr ;
wxString const &arg10_defvalue = wxPyChoiceNameStr ;
wxString *arg10 = (wxString *) &arg10_defvalue ;
bool result;
bool temp4 = False ;
+104 -16
View File
@@ -45,10 +45,31 @@ _gdi.GDIObject_swigregister(GDIObjectPtr)
#---------------------------------------------------------------------------
class Colour(core.Object):
"""
A colour is an object representing a combination of Red, Green, and Blue (RGB)
intensity values, and is used to determine drawing colours, window colours,
etc. Valid RGB values are in the range 0 to 255.
In wxPython there are typemaps that will automatically convert from a colour
name, or from a "#RRGGBB" colour hex value string to a wx.Colour object when
calling C++ methods that expect a wxColour. This means that the following are
all equivallent:
win.SetBackgroundColour(wxColour(0,0,255))
win.SetBackgroundColour("BLUE")
win.SetBackgroundColour("#0000FF")
You can retrieve the various current system colour settings with
wx.SystemSettings.GetColour.
"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxColour instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
"""__init__(unsigned char red=0, unsigned char green=0, unsigned char blue=0) -> Colour"""
"""
__init__(unsigned char red=0, unsigned char green=0, unsigned char blue=0) -> Colour
Constructs a colour from red, green and blue values.
"""
newobj = _gdi.new_Colour(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
@@ -60,45 +81,104 @@ class Colour(core.Object):
except: pass
def Red(*args, **kwargs):
"""Red() -> unsigned char"""
"""
Red() -> unsigned char
Returns the red intensity.
"""
return _gdi.Colour_Red(*args, **kwargs)
def Green(*args, **kwargs):
"""Green() -> unsigned char"""
"""
Green() -> unsigned char
Returns the green intensity.
"""
return _gdi.Colour_Green(*args, **kwargs)
def Blue(*args, **kwargs):
"""Blue() -> unsigned char"""
"""
Blue() -> unsigned char
Returns the blue intensity.
"""
return _gdi.Colour_Blue(*args, **kwargs)
def Ok(*args, **kwargs):
"""Ok() -> bool"""
"""
Ok() -> bool
Returns True if the colour object is valid (the colour has been
initialised with RGB values).
"""
return _gdi.Colour_Ok(*args, **kwargs)
def Set(*args, **kwargs):
"""Set(unsigned char red, unsigned char green, unsigned char blue)"""
"""
Set(unsigned char red, unsigned char green, unsigned char blue)
Sets the RGB intensity values.
"""
return _gdi.Colour_Set(*args, **kwargs)
def SetRGB(*args, **kwargs):
"""SetRGB(unsigned long colRGB)"""
"""
SetRGB(unsigned long colRGB)
Sets the RGB intensity values from a packed RGB value.
"""
return _gdi.Colour_SetRGB(*args, **kwargs)
def SetFromName(*args, **kwargs):
"""
SetFromName(String colourName)
Sets the RGB intensity values using a colour name listed in wx.TheColourDatabase.
"""
return _gdi.Colour_SetFromName(*args, **kwargs)
def GetPixel(*args, **kwargs):
"""
GetPixel() -> long
Returns a pixel value which is platform-dependent. On Windows, a
COLORREF is returned. On X, an allocated pixel value is returned.
-1 is returned if the pixel is invalid (on X, unallocated).
"""
return _gdi.Colour_GetPixel(*args, **kwargs)
def __eq__(*args, **kwargs):
"""__eq__(Colour colour) -> bool"""
"""
__eq__(Colour colour) -> bool
Compare colours for equality
"""
return _gdi.Colour___eq__(*args, **kwargs)
def __ne__(*args, **kwargs):
"""__ne__(Colour colour) -> bool"""
"""
__ne__(Colour colour) -> bool
Compare colours for inequality
"""
return _gdi.Colour___ne__(*args, **kwargs)
def InitFromName(*args, **kwargs):
"""InitFromName(String colourName)"""
return _gdi.Colour_InitFromName(*args, **kwargs)
def Get(*args, **kwargs):
"""Get() -> PyObject"""
"""
Get() -> (r, g, b)
Returns the RGB intensity values as a tuple.
"""
return _gdi.Colour_Get(*args, **kwargs)
def GetRGB(*args, **kwargs):
"""
GetRGB() -> unsigned long
Return the colour as a packed RGB value
"""
return _gdi.Colour_GetRGB(*args, **kwargs)
asTuple = Get
def __str__(self): return str(self.asTuple())
def __repr__(self): return 'wx.Colour' + str(self.asTuple())
@@ -115,13 +195,21 @@ class ColourPtr(Colour):
_gdi.Colour_swigregister(ColourPtr)
def NamedColour(*args, **kwargs):
"""NamedColour(String colorName) -> Colour"""
"""
NamedColour(String colorName) -> Colour
Constructs a colour object using a colour name listed in wx.TheColourDatabase.
"""
val = _gdi.new_NamedColour(*args, **kwargs)
val.thisown = 1
return val
def ColourRGB(*args, **kwargs):
"""ColourRGB(unsigned long colRGB) -> Colour"""
"""
ColourRGB(unsigned long colRGB) -> Colour
Constructs a colour from a packed RGB value.
"""
val = _gdi.new_ColourRGB(*args, **kwargs)
val.thisown = 1
return val
+216 -74
View File
@@ -371,6 +371,17 @@ PyObject *wxColour_Get(wxColour *self){
PyTuple_SetItem(rv, 2, PyInt_FromLong(blue));
return rv;
}
unsigned long wxColour_GetRGB(wxColour *self){
return self->Red() | (self->Green() << 8) | (self->Blue() << 16);
}
SWIGSTATIC(PyObject* )
SWIG_PyObj_FromUnsignedLong(unsigned long value)
{
return (value > (unsigned long)(LONG_MAX)) ?
PyLong_FromUnsignedLong(value) : PyInt_FromLong((long)value);
}
SWIGSTATIC(int)
SWIG_PyObj_AsInt(PyObject *obj)
@@ -574,14 +585,6 @@ wxString wxNativeFontInfo___str__(wxNativeFontInfo *self){
return NULL;
}
SWIGSTATIC(PyObject* )
SWIG_PyObj_FromUnsignedLong(unsigned long value)
{
return (value > (unsigned long)(LONG_MAX)) ?
PyLong_FromUnsignedLong(value) : PyInt_FromLong((long)value);
}
PyObject *wxFontMapper_GetAltForEncoding(wxFontMapper *self,wxFontEncoding encoding,wxString const &facename,bool interactive){
wxFontEncoding alt_enc;
if (self->GetAltForEncoding(encoding, &alt_enc, facename, interactive))
@@ -698,6 +701,93 @@ static void wxDC_GetBoundingBox(wxDC* dc, int* x1, int* y1, int* x2, int* y2) {
}
//-=-=-=-=-=-=-=-=-=-=-
#if 0
#include <wx/dcbuffer.h>
#else
// Temporarily put a set of classes here similar to the old buffered DC
// classes until the real ones can be fixed to work "correctly" again.
class wxBufferedDC : public wxMemoryDC
{
private:
wxDC *m_dc;
wxBitmap m_buffer;
public:
wxBufferedDC() : m_dc( 0 ) {}
wxBufferedDC( wxDC *dc, const wxBitmap &buffer )
: m_dc( dc ), m_buffer( buffer )
{
SelectObject( m_buffer );
}
wxBufferedDC( wxDC *dc, const wxSize &area )
: m_dc( dc ), m_buffer( area.GetWidth(), area.GetHeight() )
{
SelectObject( m_buffer );
}
~wxBufferedDC() {
if( m_dc != 0 )
UnMask();
}
void Init( wxDC *dc, const wxBitmap &buffer ) {
wxASSERT_MSG( m_dc == 0 && m_buffer == wxNullBitmap,
_T("wxBufferedDC already initialised") );
m_dc = dc;
m_buffer = buffer;
SelectObject( m_buffer );
}
void Init( wxDC *dc, const wxSize &area ) {
wxASSERT_MSG( m_dc == 0 && m_buffer == wxNullBitmap,
_T("wxBufferedDC already initialised") );
m_dc = dc;
m_buffer = wxBitmap( area.GetWidth(), area.GetHeight() );
SelectObject( m_buffer );
}
void UnMask() {
wxASSERT_MSG( m_dc != 0, _T("No low level DC associated with buffer (anymore)") );
m_dc->Blit( 0, 0, m_buffer.GetWidth(), m_buffer.GetHeight(), this, 0, 0 );
m_dc = 0;
}
};
class wxBufferedPaintDC : public wxBufferedDC
{
private:
wxPaintDC m_paintdc;
public:
wxBufferedPaintDC( wxWindow *window, const wxBitmap &buffer = wxNullBitmap )
: m_paintdc( window )
{
window->PrepareDC( m_paintdc );
if( buffer != wxNullBitmap )
Init( &m_paintdc, buffer );
else
Init( &m_paintdc, window->GetClientSize() );
}
~wxBufferedPaintDC() {
UnMask();
}
};
#endif
//-=-=-=-=-=-=-=-=-=-=-
#include <wx/dcps.h>
@@ -914,30 +1004,6 @@ static PyObject *_wrap_new_Colour(PyObject *self, PyObject *args, PyObject *kwar
}
static PyObject *_wrap_delete_Colour(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxColour *arg1 = (wxColour *) 0 ;
PyObject * obj0 = 0 ;
char *kwnames[] = {
(char *) "self", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:delete_Colour",kwnames,&obj0)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxColour,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
delete arg1;
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
Py_INCREF(Py_None); resultobj = Py_None;
return resultobj;
fail:
return NULL;
}
static PyObject *_wrap_new_NamedColour(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxString *arg1 = 0 ;
@@ -1004,6 +1070,30 @@ static PyObject *_wrap_new_ColourRGB(PyObject *self, PyObject *args, PyObject *k
}
static PyObject *_wrap_delete_Colour(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxColour *arg1 = (wxColour *) 0 ;
PyObject * obj0 = 0 ;
char *kwnames[] = {
(char *) "self", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:delete_Colour",kwnames,&obj0)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxColour,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
delete arg1;
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
Py_INCREF(Py_None); resultobj = Py_None;
return resultobj;
fail:
return NULL;
}
static PyObject *_wrap_Colour_Red(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxColour *arg1 = (wxColour *) 0 ;
@@ -1176,6 +1266,71 @@ static PyObject *_wrap_Colour_SetRGB(PyObject *self, PyObject *args, PyObject *k
}
static PyObject *_wrap_Colour_SetFromName(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxColour *arg1 = (wxColour *) 0 ;
wxString *arg2 = 0 ;
bool temp2 = False ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
(char *) "self",(char *) "colourName", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Colour_SetFromName",kwnames,&obj0,&obj1)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxColour,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
{
arg2 = wxString_in_helper(obj1);
if (arg2 == NULL) SWIG_fail;
temp2 = True;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
(arg1)->InitFromName((wxString const &)*arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
Py_INCREF(Py_None); resultobj = Py_None;
{
if (temp2)
delete arg2;
}
return resultobj;
fail:
{
if (temp2)
delete arg2;
}
return NULL;
}
static PyObject *_wrap_Colour_GetPixel(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxColour *arg1 = (wxColour *) 0 ;
long result;
PyObject * obj0 = 0 ;
char *kwnames[] = {
(char *) "self", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Colour_GetPixel",kwnames,&obj0)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxColour,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (long)((wxColour const *)arg1)->GetPixel();
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
resultobj = SWIG_PyObj_FromLong((long)result);
return resultobj;
fail:
return NULL;
}
static PyObject *_wrap_Colour___eq__(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxColour *arg1 = (wxColour *) 0 ;
@@ -1240,46 +1395,6 @@ static PyObject *_wrap_Colour___ne__(PyObject *self, PyObject *args, PyObject *k
}
static PyObject *_wrap_Colour_InitFromName(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxColour *arg1 = (wxColour *) 0 ;
wxString *arg2 = 0 ;
bool temp2 = False ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
(char *) "self",(char *) "colourName", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Colour_InitFromName",kwnames,&obj0,&obj1)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxColour,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
{
arg2 = wxString_in_helper(obj1);
if (arg2 == NULL) SWIG_fail;
temp2 = True;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
(arg1)->InitFromName((wxString const &)*arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
Py_INCREF(Py_None); resultobj = Py_None;
{
if (temp2)
delete arg2;
}
return resultobj;
fail:
{
if (temp2)
delete arg2;
}
return NULL;
}
static PyObject *_wrap_Colour_Get(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxColour *arg1 = (wxColour *) 0 ;
@@ -1305,6 +1420,31 @@ static PyObject *_wrap_Colour_Get(PyObject *self, PyObject *args, PyObject *kwar
}
static PyObject *_wrap_Colour_GetRGB(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxColour *arg1 = (wxColour *) 0 ;
unsigned long result;
PyObject * obj0 = 0 ;
char *kwnames[] = {
(char *) "self", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Colour_GetRGB",kwnames,&obj0)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxColour,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (unsigned long)wxColour_GetRGB(arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
resultobj = SWIG_PyObj_FromUnsignedLong((unsigned long)result);
return resultobj;
fail:
return NULL;
}
static PyObject * Colour_swigregister(PyObject *self, PyObject *args) {
PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
@@ -17632,19 +17772,21 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"GDIObject_IsNull", (PyCFunction) _wrap_GDIObject_IsNull, METH_VARARGS | METH_KEYWORDS },
{ (char *)"GDIObject_swigregister", GDIObject_swigregister, METH_VARARGS },
{ (char *)"new_Colour", (PyCFunction) _wrap_new_Colour, METH_VARARGS | METH_KEYWORDS },
{ (char *)"delete_Colour", (PyCFunction) _wrap_delete_Colour, METH_VARARGS | METH_KEYWORDS },
{ (char *)"new_NamedColour", (PyCFunction) _wrap_new_NamedColour, METH_VARARGS | METH_KEYWORDS },
{ (char *)"new_ColourRGB", (PyCFunction) _wrap_new_ColourRGB, METH_VARARGS | METH_KEYWORDS },
{ (char *)"delete_Colour", (PyCFunction) _wrap_delete_Colour, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Colour_Red", (PyCFunction) _wrap_Colour_Red, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Colour_Green", (PyCFunction) _wrap_Colour_Green, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Colour_Blue", (PyCFunction) _wrap_Colour_Blue, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Colour_Ok", (PyCFunction) _wrap_Colour_Ok, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Colour_Set", (PyCFunction) _wrap_Colour_Set, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Colour_SetRGB", (PyCFunction) _wrap_Colour_SetRGB, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Colour_SetFromName", (PyCFunction) _wrap_Colour_SetFromName, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Colour_GetPixel", (PyCFunction) _wrap_Colour_GetPixel, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Colour___eq__", (PyCFunction) _wrap_Colour___eq__, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Colour___ne__", (PyCFunction) _wrap_Colour___ne__, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Colour_InitFromName", (PyCFunction) _wrap_Colour_InitFromName, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Colour_Get", (PyCFunction) _wrap_Colour_Get, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Colour_GetRGB", (PyCFunction) _wrap_Colour_GetRGB, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Colour_swigregister", Colour_swigregister, METH_VARARGS },
{ (char *)"new_Palette", (PyCFunction) _wrap_new_Palette, METH_VARARGS | METH_KEYWORDS },
{ (char *)"delete_Palette", (PyCFunction) _wrap_delete_Palette, METH_VARARGS | METH_KEYWORDS },
+295 -70
View File
File diff suppressed because it is too large Load Diff
+153 -153
View File
@@ -14330,7 +14330,7 @@ static PyObject *_wrap_ConfigBase_Set(PyObject *self, PyObject *args, PyObject *
wxConfigBase *result;
PyObject * obj0 = 0 ;
char *kwnames[] = {
(char *) "pConfig", NULL
(char *) "config", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:ConfigBase_Set",kwnames,&obj0)) goto fail;
@@ -14430,7 +14430,7 @@ static PyObject *_wrap_ConfigBase_SetPath(PyObject *self, PyObject *args, PyObje
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
(char *) "self",(char *) "strPath", NULL
(char *) "self",(char *) "path", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ConfigBase_SetPath",kwnames,&obj0,&obj1)) goto fail;
@@ -14616,7 +14616,7 @@ static PyObject *_wrap_ConfigBase_GetNumberOfEntries(PyObject *self, PyObject *a
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
(char *) "self",(char *) "bRecursive", NULL
(char *) "self",(char *) "recursive", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:ConfigBase_GetNumberOfEntries",kwnames,&obj0,&obj1)) goto fail;
@@ -14649,7 +14649,7 @@ static PyObject *_wrap_ConfigBase_GetNumberOfGroups(PyObject *self, PyObject *ar
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
(char *) "self",(char *) "bRecursive", NULL
(char *) "self",(char *) "recursive", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:ConfigBase_GetNumberOfGroups",kwnames,&obj0,&obj1)) goto fail;
@@ -14683,7 +14683,7 @@ static PyObject *_wrap_ConfigBase_HasGroup(PyObject *self, PyObject *args, PyObj
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
(char *) "self",(char *) "strName", NULL
(char *) "self",(char *) "name", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ConfigBase_HasGroup",kwnames,&obj0,&obj1)) goto fail;
@@ -14724,7 +14724,7 @@ static PyObject *_wrap_ConfigBase_HasEntry(PyObject *self, PyObject *args, PyObj
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
(char *) "self",(char *) "strName", NULL
(char *) "self",(char *) "name", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ConfigBase_HasEntry",kwnames,&obj0,&obj1)) goto fail;
@@ -14765,7 +14765,7 @@ static PyObject *_wrap_ConfigBase_Exists(PyObject *self, PyObject *args, PyObjec
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
(char *) "self",(char *) "strName", NULL
(char *) "self",(char *) "name", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ConfigBase_Exists",kwnames,&obj0,&obj1)) goto fail;
@@ -15257,7 +15257,7 @@ static PyObject *_wrap_ConfigBase_Flush(PyObject *self, PyObject *args, PyObject
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
(char *) "self",(char *) "bCurrentOnly", NULL
(char *) "self",(char *) "currentOnly", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:ConfigBase_Flush",kwnames,&obj0,&obj1)) goto fail;
@@ -15407,7 +15407,7 @@ static PyObject *_wrap_ConfigBase_DeleteEntry(PyObject *self, PyObject *args, Py
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
char *kwnames[] = {
(char *) "self",(char *) "key",(char *) "bDeleteGroupIfEmpty", NULL
(char *) "self",(char *) "key",(char *) "deleteGroupIfEmpty", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:ConfigBase_DeleteEntry",kwnames,&obj0,&obj1,&obj2)) goto fail;
@@ -15511,6 +15511,38 @@ static PyObject *_wrap_ConfigBase_DeleteAll(PyObject *self, PyObject *args, PyOb
}
static PyObject *_wrap_ConfigBase_SetExpandEnvVars(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxConfigBase *arg1 = (wxConfigBase *) 0 ;
bool arg2 = (bool) True ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
(char *) "self",(char *) "doIt", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:ConfigBase_SetExpandEnvVars",kwnames,&obj0,&obj1)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxConfigBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
if (obj1) {
{
arg2 = (bool) SWIG_PyObj_AsBool(obj1);
if (PyErr_Occurred()) SWIG_fail;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
(arg1)->SetExpandEnvVars(arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
Py_INCREF(Py_None); resultobj = Py_None;
return resultobj;
fail:
return NULL;
}
static PyObject *_wrap_ConfigBase_IsExpandingEnvVars(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxConfigBase *arg1 = (wxConfigBase *) 0 ;
@@ -15536,38 +15568,6 @@ static PyObject *_wrap_ConfigBase_IsExpandingEnvVars(PyObject *self, PyObject *a
}
static PyObject *_wrap_ConfigBase_SetExpandEnvVars(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxConfigBase *arg1 = (wxConfigBase *) 0 ;
bool arg2 = (bool) True ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
(char *) "self",(char *) "bDoIt", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:ConfigBase_SetExpandEnvVars",kwnames,&obj0,&obj1)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxConfigBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
if (obj1) {
{
arg2 = (bool) SWIG_PyObj_AsBool(obj1);
if (PyErr_Occurred()) SWIG_fail;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
(arg1)->SetExpandEnvVars(arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
Py_INCREF(Py_None); resultobj = Py_None;
return resultobj;
fail:
return NULL;
}
static PyObject *_wrap_ConfigBase_SetRecordDefaults(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxConfigBase *arg1 = (wxConfigBase *) 0 ;
@@ -15575,7 +15575,7 @@ static PyObject *_wrap_ConfigBase_SetRecordDefaults(PyObject *self, PyObject *ar
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
(char *) "self",(char *) "bDoIt", NULL
(char *) "self",(char *) "doIt", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:ConfigBase_SetRecordDefaults",kwnames,&obj0,&obj1)) goto fail;
@@ -15876,112 +15876,6 @@ static PyObject * ConfigBase_swigregister(PyObject *self, PyObject *args) {
Py_INCREF(obj);
return Py_BuildValue((char *)"");
}
static PyObject *_wrap_new_ConfigPathChanger(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxConfigBase *arg1 = (wxConfigBase *) 0 ;
wxString *arg2 = 0 ;
wxConfigPathChanger *result;
bool temp2 = False ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
(char *) "pContainer",(char *) "strEntry", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:new_ConfigPathChanger",kwnames,&obj0,&obj1)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxConfigBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
{
arg2 = wxString_in_helper(obj1);
if (arg2 == NULL) SWIG_fail;
temp2 = True;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxConfigPathChanger *)new wxConfigPathChanger((wxConfigBase const *)arg1,(wxString const &)*arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_wxConfigPathChanger, 1);
{
if (temp2)
delete arg2;
}
return resultobj;
fail:
{
if (temp2)
delete arg2;
}
return NULL;
}
static PyObject *_wrap_delete_ConfigPathChanger(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxConfigPathChanger *arg1 = (wxConfigPathChanger *) 0 ;
PyObject * obj0 = 0 ;
char *kwnames[] = {
(char *) "self", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:delete_ConfigPathChanger",kwnames,&obj0)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxConfigPathChanger,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
delete arg1;
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
Py_INCREF(Py_None); resultobj = Py_None;
return resultobj;
fail:
return NULL;
}
static PyObject *_wrap_ConfigPathChanger_Name(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxConfigPathChanger *arg1 = (wxConfigPathChanger *) 0 ;
wxString *result;
PyObject * obj0 = 0 ;
char *kwnames[] = {
(char *) "self", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:ConfigPathChanger_Name",kwnames,&obj0)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxConfigPathChanger,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
{
wxString const &_result_ref = ((wxConfigPathChanger const *)arg1)->Name();
result = (wxString *) &_result_ref;
}
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
{
#if wxUSE_UNICODE
resultobj = PyUnicode_FromWideChar(result->c_str(), result->Len());
#else
resultobj = PyString_FromStringAndSize(result->c_str(), result->Len());
#endif
}
return resultobj;
fail:
return NULL;
}
static PyObject * ConfigPathChanger_swigregister(PyObject *self, PyObject *args) {
PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
SWIG_TypeClientData(SWIGTYPE_p_wxConfigPathChanger, obj);
Py_INCREF(obj);
return Py_BuildValue((char *)"");
}
static PyObject *_wrap_new_Config(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxString const &arg1_defvalue = wxPyEmptyString ;
@@ -16256,6 +16150,112 @@ static PyObject * FileConfig_swigregister(PyObject *self, PyObject *args) {
Py_INCREF(obj);
return Py_BuildValue((char *)"");
}
static PyObject *_wrap_new_ConfigPathChanger(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxConfigBase *arg1 = (wxConfigBase *) 0 ;
wxString *arg2 = 0 ;
wxConfigPathChanger *result;
bool temp2 = False ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
(char *) "config",(char *) "entry", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:new_ConfigPathChanger",kwnames,&obj0,&obj1)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxConfigBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
{
arg2 = wxString_in_helper(obj1);
if (arg2 == NULL) SWIG_fail;
temp2 = True;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxConfigPathChanger *)new wxConfigPathChanger((wxConfigBase const *)arg1,(wxString const &)*arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_wxConfigPathChanger, 1);
{
if (temp2)
delete arg2;
}
return resultobj;
fail:
{
if (temp2)
delete arg2;
}
return NULL;
}
static PyObject *_wrap_delete_ConfigPathChanger(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxConfigPathChanger *arg1 = (wxConfigPathChanger *) 0 ;
PyObject * obj0 = 0 ;
char *kwnames[] = {
(char *) "self", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:delete_ConfigPathChanger",kwnames,&obj0)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxConfigPathChanger,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
delete arg1;
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
Py_INCREF(Py_None); resultobj = Py_None;
return resultobj;
fail:
return NULL;
}
static PyObject *_wrap_ConfigPathChanger_Name(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxConfigPathChanger *arg1 = (wxConfigPathChanger *) 0 ;
wxString *result;
PyObject * obj0 = 0 ;
char *kwnames[] = {
(char *) "self", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:ConfigPathChanger_Name",kwnames,&obj0)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxConfigPathChanger,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
{
wxString const &_result_ref = ((wxConfigPathChanger const *)arg1)->Name();
result = (wxString *) &_result_ref;
}
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
{
#if wxUSE_UNICODE
resultobj = PyUnicode_FromWideChar(result->c_str(), result->Len());
#else
resultobj = PyString_FromStringAndSize(result->c_str(), result->Len());
#endif
}
return resultobj;
fail:
return NULL;
}
static PyObject * ConfigPathChanger_swigregister(PyObject *self, PyObject *args) {
PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
SWIG_TypeClientData(SWIGTYPE_p_wxConfigPathChanger, obj);
Py_INCREF(obj);
return Py_BuildValue((char *)"");
}
static PyObject *_wrap_ExpandEnvVars(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxString *arg1 = 0 ;
@@ -27009,8 +27009,8 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"ConfigBase_DeleteEntry", (PyCFunction) _wrap_ConfigBase_DeleteEntry, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ConfigBase_DeleteGroup", (PyCFunction) _wrap_ConfigBase_DeleteGroup, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ConfigBase_DeleteAll", (PyCFunction) _wrap_ConfigBase_DeleteAll, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ConfigBase_IsExpandingEnvVars", (PyCFunction) _wrap_ConfigBase_IsExpandingEnvVars, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ConfigBase_SetExpandEnvVars", (PyCFunction) _wrap_ConfigBase_SetExpandEnvVars, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ConfigBase_IsExpandingEnvVars", (PyCFunction) _wrap_ConfigBase_IsExpandingEnvVars, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ConfigBase_SetRecordDefaults", (PyCFunction) _wrap_ConfigBase_SetRecordDefaults, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ConfigBase_IsRecordingDefaults", (PyCFunction) _wrap_ConfigBase_IsRecordingDefaults, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ConfigBase_ExpandEnvVars", (PyCFunction) _wrap_ConfigBase_ExpandEnvVars, METH_VARARGS | METH_KEYWORDS },
@@ -27021,16 +27021,16 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"ConfigBase_SetStyle", (PyCFunction) _wrap_ConfigBase_SetStyle, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ConfigBase_GetStyle", (PyCFunction) _wrap_ConfigBase_GetStyle, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ConfigBase_swigregister", ConfigBase_swigregister, METH_VARARGS },
{ (char *)"new_ConfigPathChanger", (PyCFunction) _wrap_new_ConfigPathChanger, METH_VARARGS | METH_KEYWORDS },
{ (char *)"delete_ConfigPathChanger", (PyCFunction) _wrap_delete_ConfigPathChanger, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ConfigPathChanger_Name", (PyCFunction) _wrap_ConfigPathChanger_Name, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ConfigPathChanger_swigregister", ConfigPathChanger_swigregister, METH_VARARGS },
{ (char *)"new_Config", (PyCFunction) _wrap_new_Config, METH_VARARGS | METH_KEYWORDS },
{ (char *)"delete_Config", (PyCFunction) _wrap_delete_Config, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Config_swigregister", Config_swigregister, METH_VARARGS },
{ (char *)"new_FileConfig", (PyCFunction) _wrap_new_FileConfig, METH_VARARGS | METH_KEYWORDS },
{ (char *)"delete_FileConfig", (PyCFunction) _wrap_delete_FileConfig, METH_VARARGS | METH_KEYWORDS },
{ (char *)"FileConfig_swigregister", FileConfig_swigregister, METH_VARARGS },
{ (char *)"new_ConfigPathChanger", (PyCFunction) _wrap_new_ConfigPathChanger, METH_VARARGS | METH_KEYWORDS },
{ (char *)"delete_ConfigPathChanger", (PyCFunction) _wrap_delete_ConfigPathChanger, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ConfigPathChanger_Name", (PyCFunction) _wrap_ConfigPathChanger_Name, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ConfigPathChanger_swigregister", ConfigPathChanger_swigregister, METH_VARARGS },
{ (char *)"ExpandEnvVars", (PyCFunction) _wrap_ExpandEnvVars, METH_VARARGS | METH_KEYWORDS },
{ (char *)"DateTime_SetCountry", (PyCFunction) _wrap_DateTime_SetCountry, METH_VARARGS | METH_KEYWORDS },
{ (char *)"DateTime_GetCountry", (PyCFunction) _wrap_DateTime_GetCountry, METH_VARARGS | METH_KEYWORDS },