mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-09-20 12:59:31 +08:00
Updates to match recent CVS changes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14810 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1 +1 @@
|
||||
ver = '2.3.3pre'
|
||||
ver = '2.3.3pre2u'
|
||||
|
||||
@@ -233,11 +233,15 @@ enum {
|
||||
|
||||
wxRETAINED,
|
||||
wxBACKINGSTORE,
|
||||
wxTB_3DBUTTONS,
|
||||
|
||||
wxTB_HORIZONTAL,
|
||||
wxTB_VERTICAL,
|
||||
wxTB_3DBUTTONS,
|
||||
wxTB_FLAT,
|
||||
wxTB_DOCKABLE,
|
||||
wxTB_NOICONS,
|
||||
wxTB_TEXT,
|
||||
|
||||
wxCOLOURED,
|
||||
wxFIXED_LENGTH,
|
||||
wxALIGN_LEFT,
|
||||
|
||||
+17
-5
@@ -116,10 +116,6 @@ public:
|
||||
wxImage( const wxString& name, long type = wxBITMAP_TYPE_ANY, int index = -1 );
|
||||
~wxImage();
|
||||
|
||||
wxBitmap ConvertToBitmap(); // deprecated
|
||||
#ifdef __WXGTK__
|
||||
wxBitmap ConvertToMonoBitmap( unsigned char red, unsigned char green, unsigned char blue ) const;
|
||||
#endif
|
||||
void Create( int width, int height );
|
||||
void Destroy();
|
||||
|
||||
@@ -207,6 +203,22 @@ public:
|
||||
static void AddHandler( wxImageHandler *handler );
|
||||
static void InsertHandler( wxImageHandler *handler );
|
||||
static bool RemoveHandler( const wxString& name );
|
||||
|
||||
|
||||
%addmethods {
|
||||
wxBitmap ConvertToBitmap() {
|
||||
wxBitmap bitmap(*self);
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
wxBitmap ConvertToMonoBitmap( unsigned char red,
|
||||
unsigned char green,
|
||||
unsigned char blue ) {
|
||||
wxImage mono = self->ConvertToMono( red, green, blue );
|
||||
wxBitmap bitmap( mono, 1 );
|
||||
return bitmap;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -233,7 +245,7 @@ public:
|
||||
|
||||
|
||||
wxImage* wxImageFromBitmap(const wxBitmap &bitmap) {
|
||||
return new wxImage(bitmap);
|
||||
return new wxImage(bitmap.ConvertToImage());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -806,9 +806,16 @@ public:
|
||||
};
|
||||
|
||||
|
||||
enum {
|
||||
wxEXEC_ASYNC = 0, // execute the process asynchronously
|
||||
wxEXEC_SYNC = 1, // synchronously
|
||||
wxEXEC_NOHIDE = 2 // under Windows, don't hide the child even if it's
|
||||
// IO is redirected (this is done by default)
|
||||
};
|
||||
|
||||
|
||||
long wxExecute(const wxString& command,
|
||||
int sync = FALSE,
|
||||
int flags = wxEXEC_ASYNC,
|
||||
wxPyProcess *process = NULL);
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
+73
-32
@@ -100,7 +100,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
|
||||
|
||||
|
||||
wxImage* wxImageFromBitmap(const wxBitmap &bitmap) {
|
||||
return new wxImage(bitmap);
|
||||
return new wxImage(bitmap.ConvertToImage());
|
||||
}
|
||||
|
||||
|
||||
@@ -1333,36 +1333,6 @@ static PyObject *_wrap_delete_wxImage(PyObject *self, PyObject *args, PyObject *
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxImage_ConvertToBitmap(_swigobj) (_swigobj->ConvertToBitmap())
|
||||
static PyObject *_wrap_wxImage_ConvertToBitmap(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxBitmap * _result;
|
||||
wxImage * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxImage_ConvertToBitmap",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_ConvertToBitmap. Expected _wxImage_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = new wxBitmap (wxImage_ConvertToBitmap(_arg0));
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBitmap_p");
|
||||
_resultobj = Py_BuildValue("s",_ptemp);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxImage_Create(_swigobj,_swigarg0,_swigarg1) (_swigobj->Create(_swigarg0,_swigarg1))
|
||||
static PyObject *_wrap_wxImage_Create(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
@@ -2962,7 +2932,79 @@ static PyObject *_wrap_wxImage_RemoveHandler(PyObject *self, PyObject *args, PyO
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static wxBitmap wxImage_ConvertToBitmap(wxImage *self) {
|
||||
wxBitmap bitmap(*self);
|
||||
return bitmap;
|
||||
}
|
||||
static PyObject *_wrap_wxImage_ConvertToBitmap(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxBitmap * _result;
|
||||
wxImage * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxImage_ConvertToBitmap",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_ConvertToBitmap. Expected _wxImage_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = new wxBitmap (wxImage_ConvertToBitmap(_arg0));
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBitmap_p");
|
||||
_resultobj = Py_BuildValue("s",_ptemp);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static wxBitmap wxImage_ConvertToMonoBitmap(wxImage *self,unsigned char red,unsigned char green,unsigned char blue) {
|
||||
wxImage mono = self->ConvertToMono( red, green, blue );
|
||||
wxBitmap bitmap( mono, 1 );
|
||||
return bitmap;
|
||||
}
|
||||
static PyObject *_wrap_wxImage_ConvertToMonoBitmap(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxBitmap * _result;
|
||||
wxImage * _arg0;
|
||||
unsigned char _arg1;
|
||||
unsigned char _arg2;
|
||||
unsigned char _arg3;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self","red","green","blue", NULL };
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Obbb:wxImage_ConvertToMonoBitmap",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_ConvertToMonoBitmap. Expected _wxImage_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = new wxBitmap (wxImage_ConvertToMonoBitmap(_arg0,_arg1,_arg2,_arg3));
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBitmap_p");
|
||||
_resultobj = Py_BuildValue("s",_ptemp);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static PyMethodDef imagecMethods[] = {
|
||||
{ "wxImage_ConvertToMonoBitmap", (PyCFunction) _wrap_wxImage_ConvertToMonoBitmap, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxImage_ConvertToBitmap", (PyCFunction) _wrap_wxImage_ConvertToBitmap, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxImage_RemoveHandler", (PyCFunction) _wrap_wxImage_RemoveHandler, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxImage_InsertHandler", (PyCFunction) _wrap_wxImage_InsertHandler, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxImage_AddHandler", (PyCFunction) _wrap_wxImage_AddHandler, METH_VARARGS | METH_KEYWORDS },
|
||||
@@ -3008,7 +3050,6 @@ static PyMethodDef imagecMethods[] = {
|
||||
{ "wxImage_Scale", (PyCFunction) _wrap_wxImage_Scale, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxImage_Destroy", (PyCFunction) _wrap_wxImage_Destroy, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxImage_Create", (PyCFunction) _wrap_wxImage_Create, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxImage_ConvertToBitmap", (PyCFunction) _wrap_wxImage_ConvertToBitmap, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "delete_wxImage", (PyCFunction) _wrap_delete_wxImage, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "new_wxImage", (PyCFunction) _wrap_new_wxImage, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "new_wxTIFFHandler", (PyCFunction) _wrap_new_wxTIFFHandler, METH_VARARGS | METH_KEYWORDS },
|
||||
|
||||
@@ -193,10 +193,6 @@ class wxImagePtr(wxObjectPtr):
|
||||
def __del__(self,imagec=imagec):
|
||||
if self.thisown == 1 :
|
||||
imagec.delete_wxImage(self)
|
||||
def ConvertToBitmap(self, *_args, **_kwargs):
|
||||
val = apply(imagec.wxImage_ConvertToBitmap,(self,) + _args, _kwargs)
|
||||
if val: val = wxBitmapPtr(val) ; val.thisown = 1
|
||||
return val
|
||||
def Create(self, *_args, **_kwargs):
|
||||
val = apply(imagec.wxImage_Create,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -322,6 +318,14 @@ class wxImagePtr(wxObjectPtr):
|
||||
def CountColours(self, *_args, **_kwargs):
|
||||
val = apply(imagec.wxImage_CountColours,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def ConvertToBitmap(self, *_args, **_kwargs):
|
||||
val = apply(imagec.wxImage_ConvertToBitmap,(self,) + _args, _kwargs)
|
||||
if val: val = wxBitmapPtr(val) ; val.thisown = 1
|
||||
return val
|
||||
def ConvertToMonoBitmap(self, *_args, **_kwargs):
|
||||
val = apply(imagec.wxImage_ConvertToMonoBitmap,(self,) + _args, _kwargs)
|
||||
if val: val = wxBitmapPtr(val) ; val.thisown = 1
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxImage instance at %s>" % (self.this,)
|
||||
class wxImage(wxImagePtr):
|
||||
|
||||
@@ -2247,11 +2247,11 @@ static PyObject *_wrap_wxExecute(PyObject *self, PyObject *args, PyObject *kwarg
|
||||
PyObject * _resultobj;
|
||||
long _result;
|
||||
wxString * _arg0;
|
||||
int _arg1 = (int ) FALSE;
|
||||
int _arg1 = (int ) (wxEXEC_ASYNC);
|
||||
wxPyProcess * _arg2 = (wxPyProcess *) NULL;
|
||||
PyObject * _obj0 = 0;
|
||||
PyObject * _argo2 = 0;
|
||||
char *_kwnames[] = { "command","sync","process", NULL };
|
||||
char *_kwnames[] = { "command","flags","process", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iO:wxExecute",_kwnames,&_obj0,&_arg1,&_argo2))
|
||||
@@ -10558,6 +10558,9 @@ SWIGEXPORT(void) initmisc2c() {
|
||||
PyDict_SetItemString(d,"wxLOG_Progress", PyInt_FromLong((long) wxLOG_Progress));
|
||||
PyDict_SetItemString(d,"wxLOG_User", PyInt_FromLong((long) wxLOG_User));
|
||||
PyDict_SetItemString(d,"wxEVT_END_PROCESS", PyInt_FromLong((long) wxEVT_END_PROCESS));
|
||||
PyDict_SetItemString(d,"wxEXEC_ASYNC", PyInt_FromLong((long) wxEXEC_ASYNC));
|
||||
PyDict_SetItemString(d,"wxEXEC_SYNC", PyInt_FromLong((long) wxEXEC_SYNC));
|
||||
PyDict_SetItemString(d,"wxEXEC_NOHIDE", PyInt_FromLong((long) wxEXEC_NOHIDE));
|
||||
PyDict_SetItemString(d,"wxMAILCAP_STANDARD", PyInt_FromLong((long) wxMAILCAP_STANDARD));
|
||||
PyDict_SetItemString(d,"wxMAILCAP_NETSCAPE", PyInt_FromLong((long) wxMAILCAP_NETSCAPE));
|
||||
PyDict_SetItemString(d,"wxMAILCAP_KDE", PyInt_FromLong((long) wxMAILCAP_KDE));
|
||||
|
||||
@@ -1306,6 +1306,9 @@ wxLOG_Trace = misc2c.wxLOG_Trace
|
||||
wxLOG_Progress = misc2c.wxLOG_Progress
|
||||
wxLOG_User = misc2c.wxLOG_User
|
||||
wxEVT_END_PROCESS = misc2c.wxEVT_END_PROCESS
|
||||
wxEXEC_ASYNC = misc2c.wxEXEC_ASYNC
|
||||
wxEXEC_SYNC = misc2c.wxEXEC_SYNC
|
||||
wxEXEC_NOHIDE = misc2c.wxEXEC_NOHIDE
|
||||
wxMAILCAP_STANDARD = misc2c.wxMAILCAP_STANDARD
|
||||
wxMAILCAP_NETSCAPE = misc2c.wxMAILCAP_NETSCAPE
|
||||
wxMAILCAP_KDE = misc2c.wxMAILCAP_KDE
|
||||
|
||||
+446
-183
File diff suppressed because it is too large
Load Diff
@@ -93,6 +93,9 @@ class wxToolBarToolBasePtr(wxObjectPtr):
|
||||
def GetStyle(self, *_args, **_kwargs):
|
||||
val = apply(stattoolc.wxToolBarToolBase_GetStyle,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetKind(self, *_args, **_kwargs):
|
||||
val = apply(stattoolc.wxToolBarToolBase_GetKind,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def IsEnabled(self, *_args, **_kwargs):
|
||||
val = apply(stattoolc.wxToolBarToolBase_IsEnabled,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -184,6 +187,12 @@ class wxToolBarBasePtr(wxControlPtr):
|
||||
def AddSimpleTool(self, *_args, **_kwargs):
|
||||
val = apply(stattoolc.wxToolBarBase_AddSimpleTool,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def AddCheckTool(self, *_args, **_kwargs):
|
||||
val = apply(stattoolc.wxToolBarBase_AddCheckTool,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def AddRadioTool(self, *_args, **_kwargs):
|
||||
val = apply(stattoolc.wxToolBarBase_AddRadioTool,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def InsertTool(self, *_args, **_kwargs):
|
||||
val = apply(stattoolc.wxToolBarBase_InsertTool,(self,) + _args, _kwargs)
|
||||
return val
|
||||
|
||||
+3
-33
@@ -1709,39 +1709,7 @@ static PyObject *_wrap_wxPyApp_SetUseBestVisual(PyObject *self, PyObject *args,
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxPyApp_GetStdIcon(_swigobj,_swigarg0) (_swigobj->GetStdIcon(_swigarg0))
|
||||
static PyObject *_wrap_wxPyApp_GetStdIcon(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxIcon * _result;
|
||||
wxPyApp * _arg0;
|
||||
int _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self","which", NULL };
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxPyApp_GetStdIcon",_kwnames,&_argo0,&_arg1))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyApp_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_GetStdIcon. Expected _wxPyApp_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = new wxIcon (wxPyApp_GetStdIcon(_arg0,_arg1));
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} SWIG_MakePtr(_ptemp, (void *) _result,"_wxIcon_p");
|
||||
_resultobj = Py_BuildValue("s",_ptemp);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static PyMethodDef wxcMethods[] = {
|
||||
{ "wxPyApp_GetStdIcon", (PyCFunction) _wrap_wxPyApp_GetStdIcon, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxPyApp_SetUseBestVisual", (PyCFunction) _wrap_wxPyApp_SetUseBestVisual, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxPyApp_SetVendorName", (PyCFunction) _wrap_wxPyApp_SetVendorName, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxPyApp_SetTopWindow", (PyCFunction) _wrap_wxPyApp_SetTopWindow, METH_VARARGS | METH_KEYWORDS },
|
||||
@@ -1955,11 +1923,13 @@ SWIGEXPORT(void) initwxc() {
|
||||
PyDict_SetItemString(d,"wxCLIP_SIBLINGS", PyInt_FromLong((long) wxCLIP_SIBLINGS));
|
||||
PyDict_SetItemString(d,"wxRETAINED", PyInt_FromLong((long) wxRETAINED));
|
||||
PyDict_SetItemString(d,"wxBACKINGSTORE", PyInt_FromLong((long) wxBACKINGSTORE));
|
||||
PyDict_SetItemString(d,"wxTB_3DBUTTONS", PyInt_FromLong((long) wxTB_3DBUTTONS));
|
||||
PyDict_SetItemString(d,"wxTB_HORIZONTAL", PyInt_FromLong((long) wxTB_HORIZONTAL));
|
||||
PyDict_SetItemString(d,"wxTB_VERTICAL", PyInt_FromLong((long) wxTB_VERTICAL));
|
||||
PyDict_SetItemString(d,"wxTB_3DBUTTONS", PyInt_FromLong((long) wxTB_3DBUTTONS));
|
||||
PyDict_SetItemString(d,"wxTB_FLAT", PyInt_FromLong((long) wxTB_FLAT));
|
||||
PyDict_SetItemString(d,"wxTB_DOCKABLE", PyInt_FromLong((long) wxTB_DOCKABLE));
|
||||
PyDict_SetItemString(d,"wxTB_NOICONS", PyInt_FromLong((long) wxTB_NOICONS));
|
||||
PyDict_SetItemString(d,"wxTB_TEXT", PyInt_FromLong((long) wxTB_TEXT));
|
||||
PyDict_SetItemString(d,"wxCOLOURED", PyInt_FromLong((long) wxCOLOURED));
|
||||
PyDict_SetItemString(d,"wxFIXED_LENGTH", PyInt_FromLong((long) wxFIXED_LENGTH));
|
||||
PyDict_SetItemString(d,"wxALIGN_LEFT", PyInt_FromLong((long) wxALIGN_LEFT));
|
||||
|
||||
@@ -113,10 +113,6 @@ class wxPyAppPtr(wxEvtHandlerPtr):
|
||||
def SetUseBestVisual(self, *_args, **_kwargs):
|
||||
val = apply(wxc.wxPyApp_SetUseBestVisual,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetStdIcon(self, *_args, **_kwargs):
|
||||
val = apply(wxc.wxPyApp_GetStdIcon,(self,) + _args, _kwargs)
|
||||
if val: val = wxIconPtr(val) ; val.thisown = 1
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxPyApp instance at %s>" % (self.this,)
|
||||
class wxPyApp(wxPyAppPtr):
|
||||
@@ -216,11 +212,13 @@ wxCLIP_CHILDREN = wxc.wxCLIP_CHILDREN
|
||||
wxCLIP_SIBLINGS = wxc.wxCLIP_SIBLINGS
|
||||
wxRETAINED = wxc.wxRETAINED
|
||||
wxBACKINGSTORE = wxc.wxBACKINGSTORE
|
||||
wxTB_3DBUTTONS = wxc.wxTB_3DBUTTONS
|
||||
wxTB_HORIZONTAL = wxc.wxTB_HORIZONTAL
|
||||
wxTB_VERTICAL = wxc.wxTB_VERTICAL
|
||||
wxTB_3DBUTTONS = wxc.wxTB_3DBUTTONS
|
||||
wxTB_FLAT = wxc.wxTB_FLAT
|
||||
wxTB_DOCKABLE = wxc.wxTB_DOCKABLE
|
||||
wxTB_NOICONS = wxc.wxTB_NOICONS
|
||||
wxTB_TEXT = wxc.wxTB_TEXT
|
||||
wxCOLOURED = wxc.wxCOLOURED
|
||||
wxFIXED_LENGTH = wxc.wxFIXED_LENGTH
|
||||
wxALIGN_LEFT = wxc.wxALIGN_LEFT
|
||||
|
||||
+82
-36
@@ -94,13 +94,13 @@ class wxToolBarToolBase : public wxObject {
|
||||
public:
|
||||
// wxToolBarToolBase(wxToolBarBase *tbar = (wxToolBarBase *)NULL,
|
||||
// int id = wxID_SEPARATOR,
|
||||
// const wxBitmap& bitmap1 = wxNullBitmap,
|
||||
// const wxBitmap& bitmap2 = wxNullBitmap,
|
||||
// bool toggle = FALSE,
|
||||
// const wxString& label = wxEmptyString,
|
||||
// const wxBitmap& bmpNormal = wxNullBitmap,
|
||||
// const wxBitmap& bmpDisabled = wxNullBitmap,
|
||||
// wxItemKind kind = wxITEM_NORMAL,
|
||||
// wxObject *clientData = (wxObject *) NULL,
|
||||
// const wxString& shortHelpString = wxPyEmptyString,
|
||||
// const wxString& longHelpString = wxPyEmptyString);
|
||||
// wxToolBarToolBase(wxToolBarBase *tbar, wxControl *control);
|
||||
// const wxString& shortHelpString = wxEmptyString,
|
||||
// const wxString& longHelpString = wxEmptyString)
|
||||
// ~wxToolBarToolBase();
|
||||
|
||||
%addmethods { void Destroy() { delete self; } }
|
||||
@@ -112,6 +112,7 @@ public:
|
||||
int IsControl();
|
||||
int IsSeparator();
|
||||
int GetStyle();
|
||||
wxItemKind GetKind();
|
||||
bool IsEnabled();
|
||||
bool IsToggled();
|
||||
bool CanBeToggled();
|
||||
@@ -167,57 +168,102 @@ public:
|
||||
// This is an Abstract Base Class
|
||||
|
||||
%addmethods {
|
||||
// wrap ClientData in a class that knows about PyObjects
|
||||
|
||||
// the full AddTool() function
|
||||
//
|
||||
// If bmpDisabled is wxNullBitmap, a shadowed version of the normal bitmap
|
||||
// is created and used as the disabled image.
|
||||
wxToolBarToolBase *AddTool(int id,
|
||||
const wxString& label,
|
||||
const wxBitmap& bitmap,
|
||||
const wxBitmap& pushedBitmap = wxNullBitmap,
|
||||
int isToggle = FALSE,
|
||||
PyObject *clientData = NULL,
|
||||
const wxString& shortHelpString = wxPyEmptyString,
|
||||
const wxString& longHelpString = wxPyEmptyString) {
|
||||
const wxBitmap& bmpDisabled,
|
||||
wxItemKind kind = wxITEM_NORMAL,
|
||||
const wxString& shortHelp = wxPyEmptyString,
|
||||
const wxString& longHelp = wxPyEmptyString,
|
||||
PyObject *clientData = NULL)
|
||||
{
|
||||
wxPyUserData* udata = NULL;
|
||||
if (clientData)
|
||||
udata = new wxPyUserData(clientData);
|
||||
return self->AddTool(id, bitmap, pushedBitmap, (bool)isToggle,
|
||||
udata, shortHelpString, longHelpString);
|
||||
return self->AddTool(id, label, bitmap, bmpDisabled, kind,
|
||||
shortHelp, longHelp, udata);
|
||||
}
|
||||
|
||||
// This one is easier to use...
|
||||
// The most common version of AddTool
|
||||
wxToolBarToolBase *AddSimpleTool(int id,
|
||||
const wxString& label,
|
||||
const wxBitmap& bitmap,
|
||||
const wxString& shortHelpString = wxPyEmptyString,
|
||||
const wxString& longHelpString = wxPyEmptyString,
|
||||
int isToggle = FALSE) {
|
||||
return self->AddTool(id, bitmap, wxNullBitmap, isToggle, NULL,
|
||||
shortHelpString, longHelpString);
|
||||
const wxString& shortHelp = wxPyEmptyString,
|
||||
const wxString& longHelp = wxPyEmptyString,
|
||||
wxItemKind kind = wxITEM_NORMAL)
|
||||
{
|
||||
return self->AddTool(id, label, bitmap, wxNullBitmap, kind,
|
||||
shortHelp, longHelp, NULL);
|
||||
}
|
||||
|
||||
// add a check tool, i.e. a tool which can be toggled
|
||||
wxToolBarToolBase *AddCheckTool(int id,
|
||||
const wxString& label,
|
||||
const wxBitmap& bitmap,
|
||||
const wxBitmap& bmpDisabled = wxNullBitmap,
|
||||
const wxString& shortHelp = wxEmptyString,
|
||||
const wxString& longHelp = wxEmptyString,
|
||||
PyObject *clientData = NULL)
|
||||
{
|
||||
wxPyUserData* udata = NULL;
|
||||
if (clientData)
|
||||
udata = new wxPyUserData(clientData);
|
||||
return self->AddCheckTool(id, label, bitmap, bmpDisabled,
|
||||
shortHelp, longHelp, udata);
|
||||
}
|
||||
|
||||
// wrap ClientData in a class that knows about PyObjects
|
||||
// add a radio tool, i.e. a tool which can be toggled and releases any
|
||||
// other toggled radio tools in the same group when it happens
|
||||
wxToolBarToolBase *AddRadioTool(int id,
|
||||
const wxString& label,
|
||||
const wxBitmap& bitmap,
|
||||
const wxBitmap& bmpDisabled = wxNullBitmap,
|
||||
const wxString& shortHelp = wxEmptyString,
|
||||
const wxString& longHelp = wxEmptyString,
|
||||
PyObject *clientData = NULL)
|
||||
{
|
||||
wxPyUserData* udata = NULL;
|
||||
if (clientData)
|
||||
udata = new wxPyUserData(clientData);
|
||||
return self->AddRadioTool(id, label, bitmap, bmpDisabled,
|
||||
shortHelp, longHelp, udata);
|
||||
}
|
||||
|
||||
// insert the new tool at the given position, if pos == GetToolsCount(), it
|
||||
// is equivalent to AddTool()
|
||||
wxToolBarToolBase *InsertTool(size_t pos,
|
||||
int id,
|
||||
const wxString& label,
|
||||
const wxBitmap& bitmap,
|
||||
const wxBitmap& pushedBitmap = wxNullBitmap,
|
||||
int isToggle = FALSE,
|
||||
PyObject *clientData = NULL,
|
||||
const wxString& shortHelpString = wxPyEmptyString,
|
||||
const wxString& longHelpString = wxPyEmptyString) {
|
||||
const wxBitmap& bmpDisabled = wxNullBitmap,
|
||||
wxItemKind kind = wxITEM_NORMAL,
|
||||
const wxString& shortHelp = wxEmptyString,
|
||||
const wxString& longHelp = wxEmptyString,
|
||||
PyObject *clientData = NULL)
|
||||
{
|
||||
wxPyUserData* udata = NULL;
|
||||
if (clientData)
|
||||
udata = new wxPyUserData(clientData);
|
||||
return self->InsertTool(pos, id, bitmap, pushedBitmap, (bool)isToggle,
|
||||
udata, shortHelpString, longHelpString);
|
||||
return self->InsertTool(pos, id, label, bitmap, bmpDisabled, kind,
|
||||
shortHelp, longHelp, udata);
|
||||
}
|
||||
|
||||
// This one is easier to use...
|
||||
// A simpler InsertTool
|
||||
wxToolBarToolBase *InsertSimpleTool(size_t pos,
|
||||
int id,
|
||||
const wxBitmap& bitmap,
|
||||
const wxString& shortHelpString = wxPyEmptyString,
|
||||
const wxString& longHelpString = wxPyEmptyString,
|
||||
int isToggle = FALSE) {
|
||||
return self->InsertTool(pos, id, bitmap, wxNullBitmap, isToggle, NULL,
|
||||
shortHelpString, longHelpString);
|
||||
int id,
|
||||
const wxString& label,
|
||||
const wxBitmap& bitmap,
|
||||
wxItemKind kind = wxITEM_NORMAL,
|
||||
const wxString& shortHelp = wxEmptyString,
|
||||
const wxString& longHelp = wxEmptyString)
|
||||
{
|
||||
return self->InsertTool(pos, id, label, bitmap, wxNullBitmap, kind,
|
||||
shortHelp, longHelp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
#include "helpers.h"
|
||||
%}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// This is where we include the other wrapper definition files for SWIG
|
||||
//----------------------------------------------------------------------
|
||||
@@ -102,7 +101,6 @@ public:
|
||||
void SetTopWindow(wxWindow* window);
|
||||
void SetVendorName(const wxString& name);
|
||||
void SetUseBestVisual(bool flag);
|
||||
wxIcon GetStdIcon(int which);
|
||||
};
|
||||
|
||||
%inline %{
|
||||
|
||||
Reference in New Issue
Block a user