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

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

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 ;

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

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 },

View File

@@ -2478,6 +2478,26 @@ CONFIG_USE_GLOBAL_FILE = _misc.CONFIG_USE_GLOBAL_FILE
CONFIG_USE_RELATIVE_PATH = _misc.CONFIG_USE_RELATIVE_PATH
CONFIG_USE_NO_ESCAPE_CHARACTERS = _misc.CONFIG_USE_NO_ESCAPE_CHARACTERS
class ConfigBase(object):
"""
wx.ConfigBase class defines the basic interface of all config
classes. It can not be used by itself (it is an abstract base
class) and you will always use one of its derivations: wx.Config
or wx.FileConfig.
wx.ConfigBase organizes the items in a tree-like structure
(modeled after the Unix/Dos filesystem). There are groups
(directories) and keys (files). There is always one current
group given by the current path. As in the file system case, to
specify a key in the config class you must use a path to it.
Config classes also support the notion of the current group,
which makes it possible to use relative paths.
Keys are pairs "key_name = value" where value may be of string, integer
floating point or boolean, you can not store binary data without first
encoding it as a string. For performance reasons items should be kept small,
no more than a couple kilobytes.
"""
def __init__(self): raise RuntimeError, "No constructor defined"
def __repr__(self):
return "<%s.%s; proxy of C++ wxConfigBase instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
@@ -2493,147 +2513,311 @@ class ConfigBase(object):
Type_Integer = _misc.ConfigBase_Type_Integer
Type_Float = _misc.ConfigBase_Type_Float
def Set(*args, **kwargs):
"""Set(ConfigBase pConfig) -> ConfigBase"""
"""
Set(ConfigBase config) -> ConfigBase
Sets the global config object (the one returned by Get) and
returns a reference to the previous global config object.
"""
return _misc.ConfigBase_Set(*args, **kwargs)
Set = staticmethod(Set)
def Get(*args, **kwargs):
"""Get(bool createOnDemand=True) -> ConfigBase"""
"""
Get(bool createOnDemand=True) -> ConfigBase
Returns the current global config object, creating one if neccessary.
"""
return _misc.ConfigBase_Get(*args, **kwargs)
Get = staticmethod(Get)
def Create(*args, **kwargs):
"""Create() -> ConfigBase"""
"""
Create() -> ConfigBase
Create and return a new global config object. This function will
create the "best" implementation of wx.Config available for the
current platform.
"""
return _misc.ConfigBase_Create(*args, **kwargs)
Create = staticmethod(Create)
def DontCreateOnDemand(*args, **kwargs):
"""DontCreateOnDemand()"""
"""
DontCreateOnDemand()
Should Get() try to create a new log object if there isn't a current one?
"""
return _misc.ConfigBase_DontCreateOnDemand(*args, **kwargs)
DontCreateOnDemand = staticmethod(DontCreateOnDemand)
def SetPath(*args, **kwargs):
"""SetPath(String strPath)"""
"""
SetPath(String path)
Set current path: if the first character is '/', it's the absolute path,
otherwise it's a relative path. '..' is supported. If the strPath
doesn't exist it is created.
"""
return _misc.ConfigBase_SetPath(*args, **kwargs)
def GetPath(*args, **kwargs):
"""GetPath() -> String"""
"""
GetPath() -> String
Retrieve the current path (always as absolute path)
"""
return _misc.ConfigBase_GetPath(*args, **kwargs)
def GetFirstGroup(*args, **kwargs):
"""GetFirstGroup() -> PyObject"""
"""
GetFirstGroup() -> (more, value, index)
Allows enumerating the subgroups in a config object. Returns
a tuple containing a flag indicating there are more items, the
name of the current item, and an index to pass to GetNextGroup to
fetch the next item.
"""
return _misc.ConfigBase_GetFirstGroup(*args, **kwargs)
def GetNextGroup(*args, **kwargs):
"""GetNextGroup(long index) -> PyObject"""
"""
GetNextGroup(long index) -> (more, value, index)
Allows enumerating the subgroups in a config object. Returns
a tuple containing a flag indicating there are more items, the
name of the current item, and an index to pass to GetNextGroup to
fetch the next item.
"""
return _misc.ConfigBase_GetNextGroup(*args, **kwargs)
def GetFirstEntry(*args, **kwargs):
"""GetFirstEntry() -> PyObject"""
"""
GetFirstEntry() -> (more, value, index)
Allows enumerating the entries in the current group in a config
object. Returns a tuple containing a flag indicating there are
more items, the name of the current item, and an index to pass to
GetNextGroup to fetch the next item.
"""
return _misc.ConfigBase_GetFirstEntry(*args, **kwargs)
def GetNextEntry(*args, **kwargs):
"""GetNextEntry(long index) -> PyObject"""
"""
GetNextEntry(long index) -> (more, value, index)
Allows enumerating the entries in the current group in a config
object. Returns a tuple containing a flag indicating there are
more items, the name of the current item, and an index to pass to
GetNextGroup to fetch the next item.
"""
return _misc.ConfigBase_GetNextEntry(*args, **kwargs)
def GetNumberOfEntries(*args, **kwargs):
"""GetNumberOfEntries(bool bRecursive=False) -> size_t"""
"""
GetNumberOfEntries(bool recursive=False) -> size_t
Get the number of entries in the current group, with or
without its subgroups.
"""
return _misc.ConfigBase_GetNumberOfEntries(*args, **kwargs)
def GetNumberOfGroups(*args, **kwargs):
"""GetNumberOfGroups(bool bRecursive=False) -> size_t"""
"""
GetNumberOfGroups(bool recursive=False) -> size_t
Get the number of subgroups in the current group, with or
without its subgroups.
"""
return _misc.ConfigBase_GetNumberOfGroups(*args, **kwargs)
def HasGroup(*args, **kwargs):
"""HasGroup(String strName) -> bool"""
"""
HasGroup(String name) -> bool
Returns True if the group by this name exists
"""
return _misc.ConfigBase_HasGroup(*args, **kwargs)
def HasEntry(*args, **kwargs):
"""HasEntry(String strName) -> bool"""
"""
HasEntry(String name) -> bool
Returns True if the entry by this name exists
"""
return _misc.ConfigBase_HasEntry(*args, **kwargs)
def Exists(*args, **kwargs):
"""Exists(String strName) -> bool"""
"""
Exists(String name) -> bool
Returns True if either a group or an entry with a given name exists
"""
return _misc.ConfigBase_Exists(*args, **kwargs)
def GetEntryType(*args, **kwargs):
"""GetEntryType(String name) -> int"""
"""
GetEntryType(String name) -> int
Get the type of the entry. Returns one of the wx.Config.Type_XXX values.
"""
return _misc.ConfigBase_GetEntryType(*args, **kwargs)
def Read(*args, **kwargs):
"""Read(String key, String defaultVal=EmptyString) -> String"""
"""
Read(String key, String defaultVal=EmptyString) -> String
Returns the value of key if it exists, defaultVal otherwise.
"""
return _misc.ConfigBase_Read(*args, **kwargs)
def ReadInt(*args, **kwargs):
"""ReadInt(String key, long defaultVal=0) -> long"""
"""
ReadInt(String key, long defaultVal=0) -> long
Returns the value of key if it exists, defaultVal otherwise.
"""
return _misc.ConfigBase_ReadInt(*args, **kwargs)
def ReadFloat(*args, **kwargs):
"""ReadFloat(String key, double defaultVal=0.0) -> double"""
"""
ReadFloat(String key, double defaultVal=0.0) -> double
Returns the value of key if it exists, defaultVal otherwise.
"""
return _misc.ConfigBase_ReadFloat(*args, **kwargs)
def ReadBool(*args, **kwargs):
"""ReadBool(String key, bool defaultVal=False) -> bool"""
"""
ReadBool(String key, bool defaultVal=False) -> bool
Returns the value of key if it exists, defaultVal otherwise.
"""
return _misc.ConfigBase_ReadBool(*args, **kwargs)
def Write(*args, **kwargs):
"""Write(String key, String value) -> bool"""
"""
Write(String key, String value) -> bool
write the value (return True on success)
"""
return _misc.ConfigBase_Write(*args, **kwargs)
def WriteInt(*args, **kwargs):
"""WriteInt(String key, long value) -> bool"""
"""
WriteInt(String key, long value) -> bool
write the value (return True on success)
"""
return _misc.ConfigBase_WriteInt(*args, **kwargs)
def WriteFloat(*args, **kwargs):
"""WriteFloat(String key, double value) -> bool"""
"""
WriteFloat(String key, double value) -> bool
write the value (return True on success)
"""
return _misc.ConfigBase_WriteFloat(*args, **kwargs)
def WriteBool(*args, **kwargs):
"""WriteBool(String key, bool value) -> bool"""
"""
WriteBool(String key, bool value) -> bool
write the value (return True on success)
"""
return _misc.ConfigBase_WriteBool(*args, **kwargs)
def Flush(*args, **kwargs):
"""Flush(bool bCurrentOnly=False) -> bool"""
"""
Flush(bool currentOnly=False) -> bool
permanently writes all changes
"""
return _misc.ConfigBase_Flush(*args, **kwargs)
def RenameEntry(*args, **kwargs):
"""RenameEntry(String oldName, String newName) -> bool"""
"""
RenameEntry(String oldName, String newName) -> bool
Rename an entry. Returns False on failure (probably because the new
name is already taken by an existing entry)
"""
return _misc.ConfigBase_RenameEntry(*args, **kwargs)
def RenameGroup(*args, **kwargs):
"""RenameGroup(String oldName, String newName) -> bool"""
"""
RenameGroup(String oldName, String newName) -> bool
Rename aa group. Returns False on failure (probably because the new
name is already taken by an existing entry)
"""
return _misc.ConfigBase_RenameGroup(*args, **kwargs)
def DeleteEntry(*args, **kwargs):
"""DeleteEntry(String key, bool bDeleteGroupIfEmpty=True) -> bool"""
"""
DeleteEntry(String key, bool deleteGroupIfEmpty=True) -> bool
Deletes the specified entry and the group it belongs to if
it was the last key in it and the second parameter is True
"""
return _misc.ConfigBase_DeleteEntry(*args, **kwargs)
def DeleteGroup(*args, **kwargs):
"""DeleteGroup(String key) -> bool"""
"""
DeleteGroup(String key) -> bool
Delete the group (with all subgroups)
"""
return _misc.ConfigBase_DeleteGroup(*args, **kwargs)
def DeleteAll(*args, **kwargs):
"""DeleteAll() -> bool"""
"""
DeleteAll() -> bool
Delete the whole underlying object (disk file, registry key, ...)
primarly intended for use by desinstallation routine.
"""
return _misc.ConfigBase_DeleteAll(*args, **kwargs)
def IsExpandingEnvVars(*args, **kwargs):
"""IsExpandingEnvVars() -> bool"""
return _misc.ConfigBase_IsExpandingEnvVars(*args, **kwargs)
def SetExpandEnvVars(*args, **kwargs):
"""SetExpandEnvVars(bool bDoIt=True)"""
"""
SetExpandEnvVars(bool doIt=True)
We can automatically expand environment variables in the config entries
(this option is on by default, you can turn it on/off at any time)
"""
return _misc.ConfigBase_SetExpandEnvVars(*args, **kwargs)
def IsExpandingEnvVars(*args, **kwargs):
"""
IsExpandingEnvVars() -> bool
Are we currently expanding environment variables?
"""
return _misc.ConfigBase_IsExpandingEnvVars(*args, **kwargs)
def SetRecordDefaults(*args, **kwargs):
"""SetRecordDefaults(bool bDoIt=True)"""
"""
SetRecordDefaults(bool doIt=True)
Set whether the config objec should record default values.
"""
return _misc.ConfigBase_SetRecordDefaults(*args, **kwargs)
def IsRecordingDefaults(*args, **kwargs):
"""IsRecordingDefaults() -> bool"""
"""
IsRecordingDefaults() -> bool
Are we currently recording default values?
"""
return _misc.ConfigBase_IsRecordingDefaults(*args, **kwargs)
def ExpandEnvVars(*args, **kwargs):
"""ExpandEnvVars(String str) -> String"""
"""
ExpandEnvVars(String str) -> String
Expand any environment variables in str and return the result
"""
return _misc.ConfigBase_ExpandEnvVars(*args, **kwargs)
def GetAppName(*args, **kwargs):
@@ -2669,49 +2853,45 @@ class ConfigBasePtr(ConfigBase):
_misc.ConfigBase_swigregister(ConfigBasePtr)
def ConfigBase_Set(*args, **kwargs):
"""ConfigBase_Set(ConfigBase pConfig) -> ConfigBase"""
"""
ConfigBase_Set(ConfigBase config) -> ConfigBase
Sets the global config object (the one returned by Get) and
returns a reference to the previous global config object.
"""
return _misc.ConfigBase_Set(*args, **kwargs)
def ConfigBase_Get(*args, **kwargs):
"""ConfigBase_Get(bool createOnDemand=True) -> ConfigBase"""
"""
ConfigBase_Get(bool createOnDemand=True) -> ConfigBase
Returns the current global config object, creating one if neccessary.
"""
return _misc.ConfigBase_Get(*args, **kwargs)
def ConfigBase_Create(*args, **kwargs):
"""ConfigBase_Create() -> ConfigBase"""
"""
ConfigBase_Create() -> ConfigBase
Create and return a new global config object. This function will
create the "best" implementation of wx.Config available for the
current platform.
"""
return _misc.ConfigBase_Create(*args, **kwargs)
def ConfigBase_DontCreateOnDemand(*args, **kwargs):
"""ConfigBase_DontCreateOnDemand()"""
"""
ConfigBase_DontCreateOnDemand()
Should Get() try to create a new log object if there isn't a current one?
"""
return _misc.ConfigBase_DontCreateOnDemand(*args, **kwargs)
class ConfigPathChanger(object):
def __repr__(self):
return "<%s.%s; proxy of C++ wxConfigPathChanger instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
"""__init__(ConfigBase pContainer, String strEntry) -> ConfigPathChanger"""
newobj = _misc.new_ConfigPathChanger(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
del newobj.thisown
def __del__(self, destroy=_misc.delete_ConfigPathChanger):
"""__del__()"""
try:
if self.thisown: destroy(self)
except: pass
def Name(*args, **kwargs):
"""Name() -> String"""
return _misc.ConfigPathChanger_Name(*args, **kwargs)
class ConfigPathChangerPtr(ConfigPathChanger):
def __init__(self, this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = ConfigPathChanger
_misc.ConfigPathChanger_swigregister(ConfigPathChangerPtr)
class Config(ConfigBase):
"""
This ConfigBase-derived class will use the registry on Windows,
and will be a wx.FileConfig on other platforms.
"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxConfig instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
@@ -2739,6 +2919,7 @@ class ConfigPtr(Config):
_misc.Config_swigregister(ConfigPtr)
class FileConfig(ConfigBase):
"""This config class will use a file for storage on all platforms."""
def __repr__(self):
return "<%s.%s; proxy of C++ wxFileConfig instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
@@ -2765,9 +2946,53 @@ class FileConfigPtr(FileConfig):
self.__class__ = FileConfig
_misc.FileConfig_swigregister(FileConfigPtr)
class ConfigPathChanger(object):
"""
A handy little class which changes current path to the path of
given entry and restores it in the destructoir: so if you declare
a local variable of this type, you work in the entry directory
and the path is automatically restored when the function returns.
"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxConfigPathChanger instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
"""__init__(ConfigBase config, String entry) -> ConfigPathChanger"""
newobj = _misc.new_ConfigPathChanger(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
del newobj.thisown
def __del__(self, destroy=_misc.delete_ConfigPathChanger):
"""__del__()"""
try:
if self.thisown: destroy(self)
except: pass
def Name(*args, **kwargs):
"""
Name() -> String
Get the key name
"""
return _misc.ConfigPathChanger_Name(*args, **kwargs)
class ConfigPathChangerPtr(ConfigPathChanger):
def __init__(self, this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = ConfigPathChanger
_misc.ConfigPathChanger_swigregister(ConfigPathChangerPtr)
def ExpandEnvVars(*args, **kwargs):
"""ExpandEnvVars(String sz) -> String"""
"""
ExpandEnvVars(String sz) -> String
Replace environment variables ($SOMETHING) with their values. The
format is $VARNAME or ${VARNAME} where VARNAME contains
alphanumeric characters and '_' only. '$' must be escaped ('\$')
in order to be taken literally.
"""
return _misc.ExpandEnvVars(*args, **kwargs)
#---------------------------------------------------------------------------

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 },