reSWIGged

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40905 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2006-08-29 01:03:18 +00:00
parent a0ef52c038
commit fc46b7f37c
50 changed files with 15100 additions and 1707 deletions

View File

@@ -5692,8 +5692,6 @@ def PrePyControl(*args, **kwargs):
#---------------------------------------------------------------------------
FRAME_EX_CONTEXTHELP = _controls_.FRAME_EX_CONTEXTHELP
DIALOG_EX_CONTEXTHELP = _controls_.DIALOG_EX_CONTEXTHELP
wxEVT_HELP = _controls_.wxEVT_HELP
wxEVT_DETAILED_HELP = _controls_.wxEVT_DETAILED_HELP
EVT_HELP = wx.PyEventBinder( wxEVT_HELP, 1)
@@ -5804,7 +5802,7 @@ class ContextHelp(_core.Object):
There are a couple of ways to invoke this behaviour implicitly:
* Use the wx.DIALOG_EX_CONTEXTHELP extended style for a dialog
* Use the wx.WS_EX_CONTEXTHELP extended style for a dialog or frame
(Windows only). This will put a question mark in the titlebar,
and Windows will put the application into context-sensitive help
mode automatically, with further programming.
@@ -5812,7 +5810,7 @@ class ContextHelp(_core.Object):
* Create a `wx.ContextHelpButton`, whose predefined behaviour is
to create a context help object. Normally you will write your
application so that this button is only added to a dialog for
non-Windows platforms (use ``wx.DIALOG_EX_CONTEXTHELP`` on
non-Windows platforms (use ``wx.WS_EX_CONTEXTHELP`` on
Windows).
:see: `wx.ContextHelpButton`

View File

@@ -48858,8 +48858,6 @@ SWIGEXPORT void SWIG_init(void) {
SWIG_Python_SetConstant(d, "DIRCTRL_SHOW_FILTERS",SWIG_From_int(static_cast< int >(wxDIRCTRL_SHOW_FILTERS)));
SWIG_Python_SetConstant(d, "DIRCTRL_3D_INTERNAL",SWIG_From_int(static_cast< int >(wxDIRCTRL_3D_INTERNAL)));
SWIG_Python_SetConstant(d, "DIRCTRL_EDIT_LABELS",SWIG_From_int(static_cast< int >(wxDIRCTRL_EDIT_LABELS)));
SWIG_Python_SetConstant(d, "FRAME_EX_CONTEXTHELP",SWIG_From_int(static_cast< int >(wxFRAME_EX_CONTEXTHELP)));
SWIG_Python_SetConstant(d, "DIALOG_EX_CONTEXTHELP",SWIG_From_int(static_cast< int >(wxDIALOG_EX_CONTEXTHELP)));
PyDict_SetItemString(d, "wxEVT_HELP", PyInt_FromLong(wxEVT_HELP));
PyDict_SetItemString(d, "wxEVT_DETAILED_HELP", PyInt_FromLong(wxEVT_DETAILED_HELP));
SWIG_Python_SetConstant(d, "HelpEvent_Origin_Unknown",SWIG_From_int(static_cast< int >(wxHelpEvent::Origin_Unknown)));

View File

@@ -194,6 +194,7 @@ ID_REDO = _core_.ID_REDO
ID_HELP = _core_.ID_HELP
ID_PRINT = _core_.ID_PRINT
ID_PRINT_SETUP = _core_.ID_PRINT_SETUP
ID_PAGE_SETUP = _core_.ID_PAGE_SETUP
ID_PREVIEW = _core_.ID_PREVIEW
ID_ABOUT = _core_.ID_ABOUT
ID_HELP_CONTENTS = _core_.ID_HELP_CONTENTS
@@ -1345,6 +1346,15 @@ class Rect(object):
"""
return _core_.Rect_Inside(*args, **kwargs)
def InsideRect(*args, **kwargs):
"""
InsideRect(self, Rect rect) -> bool
Returns ``True`` if the given rectangle is completely inside this
rectangle or touches its boundary.
"""
return _core_.Rect_InsideRect(*args, **kwargs)
def Intersects(*args, **kwargs):
"""
Intersects(self, Rect rect) -> bool
@@ -2652,11 +2662,23 @@ class Image(Object):
return _core_.Image_SetAlphaData(*args, **kwargs)
def GetAlphaBuffer(*args, **kwargs):
"""GetAlphaBuffer(self) -> PyObject"""
"""
GetAlphaBuffer(self) -> PyObject
Returns a writable Python buffer object that is pointing at the Alpha
data buffer inside the wx.Image. You need to ensure that you do not
use this buffer object after the image has been destroyed.
"""
return _core_.Image_GetAlphaBuffer(*args, **kwargs)
def SetAlphaBuffer(*args, **kwargs):
"""SetAlphaBuffer(self, buffer alpha)"""
"""
SetAlphaBuffer(self, buffer alpha)
Sets the internal image alpha pointer to point at a Python buffer
object. This can save making an extra copy of the data but you must
ensure that the buffer object lives as long as the wx.Image does.
"""
return _core_.Image_SetAlphaBuffer(*args, **kwargs)
def SetMaskColour(*args, **kwargs):
@@ -3041,6 +3063,45 @@ def Image_HSVtoRGB(*args, **kwargs):
"""
return _core_.Image_HSVtoRGB(*args, **kwargs)
def _ImageFromBuffer(*args, **kwargs):
"""_ImageFromBuffer(int width, int height, buffer data, buffer alpha=None) -> Image"""
return _core_._ImageFromBuffer(*args, **kwargs)
def ImageFromBuffer(width, height, dataBuffer, alphaBuffer=None):
"""
Creates a `wx.Image` from the data in dataBuffer. The dataBuffer
parameter must be a Python object that implements the buffer interface, or
is convertable to a buffer object, such as a string, array, etc. The
dataBuffer object is expected to contain a series of RGB bytes and be
width*height*3 bytes long. A buffer object can optionally be supplied for
the image's alpha channel data, and it is expected to be width*height
bytes long.
The wx.Image will be created with its data and alpha pointers initialized
to the memory address pointed to by the buffer objects, thus saving the
time needed to copy the image data from the buffer object to the wx.Image.
While this has advantages, it also has the shoot-yourself-in-the-foot
risks associated with sharing a C pointer between two objects.
To help alleviate the risk a reference to the data and alpha buffer
objects are kept with the wx.Image, so that they won't get deleted until
after the wx.Image is deleted. However please be aware that it is not
guaranteed that an object won't move its memory buffer to a new location
when it needs to resize its contents. If that happens then the wx.Image
will end up referring to an invalid memory location and could cause the
application to crash. Therefore care should be taken to not manipulate
the objects used for the data and alpha buffers in a way that would cause
them to change size.
"""
if not isinstance(dataBuffer, buffer):
dataBuffer = buffer(dataBuffer)
if alphaBuffer is not None and not isinstance(alphaBuffer, buffer):
alphaBuffer = buffer(alphaBuffer)
image = _core_._ImageFromBuffer(width, height, dataBuffer, alphaBuffer)
image._buffer = dataBuffer
image._alpha = alphaBuffer
return image
def InitAllImageHandlers():
"""
The former functionality of InitAllImageHanders is now done internal to
@@ -6816,6 +6877,28 @@ class PyApp(EvtHandler):
return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
GetComCtl32Version = staticmethod(GetComCtl32Version)
def DisplayAvailable(*args, **kwargs):
"""
DisplayAvailable() -> bool
Tests if it is possible to create a GUI in the current environment.
This will mean different things on the different platforms.
* On X Windows systems this function will return ``False`` if it is
not able to open a connection to the X display, which can happen
if $DISPLAY is not set, or is not set correctly.
* On Mac OS X a ``False`` return value will mean that wx is not
able to access the window manager, which can happen if logged in
remotely or if running from the normal version of python instead
of the framework version, (i.e., pythonw.)
* On MS Windows...
"""
return _core_.PyApp_DisplayAvailable(*args, **kwargs)
DisplayAvailable = staticmethod(DisplayAvailable)
_core_.PyApp_swigregister(PyApp)
def PyApp_IsMainLoopRunning(*args):
@@ -6876,6 +6959,27 @@ def PyApp_GetComCtl32Version(*args):
"""
return _core_.PyApp_GetComCtl32Version(*args)
def PyApp_DisplayAvailable(*args):
"""
PyApp_DisplayAvailable() -> bool
Tests if it is possible to create a GUI in the current environment.
This will mean different things on the different platforms.
* On X Windows systems this function will return ``False`` if it is
not able to open a connection to the X display, which can happen
if $DISPLAY is not set, or is not set correctly.
* On Mac OS X a ``False`` return value will mean that wx is not
able to access the window manager, which can happen if logged in
remotely or if running from the normal version of python instead
of the framework version, (i.e., pythonw.)
* On MS Windows...
"""
return _core_.PyApp_DisplayAvailable(*args)
#---------------------------------------------------------------------------
@@ -7045,7 +7149,7 @@ class PyOnDemandOutputWindow:
#----------------------------------------------------------------------
_defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__')
class App(wx.PyApp):
"""
The ``wx.App`` class represents the application and is used to:
@@ -7103,22 +7207,26 @@ class App(wx.PyApp):
initialization to ensure that the system, toolkit and
wxWidgets are fully initialized.
"""
wx.PyApp.__init__(self)
if wx.Platform == "__WXMAC__":
try:
import MacOS
if not MacOS.WMAvailable():
print """\
This program needs access to the screen. Please run with 'pythonw',
not 'python', and only when you are logged in on the main display of
your Mac."""
_sys.exit(1)
except SystemExit:
raise
except:
pass
# make sure we can create a GUI
if not self.DisplayAvailable():
if wx.Platform == "__WXMAC__":
msg = """This program needs access to the screen.
Please run with 'pythonw', not 'python', and only when you are logged
in on the main display of your Mac."""
elif wx.Platform == "__WXGTK__":
msg ="Unable to access the X Display, is $DISPLAY set properly?"
else:
msg = "Unable to create GUI"
# TODO: more description is needed for wxMSW...
raise SystemExit(msg)
# This has to be done before OnInit
self.SetUseBestVisual(useBestVisual)
@@ -9587,6 +9695,32 @@ class Window(EvtHandler):
"""
return _core_.Window_ShouldInheritColours(*args, **kwargs)
def CanSetTransparent(*args, **kwargs):
"""
CanSetTransparent(self) -> bool
Returns ``True`` if the platform supports setting the transparency for
this window. Note that this method will err on the side of caution,
so it is possible that this will return ``False`` when it is in fact
possible to set the transparency.
NOTE: On X-windows systems the X server must have the composite
extension loaded, and there must be a composite manager program (such
as xcompmgr) running.
"""
return _core_.Window_CanSetTransparent(*args, **kwargs)
def SetTransparent(*args, **kwargs):
"""
SetTransparent(self, byte alpha) -> bool
Attempt to set the transparency of this window to the ``alpha`` value,
returns True on success. The ``alpha`` value is an integer in the
range of 0 to 255, where 0 is fully transparent and 255 is fully
opaque.
"""
return _core_.Window_SetTransparent(*args, **kwargs)
def PostCreate(self, pre):
"""
Phase 3 of the 2-phase create <wink!>

View File

@@ -3483,9 +3483,6 @@ SWIGINTERN unsigned long wxImageHistogram_GetCountColour(wxImageHistogram *self,
return e.value;
}
typedef unsigned char* buffer;
// Pull the nested class out to the top level for SWIG's sake
#define wxImage_RGBValue wxImage::RGBValue
#define wxImage_HSVValue wxImage::HSVValue
@@ -3632,6 +3629,25 @@ SWIGINTERN wxBitmap wxImage_ConvertToMonoBitmap(wxImage *self,byte red,byte gree
wxBitmap bitmap( mono, 1 );
return bitmap;
}
wxImage* _ImageFromBuffer(int width, int height,
buffer data, int DATASIZE,
buffer alpha=NULL, int ALPHASIZE=0)
{
if (DATASIZE != width*height*3) {
wxPyErr_SetString(PyExc_ValueError, "Invalid data buffer size.");
return NULL;
}
if (alpha != NULL) {
if (ALPHASIZE != width*height) {
wxPyErr_SetString(PyExc_ValueError, "Invalid alpha buffer size.");
return NULL;
}
return new wxImage(width, height, data, alpha, true);
}
return new wxImage(width, height, data, true);
}
static const wxString wxPyIMAGE_OPTION_FILENAME(wxIMAGE_OPTION_FILENAME);
static const wxString wxPyIMAGE_OPTION_BMP_FORMAT(wxIMAGE_OPTION_BMP_FORMAT);
static const wxString wxPyIMAGE_OPTION_CUR_HOTSPOT_X(wxIMAGE_OPTION_CUR_HOTSPOT_X);
@@ -3771,6 +3787,9 @@ SWIGINTERN wxPyApp *new_wxPyApp(){
return wxPythonApp;
}
SWIGINTERN int wxPyApp_GetComCtl32Version(){ wxPyRaiseNotImplemented(); return 0; }
SWIGINTERN bool wxPyApp_DisplayAvailable(){
return wxPyTestDisplayAvailable();
}
void wxApp_CleanUp() {
__wxPyCleanup();
@@ -7560,6 +7579,45 @@ fail:
}
SWIGINTERN PyObject *_wrap_Rect_InsideRect(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
PyObject *resultobj = 0;
wxRect *arg1 = (wxRect *) 0 ;
wxRect *arg2 = 0 ;
bool result;
void *argp1 = 0 ;
int res1 = 0 ;
wxRect temp2 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char * kwnames[] = {
(char *) "self",(char *) "rect", NULL
};
if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Rect_InsideRect",kwnames,&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxRect, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Rect_InsideRect" "', expected argument " "1"" of type '" "wxRect const *""'");
}
arg1 = reinterpret_cast< wxRect * >(argp1);
{
arg2 = &temp2;
if ( ! wxRect_helper(obj1, &arg2)) SWIG_fail;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (bool)((wxRect const *)arg1)->Inside((wxRect const &)*arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
{
resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
}
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_Rect_Intersects(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
PyObject *resultobj = 0;
wxRect *arg1 = (wxRect *) 0 ;
@@ -13371,7 +13429,9 @@ SWIGINTERN PyObject *_wrap_new_ImageFromData(PyObject *SWIGUNUSEDPARM(self), PyO
}
arg2 = static_cast< int >(val2);
{
if (!PyArg_Parse(obj2, "t#", &arg3, &arg4)) SWIG_fail;
if (obj2 != Py_None) {
if (!PyArg_Parse(obj2, "t#", &arg3, &arg4)) SWIG_fail;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -13419,10 +13479,14 @@ SWIGINTERN PyObject *_wrap_new_ImageFromDataWithAlpha(PyObject *SWIGUNUSEDPARM(s
}
arg2 = static_cast< int >(val2);
{
if (!PyArg_Parse(obj2, "t#", &arg3, &arg4)) SWIG_fail;
if (obj2 != Py_None) {
if (!PyArg_Parse(obj2, "t#", &arg3, &arg4)) SWIG_fail;
}
}
{
if (!PyArg_Parse(obj3, "t#", &arg5, &arg6)) SWIG_fail;
if (obj3 != Py_None) {
if (!PyArg_Parse(obj3, "t#", &arg5, &arg6)) SWIG_fail;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -15444,7 +15508,9 @@ SWIGINTERN PyObject *_wrap_Image_SetData(PyObject *SWIGUNUSEDPARM(self), PyObjec
}
arg1 = reinterpret_cast< wxImage * >(argp1);
{
if (!PyArg_Parse(obj1, "t#", &arg2, &arg3)) SWIG_fail;
if (obj1 != Py_None) {
if (!PyArg_Parse(obj1, "t#", &arg2, &arg3)) SWIG_fail;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -15507,7 +15573,9 @@ SWIGINTERN PyObject *_wrap_Image_SetDataBuffer(PyObject *SWIGUNUSEDPARM(self), P
}
arg1 = reinterpret_cast< wxImage * >(argp1);
{
if (!PyArg_Parse(obj1, "t#", &arg2, &arg3)) SWIG_fail;
if (obj1 != Py_None) {
if (!PyArg_Parse(obj1, "t#", &arg2, &arg3)) SWIG_fail;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -15570,7 +15638,9 @@ SWIGINTERN PyObject *_wrap_Image_SetAlphaData(PyObject *SWIGUNUSEDPARM(self), Py
}
arg1 = reinterpret_cast< wxImage * >(argp1);
{
if (!PyArg_Parse(obj1, "t#", &arg2, &arg3)) SWIG_fail;
if (obj1 != Py_None) {
if (!PyArg_Parse(obj1, "t#", &arg2, &arg3)) SWIG_fail;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -15633,7 +15703,9 @@ SWIGINTERN PyObject *_wrap_Image_SetAlphaBuffer(PyObject *SWIGUNUSEDPARM(self),
}
arg1 = reinterpret_cast< wxImage * >(argp1);
{
if (!PyArg_Parse(obj1, "t#", &arg2, &arg3)) SWIG_fail;
if (obj1 != Py_None) {
if (!PyArg_Parse(obj1, "t#", &arg2, &arg3)) SWIG_fail;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -16976,6 +17048,65 @@ SWIGINTERN PyObject *Image_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *ar
return SWIG_Python_InitShadowInstance(args);
}
SWIGINTERN PyObject *_wrap__ImageFromBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
PyObject *resultobj = 0;
int arg1 ;
int arg2 ;
buffer arg3 ;
int arg4 ;
buffer arg5 = (buffer) NULL ;
int arg6 = (int) 0 ;
wxImage *result = 0 ;
int val1 ;
int ecode1 = 0 ;
int val2 ;
int ecode2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
PyObject * obj3 = 0 ;
char * kwnames[] = {
(char *) "width",(char *) "height",(char *) "data",(char *) "alpha", NULL
};
if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:_ImageFromBuffer",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
ecode1 = SWIG_AsVal_int(obj0, &val1);
if (!SWIG_IsOK(ecode1)) {
SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "_ImageFromBuffer" "', expected argument " "1"" of type '" "int""'");
}
arg1 = static_cast< int >(val1);
ecode2 = SWIG_AsVal_int(obj1, &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "_ImageFromBuffer" "', expected argument " "2"" of type '" "int""'");
}
arg2 = static_cast< int >(val2);
{
if (obj2 != Py_None) {
if (!PyArg_Parse(obj2, "t#", &arg3, &arg4)) SWIG_fail;
}
}
if (obj3) {
{
if (obj3 != Py_None) {
if (!PyArg_Parse(obj3, "t#", &arg5, &arg6)) SWIG_fail;
}
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxImage *)_ImageFromBuffer(arg1,arg2,arg3,arg4,arg5,arg6);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
{
resultobj = wxPyMake_wxObject(result, SWIG_POINTER_OWN);
}
return resultobj;
fail:
return NULL;
}
SWIGINTERN int NullImage_set(PyObject *) {
SWIG_Error(SWIG_AttributeError,"Variable NullImage is read-only.");
return 1;
@@ -28403,6 +28534,26 @@ fail:
}
SWIGINTERN PyObject *_wrap_PyApp_DisplayAvailable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
bool result;
if (!SWIG_Python_UnpackTuple(args,"PyApp_DisplayAvailable",0,0,0)) SWIG_fail;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (bool)wxPyApp_DisplayAvailable();
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
{
resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
}
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *PyApp_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
@@ -37690,6 +37841,77 @@ fail:
}
SWIGINTERN PyObject *_wrap_Window_CanSetTransparent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
wxWindow *arg1 = (wxWindow *) 0 ;
bool result;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject *swig_obj[1] ;
if (!args) SWIG_fail;
swig_obj[0] = args;
res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxWindow, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Window_CanSetTransparent" "', expected argument " "1"" of type '" "wxWindow *""'");
}
arg1 = reinterpret_cast< wxWindow * >(argp1);
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (bool)(arg1)->CanSetTransparent();
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
{
resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
}
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_Window_SetTransparent(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
PyObject *resultobj = 0;
wxWindow *arg1 = (wxWindow *) 0 ;
byte arg2 ;
bool result;
void *argp1 = 0 ;
int res1 = 0 ;
unsigned char val2 ;
int ecode2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char * kwnames[] = {
(char *) "self",(char *) "alpha", NULL
};
if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Window_SetTransparent",kwnames,&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxWindow, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Window_SetTransparent" "', expected argument " "1"" of type '" "wxWindow *""'");
}
arg1 = reinterpret_cast< wxWindow * >(argp1);
ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Window_SetTransparent" "', expected argument " "2"" of type '" "byte""'");
}
arg2 = static_cast< byte >(val2);
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (bool)(arg1)->SetTransparent(arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
{
resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
}
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *Window_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
@@ -52924,6 +53146,7 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"Rect___ne__", (PyCFunction) _wrap_Rect___ne__, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Rect_InsideXY", (PyCFunction) _wrap_Rect_InsideXY, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Rect_Inside", (PyCFunction) _wrap_Rect_Inside, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Rect_InsideRect", (PyCFunction) _wrap_Rect_InsideRect, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Rect_Intersects", (PyCFunction) _wrap_Rect_Intersects, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Rect_CenterIn", (PyCFunction) _wrap_Rect_CenterIn, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Rect_x_set", _wrap_Rect_x_set, METH_VARARGS, NULL},
@@ -53177,6 +53400,7 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"Image_HSVtoRGB", (PyCFunction) _wrap_Image_HSVtoRGB, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Image_swigregister", Image_swigregister, METH_VARARGS, NULL},
{ (char *)"Image_swiginit", Image_swiginit, METH_VARARGS, NULL},
{ (char *)"_ImageFromBuffer", (PyCFunction) _wrap__ImageFromBuffer, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"new_BMPHandler", (PyCFunction)_wrap_new_BMPHandler, METH_NOARGS, NULL},
{ (char *)"BMPHandler_swigregister", BMPHandler_swigregister, METH_VARARGS, NULL},
{ (char *)"BMPHandler_swiginit", BMPHandler_swiginit, METH_VARARGS, NULL},
@@ -53615,6 +53839,7 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"PyApp_SetMacHelpMenuTitleName", (PyCFunction) _wrap_PyApp_SetMacHelpMenuTitleName, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"PyApp__BootstrapApp", (PyCFunction)_wrap_PyApp__BootstrapApp, METH_O, NULL},
{ (char *)"PyApp_GetComCtl32Version", (PyCFunction)_wrap_PyApp_GetComCtl32Version, METH_NOARGS, NULL},
{ (char *)"PyApp_DisplayAvailable", (PyCFunction)_wrap_PyApp_DisplayAvailable, METH_NOARGS, NULL},
{ (char *)"PyApp_swigregister", PyApp_swigregister, METH_VARARGS, NULL},
{ (char *)"PyApp_swiginit", PyApp_swiginit, METH_VARARGS, NULL},
{ (char *)"Exit", (PyCFunction)_wrap_Exit, METH_NOARGS, NULL},
@@ -53879,6 +54104,8 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"Window_GetContainingSizer", (PyCFunction)_wrap_Window_GetContainingSizer, METH_O, NULL},
{ (char *)"Window_InheritAttributes", (PyCFunction)_wrap_Window_InheritAttributes, METH_O, NULL},
{ (char *)"Window_ShouldInheritColours", (PyCFunction)_wrap_Window_ShouldInheritColours, METH_O, NULL},
{ (char *)"Window_CanSetTransparent", (PyCFunction)_wrap_Window_CanSetTransparent, METH_O, NULL},
{ (char *)"Window_SetTransparent", (PyCFunction) _wrap_Window_SetTransparent, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Window_swigregister", Window_swigregister, METH_VARARGS, NULL},
{ (char *)"Window_swiginit", Window_swiginit, METH_VARARGS, NULL},
{ (char *)"FindWindowById", (PyCFunction) _wrap_FindWindowById, METH_VARARGS | METH_KEYWORDS, NULL},
@@ -55975,6 +56202,7 @@ SWIGEXPORT void SWIG_init(void) {
SWIG_Python_SetConstant(d, "ID_HELP",SWIG_From_int(static_cast< int >(wxID_HELP)));
SWIG_Python_SetConstant(d, "ID_PRINT",SWIG_From_int(static_cast< int >(wxID_PRINT)));
SWIG_Python_SetConstant(d, "ID_PRINT_SETUP",SWIG_From_int(static_cast< int >(wxID_PRINT_SETUP)));
SWIG_Python_SetConstant(d, "ID_PAGE_SETUP",SWIG_From_int(static_cast< int >(wxID_PAGE_SETUP)));
SWIG_Python_SetConstant(d, "ID_PREVIEW",SWIG_From_int(static_cast< int >(wxID_PREVIEW)));
SWIG_Python_SetConstant(d, "ID_ABOUT",SWIG_From_int(static_cast< int >(wxID_ABOUT)));
SWIG_Python_SetConstant(d, "ID_HELP_CONTENTS",SWIG_From_int(static_cast< int >(wxID_HELP_CONTENTS)));

View File

@@ -75,6 +75,8 @@ _gdi_.GDIObject_swigregister(GDIObject)
C2S_NAME = _gdi_.C2S_NAME
C2S_CSS_SYNTAX = _gdi_.C2S_CSS_SYNTAX
C2S_HTML_SYNTAX = _gdi_.C2S_HTML_SYNTAX
ALPHA_TRANSPARENT = _gdi_.ALPHA_TRANSPARENT
ALPHA_OPAQUE = _gdi_.ALPHA_OPAQUE
class Colour(_core.Object):
"""
A colour is an object representing a combination of Red, Green, and
@@ -102,7 +104,7 @@ class Colour(_core.Object):
__repr__ = _swig_repr
def __init__(self, *args, **kwargs):
"""
__init__(self, byte red=0, byte green=0, byte blue=0) -> Colour
__init__(self, byte red=0, byte green=0, byte blue=0, byte alpha=ALPHA_OPAQUE) -> Colour
Constructs a colour from red, green and blue values.
@@ -136,6 +138,14 @@ class Colour(_core.Object):
"""
return _gdi_.Colour_Blue(*args, **kwargs)
def Alpha(*args, **kwargs):
"""
Alpha(self) -> byte
Returns the Alpha value.
"""
return _gdi_.Colour_Alpha(*args, **kwargs)
def Ok(*args, **kwargs):
"""
Ok(self) -> bool
@@ -147,7 +157,7 @@ class Colour(_core.Object):
def Set(*args, **kwargs):
"""
Set(self, byte red, byte green, byte blue)
Set(self, byte red, byte green, byte blue, byte alpha=ALPHA_OPAQUE)
Sets the RGB intensity values.
"""
@@ -227,11 +237,11 @@ class Colour(_core.Object):
return _gdi_.Colour_GetRGB(*args, **kwargs)
asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
def __str__(self): return str(self.Get())
def __repr__(self): return 'wx.Colour' + str(self.Get())
def __str__(self): return str(self.Get(True))
def __repr__(self): return 'wx.Colour' + str(self.Get(True))
def __nonzero__(self): return self.Ok()
__safe_for_unpickling__ = True
def __reduce__(self): return (Colour, self.Get())
def __reduce__(self): return (Colour, self.Get(True))
_gdi_.Colour_swigregister(Colour)
@@ -707,6 +717,354 @@ def BitmapFromBits(*args, **kwargs):
val = _gdi_.new_BitmapFromBits(*args, **kwargs)
return val
def _BitmapFromBufferAlpha(*args, **kwargs):
"""_BitmapFromBufferAlpha(int width, int height, buffer data, buffer alpha) -> Bitmap"""
return _gdi_._BitmapFromBufferAlpha(*args, **kwargs)
def _BitmapFromBuffer(*args, **kwargs):
"""_BitmapFromBuffer(int width, int height, buffer data) -> Bitmap"""
return _gdi_._BitmapFromBuffer(*args, **kwargs)
def BitmapFromBuffer(width, height, dataBuffer, alphaBuffer=None):
"""
Creates a `wx.Bitmap` from the data in dataBuffer. The dataBuffer
parameter must be a Python object that implements the buffer interface, or
is convertable to a buffer object, such as a string, array, etc. The
dataBuffer object is expected to contain a series of RGB bytes and be
width*height*3 bytes long. A buffer object can optionally be supplied for
the image's alpha channel data, and it is expected to be width*height
bytes long. On Windows the RGB values are 'premultiplied' by the alpha
values. (The other platforms appear to already be premultiplying the
alpha.)
Unlike `wx.ImageFromBuffer` the bitmap created with this function does not
share the memory buffer with the buffer object. This is because the
native pixel buffer format varies on different platforms, and so instead
an efficient as possible copy of the data is made from the buffer objects
to the bitmap's native pixel buffer. For direct access to a bitmap's
pixel buffer see `wx.NativePixelData` and `wx.AlphaPixelData`.
:see: `wx.Bitmap`, `wx.BitmapFromBufferRGBA`, `wx.NativePixelData`,
`wx.AlphaPixelData`, `wx.ImageFromBuffer`
"""
if not isinstance(dataBuffer, buffer):
dataBuffer = buffer(dataBuffer)
if alphaBuffer is not None and not isinstance(alphaBuffer, buffer):
alphaBuffer = buffer(alphaBuffer)
if alphaBuffer is not None:
return _gdi_._BitmapFromBufferAlpha(width, height, dataBuffer, alphaBuffer)
else:
return _gdi_._BitmapFromBuffer(width, height, dataBuffer)
def _BitmapFromBufferRGBA(*args, **kwargs):
"""_BitmapFromBufferRGBA(int width, int height, buffer data) -> Bitmap"""
return _gdi_._BitmapFromBufferRGBA(*args, **kwargs)
def BitmapFromBufferRGBA(width, height, dataBuffer):
"""
Creates a `wx.Bitmap` from the data in dataBuffer. The dataBuffer
parameter must be a Python object that implements the buffer interface, or
is convertable to a buffer object, such as a string, array, etc. The
dataBuffer object is expected to contain a series of RGBA bytes (red,
green, blue and alpha) and be width*height*4 bytes long. On Windows the
RGB values are 'premultiplied' by the alpha values. (The other platforms
appear to already be premultiplying the alpha.)
Unlike `wx.ImageFromBuffer` the bitmap created with this function does not
share the memory buffer with the buffer object. This is because the
native pixel buffer format varies on different platforms, and so instead
an efficient as possible copy of the data is made from the buffer object
to the bitmap's native pixel buffer. For direct access to a bitmap's
pixel buffer see `wx.NativePixelData` and `wx.AlphaPixelData`.
:see: `wx.Bitmap`, `wx.BitmapFromBuffer`, `wx.NativePixelData`,
`wx.AlphaPixelData`, `wx.ImageFromBuffer`
"""
if not isinstance(dataBuffer, buffer):
dataBuffer = buffer(dataBuffer)
return _gdi_._BitmapFromBufferRGBA(width, height, dataBuffer)
class PixelDataBase(object):
"""Proxy of C++ PixelDataBase class"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
def __init__(self): raise AttributeError, "No constructor defined"
__repr__ = _swig_repr
def GetOrigin(*args, **kwargs):
"""GetOrigin(self) -> Point"""
return _gdi_.PixelDataBase_GetOrigin(*args, **kwargs)
def GetWidth(*args, **kwargs):
"""GetWidth(self) -> int"""
return _gdi_.PixelDataBase_GetWidth(*args, **kwargs)
def GetHeight(*args, **kwargs):
"""GetHeight(self) -> int"""
return _gdi_.PixelDataBase_GetHeight(*args, **kwargs)
def GetSize(*args, **kwargs):
"""GetSize(self) -> Size"""
return _gdi_.PixelDataBase_GetSize(*args, **kwargs)
def GetRowStride(*args, **kwargs):
"""GetRowStride(self) -> int"""
return _gdi_.PixelDataBase_GetRowStride(*args, **kwargs)
_gdi_.PixelDataBase_swigregister(PixelDataBase)
class NativePixelData(PixelDataBase):
"""Proxy of C++ NativePixelData class"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
"""
__init__(self, Bitmap bmp) -> NativePixelData
__init__(self, Bitmap bmp, Rect rect) -> NativePixelData
__init__(self, Bitmap bmp, Point pt, Size sz) -> NativePixelData
"""
_gdi_.NativePixelData_swiginit(self,_gdi_.new_NativePixelData(*args))
__swig_destroy__ = _gdi_.delete_NativePixelData
__del__ = lambda self : None;
def GetPixels(*args, **kwargs):
"""GetPixels(self) -> NativePixelData_Accessor"""
return _gdi_.NativePixelData_GetPixels(*args, **kwargs)
def UseAlpha(*args, **kwargs):
"""UseAlpha(self)"""
return _gdi_.NativePixelData_UseAlpha(*args, **kwargs)
def __nonzero__(*args, **kwargs):
"""__nonzero__(self) -> bool"""
return _gdi_.NativePixelData___nonzero__(*args, **kwargs)
def __iter__(self):
"""Create and return an iterator object for this pixel data object."""
return self.PixelIterator(self)
class PixelIterator(object):
"""
Sequential iterator which returns pixel accessor objects starting at the
the top-left corner, and going row-by-row until the bottom-right
corner is reached.
"""
class PixelAccessor(object):
"""
This class is what is returned by the iterator and allows the pixel
to be Get or Set.
"""
def __init__(self, data, pixels, x, y):
self.data = data
self.pixels = pixels
self.x = x
self.y = y
def Set(self, *args, **kw):
self.pixels.MoveTo(self.data, self.x, self.y)
return self.pixels.Set(*args, **kw)
def Get(self):
self.pixels.MoveTo(self.data, self.x, self.y)
return self.pixels.Get()
def __init__(self, pixelData):
self.x = self.y = 0
self.w = pixelData.GetWidth()
self.h = pixelData.GetHeight()
self.data = pixelData
self.pixels = pixelData.GetPixels()
def __iter__(self):
return self
def next(self):
if self.y >= self.h:
raise StopIteration
p = self.PixelAccessor(self.data, self.pixels, self.x, self.y)
self.x += 1
if self.x >= self.w:
self.x = 0
self.y += 1
return p
_gdi_.NativePixelData_swigregister(NativePixelData)
class NativePixelData_Accessor(object):
"""Proxy of C++ NativePixelData_Accessor class"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
"""
__init__(self, NativePixelData data) -> NativePixelData_Accessor
__init__(self, Bitmap bmp, NativePixelData data) -> NativePixelData_Accessor
__init__(self) -> NativePixelData_Accessor
"""
_gdi_.NativePixelData_Accessor_swiginit(self,_gdi_.new_NativePixelData_Accessor(*args))
__swig_destroy__ = _gdi_.delete_NativePixelData_Accessor
__del__ = lambda self : None;
def Reset(*args, **kwargs):
"""Reset(self, NativePixelData data)"""
return _gdi_.NativePixelData_Accessor_Reset(*args, **kwargs)
def IsOk(*args, **kwargs):
"""IsOk(self) -> bool"""
return _gdi_.NativePixelData_Accessor_IsOk(*args, **kwargs)
def nextPixel(*args, **kwargs):
"""nextPixel(self)"""
return _gdi_.NativePixelData_Accessor_nextPixel(*args, **kwargs)
def Offset(*args, **kwargs):
"""Offset(self, NativePixelData data, int x, int y)"""
return _gdi_.NativePixelData_Accessor_Offset(*args, **kwargs)
def OffsetX(*args, **kwargs):
"""OffsetX(self, NativePixelData data, int x)"""
return _gdi_.NativePixelData_Accessor_OffsetX(*args, **kwargs)
def OffsetY(*args, **kwargs):
"""OffsetY(self, NativePixelData data, int y)"""
return _gdi_.NativePixelData_Accessor_OffsetY(*args, **kwargs)
def MoveTo(*args, **kwargs):
"""MoveTo(self, NativePixelData data, int x, int y)"""
return _gdi_.NativePixelData_Accessor_MoveTo(*args, **kwargs)
def Set(*args, **kwargs):
"""Set(self, byte red, byte green, byte blue)"""
return _gdi_.NativePixelData_Accessor_Set(*args, **kwargs)
def Get(*args, **kwargs):
"""Get(self) -> PyObject"""
return _gdi_.NativePixelData_Accessor_Get(*args, **kwargs)
_gdi_.NativePixelData_Accessor_swigregister(NativePixelData_Accessor)
class AlphaPixelData(PixelDataBase):
"""Proxy of C++ AlphaPixelData class"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
"""
__init__(self, Bitmap bmp) -> AlphaPixelData
__init__(self, Bitmap bmp, Rect rect) -> AlphaPixelData
__init__(self, Bitmap bmp, Point pt, Size sz) -> AlphaPixelData
"""
_gdi_.AlphaPixelData_swiginit(self,_gdi_.new_AlphaPixelData(*args))
self.UseAlpha()
__swig_destroy__ = _gdi_.delete_AlphaPixelData
__del__ = lambda self : None;
def GetPixels(*args, **kwargs):
"""GetPixels(self) -> AlphaPixelData_Accessor"""
return _gdi_.AlphaPixelData_GetPixels(*args, **kwargs)
def UseAlpha(*args, **kwargs):
"""UseAlpha(self)"""
return _gdi_.AlphaPixelData_UseAlpha(*args, **kwargs)
def __nonzero__(*args, **kwargs):
"""__nonzero__(self) -> bool"""
return _gdi_.AlphaPixelData___nonzero__(*args, **kwargs)
def __iter__(self):
"""Create and return an iterator object for this pixel data object."""
return self.PixelIterator(self)
class PixelIterator(object):
"""
Sequential iterator which returns pixel accessor objects starting at the
the top-left corner, and going row-by-row until the bottom-right
corner is reached.
"""
class PixelAccessor(object):
"""
This class is what is returned by the iterator and allows the pixel
to be Get or Set.
"""
def __init__(self, data, pixels, x, y):
self.data = data
self.pixels = pixels
self.x = x
self.y = y
def Set(self, *args, **kw):
self.pixels.MoveTo(self.data, self.x, self.y)
return self.pixels.Set(*args, **kw)
def Get(self):
self.pixels.MoveTo(self.data, self.x, self.y)
return self.pixels.Get()
def __init__(self, pixelData):
self.x = self.y = 0
self.w = pixelData.GetWidth()
self.h = pixelData.GetHeight()
self.data = pixelData
self.pixels = pixelData.GetPixels()
def __iter__(self):
return self
def next(self):
if self.y >= self.h:
raise StopIteration
p = self.PixelAccessor(self.data, self.pixels, self.x, self.y)
self.x += 1
if self.x >= self.w:
self.x = 0
self.y += 1
return p
_gdi_.AlphaPixelData_swigregister(AlphaPixelData)
class AlphaPixelData_Accessor(object):
"""Proxy of C++ AlphaPixelData_Accessor class"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
"""
__init__(self, AlphaPixelData data) -> AlphaPixelData_Accessor
__init__(self, Bitmap bmp, AlphaPixelData data) -> AlphaPixelData_Accessor
__init__(self) -> AlphaPixelData_Accessor
"""
_gdi_.AlphaPixelData_Accessor_swiginit(self,_gdi_.new_AlphaPixelData_Accessor(*args))
__swig_destroy__ = _gdi_.delete_AlphaPixelData_Accessor
__del__ = lambda self : None;
def Reset(*args, **kwargs):
"""Reset(self, AlphaPixelData data)"""
return _gdi_.AlphaPixelData_Accessor_Reset(*args, **kwargs)
def IsOk(*args, **kwargs):
"""IsOk(self) -> bool"""
return _gdi_.AlphaPixelData_Accessor_IsOk(*args, **kwargs)
def nextPixel(*args, **kwargs):
"""nextPixel(self)"""
return _gdi_.AlphaPixelData_Accessor_nextPixel(*args, **kwargs)
def Offset(*args, **kwargs):
"""Offset(self, AlphaPixelData data, int x, int y)"""
return _gdi_.AlphaPixelData_Accessor_Offset(*args, **kwargs)
def OffsetX(*args, **kwargs):
"""OffsetX(self, AlphaPixelData data, int x)"""
return _gdi_.AlphaPixelData_Accessor_OffsetX(*args, **kwargs)
def OffsetY(*args, **kwargs):
"""OffsetY(self, AlphaPixelData data, int y)"""
return _gdi_.AlphaPixelData_Accessor_OffsetY(*args, **kwargs)
def MoveTo(*args, **kwargs):
"""MoveTo(self, AlphaPixelData data, int x, int y)"""
return _gdi_.AlphaPixelData_Accessor_MoveTo(*args, **kwargs)
def Set(*args, **kwargs):
"""Set(self, byte red, byte green, byte blue, byte alpha)"""
return _gdi_.AlphaPixelData_Accessor_Set(*args, **kwargs)
def Get(*args, **kwargs):
"""Get(self) -> PyObject"""
return _gdi_.AlphaPixelData_Accessor_Get(*args, **kwargs)
_gdi_.AlphaPixelData_Accessor_swigregister(AlphaPixelData_Accessor)
class Mask(_core.Object):
"""
This class encapsulates a monochrome mask bitmap, where the masked
@@ -2338,6 +2696,34 @@ def Locale_AddLanguage(*args, **kwargs):
"""Locale_AddLanguage(LanguageInfo info)"""
return _gdi_.Locale_AddLanguage(*args, **kwargs)
class PyLocale(Locale):
"""Proxy of C++ PyLocale class"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args, **kwargs):
"""__init__(self, int language=-1, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> PyLocale"""
_gdi_.PyLocale_swiginit(self,_gdi_.new_PyLocale(*args, **kwargs))
self._setCallbackInfo(self, PyLocale)
__swig_destroy__ = _gdi_.delete_PyLocale
__del__ = lambda self : None;
def _setCallbackInfo(*args, **kwargs):
"""_setCallbackInfo(self, PyObject self, PyObject _class)"""
return _gdi_.PyLocale__setCallbackInfo(*args, **kwargs)
def GetSingularString(*args, **kwargs):
"""GetSingularString(self, wxChar szOrigString, wxChar szDomain=None) -> wxChar"""
return _gdi_.PyLocale_GetSingularString(*args, **kwargs)
def GetPluralString(*args, **kwargs):
"""
GetPluralString(self, wxChar szOrigString, wxChar szOrigString2, size_t n,
wxChar szDomain=None) -> wxChar
"""
return _gdi_.PyLocale_GetPluralString(*args, **kwargs)
_gdi_.PyLocale_swigregister(PyLocale)
def GetLocale(*args):
"""GetLocale() -> Locale"""
@@ -2389,7 +2775,9 @@ _gdi_.EncodingConverter_swigregister(EncodingConverter)
def GetTranslation(*args):
"""
GetTranslation(String str) -> String
GetTranslation(String str, String domain) -> String
GetTranslation(String str, String strPlural, size_t n) -> String
GetTranslation(String str, String strPlural, size_t n, String domain) -> String
"""
return _gdi_.GetTranslation(*args)
@@ -3208,7 +3596,7 @@ class DC(_core.Object):
def GetMultiLineTextExtent(*args, **kwargs):
"""
GetMultiLineTextExtent(wxString string, Font font=None) ->
(width, height, descent, externalLeading)
(width, height, lineHeight)
Get the width, height, decent and leading of the text using the
current or specified font. Works for single as well as multi-line

File diff suppressed because it is too large Load Diff

View File

@@ -328,41 +328,6 @@ def Shell(*args, **kwargs):
def StartTimer(*args):
"""StartTimer()"""
return _misc_.StartTimer(*args)
UNKNOWN_PLATFORM = _misc_.UNKNOWN_PLATFORM
CURSES = _misc_.CURSES
XVIEW_X = _misc_.XVIEW_X
MOTIF_X = _misc_.MOTIF_X
COSE_X = _misc_.COSE_X
NEXTSTEP = _misc_.NEXTSTEP
MAC = _misc_.MAC
MAC_DARWIN = _misc_.MAC_DARWIN
BEOS = _misc_.BEOS
GTK = _misc_.GTK
GTK_WIN32 = _misc_.GTK_WIN32
GTK_OS2 = _misc_.GTK_OS2
GTK_BEOS = _misc_.GTK_BEOS
GEOS = _misc_.GEOS
OS2_PM = _misc_.OS2_PM
WINDOWS = _misc_.WINDOWS
MICROWINDOWS = _misc_.MICROWINDOWS
PENWINDOWS = _misc_.PENWINDOWS
WINDOWS_NT = _misc_.WINDOWS_NT
WIN32S = _misc_.WIN32S
WIN95 = _misc_.WIN95
WIN386 = _misc_.WIN386
WINDOWS_CE = _misc_.WINDOWS_CE
WINDOWS_POCKETPC = _misc_.WINDOWS_POCKETPC
WINDOWS_SMARTPHONE = _misc_.WINDOWS_SMARTPHONE
MGL_UNIX = _misc_.MGL_UNIX
MGL_X = _misc_.MGL_X
MGL_WIN32 = _misc_.MGL_WIN32
MGL_OS2 = _misc_.MGL_OS2
MGL_DOS = _misc_.MGL_DOS
WINDOWS_OS2 = _misc_.WINDOWS_OS2
UNIX = _misc_.UNIX
X11 = _misc_.X11
PALMOS = _misc_.PALMOS
DOS = _misc_.DOS
def GetOsVersion(*args):
"""GetOsVersion() -> (platform, major, minor)"""
@@ -372,6 +337,14 @@ def GetOsDescription(*args):
"""GetOsDescription() -> String"""
return _misc_.GetOsDescription(*args)
def IsPlatformLittleEndian(*args):
"""IsPlatformLittleEndian() -> bool"""
return _misc_.IsPlatformLittleEndian(*args)
def IsPlatform64Bit(*args):
"""IsPlatform64Bit() -> bool"""
return _misc_.IsPlatform64Bit(*args)
def GetFreeMemory(*args):
"""GetFreeMemory() -> wxMemorySize"""
return _misc_.GetFreeMemory(*args)
@@ -1051,6 +1024,155 @@ def PreSingleInstanceChecker(*args, **kwargs):
val = _misc_.new_PreSingleInstanceChecker(*args, **kwargs)
return val
#---------------------------------------------------------------------------
OS_UNKNOWN = _misc_.OS_UNKNOWN
OS_MAC_OS = _misc_.OS_MAC_OS
OS_MAC_OSX_DARWIN = _misc_.OS_MAC_OSX_DARWIN
OS_MAC = _misc_.OS_MAC
OS_WINDOWS_9X = _misc_.OS_WINDOWS_9X
OS_WINDOWS_NT = _misc_.OS_WINDOWS_NT
OS_WINDOWS_MICRO = _misc_.OS_WINDOWS_MICRO
OS_WINDOWS_CE = _misc_.OS_WINDOWS_CE
OS_WINDOWS = _misc_.OS_WINDOWS
OS_UNIX_LINUX = _misc_.OS_UNIX_LINUX
OS_UNIX_FREEBSD = _misc_.OS_UNIX_FREEBSD
OS_UNIX_OPENBSD = _misc_.OS_UNIX_OPENBSD
OS_UNIX_NETBSD = _misc_.OS_UNIX_NETBSD
OS_UNIX_SOLARIS = _misc_.OS_UNIX_SOLARIS
OS_UNIX_AIX = _misc_.OS_UNIX_AIX
OS_UNIX_HPUX = _misc_.OS_UNIX_HPUX
OS_UNIX = _misc_.OS_UNIX
OS_DOS = _misc_.OS_DOS
OS_OS2 = _misc_.OS_OS2
PORT_UNKNOWN = _misc_.PORT_UNKNOWN
PORT_BASE = _misc_.PORT_BASE
PORT_MSW = _misc_.PORT_MSW
PORT_MOTIF = _misc_.PORT_MOTIF
PORT_GTK = _misc_.PORT_GTK
PORT_MGL = _misc_.PORT_MGL
PORT_X11 = _misc_.PORT_X11
PORT_PM = _misc_.PORT_PM
PORT_OS2 = _misc_.PORT_OS2
PORT_MAC = _misc_.PORT_MAC
PORT_COCOA = _misc_.PORT_COCOA
PORT_WINCE = _misc_.PORT_WINCE
PORT_PALMOS = _misc_.PORT_PALMOS
PORT_DFB = _misc_.PORT_DFB
ARCH_INVALID = _misc_.ARCH_INVALID
ARCH_32 = _misc_.ARCH_32
ARCH_64 = _misc_.ARCH_64
ARCH_MAX = _misc_.ARCH_MAX
ENDIAN_INVALID = _misc_.ENDIAN_INVALID
ENDIAN_BIG = _misc_.ENDIAN_BIG
ENDIAN_LITTLE = _misc_.ENDIAN_LITTLE
ENDIAN_PDP = _misc_.ENDIAN_PDP
ENDIAN_MAX = _misc_.ENDIAN_MAX
class PlatformInformation(object):
"""Proxy of C++ PlatformInformation class"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args, **kwargs):
"""__init__(self) -> PlatformInformation"""
_misc_.PlatformInformation_swiginit(self,_misc_.new_PlatformInformation(*args, **kwargs))
def __eq__(*args, **kwargs):
"""__eq__(self, PlatformInformation t) -> bool"""
return _misc_.PlatformInformation___eq__(*args, **kwargs)
def __ne__(*args, **kwargs):
"""__ne__(self, PlatformInformation t) -> bool"""
return _misc_.PlatformInformation___ne__(*args, **kwargs)
def GetOSMajorVersion(*args, **kwargs):
"""GetOSMajorVersion(self) -> int"""
return _misc_.PlatformInformation_GetOSMajorVersion(*args, **kwargs)
def GetOSMinorVersion(*args, **kwargs):
"""GetOSMinorVersion(self) -> int"""
return _misc_.PlatformInformation_GetOSMinorVersion(*args, **kwargs)
def GetToolkitMajorVersion(*args, **kwargs):
"""GetToolkitMajorVersion(self) -> int"""
return _misc_.PlatformInformation_GetToolkitMajorVersion(*args, **kwargs)
def GetToolkitMinorVersion(*args, **kwargs):
"""GetToolkitMinorVersion(self) -> int"""
return _misc_.PlatformInformation_GetToolkitMinorVersion(*args, **kwargs)
def IsUsingUniversalWidgets(*args, **kwargs):
"""IsUsingUniversalWidgets(self) -> bool"""
return _misc_.PlatformInformation_IsUsingUniversalWidgets(*args, **kwargs)
def GetOperatingSystemId(*args, **kwargs):
"""GetOperatingSystemId(self) -> int"""
return _misc_.PlatformInformation_GetOperatingSystemId(*args, **kwargs)
def GetPortId(*args, **kwargs):
"""GetPortId(self) -> int"""
return _misc_.PlatformInformation_GetPortId(*args, **kwargs)
def GetArchitecture(*args, **kwargs):
"""GetArchitecture(self) -> int"""
return _misc_.PlatformInformation_GetArchitecture(*args, **kwargs)
def GetEndianness(*args, **kwargs):
"""GetEndianness(self) -> int"""
return _misc_.PlatformInformation_GetEndianness(*args, **kwargs)
def GetOperatingSystemFamilyName(*args, **kwargs):
"""GetOperatingSystemFamilyName(self) -> String"""
return _misc_.PlatformInformation_GetOperatingSystemFamilyName(*args, **kwargs)
def GetOperatingSystemIdName(*args, **kwargs):
"""GetOperatingSystemIdName(self) -> String"""
return _misc_.PlatformInformation_GetOperatingSystemIdName(*args, **kwargs)
def GetPortIdName(*args, **kwargs):
"""GetPortIdName(self) -> String"""
return _misc_.PlatformInformation_GetPortIdName(*args, **kwargs)
def GetPortIdShortName(*args, **kwargs):
"""GetPortIdShortName(self) -> String"""
return _misc_.PlatformInformation_GetPortIdShortName(*args, **kwargs)
def GetArchName(*args, **kwargs):
"""GetArchName(self) -> String"""
return _misc_.PlatformInformation_GetArchName(*args, **kwargs)
def GetEndiannessName(*args, **kwargs):
"""GetEndiannessName(self) -> String"""
return _misc_.PlatformInformation_GetEndiannessName(*args, **kwargs)
def SetOSVersion(*args, **kwargs):
"""SetOSVersion(self, int major, int minor)"""
return _misc_.PlatformInformation_SetOSVersion(*args, **kwargs)
def SetToolkitVersion(*args, **kwargs):
"""SetToolkitVersion(self, int major, int minor)"""
return _misc_.PlatformInformation_SetToolkitVersion(*args, **kwargs)
def SetOperatingSystemId(*args, **kwargs):
"""SetOperatingSystemId(self, int n)"""
return _misc_.PlatformInformation_SetOperatingSystemId(*args, **kwargs)
def SetPortId(*args, **kwargs):
"""SetPortId(self, int n)"""
return _misc_.PlatformInformation_SetPortId(*args, **kwargs)
def SetArchitecture(*args, **kwargs):
"""SetArchitecture(self, int n)"""
return _misc_.PlatformInformation_SetArchitecture(*args, **kwargs)
def SetEndianness(*args, **kwargs):
"""SetEndianness(self, int n)"""
return _misc_.PlatformInformation_SetEndianness(*args, **kwargs)
def IsOk(*args, **kwargs):
"""IsOk(self) -> bool"""
return _misc_.PlatformInformation_IsOk(*args, **kwargs)
_misc_.PlatformInformation_swigregister(PlatformInformation)
def DrawWindowOnDC(*args, **kwargs):
"""DrawWindowOnDC(Window window, DC dc) -> bool"""
@@ -4891,7 +5013,7 @@ class URLDataObject(DataObject):
__repr__ = _swig_repr
def __init__(self, *args, **kwargs):
"""
__init__(self) -> URLDataObject
__init__(self, String url=EmptyString) -> URLDataObject
This data object holds a URL in a format that is compatible with some
browsers such that it is able to be dragged to or from them.

File diff suppressed because one or more lines are too long

View File

@@ -328,10 +328,13 @@ FRAME_SHAPED = _windows_.FRAME_SHAPED
FRAME_DRAWER = _windows_.FRAME_DRAWER
FRAME_EX_METAL = _windows_.FRAME_EX_METAL
DIALOG_EX_METAL = _windows_.DIALOG_EX_METAL
WS_EX_CONTEXTHELP = _windows_.WS_EX_CONTEXTHELP
DIALOG_MODAL = _windows_.DIALOG_MODAL
DIALOG_MODELESS = _windows_.DIALOG_MODELESS
USER_COLOURS = _windows_.USER_COLOURS
NO_3D = _windows_.NO_3D
FRAME_EX_CONTEXTHELP = _windows_.FRAME_EX_CONTEXTHELP
DIALOG_EX_CONTEXTHELP = _windows_.DIALOG_EX_CONTEXTHELP
FULLSCREEN_NOMENUBAR = _windows_.FULLSCREEN_NOMENUBAR
FULLSCREEN_NOTOOLBAR = _windows_.FULLSCREEN_NOTOOLBAR
FULLSCREEN_NOSTATUSBAR = _windows_.FULLSCREEN_NOSTATUSBAR
@@ -431,14 +434,6 @@ class TopLevelWindow(_core.Window):
"""EnableCloseButton(self, bool enable=True) -> bool"""
return _windows_.TopLevelWindow_EnableCloseButton(*args, **kwargs)
def SetTransparent(*args, **kwargs):
"""SetTransparent(self, byte alpha) -> bool"""
return _windows_.TopLevelWindow_SetTransparent(*args, **kwargs)
def CanSetTransparent(*args, **kwargs):
"""CanSetTransparent(self) -> bool"""
return _windows_.TopLevelWindow_CanSetTransparent(*args, **kwargs)
def GetDefaultItem(*args, **kwargs):
"""
GetDefaultItem(self) -> Window
@@ -1752,19 +1747,11 @@ class VScrolledWindow(Panel):
return _windows_.VScrolledWindow_RefreshLines(*args, **kwargs)
def HitTestXY(*args, **kwargs):
"""
HitTestXY(self, int x, int y) -> int
Test where the given (in client coords) point lies
"""
"""HitTestXY(self, int x, int y) -> int"""
return _windows_.VScrolledWindow_HitTestXY(*args, **kwargs)
def HitTest(*args, **kwargs):
"""
HitTest(self, Point pt) -> int
Test where the given (in client coords) point lies
"""
"""HitTest(self, Point pt) -> int"""
return _windows_.VScrolledWindow_HitTest(*args, **kwargs)
def RefreshAll(*args, **kwargs):

View File

@@ -2830,35 +2830,6 @@ SWIGINTERN void wxTopLevelWindow_MacSetMetalAppearance(wxTopLevelWindow *self,bo
}
SWIGINTERN bool wxTopLevelWindow_EnableCloseButton(wxTopLevelWindow *self,bool enable=true){ return false; }
SWIGINTERN int
SWIG_AsVal_unsigned_SS_long (PyObject* obj, unsigned long* val)
{
long v = 0;
if (SWIG_AsVal_long(obj, &v) && v < 0) {
return SWIG_TypeError;
}
else if (val)
*val = (unsigned long)v;
return SWIG_OK;
}
SWIGINTERN int
SWIG_AsVal_unsigned_SS_char (PyObject * obj, unsigned char *val)
{
unsigned long v;
int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
if (SWIG_IsOK(res)) {
if ((v > UCHAR_MAX)) {
return SWIG_OverflowError;
} else {
if (val) *val = static_cast< unsigned char >(v);
}
}
return res;
}
SWIGINTERN wxRect wxStatusBar_GetFieldRect(wxStatusBar *self,int i){
wxRect r;
@@ -2976,6 +2947,19 @@ IMP_PYCALLBACK_VOID_SIZETSIZET_const(wxPyVScrolledWindow, wxVScrolledWindow, OnG
IMP_PYCALLBACK_COORD_const (wxPyVScrolledWindow, wxVScrolledWindow, EstimateTotalHeight);
SWIGINTERN int
SWIG_AsVal_unsigned_SS_long (PyObject* obj, unsigned long* val)
{
long v = 0;
if (SWIG_AsVal_long(obj, &v) && v < 0) {
return SWIG_TypeError;
}
else if (val)
*val = (unsigned long)v;
return SWIG_OK;
}
SWIGINTERNINLINE int
SWIG_AsVal_size_t (PyObject * obj, size_t *val)
{
@@ -6107,77 +6091,6 @@ fail:
}
SWIGINTERN PyObject *_wrap_TopLevelWindow_SetTransparent(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
PyObject *resultobj = 0;
wxTopLevelWindow *arg1 = (wxTopLevelWindow *) 0 ;
byte arg2 ;
bool result;
void *argp1 = 0 ;
int res1 = 0 ;
unsigned char val2 ;
int ecode2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char * kwnames[] = {
(char *) "self",(char *) "alpha", NULL
};
if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TopLevelWindow_SetTransparent",kwnames,&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxTopLevelWindow, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TopLevelWindow_SetTransparent" "', expected argument " "1"" of type '" "wxTopLevelWindow *""'");
}
arg1 = reinterpret_cast< wxTopLevelWindow * >(argp1);
ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TopLevelWindow_SetTransparent" "', expected argument " "2"" of type '" "byte""'");
}
arg2 = static_cast< byte >(val2);
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (bool)(arg1)->SetTransparent(arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
{
resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
}
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_TopLevelWindow_CanSetTransparent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
wxTopLevelWindow *arg1 = (wxTopLevelWindow *) 0 ;
bool result;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject *swig_obj[1] ;
if (!args) SWIG_fail;
swig_obj[0] = args;
res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxTopLevelWindow, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TopLevelWindow_CanSetTransparent" "', expected argument " "1"" of type '" "wxTopLevelWindow *""'");
}
arg1 = reinterpret_cast< wxTopLevelWindow * >(argp1);
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (bool)(arg1)->CanSetTransparent();
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
{
resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
}
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_TopLevelWindow_GetDefaultItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
wxTopLevelWindow *arg1 = (wxTopLevelWindow *) 0 ;
@@ -30893,8 +30806,6 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"TopLevelWindow_MacGetMetalAppearance", (PyCFunction)_wrap_TopLevelWindow_MacGetMetalAppearance, METH_O, NULL},
{ (char *)"TopLevelWindow_CenterOnScreen", (PyCFunction) _wrap_TopLevelWindow_CenterOnScreen, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"TopLevelWindow_EnableCloseButton", (PyCFunction) _wrap_TopLevelWindow_EnableCloseButton, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"TopLevelWindow_SetTransparent", (PyCFunction) _wrap_TopLevelWindow_SetTransparent, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"TopLevelWindow_CanSetTransparent", (PyCFunction)_wrap_TopLevelWindow_CanSetTransparent, METH_O, NULL},
{ (char *)"TopLevelWindow_GetDefaultItem", (PyCFunction)_wrap_TopLevelWindow_GetDefaultItem, METH_O, NULL},
{ (char *)"TopLevelWindow_SetDefaultItem", (PyCFunction) _wrap_TopLevelWindow_SetDefaultItem, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"TopLevelWindow_SetTmpDefaultItem", (PyCFunction) _wrap_TopLevelWindow_SetTmpDefaultItem, METH_VARARGS | METH_KEYWORDS, NULL},
@@ -33843,10 +33754,13 @@ SWIGEXPORT void SWIG_init(void) {
SWIG_Python_SetConstant(d, "FRAME_DRAWER",SWIG_From_int(static_cast< int >(wxFRAME_DRAWER)));
SWIG_Python_SetConstant(d, "FRAME_EX_METAL",SWIG_From_int(static_cast< int >(wxFRAME_EX_METAL)));
SWIG_Python_SetConstant(d, "DIALOG_EX_METAL",SWIG_From_int(static_cast< int >(wxDIALOG_EX_METAL)));
SWIG_Python_SetConstant(d, "WS_EX_CONTEXTHELP",SWIG_From_int(static_cast< int >(wxWS_EX_CONTEXTHELP)));
SWIG_Python_SetConstant(d, "DIALOG_MODAL",SWIG_From_int(static_cast< int >(wxDIALOG_MODAL)));
SWIG_Python_SetConstant(d, "DIALOG_MODELESS",SWIG_From_int(static_cast< int >(wxDIALOG_MODELESS)));
SWIG_Python_SetConstant(d, "USER_COLOURS",SWIG_From_int(static_cast< int >(wxUSER_COLOURS)));
SWIG_Python_SetConstant(d, "NO_3D",SWIG_From_int(static_cast< int >(wxNO_3D)));
SWIG_Python_SetConstant(d, "FRAME_EX_CONTEXTHELP",SWIG_From_int(static_cast< int >(wxFRAME_EX_CONTEXTHELP)));
SWIG_Python_SetConstant(d, "DIALOG_EX_CONTEXTHELP",SWIG_From_int(static_cast< int >(wxDIALOG_EX_CONTEXTHELP)));
SWIG_Python_SetConstant(d, "FULLSCREEN_NOMENUBAR",SWIG_From_int(static_cast< int >(wxFULLSCREEN_NOMENUBAR)));
SWIG_Python_SetConstant(d, "FULLSCREEN_NOTOOLBAR",SWIG_From_int(static_cast< int >(wxFULLSCREEN_NOTOOLBAR)));
SWIG_Python_SetConstant(d, "FULLSCREEN_NOSTATUSBAR",SWIG_From_int(static_cast< int >(wxFULLSCREEN_NOSTATUSBAR)));

View File

@@ -91,6 +91,8 @@ class CalendarDateAttr(object):
Create a CalendarDateAttr.
"""
_calendar.CalendarDateAttr_swiginit(self,_calendar.new_CalendarDateAttr(*args, **kwargs))
__swig_destroy__ = _calendar.delete_CalendarDateAttr
__del__ = lambda self : None;
def SetTextColour(*args, **kwargs):
"""SetTextColour(self, Colour colText)"""
return _calendar.CalendarDateAttr_SetTextColour(*args, **kwargs)
@@ -217,7 +219,7 @@ class CalendarCtrl(_core.Control):
An item without custom attributes is drawn with the default colours
and font and without border, but setting custom attributes with
SetAttr allows to modify its appearance. Just create a custom
`SetAttr` allows to modify its appearance. Just create a custom
attribute object and set it for the day you want to be displayed
specially A day may be marked as being a holiday, (even if it is not
recognized as one by `wx.DateTime`) by using the SetHoliday method.

View File

@@ -2855,6 +2855,34 @@ fail:
}
SWIGINTERN PyObject *_wrap_delete_CalendarDateAttr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
wxCalendarDateAttr *arg1 = (wxCalendarDateAttr *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject *swig_obj[1] ;
if (!args) SWIG_fail;
swig_obj[0] = args;
res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxCalendarDateAttr, SWIG_POINTER_DISOWN | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CalendarDateAttr" "', expected argument " "1"" of type '" "wxCalendarDateAttr *""'");
}
arg1 = reinterpret_cast< wxCalendarDateAttr * >(argp1);
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
delete arg1;
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
resultobj = SWIG_Py_Void();
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_CalendarDateAttr_SetTextColour(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
PyObject *resultobj = 0;
wxCalendarDateAttr *arg1 = (wxCalendarDateAttr *) 0 ;
@@ -4534,7 +4562,6 @@ SWIGINTERN PyObject *_wrap_CalendarCtrl_SetAttr(PyObject *SWIGUNUSEDPARM(self),
int res1 = 0 ;
size_t val2 ;
int ecode2 = 0 ;
void *argp3 = 0 ;
int res3 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
@@ -4554,11 +4581,10 @@ SWIGINTERN PyObject *_wrap_CalendarCtrl_SetAttr(PyObject *SWIGUNUSEDPARM(self),
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CalendarCtrl_SetAttr" "', expected argument " "2"" of type '" "size_t""'");
}
arg2 = static_cast< size_t >(val2);
res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_wxCalendarDateAttr, 0 | 0 );
res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&arg3), SWIGTYPE_p_wxCalendarDateAttr, SWIG_POINTER_DISOWN | 0 );
if (!SWIG_IsOK(res3)) {
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CalendarCtrl_SetAttr" "', expected argument " "3"" of type '" "wxCalendarDateAttr *""'");
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CalendarCtrl_SetAttr" "', expected argument " "3"" of type '" "wxCalendarDateAttr *""'");
}
arg3 = reinterpret_cast< wxCalendarDateAttr * >(argp3);
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
(arg1)->SetAttr(arg2,arg3);
@@ -4791,6 +4817,7 @@ SWIGINTERN PyObject *CalendarCtrl_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObj
static PyMethodDef SwigMethods[] = {
{ (char *)"new_CalendarDateAttr", (PyCFunction) _wrap_new_CalendarDateAttr, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"delete_CalendarDateAttr", (PyCFunction)_wrap_delete_CalendarDateAttr, METH_O, NULL},
{ (char *)"CalendarDateAttr_SetTextColour", (PyCFunction) _wrap_CalendarDateAttr_SetTextColour, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"CalendarDateAttr_SetBackgroundColour", (PyCFunction) _wrap_CalendarDateAttr_SetBackgroundColour, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"CalendarDateAttr_SetBorderColour", (PyCFunction) _wrap_CalendarDateAttr_SetBorderColour, METH_VARARGS | METH_KEYWORDS, NULL},

View File

@@ -80,13 +80,6 @@ HTML_INDENT_ALL = _html.HTML_INDENT_ALL
HTML_COND_ISANCHOR = _html.HTML_COND_ISANCHOR
HTML_COND_ISIMAGEMAP = _html.HTML_COND_ISIMAGEMAP
HTML_COND_USER = _html.HTML_COND_USER
HTML_FONT_SIZE_1 = _html.HTML_FONT_SIZE_1
HTML_FONT_SIZE_2 = _html.HTML_FONT_SIZE_2
HTML_FONT_SIZE_3 = _html.HTML_FONT_SIZE_3
HTML_FONT_SIZE_4 = _html.HTML_FONT_SIZE_4
HTML_FONT_SIZE_5 = _html.HTML_FONT_SIZE_5
HTML_FONT_SIZE_6 = _html.HTML_FONT_SIZE_6
HTML_FONT_SIZE_7 = _html.HTML_FONT_SIZE_7
HW_SCROLLBAR_NEVER = _html.HW_SCROLLBAR_NEVER
HW_SCROLLBAR_AUTO = _html.HW_SCROLLBAR_AUTO
HW_NO_SELECTION = _html.HW_NO_SELECTION

View File

@@ -20410,13 +20410,6 @@ SWIGEXPORT void SWIG_init(void) {
SWIG_Python_SetConstant(d, "HTML_COND_ISANCHOR",SWIG_From_int(static_cast< int >(wxHTML_COND_ISANCHOR)));
SWIG_Python_SetConstant(d, "HTML_COND_ISIMAGEMAP",SWIG_From_int(static_cast< int >(wxHTML_COND_ISIMAGEMAP)));
SWIG_Python_SetConstant(d, "HTML_COND_USER",SWIG_From_int(static_cast< int >(wxHTML_COND_USER)));
SWIG_Python_SetConstant(d, "HTML_FONT_SIZE_1",SWIG_From_int(static_cast< int >(wxHTML_FONT_SIZE_1)));
SWIG_Python_SetConstant(d, "HTML_FONT_SIZE_2",SWIG_From_int(static_cast< int >(wxHTML_FONT_SIZE_2)));
SWIG_Python_SetConstant(d, "HTML_FONT_SIZE_3",SWIG_From_int(static_cast< int >(wxHTML_FONT_SIZE_3)));
SWIG_Python_SetConstant(d, "HTML_FONT_SIZE_4",SWIG_From_int(static_cast< int >(wxHTML_FONT_SIZE_4)));
SWIG_Python_SetConstant(d, "HTML_FONT_SIZE_5",SWIG_From_int(static_cast< int >(wxHTML_FONT_SIZE_5)));
SWIG_Python_SetConstant(d, "HTML_FONT_SIZE_6",SWIG_From_int(static_cast< int >(wxHTML_FONT_SIZE_6)));
SWIG_Python_SetConstant(d, "HTML_FONT_SIZE_7",SWIG_From_int(static_cast< int >(wxHTML_FONT_SIZE_7)));
SWIG_Python_SetConstant(d, "HW_SCROLLBAR_NEVER",SWIG_From_int(static_cast< int >(wxHW_SCROLLBAR_NEVER)));
SWIG_Python_SetConstant(d, "HW_SCROLLBAR_AUTO",SWIG_From_int(static_cast< int >(wxHW_SCROLLBAR_AUTO)));
SWIG_Python_SetConstant(d, "HW_NO_SELECTION",SWIG_From_int(static_cast< int >(wxHW_NO_SELECTION)));

View File

@@ -73,7 +73,7 @@ class XmlResource(_core.Object):
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args, **kwargs):
"""__init__(self, String filemask, int flags=XRC_USE_LOCALE) -> XmlResource"""
"""__init__(self, String filemask, int flags=XRC_USE_LOCALE, String domain=wxEmptyString) -> XmlResource"""
_xrc.XmlResource_swiginit(self,_xrc.new_XmlResource(*args, **kwargs))
self.InitAllHandlers()
@@ -203,6 +203,14 @@ class XmlResource(_core.Object):
"""SetFlags(self, int flags)"""
return _xrc.XmlResource_SetFlags(*args, **kwargs)
def GetDomain(*args, **kwargs):
"""GetDomain(self) -> String"""
return _xrc.XmlResource_GetDomain(*args, **kwargs)
def SetDomain(*args, **kwargs):
"""SetDomain(self, String domain)"""
return _xrc.XmlResource_SetDomain(*args, **kwargs)
_xrc.XmlResource_swigregister(XmlResource)
cvar = _xrc.cvar
UTF8String = cvar.UTF8String
@@ -214,7 +222,7 @@ IconString = cvar.IconString
FontString = cvar.FontString
def EmptyXmlResource(*args, **kwargs):
"""EmptyXmlResource(int flags=XRC_USE_LOCALE) -> XmlResource"""
"""EmptyXmlResource(int flags=XRC_USE_LOCALE, String domain=wxEmptyString) -> XmlResource"""
val = _xrc.new_EmptyXmlResource(*args, **kwargs)
val.InitAllHandlers()
return val

View File

@@ -3046,17 +3046,21 @@ SWIGINTERN PyObject *_wrap_new_XmlResource(PyObject *SWIGUNUSEDPARM(self), PyObj
PyObject *resultobj = 0;
wxString *arg1 = 0 ;
int arg2 = (int) wxXRC_USE_LOCALE ;
wxString const &arg3_defvalue = wxEmptyString ;
wxString *arg3 = (wxString *) &arg3_defvalue ;
wxXmlResource *result = 0 ;
bool temp1 = false ;
int val2 ;
int ecode2 = 0 ;
bool temp3 = false ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
char * kwnames[] = {
(char *) "filemask",(char *) "flags", NULL
(char *) "filemask",(char *) "flags",(char *) "domain", NULL
};
if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:new_XmlResource",kwnames,&obj0,&obj1)) SWIG_fail;
if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:new_XmlResource",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
{
arg1 = wxString_in_helper(obj0);
if (arg1 == NULL) SWIG_fail;
@@ -3069,9 +3073,16 @@ SWIGINTERN PyObject *_wrap_new_XmlResource(PyObject *SWIGUNUSEDPARM(self), PyObj
}
arg2 = static_cast< int >(val2);
}
if (obj2) {
{
arg3 = wxString_in_helper(obj2);
if (arg3 == NULL) SWIG_fail;
temp3 = true;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxXmlResource *)new wxXmlResource((wxString const &)*arg1,arg2);
result = (wxXmlResource *)new wxXmlResource((wxString const &)*arg1,arg2,(wxString const &)*arg3);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
@@ -3080,12 +3091,20 @@ SWIGINTERN PyObject *_wrap_new_XmlResource(PyObject *SWIGUNUSEDPARM(self), PyObj
if (temp1)
delete arg1;
}
{
if (temp3)
delete arg3;
}
return resultobj;
fail:
{
if (temp1)
delete arg1;
}
{
if (temp3)
delete arg3;
}
return NULL;
}
@@ -3093,15 +3112,19 @@ fail:
SWIGINTERN PyObject *_wrap_new_EmptyXmlResource(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
PyObject *resultobj = 0;
int arg1 = (int) wxXRC_USE_LOCALE ;
wxString const &arg2_defvalue = wxEmptyString ;
wxString *arg2 = (wxString *) &arg2_defvalue ;
wxXmlResource *result = 0 ;
int val1 ;
int ecode1 = 0 ;
bool temp2 = false ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char * kwnames[] = {
(char *) "flags", NULL
(char *) "flags",(char *) "domain", NULL
};
if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:new_EmptyXmlResource",kwnames,&obj0)) SWIG_fail;
if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OO:new_EmptyXmlResource",kwnames,&obj0,&obj1)) SWIG_fail;
if (obj0) {
ecode1 = SWIG_AsVal_int(obj0, &val1);
if (!SWIG_IsOK(ecode1)) {
@@ -3109,15 +3132,30 @@ SWIGINTERN PyObject *_wrap_new_EmptyXmlResource(PyObject *SWIGUNUSEDPARM(self),
}
arg1 = static_cast< int >(val1);
}
if (obj1) {
{
arg2 = wxString_in_helper(obj1);
if (arg2 == NULL) SWIG_fail;
temp2 = true;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxXmlResource *)new wxXmlResource(arg1);
result = (wxXmlResource *)new wxXmlResource(arg1,(wxString const &)*arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxXmlResource, SWIG_POINTER_OWN | 0 );
{
if (temp2)
delete arg2;
}
return resultobj;
fail:
{
if (temp2)
delete arg2;
}
return NULL;
}
@@ -4603,6 +4641,85 @@ fail:
}
SWIGINTERN PyObject *_wrap_XmlResource_GetDomain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
wxXmlResource *arg1 = (wxXmlResource *) 0 ;
wxString result;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject *swig_obj[1] ;
if (!args) SWIG_fail;
swig_obj[0] = args;
res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxXmlResource, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmlResource_GetDomain" "', expected argument " "1"" of type '" "wxXmlResource const *""'");
}
arg1 = reinterpret_cast< wxXmlResource * >(argp1);
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = ((wxXmlResource const *)arg1)->GetDomain();
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;
}
SWIGINTERN PyObject *_wrap_XmlResource_SetDomain(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
PyObject *resultobj = 0;
wxXmlResource *arg1 = (wxXmlResource *) 0 ;
wxString *arg2 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
bool temp2 = false ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char * kwnames[] = {
(char *) "self",(char *) "domain", NULL
};
if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:XmlResource_SetDomain",kwnames,&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxXmlResource, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmlResource_SetDomain" "', expected argument " "1"" of type '" "wxXmlResource *""'");
}
arg1 = reinterpret_cast< wxXmlResource * >(argp1);
{
arg2 = wxString_in_helper(obj1);
if (arg2 == NULL) SWIG_fail;
temp2 = true;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
(arg1)->SetDomain((wxString const &)*arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
resultobj = SWIG_Py_Void();
{
if (temp2)
delete arg2;
}
return resultobj;
fail:
{
if (temp2)
delete arg2;
}
return NULL;
}
SWIGINTERN PyObject *XmlResource_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
@@ -8381,6 +8498,8 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"XmlResource_Set", (PyCFunction) _wrap_XmlResource_Set, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"XmlResource_GetFlags", (PyCFunction)_wrap_XmlResource_GetFlags, METH_O, NULL},
{ (char *)"XmlResource_SetFlags", (PyCFunction) _wrap_XmlResource_SetFlags, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"XmlResource_GetDomain", (PyCFunction)_wrap_XmlResource_GetDomain, METH_O, NULL},
{ (char *)"XmlResource_SetDomain", (PyCFunction) _wrap_XmlResource_SetDomain, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"XmlResource_swigregister", XmlResource_swigregister, METH_VARARGS, NULL},
{ (char *)"XmlResource_swiginit", XmlResource_swiginit, METH_VARARGS, NULL},
{ (char *)"new_XmlSubclassFactory", (PyCFunction)_wrap_new_XmlSubclassFactory, METH_NOARGS, NULL},