reSWIGged

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25892 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2004-02-21 02:04:26 +00:00
parent b88bce5f07
commit 328fcd84d4
13 changed files with 1411 additions and 833 deletions
+1 -1
View File
@@ -277,9 +277,9 @@
%rename(CONFIG_USE_RELATIVE_PATH) wxCONFIG_USE_RELATIVE_PATH;
%rename(CONFIG_USE_NO_ESCAPE_CHARACTERS) wxCONFIG_USE_NO_ESCAPE_CHARACTERS;
%rename(ConfigBase) wxConfigBase;
%rename(ConfigPathChanger) wxConfigPathChanger;
%rename(Config) wxConfig;
%rename(FileConfig) wxFileConfig;
%rename(ConfigPathChanger) wxConfigPathChanger;
%rename(ExpandEnvVars) wxExpandEnvVars;
%rename(DateTime) wxDateTime;
%rename(TimeSpan) wxTimeSpan;
+78 -22
View File
@@ -417,15 +417,21 @@ def PreChoice(*args, **kwargs):
#---------------------------------------------------------------------------
class ComboBox(Choice):
"""
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(Choice):
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(Choice):
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(Choice):
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
+5 -11
View File
@@ -665,14 +665,8 @@ wxWindow *wxPyListCtrl_GetMainWindow(wxPyListCtrl *self){
#include "wx/wxPython/pytree.h"
static const wxString wxPyTreeCtrlNameStr(_T("wxTreeCtrl"));
bool wxTreeItemId_operator_ee___(wxTreeItemId *self,wxTreeItemId const *other){
if (!other) return False;
return *self == *other;
}
bool wxTreeItemId_operator_Ne___(wxTreeItemId *self,wxTreeItemId const *other){
if (!other) return True;
return *self != *other;
}
bool wxTreeItemId___eq__(wxTreeItemId *self,wxTreeItemId const *other){ return other ? (*self == *other) : False; }
bool wxTreeItemId___ne__(wxTreeItemId *self,wxTreeItemId const *other){ return other ? (*self != *other) : True; }
void wxPyTreeItemData_Destroy(wxPyTreeItemData *self){ delete self; }
// C++ version of Python aware wxTreeCtrl
class wxPyTreeCtrl : public wxTreeCtrl {
@@ -2787,7 +2781,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 ;
@@ -22934,7 +22928,7 @@ static PyObject *_wrap_TreeItemId___eq__(PyObject *self, PyObject *args, PyObjec
if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxTreeItemId,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (bool)wxTreeItemId_operator_ee___(arg1,(wxTreeItemId const *)arg2);
result = (bool)wxTreeItemId___eq__(arg1,(wxTreeItemId const *)arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
@@ -22962,7 +22956,7 @@ static PyObject *_wrap_TreeItemId___ne__(PyObject *self, PyObject *args, PyObjec
if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxTreeItemId,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (bool)wxTreeItemId_operator_Ne___(arg1,(wxTreeItemId const *)arg2);
result = (bool)wxTreeItemId___ne__(arg1,(wxTreeItemId const *)arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
+4 -4
View File
@@ -7518,11 +7518,11 @@ class GBPosition(object):
return _core.GBPosition_SetCol(*args, **kwargs)
def __eq__(*args, **kwargs):
"""__eq__(GBPosition p) -> bool"""
"""__eq__(GBPosition other) -> bool"""
return _core.GBPosition___eq__(*args, **kwargs)
def __ne__(*args, **kwargs):
"""__ne__(GBPosition p) -> bool"""
"""__ne__(GBPosition other) -> bool"""
return _core.GBPosition___ne__(*args, **kwargs)
def Set(*args, **kwargs):
@@ -7583,11 +7583,11 @@ class GBSpan(object):
return _core.GBSpan_SetColspan(*args, **kwargs)
def __eq__(*args, **kwargs):
"""__eq__(GBSpan o) -> bool"""
"""__eq__(GBSpan other) -> bool"""
return _core.GBSpan___eq__(*args, **kwargs)
def __ne__(*args, **kwargs):
"""__ne__(GBSpan o) -> bool"""
"""__ne__(GBSpan other) -> bool"""
return _core.GBSpan___ne__(*args, **kwargs)
def Set(*args, **kwargs):
+20 -32
View File
@@ -1429,6 +1429,8 @@ bool wxGBSpan_helper(PyObject* source, wxGBSpan** obj)
}
bool wxGBPosition___eq__(wxGBPosition *self,wxGBPosition const *other){ return other ? (*self == *other) : False; }
bool wxGBPosition___ne__(wxGBPosition *self,wxGBPosition const *other){ return other ? (*self != *other) : True; }
void wxGBPosition_Set(wxGBPosition *self,int row,int col){
self->SetRow(row);
self->SetCol(col);
@@ -1441,6 +1443,8 @@ PyObject *wxGBPosition_Get(wxGBPosition *self){
wxPyEndBlockThreads();
return tup;
}
bool wxGBSpan___eq__(wxGBSpan *self,wxGBSpan const *other){ return other ? (*self == *other) : False; }
bool wxGBSpan___ne__(wxGBSpan *self,wxGBSpan const *other){ return other ? (*self != *other) : True; }
void wxGBSpan_Set(wxGBSpan *self,int rowspan,int colspan){
self->SetRowspan(rowspan);
self->SetColspan(colspan);
@@ -35443,24 +35447,20 @@ static PyObject *_wrap_GBPosition_SetCol(PyObject *self, PyObject *args, PyObjec
static PyObject *_wrap_GBPosition___eq__(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxGBPosition *arg1 = (wxGBPosition *) 0 ;
wxGBPosition *arg2 = 0 ;
wxGBPosition *arg2 = (wxGBPosition *) 0 ;
bool result;
wxGBPosition temp2 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
(char *) "self",(char *) "p", NULL
(char *) "self",(char *) "other", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:GBPosition___eq__",kwnames,&obj0,&obj1)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGBPosition,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
{
arg2 = &temp2;
if ( ! wxGBPosition_helper(obj1, &arg2)) SWIG_fail;
}
if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxGBPosition,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (bool)((wxGBPosition const *)arg1)->operator ==((wxGBPosition const &)*arg2);
result = (bool)wxGBPosition___eq__(arg1,(wxGBPosition const *)arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
@@ -35475,24 +35475,20 @@ static PyObject *_wrap_GBPosition___eq__(PyObject *self, PyObject *args, PyObjec
static PyObject *_wrap_GBPosition___ne__(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxGBPosition *arg1 = (wxGBPosition *) 0 ;
wxGBPosition *arg2 = 0 ;
wxGBPosition *arg2 = (wxGBPosition *) 0 ;
bool result;
wxGBPosition temp2 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
(char *) "self",(char *) "p", NULL
(char *) "self",(char *) "other", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:GBPosition___ne__",kwnames,&obj0,&obj1)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGBPosition,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
{
arg2 = &temp2;
if ( ! wxGBPosition_helper(obj1, &arg2)) SWIG_fail;
}
if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxGBPosition,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (bool)((wxGBPosition const *)arg1)->operator !=((wxGBPosition const &)*arg2);
result = (bool)wxGBPosition___ne__(arg1,(wxGBPosition const *)arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
@@ -35727,24 +35723,20 @@ static PyObject *_wrap_GBSpan_SetColspan(PyObject *self, PyObject *args, PyObjec
static PyObject *_wrap_GBSpan___eq__(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxGBSpan *arg1 = (wxGBSpan *) 0 ;
wxGBSpan *arg2 = 0 ;
wxGBSpan *arg2 = (wxGBSpan *) 0 ;
bool result;
wxGBSpan temp2 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
(char *) "self",(char *) "o", NULL
(char *) "self",(char *) "other", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:GBSpan___eq__",kwnames,&obj0,&obj1)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGBSpan,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
{
arg2 = &temp2;
if ( ! wxGBSpan_helper(obj1, &arg2)) SWIG_fail;
}
if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxGBSpan,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (bool)((wxGBSpan const *)arg1)->operator ==((wxGBSpan const &)*arg2);
result = (bool)wxGBSpan___eq__(arg1,(wxGBSpan const *)arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
@@ -35759,24 +35751,20 @@ static PyObject *_wrap_GBSpan___eq__(PyObject *self, PyObject *args, PyObject *k
static PyObject *_wrap_GBSpan___ne__(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxGBSpan *arg1 = (wxGBSpan *) 0 ;
wxGBSpan *arg2 = 0 ;
wxGBSpan *arg2 = (wxGBSpan *) 0 ;
bool result;
wxGBSpan temp2 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
(char *) "self",(char *) "o", NULL
(char *) "self",(char *) "other", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:GBSpan___ne__",kwnames,&obj0,&obj1)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGBSpan,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
{
arg2 = &temp2;
if ( ! wxGBSpan_helper(obj1, &arg2)) SWIG_fail;
}
if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxGBSpan,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (bool)((wxGBSpan const *)arg1)->operator !=((wxGBSpan const &)*arg2);
result = (bool)wxGBSpan___ne__(arg1,(wxGBSpan const *)arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
+122 -30
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
@@ -236,9 +324,13 @@ class Pen(GDIObject):
return _gdi.Pen_GetDashes(*args, **kwargs)
def __eq__(*args, **kwargs):
"""__eq__(Pen pen) -> bool"""
"""__eq__(Pen other) -> bool"""
return _gdi.Pen___eq__(*args, **kwargs)
def __ne__(*args, **kwargs):
"""__ne__(Pen other) -> bool"""
return _gdi.Pen___ne__(*args, **kwargs)
def GetDashCount(*args, **kwargs):
"""GetDashCount() -> int"""
return _gdi.Pen_GetDashCount(*args, **kwargs)
@@ -1491,11 +1583,11 @@ class Font(GDIObject):
def __nonzero__(self): return self.Ok()
def __eq__(*args, **kwargs):
"""__eq__(Font font) -> bool"""
"""__eq__(Font other) -> bool"""
return _gdi.Font___eq__(*args, **kwargs)
def __ne__(*args, **kwargs):
"""__ne__(Font font) -> bool"""
"""__ne__(Font other) -> bool"""
return _gdi.Font___ne__(*args, **kwargs)
def GetPointSize(*args, **kwargs):
@@ -2894,16 +2986,13 @@ def MemoryDCFromDC(*args, **kwargs):
#---------------------------------------------------------------------------
BUFFER_DC_OVERWRITE_BG = _gdi.BUFFER_DC_OVERWRITE_BG
BUFFER_DC_PRESERVE_BG = _gdi.BUFFER_DC_PRESERVE_BG
BUFFER_DC_DEFAULT = _gdi.BUFFER_DC_DEFAULT
class BufferedDC(MemoryDC):
def __repr__(self):
return "<%s.%s; proxy of C++ wxBufferedDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args):
"""
__init__(DC dc, Bitmap buffer) -> BufferedDC
__init__(DC dc, Size area, int flags=BUFFER_DC_DEFAULT) -> BufferedDC
__init__(DC dc, Size area) -> BufferedDC
"""
newobj = _gdi.new_BufferedDC(*args)
self.this = newobj.this
@@ -2911,6 +3000,12 @@ class BufferedDC(MemoryDC):
del newobj.thisown
self._dc = args[0] # save a ref so the other dc will not be deleted before self
def __del__(self, destroy=_gdi.delete_BufferedDC):
"""__del__()"""
try:
if self.thisown: destroy(self)
except: pass
def UnMask(*args, **kwargs):
"""UnMask()"""
return _gdi.BufferedDC_UnMask(*args, **kwargs)
@@ -2924,7 +3019,7 @@ class BufferedDCPtr(BufferedDC):
_gdi.BufferedDC_swigregister(BufferedDCPtr)
def BufferedDCInternalBuffer(*args):
"""BufferedDCInternalBuffer(DC dc, Size area, int flags=BUFFER_DC_DEFAULT) -> BufferedDC"""
"""BufferedDCInternalBuffer(DC dc, Size area) -> BufferedDC"""
val = _gdi.new_BufferedDCInternalBuffer(*args)
val.thisown = 1
val._dc = args[0] # save a ref so the other dc will not be deleted before self
@@ -2933,12 +3028,9 @@ def BufferedDCInternalBuffer(*args):
class BufferedPaintDC(BufferedDC):
def __repr__(self):
return "<%s.%s; proxy of C++ wxBufferedPaintDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args):
"""
__init__(Window window, Bitmap buffer) -> BufferedPaintDC
__init__(Window window, int flags=BUFFER_DC_DEFAULT) -> BufferedPaintDC
"""
newobj = _gdi.new_BufferedPaintDC(*args)
def __init__(self, *args, **kwargs):
"""__init__(Window window, Bitmap buffer=NullBitmap) -> BufferedPaintDC"""
newobj = _gdi.new_BufferedPaintDC(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
del newobj.thisown
File diff suppressed because it is too large Load Diff
+19 -12
View File
@@ -1223,15 +1223,14 @@ public:
};
void wxPyGridTableBase_Destroy(wxPyGridTableBase *self){ delete self; }
PyObject *wxGridCellCoords_asTuple(wxGridCellCoords *self){
PyObject* tup = PyTuple_New(2);
PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->GetRow()));
PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->GetCol()));
return tup;
}
bool wxGridCellCoords_helper(PyObject* source, wxGridCellCoords** obj) {
if (source == Py_None) {
**obj = wxGridCellCoords(-1,-1);
return True;
}
// If source is an object instance then it may already be the right type
if (wxPySwigInstance_Check(source)) {
wxGridCellCoords* ptr;
@@ -1291,6 +1290,12 @@ PyObject* wxGridCellCoordsArray_helper(const wxGridCellCoordsArray& source)
return list;
}
PyObject *wxGridCellCoords_asTuple(wxGridCellCoords *self){
PyObject* tup = PyTuple_New(2);
PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->GetRow()));
PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->GetCol()));
return tup;
}
typedef wxGrid::wxGridSelectionModes WXGRIDSELECTIONMODES;
@@ -7746,6 +7751,7 @@ static PyObject *_wrap_GridCellCoords___eq__(PyObject *self, PyObject *args, PyO
wxGridCellCoords *arg1 = (wxGridCellCoords *) 0 ;
wxGridCellCoords *arg2 = 0 ;
bool result;
wxGridCellCoords temp2 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
@@ -7754,9 +7760,9 @@ static PyObject *_wrap_GridCellCoords___eq__(PyObject *self, PyObject *args, PyO
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:GridCellCoords___eq__",kwnames,&obj0,&obj1)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGridCellCoords,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxGridCellCoords,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
if (arg2 == NULL) {
PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail;
{
arg2 = &temp2;
if (! wxGridCellCoords_helper(obj1, &arg2)) SWIG_fail;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -7777,6 +7783,7 @@ static PyObject *_wrap_GridCellCoords___ne__(PyObject *self, PyObject *args, PyO
wxGridCellCoords *arg1 = (wxGridCellCoords *) 0 ;
wxGridCellCoords *arg2 = 0 ;
bool result;
wxGridCellCoords temp2 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
@@ -7785,9 +7792,9 @@ static PyObject *_wrap_GridCellCoords___ne__(PyObject *self, PyObject *args, PyO
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:GridCellCoords___ne__",kwnames,&obj0,&obj1)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGridCellCoords,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxGridCellCoords,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
if (arg2 == NULL) {
PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail;
{
arg2 = &temp2;
if (! wxGridCellCoords_helper(obj1, &arg2)) SWIG_fail;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
+295 -70
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+81 -110
View File
@@ -12317,31 +12317,6 @@ static PyObject *_wrap_SingleChoiceDialog_SetSelection(PyObject *self, PyObject
}
static PyObject *_wrap_SingleChoiceDialog_ShowModal(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxSingleChoiceDialog *arg1 = (wxSingleChoiceDialog *) 0 ;
int result;
PyObject * obj0 = 0 ;
char *kwnames[] = {
(char *) "self", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:SingleChoiceDialog_ShowModal",kwnames,&obj0)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxSingleChoiceDialog,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (int)(arg1)->ShowModal();
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
resultobj = SWIG_PyObj_FromInt((int)result);
return resultobj;
fail:
return NULL;
}
static PyObject * SingleChoiceDialog_swigregister(PyObject *self, PyObject *args) {
PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
@@ -12517,31 +12492,6 @@ static PyObject *_wrap_TextEntryDialog_SetValue(PyObject *self, PyObject *args,
}
static PyObject *_wrap_TextEntryDialog_ShowModal(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxTextEntryDialog *arg1 = (wxTextEntryDialog *) 0 ;
int result;
PyObject * obj0 = 0 ;
char *kwnames[] = {
(char *) "self", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:TextEntryDialog_ShowModal",kwnames,&obj0)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxTextEntryDialog,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (int)(arg1)->ShowModal();
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
resultobj = SWIG_PyObj_FromInt((int)result);
return resultobj;
fail:
return NULL;
}
static PyObject * TextEntryDialog_swigregister(PyObject *self, PyObject *args) {
PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
@@ -12981,18 +12931,37 @@ static PyObject * FontData_swigregister(PyObject *self, PyObject *args) {
Py_INCREF(obj);
return Py_BuildValue((char *)"");
}
static PyObject *_wrap_new_FontDialog(PyObject *self, PyObject *args, PyObject *kwargs) {
static PyObject *_wrap_new_FontDialog__SWIG_0(PyObject *self, PyObject *args) {
PyObject *resultobj;
wxWindow *arg1 = (wxWindow *) 0 ;
wxFontDialog *result;
PyObject * obj0 = 0 ;
if(!PyArg_ParseTuple(args,(char *)"O:new_FontDialog",&obj0)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxFontDialog *)new wxFontDialog(arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_wxFontDialog, 1);
return resultobj;
fail:
return NULL;
}
static PyObject *_wrap_new_FontDialog__SWIG_1(PyObject *self, PyObject *args) {
PyObject *resultobj;
wxWindow *arg1 = (wxWindow *) 0 ;
wxFontData *arg2 = 0 ;
wxFontDialog *result;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
(char *) "parent",(char *) "data", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:new_FontDialog",kwnames,&obj0,&obj1)) goto fail;
if(!PyArg_ParseTuple(args,(char *)"OO:new_FontDialog",&obj0,&obj1)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxFontData,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
if (arg2 == NULL) {
@@ -13012,6 +12981,62 @@ static PyObject *_wrap_new_FontDialog(PyObject *self, PyObject *args, PyObject *
}
static PyObject *_wrap_new_FontDialog(PyObject *self, PyObject *args) {
int argc;
PyObject *argv[3];
int ii;
argc = PyObject_Length(args);
for (ii = 0; (ii < argc) && (ii < 2); ii++) {
argv[ii] = PyTuple_GetItem(args,ii);
}
if (argc == 1) {
int _v;
{
void *ptr;
if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_wxWindow, 0) == -1) {
_v = 0;
PyErr_Clear();
} else {
_v = 1;
}
}
if (_v) {
return _wrap_new_FontDialog__SWIG_0(self,args);
}
}
if (argc == 2) {
int _v;
{
void *ptr;
if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_wxWindow, 0) == -1) {
_v = 0;
PyErr_Clear();
} else {
_v = 1;
}
}
if (_v) {
{
void *ptr;
if (SWIG_ConvertPtr(argv[1], (void **) &ptr, SWIGTYPE_p_wxFontData, 0) == -1) {
_v = 0;
PyErr_Clear();
} else {
_v = 1;
}
}
if (_v) {
return _wrap_new_FontDialog__SWIG_1(self,args);
}
}
}
PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'new_FontDialog'");
return NULL;
}
static PyObject *_wrap_FontDialog_GetFontData(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxFontDialog *arg1 = (wxFontDialog *) 0 ;
@@ -13040,31 +13065,6 @@ static PyObject *_wrap_FontDialog_GetFontData(PyObject *self, PyObject *args, Py
}
static PyObject *_wrap_FontDialog_ShowModal(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxFontDialog *arg1 = (wxFontDialog *) 0 ;
int result;
PyObject * obj0 = 0 ;
char *kwnames[] = {
(char *) "self", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:FontDialog_ShowModal",kwnames,&obj0)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxFontDialog,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (int)(arg1)->ShowModal();
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
resultobj = SWIG_PyObj_FromInt((int)result);
return resultobj;
fail:
return NULL;
}
static PyObject * FontDialog_swigregister(PyObject *self, PyObject *args) {
PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
@@ -13150,31 +13150,6 @@ static PyObject *_wrap_new_MessageDialog(PyObject *self, PyObject *args, PyObjec
}
static PyObject *_wrap_MessageDialog_ShowModal(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxMessageDialog *arg1 = (wxMessageDialog *) 0 ;
int result;
PyObject * obj0 = 0 ;
char *kwnames[] = {
(char *) "self", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:MessageDialog_ShowModal",kwnames,&obj0)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMessageDialog,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (int)(arg1)->ShowModal();
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
resultobj = SWIG_PyObj_FromInt((int)result);
return resultobj;
fail:
return NULL;
}
static PyObject * MessageDialog_swigregister(PyObject *self, PyObject *args) {
PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
@@ -23070,12 +23045,10 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"SingleChoiceDialog_GetSelection", (PyCFunction) _wrap_SingleChoiceDialog_GetSelection, METH_VARARGS | METH_KEYWORDS },
{ (char *)"SingleChoiceDialog_GetStringSelection", (PyCFunction) _wrap_SingleChoiceDialog_GetStringSelection, METH_VARARGS | METH_KEYWORDS },
{ (char *)"SingleChoiceDialog_SetSelection", (PyCFunction) _wrap_SingleChoiceDialog_SetSelection, METH_VARARGS | METH_KEYWORDS },
{ (char *)"SingleChoiceDialog_ShowModal", (PyCFunction) _wrap_SingleChoiceDialog_ShowModal, METH_VARARGS | METH_KEYWORDS },
{ (char *)"SingleChoiceDialog_swigregister", SingleChoiceDialog_swigregister, METH_VARARGS },
{ (char *)"new_TextEntryDialog", (PyCFunction) _wrap_new_TextEntryDialog, METH_VARARGS | METH_KEYWORDS },
{ (char *)"TextEntryDialog_GetValue", (PyCFunction) _wrap_TextEntryDialog_GetValue, METH_VARARGS | METH_KEYWORDS },
{ (char *)"TextEntryDialog_SetValue", (PyCFunction) _wrap_TextEntryDialog_SetValue, METH_VARARGS | METH_KEYWORDS },
{ (char *)"TextEntryDialog_ShowModal", (PyCFunction) _wrap_TextEntryDialog_ShowModal, METH_VARARGS | METH_KEYWORDS },
{ (char *)"TextEntryDialog_swigregister", TextEntryDialog_swigregister, METH_VARARGS },
{ (char *)"new_FontData", (PyCFunction) _wrap_new_FontData, METH_VARARGS | METH_KEYWORDS },
{ (char *)"delete_FontData", (PyCFunction) _wrap_delete_FontData, METH_VARARGS | METH_KEYWORDS },
@@ -23093,12 +23066,10 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"FontData_SetRange", (PyCFunction) _wrap_FontData_SetRange, METH_VARARGS | METH_KEYWORDS },
{ (char *)"FontData_SetShowHelp", (PyCFunction) _wrap_FontData_SetShowHelp, METH_VARARGS | METH_KEYWORDS },
{ (char *)"FontData_swigregister", FontData_swigregister, METH_VARARGS },
{ (char *)"new_FontDialog", (PyCFunction) _wrap_new_FontDialog, METH_VARARGS | METH_KEYWORDS },
{ (char *)"new_FontDialog", _wrap_new_FontDialog, METH_VARARGS },
{ (char *)"FontDialog_GetFontData", (PyCFunction) _wrap_FontDialog_GetFontData, METH_VARARGS | METH_KEYWORDS },
{ (char *)"FontDialog_ShowModal", (PyCFunction) _wrap_FontDialog_ShowModal, METH_VARARGS | METH_KEYWORDS },
{ (char *)"FontDialog_swigregister", FontDialog_swigregister, METH_VARARGS },
{ (char *)"new_MessageDialog", (PyCFunction) _wrap_new_MessageDialog, METH_VARARGS | METH_KEYWORDS },
{ (char *)"MessageDialog_ShowModal", (PyCFunction) _wrap_MessageDialog_ShowModal, METH_VARARGS | METH_KEYWORDS },
{ (char *)"MessageDialog_swigregister", MessageDialog_swigregister, METH_VARARGS },
{ (char *)"new_ProgressDialog", (PyCFunction) _wrap_new_ProgressDialog, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ProgressDialog_Update", (PyCFunction) _wrap_ProgressDialog_Update, METH_VARARGS | METH_KEYWORDS },