Added rotated text support

Added Some generic button and toggle button classes
Lots of little fixes, additions, etc.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4900 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
1999-12-11 07:59:23 +00:00
parent 4afd752902
commit 6999b0d8e9
35 changed files with 1551 additions and 673 deletions

View File

@@ -1 +1 @@
ver = '2.1.11'
ver = '2.1.12'

View File

@@ -666,6 +666,8 @@ wxPyDefaultSize.Set(-1,-1)
wxDefaultPosition = wxPyDefaultPosition
wxDefaultSize = wxPyDefaultSize
# backwards compatibility
wxNoRefBitmap = wxBitmap
#----------------------------------------------------------------------
# This helper function will take a wxPython object and convert it to
@@ -695,7 +697,8 @@ def wxPyTypeCast(obj, typeStr):
newPtr = ptrcast(obj, typeStr+"_p")
theClass = globals()[typeStr+"Ptr"]
theObj = theClass(newPtr)
theObj.thisown = obj.thisown
if hasattr(obj, "this"):
theObj.thisown = obj.thisown
return theObj
@@ -780,6 +783,13 @@ class wxApp(wxPyApp):
if self.stdioWin != None:
self.stdioWin.close()
#----------------------------------------------------------------------------
class wxPySimpleApp(wxApp):
def __init__(self):
wxApp.__init__(self, 0)
def OnInit(self):
return true
#----------------------------------------------------------------------------

View File

@@ -376,6 +376,7 @@ public:
};
%{
// See below in the init function...
wxClipboard* wxPyTheClipboard;
%}
%readonly

View File

@@ -18,6 +18,7 @@
#include <wx/spinbutt.h>
#include <wx/dynarray.h>
#include <wx/statline.h>
//#include <wx/toggbutt.h>
#ifdef __WXMSW__
#if wxUSE_OWNER_DRAWN
@@ -59,6 +60,8 @@ wxValidator wxDefaultValidator;
class wxControl : public wxWindow {
public:
wxControl();
#ifdef __WXMSW__
void Command(wxCommandEvent& event);
#endif
@@ -66,6 +69,35 @@ public:
void SetLabel(const wxString& label);
};
// %{
// class wxPyControl : public wxControl {
// public:
// wxPyControl(wxWindow *parent,
// wxWindowID id,
// const wxPoint& pos,
// const wxSize& size,
// long style,
// const wxValidator& validator,
// const wxString& name)
// : wxControl() {
// CreateControl(parent, id, pos, size, style, validator, name);
// }
// };
// %}
// class wxPyControl : public wxControl {
// public:
// wxPyControl(wxWindow* parent, wxWindowID id,
// const wxPoint& pos = wxPyDefaultPosition,
// const wxSize& size = wxPyDefaultSize,
// long style = 0,
// const wxValidator& validator = wxPyDefaultValidator,
// char* name = "control");
// };
//----------------------------------------------------------------------
class wxButton : public wxControl {
@@ -82,6 +114,13 @@ public:
void SetDefault();
};
%inline %{
wxSize wxButton_GetDefaultSize() {
return wxButton::GetDefaultSize();
}
%}
//----------------------------------------------------------------------
class wxBitmapButton : public wxButton {
@@ -106,6 +145,31 @@ public:
};
//----------------------------------------------------------------------
// class wxToggleButton : public wxControl {
// public:
// wxToggleButton(wxWindow *parent, wxWindowID id, const wxString& label,
// const wxPoint& pos = wxPyDefaultPosition,
// const wxSize& size = wxPyDefaultSize, long style = 0,
// const wxValidator& validator = wxPyDefaultValidator,
// const char* name = "toggle");
// void SetValue(bool value);
// bool GetValue() const ;
// void SetLabel(const wxString& label);
// };
// class wxBitmapToggleButton : public wxToggleButton {
// public:
// wxBitmapToggleButton(wxWindow *parent, wxWindowID id, const wxBitmap *label,
// const wxPoint& pos = wxPyDefaultPosition,
// const wxSize& size = wxPyDefaultSize, long style = 0,
// const wxValidator& validator = wxPyDefaultValidator,
// const char *name = "toggle");
// void SetLabel(const wxBitmap& bitmap);
// };
//----------------------------------------------------------------------
class wxCheckBox : public wxControl {

View File

@@ -80,6 +80,10 @@ public:
int GetSelection();
wxString GetString();
bool IsSelection();
void SetString(const wxString& s);
void SetExtraLong(long extraLong);
void SetInt(int i);
};

View File

@@ -33,33 +33,43 @@
//---------------------------------------------------------------------------
class wxBitmap {
class wxGDIImage {
public:
long GetHandle();
void SetHandle(long handle);
bool Ok();
int GetWidth();
int GetHeight();
int GetDepth();
void SetWidth(int w);
void SetHeight(int h);
void SetDepth(int d);
void SetSize(const wxSize& size);
};
//---------------------------------------------------------------------------
class wxBitmap : public wxGDIImage {
public:
wxBitmap(const wxString& name, long type);
~wxBitmap();
#ifdef __WXMSW__
void Create(int width, int height, int depth = -1);
#endif
int GetDepth();
int GetHeight();
wxPalette* GetPalette();
wxMask* GetMask();
int GetWidth();
bool LoadFile(const wxString& name, long flags);
bool Ok();
bool SaveFile(const wxString& name, int type, wxPalette* palette = NULL);
void SetDepth(int depth);
void SetHeight(int height);
void SetMask(wxMask* mask);
#ifdef __WXMSW__
void SetPalette(wxPalette& palette);
#endif
void SetWidth(int width);
};
%new wxBitmap* wxEmptyBitmap(int width, int height, int depth=-1);
wxBitmap* wxNoRefBitmap(char* name, long flags);
#ifdef __WXMSW__
%new wxBitmap* wxBitmapFromData(char* data, long type,
@@ -71,14 +81,6 @@ wxBitmap* wxNoRefBitmap(char* name, long flags);
return new wxBitmap(width, height, depth);
}
// This one won't own the reference, so Python
// won't call the dtor, this is good for
// toolbars and such where the parent will
// manage the bitmap.
wxBitmap* wxNoRefBitmap(char* name, long flags) {
return new wxBitmap(name, flags);
}
#ifdef __WXMSW__
wxBitmap* wxBitmapFromData(char* data, long type,
int width, int height, int depth = 1) {
@@ -106,32 +108,24 @@ public:
//---------------------------------------------------------------------------
class wxIcon : public wxBitmap {
class wxIcon : public wxGDIImage {
public:
wxIcon(const wxString& name, long flags,
int desiredWidth = -1, int desiredHeight = -1);
~wxIcon();
int GetDepth();
int GetHeight();
int GetWidth();
bool LoadFile(const wxString& name, long flags);
bool Ok();
void SetDepth(int depth);
void SetHeight(int height);
void SetWidth(int width);
};
//---------------------------------------------------------------------------
class wxCursor : public wxBitmap {
class wxCursor : public wxGDIImage {
public:
#ifdef __WXMSW__
wxCursor(const wxString& cursorName, long flags, int hotSpotX=0, int hotSpotY=0);
#endif
~wxCursor();
bool Ok();
};
%name(wxStockCursor) %new wxCursor* wxPyStockCursor(int id);
@@ -269,7 +263,12 @@ public:
//----------------------------------------------------------------------
#ifdef __WXMSW__
typedef unsigned long wxDash;
#else
typedef byte wxDash;
#endif
class wxPen {
public:
@@ -295,11 +294,12 @@ public:
void SetStyle(int style);
void SetWidth(int width);
#ifdef __WXMSW__
// **** This one needs to return a list of ints (wxDash)
int GetDashes(wxDash **dashes);
wxBitmap* GetStipple();
void SetDashes(int LCOUNT, wxDash* LIST);
#ifdef __WXMSW__
wxBitmap* GetStipple();
void SetStipple(wxBitmap& stipple);
#endif
};
@@ -363,6 +363,7 @@ public:
int fill_style=wxODDEVEN_RULE);
void DrawPoint(long x, long y);
void DrawRectangle(long x, long y, long width, long height);
void DrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle);
void DrawRoundedRectangle(long x, long y, long width, long height, long radius=20);
void DrawSpline(int LCOUNT, wxPoint* LIST);
void DrawText(const wxString& text, long x, long y);
@@ -611,7 +612,7 @@ enum {
class wxImageList {
public:
wxImageList(int width, int height, const bool mask=TRUE, int initialCount=1);
wxImageList(int width, int height, int mask=TRUE, int initialCount=1);
~wxImageList();
#ifdef __WXMSW__

View File

@@ -75,7 +75,7 @@ wxPyApp::~wxPyApp() {
// This one isn't acutally called... See __wxStart()
bool wxPyApp::OnInit(void) {
return false;
return FALSE;
}
int wxPyApp::MainLoop(void) {

View File

@@ -208,6 +208,7 @@ void wxPyBitmapDataObject::SetBitmap(const wxBitmap& bitmap) {
wxPySaveThread(doSave);
}
// See below in the init function...
wxClipboard* wxPyTheClipboard;
class wxPyDropSource : public wxDropSource {
@@ -3444,6 +3445,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_EBool","_wxWindowID",0},
{ "_class_wxRegion","_wxRegion",0},
{ "_class_wxDataFormat","_wxDataFormat",0},
{ "_wxGDIImage","_class_wxGDIImage",0},
{ "_wxFont","_class_wxFont",0},
{ "_class_wxPyDropTarget","_class_wxPyFileDropTarget",SwigwxPyFileDropTargetTowxPyDropTarget},
{ "_class_wxPyDropTarget","_wxPyFileDropTarget",SwigwxPyFileDropTargetTowxPyDropTarget},
@@ -3512,6 +3514,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxPyDataObjectSimple","_wxPyDataObjectSimple",0},
{ "_class_wxPyDropSource","_wxPyDropSource",0},
{ "_class_wxImageList","_wxImageList",0},
{ "_class_wxGDIImage","_wxGDIImage",0},
{ "_wxWindowID","_wxCoord",0},
{ "_wxWindowID","_wxPrintQuality",0},
{ "_wxWindowID","_size_t",0},

View File

@@ -58,6 +58,7 @@ extern PyObject *SWIG_newvarlink(void);
#include <wx/spinbutt.h>
#include <wx/dynarray.h>
#include <wx/statline.h>
//#include <wx/toggbutt.h>
#ifdef __WXMSW__
#if wxUSE_OWNER_DRAWN
@@ -120,6 +121,10 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
static char* wxStringErrorMsg = "string type is required for parameter";
wxValidator wxPyDefaultValidator; // Non-const default because of SWIG
wxSize wxButton_GetDefaultSize() {
return wxButton::GetDefaultSize();
}
#ifdef __cplusplus
extern "C" {
#endif
@@ -138,6 +143,25 @@ static PyObject *_wrap_wxDefaultValidator_get() {
return pyobj;
}
static PyObject *_wrap_wxButton_GetDefaultSize(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxSize * _result;
char *_kwnames[] = { NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxButton_GetDefaultSize",_kwnames))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
_result = new wxSize (wxButton_GetDefaultSize());
wxPy_END_ALLOW_THREADS;
} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p");
_resultobj = Py_BuildValue("s",_ptemp);
return _resultobj;
}
static void *SwigwxControlTowxWindow(void *ptr) {
wxControl *src;
wxWindow *dest;
@@ -154,6 +178,31 @@ static void *SwigwxControlTowxEvtHandler(void *ptr) {
return (void *) dest;
}
#define new_wxControl() (new wxControl())
static PyObject *_wrap_new_wxControl(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxControl * _result;
char *_kwnames[] = { NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxControl",_kwnames))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (wxControl *)new_wxControl();
wxPy_END_ALLOW_THREADS;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxControl_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
#define wxControl_Command(_swigobj,_swigarg0) (_swigobj->Command(_swigarg0))
static PyObject *_wrap_wxControl_Command(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@@ -7175,6 +7224,8 @@ static PyMethodDef controlscMethods[] = {
{ "wxControl_SetLabel", (PyCFunction) _wrap_wxControl_SetLabel, METH_VARARGS | METH_KEYWORDS },
{ "wxControl_GetLabel", (PyCFunction) _wrap_wxControl_GetLabel, METH_VARARGS | METH_KEYWORDS },
{ "wxControl_Command", (PyCFunction) _wrap_wxControl_Command, METH_VARARGS | METH_KEYWORDS },
{ "new_wxControl", (PyCFunction) _wrap_new_wxControl, METH_VARARGS | METH_KEYWORDS },
{ "wxButton_GetDefaultSize", (PyCFunction) _wrap_wxButton_GetDefaultSize, METH_VARARGS | METH_KEYWORDS },
{ NULL, NULL }
};
#ifdef __cplusplus
@@ -7344,6 +7395,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxDataFormat","_wxDataFormat",0},
{ "_class_wxDropFilesEvent","_wxDropFilesEvent",0},
{ "_wxWindowDestroyEvent","_class_wxWindowDestroyEvent",0},
{ "_wxGDIImage","_class_wxGDIImage",0},
{ "_wxStaticText","_class_wxStaticText",0},
{ "_wxFont","_class_wxFont",0},
{ "_class_wxPyDropTarget","_wxPyDropTarget",0},
@@ -7517,6 +7569,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxSlider","_wxSlider",0},
{ "_class_wxImageList","_wxImageList",0},
{ "_class_wxBitmapButton","_wxBitmapButton",0},
{ "_class_wxGDIImage","_wxGDIImage",0},
{ "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0},
{ "_wxWindowID","_wxCoord",0},
{ "_wxWindowID","_wxPrintQuality",0},

View File

@@ -27,8 +27,9 @@ class wxControlPtr(wxWindowPtr):
def __repr__(self):
return "<C wxControl instance at %s>" % (self.this,)
class wxControl(wxControlPtr):
def __init__(self,this):
self.this = this
def __init__(self,*_args,**_kwargs):
self.this = apply(controlsc.new_wxControl,_args,_kwargs)
self.thisown = 1
@@ -786,6 +787,11 @@ class wxSlider(wxSliderPtr):
#-------------- FUNCTION WRAPPERS ------------------
def wxButton_GetDefaultSize(*_args, **_kwargs):
val = apply(controlsc.wxButton_GetDefaultSize,_args,_kwargs)
if val: val = wxSizePtr(val); val.thisown = 1
return val
#-------------- VARIABLE WRAPPERS ------------------

View File

@@ -6178,6 +6178,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxDataFormat","_wxDataFormat",0},
{ "_class_wxDropFilesEvent","_wxDropFilesEvent",0},
{ "_wxWindowDestroyEvent","_class_wxWindowDestroyEvent",0},
{ "_wxGDIImage","_class_wxGDIImage",0},
{ "_wxStaticText","_class_wxStaticText",0},
{ "_wxFont","_class_wxFont",0},
{ "_class_wxPyDropTarget","_wxPyDropTarget",0},
@@ -6283,6 +6284,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxSlider","_wxSlider",0},
{ "_class_wxImageList","_wxImageList",0},
{ "_class_wxBitmapButton","_wxBitmapButton",0},
{ "_class_wxGDIImage","_wxGDIImage",0},
{ "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0},
{ "_wxWindowID","_wxCoord",0},
{ "_wxWindowID","_wxPrintQuality",0},

View File

@@ -931,6 +931,102 @@ static PyObject *_wrap_wxCommandEvent_IsSelection(PyObject *self, PyObject *args
return _resultobj;
}
#define wxCommandEvent_SetString(_swigobj,_swigarg0) (_swigobj->SetString(_swigarg0))
static PyObject *_wrap_wxCommandEvent_SetString(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxCommandEvent * _arg0;
wxString * _arg1;
PyObject * _argo0 = 0;
PyObject * _obj1 = 0;
char *_kwnames[] = { "self","s", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxCommandEvent_SetString",_kwnames,&_argo0,&_obj1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCommandEvent_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCommandEvent_SetString. Expected _wxCommandEvent_p.");
return NULL;
}
}
{
if (!PyString_Check(_obj1)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
_arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
}
{
wxPy_BEGIN_ALLOW_THREADS;
wxCommandEvent_SetString(_arg0,*_arg1);
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
_resultobj = Py_None;
{
if (_obj1)
delete _arg1;
}
return _resultobj;
}
#define wxCommandEvent_SetExtraLong(_swigobj,_swigarg0) (_swigobj->SetExtraLong(_swigarg0))
static PyObject *_wrap_wxCommandEvent_SetExtraLong(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxCommandEvent * _arg0;
long _arg1;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self","extraLong", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxCommandEvent_SetExtraLong",_kwnames,&_argo0,&_arg1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCommandEvent_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCommandEvent_SetExtraLong. Expected _wxCommandEvent_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
wxCommandEvent_SetExtraLong(_arg0,_arg1);
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxCommandEvent_SetInt(_swigobj,_swigarg0) (_swigobj->SetInt(_swigarg0))
static PyObject *_wrap_wxCommandEvent_SetInt(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxCommandEvent * _arg0;
int _arg1;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self","i", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxCommandEvent_SetInt",_kwnames,&_argo0,&_arg1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCommandEvent_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCommandEvent_SetInt. Expected _wxCommandEvent_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
wxCommandEvent_SetInt(_arg0,_arg1);
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
static void *SwigwxScrollEventTowxCommandEvent(void *ptr) {
wxScrollEvent *src;
wxCommandEvent *dest;
@@ -4982,6 +5078,9 @@ static PyMethodDef eventscMethods[] = {
{ "wxScrollEvent_GetPosition", (PyCFunction) _wrap_wxScrollEvent_GetPosition, METH_VARARGS | METH_KEYWORDS },
{ "wxScrollEvent_GetOrientation", (PyCFunction) _wrap_wxScrollEvent_GetOrientation, METH_VARARGS | METH_KEYWORDS },
{ "new_wxScrollEvent", (PyCFunction) _wrap_new_wxScrollEvent, METH_VARARGS | METH_KEYWORDS },
{ "wxCommandEvent_SetInt", (PyCFunction) _wrap_wxCommandEvent_SetInt, METH_VARARGS | METH_KEYWORDS },
{ "wxCommandEvent_SetExtraLong", (PyCFunction) _wrap_wxCommandEvent_SetExtraLong, METH_VARARGS | METH_KEYWORDS },
{ "wxCommandEvent_SetString", (PyCFunction) _wrap_wxCommandEvent_SetString, METH_VARARGS | METH_KEYWORDS },
{ "wxCommandEvent_IsSelection", (PyCFunction) _wrap_wxCommandEvent_IsSelection, METH_VARARGS | METH_KEYWORDS },
{ "wxCommandEvent_GetString", (PyCFunction) _wrap_wxCommandEvent_GetString, METH_VARARGS | METH_KEYWORDS },
{ "wxCommandEvent_GetSelection", (PyCFunction) _wrap_wxCommandEvent_GetSelection, METH_VARARGS | METH_KEYWORDS },

View File

@@ -121,6 +121,15 @@ class wxCommandEventPtr(wxEventPtr):
def IsSelection(self, *_args, **_kwargs):
val = apply(eventsc.wxCommandEvent_IsSelection,(self,) + _args, _kwargs)
return val
def SetString(self, *_args, **_kwargs):
val = apply(eventsc.wxCommandEvent_SetString,(self,) + _args, _kwargs)
return val
def SetExtraLong(self, *_args, **_kwargs):
val = apply(eventsc.wxCommandEvent_SetExtraLong,(self,) + _args, _kwargs)
return val
def SetInt(self, *_args, **_kwargs):
val = apply(eventsc.wxCommandEvent_SetInt,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxCommandEvent instance at %s>" % (self.this,)
class wxCommandEvent(wxCommandEventPtr):

File diff suppressed because it is too large Load Diff

View File

@@ -2,22 +2,56 @@
import gdic
from misc import *
class wxBitmapPtr :
class wxGDIImagePtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def GetHandle(self, *_args, **_kwargs):
val = apply(gdic.wxGDIImage_GetHandle,(self,) + _args, _kwargs)
return val
def SetHandle(self, *_args, **_kwargs):
val = apply(gdic.wxGDIImage_SetHandle,(self,) + _args, _kwargs)
return val
def Ok(self, *_args, **_kwargs):
val = apply(gdic.wxGDIImage_Ok,(self,) + _args, _kwargs)
return val
def GetWidth(self, *_args, **_kwargs):
val = apply(gdic.wxGDIImage_GetWidth,(self,) + _args, _kwargs)
return val
def GetHeight(self, *_args, **_kwargs):
val = apply(gdic.wxGDIImage_GetHeight,(self,) + _args, _kwargs)
return val
def GetDepth(self, *_args, **_kwargs):
val = apply(gdic.wxGDIImage_GetDepth,(self,) + _args, _kwargs)
return val
def SetWidth(self, *_args, **_kwargs):
val = apply(gdic.wxGDIImage_SetWidth,(self,) + _args, _kwargs)
return val
def SetHeight(self, *_args, **_kwargs):
val = apply(gdic.wxGDIImage_SetHeight,(self,) + _args, _kwargs)
return val
def SetDepth(self, *_args, **_kwargs):
val = apply(gdic.wxGDIImage_SetDepth,(self,) + _args, _kwargs)
return val
def SetSize(self, *_args, **_kwargs):
val = apply(gdic.wxGDIImage_SetSize,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxGDIImage instance at %s>" % (self.this,)
class wxGDIImage(wxGDIImagePtr):
def __init__(self,this):
self.this = this
class wxBitmapPtr(wxGDIImagePtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self,gdic=gdic):
if self.thisown == 1 :
gdic.delete_wxBitmap(self)
def Create(self, *_args, **_kwargs):
val = apply(gdic.wxBitmap_Create,(self,) + _args, _kwargs)
return val
def GetDepth(self, *_args, **_kwargs):
val = apply(gdic.wxBitmap_GetDepth,(self,) + _args, _kwargs)
return val
def GetHeight(self, *_args, **_kwargs):
val = apply(gdic.wxBitmap_GetHeight,(self,) + _args, _kwargs)
return val
def GetPalette(self, *_args, **_kwargs):
val = apply(gdic.wxBitmap_GetPalette,(self,) + _args, _kwargs)
if val: val = wxPalettePtr(val)
@@ -26,33 +60,18 @@ class wxBitmapPtr :
val = apply(gdic.wxBitmap_GetMask,(self,) + _args, _kwargs)
if val: val = wxMaskPtr(val)
return val
def GetWidth(self, *_args, **_kwargs):
val = apply(gdic.wxBitmap_GetWidth,(self,) + _args, _kwargs)
return val
def LoadFile(self, *_args, **_kwargs):
val = apply(gdic.wxBitmap_LoadFile,(self,) + _args, _kwargs)
return val
def Ok(self, *_args, **_kwargs):
val = apply(gdic.wxBitmap_Ok,(self,) + _args, _kwargs)
return val
def SaveFile(self, *_args, **_kwargs):
val = apply(gdic.wxBitmap_SaveFile,(self,) + _args, _kwargs)
return val
def SetDepth(self, *_args, **_kwargs):
val = apply(gdic.wxBitmap_SetDepth,(self,) + _args, _kwargs)
return val
def SetHeight(self, *_args, **_kwargs):
val = apply(gdic.wxBitmap_SetHeight,(self,) + _args, _kwargs)
return val
def SetMask(self, *_args, **_kwargs):
val = apply(gdic.wxBitmap_SetMask,(self,) + _args, _kwargs)
return val
def SetPalette(self, *_args, **_kwargs):
val = apply(gdic.wxBitmap_SetPalette,(self,) + _args, _kwargs)
return val
def SetWidth(self, *_args, **_kwargs):
val = apply(gdic.wxBitmap_SetWidth,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxBitmap instance at %s>" % (self.this,)
class wxBitmap(wxBitmapPtr):
@@ -77,37 +96,16 @@ class wxMask(wxMaskPtr):
class wxIconPtr(wxBitmapPtr):
class wxIconPtr(wxGDIImagePtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self,gdic=gdic):
if self.thisown == 1 :
gdic.delete_wxIcon(self)
def GetDepth(self, *_args, **_kwargs):
val = apply(gdic.wxIcon_GetDepth,(self,) + _args, _kwargs)
return val
def GetHeight(self, *_args, **_kwargs):
val = apply(gdic.wxIcon_GetHeight,(self,) + _args, _kwargs)
return val
def GetWidth(self, *_args, **_kwargs):
val = apply(gdic.wxIcon_GetWidth,(self,) + _args, _kwargs)
return val
def LoadFile(self, *_args, **_kwargs):
val = apply(gdic.wxIcon_LoadFile,(self,) + _args, _kwargs)
return val
def Ok(self, *_args, **_kwargs):
val = apply(gdic.wxIcon_Ok,(self,) + _args, _kwargs)
return val
def SetDepth(self, *_args, **_kwargs):
val = apply(gdic.wxIcon_SetDepth,(self,) + _args, _kwargs)
return val
def SetHeight(self, *_args, **_kwargs):
val = apply(gdic.wxIcon_SetHeight,(self,) + _args, _kwargs)
return val
def SetWidth(self, *_args, **_kwargs):
val = apply(gdic.wxIcon_SetWidth,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxIcon instance at %s>" % (self.this,)
class wxIcon(wxIconPtr):
@@ -118,16 +116,13 @@ class wxIcon(wxIconPtr):
class wxCursorPtr(wxBitmapPtr):
class wxCursorPtr(wxGDIImagePtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self,gdic=gdic):
if self.thisown == 1 :
gdic.delete_wxCursor(self)
def Ok(self, *_args, **_kwargs):
val = apply(gdic.wxCursor_Ok,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxCursor instance at %s>" % (self.this,)
class wxCursor(wxCursorPtr):
@@ -285,13 +280,13 @@ class wxPenPtr :
def GetDashes(self, *_args, **_kwargs):
val = apply(gdic.wxPen_GetDashes,(self,) + _args, _kwargs)
return val
def SetDashes(self, *_args, **_kwargs):
val = apply(gdic.wxPen_SetDashes,(self,) + _args, _kwargs)
return val
def GetStipple(self, *_args, **_kwargs):
val = apply(gdic.wxPen_GetStipple,(self,) + _args, _kwargs)
if val: val = wxBitmapPtr(val)
return val
def SetDashes(self, *_args, **_kwargs):
val = apply(gdic.wxPen_SetDashes,(self,) + _args, _kwargs)
return val
def SetStipple(self, *_args, **_kwargs):
val = apply(gdic.wxPen_SetStipple,(self,) + _args, _kwargs)
return val
@@ -406,6 +401,9 @@ class wxDCPtr :
def DrawRectangle(self, *_args, **_kwargs):
val = apply(gdic.wxDC_DrawRectangle,(self,) + _args, _kwargs)
return val
def DrawRotatedText(self, *_args, **_kwargs):
val = apply(gdic.wxDC_DrawRotatedText,(self,) + _args, _kwargs)
return val
def DrawRoundedRectangle(self, *_args, **_kwargs):
val = apply(gdic.wxDC_DrawRoundedRectangle,(self,) + _args, _kwargs)
return val
@@ -765,11 +763,6 @@ def wxEmptyBitmap(*_args, **_kwargs):
if val: val = wxBitmapPtr(val); val.thisown = 1
return val
def wxNoRefBitmap(*_args, **_kwargs):
val = apply(gdic.wxNoRefBitmap,_args,_kwargs)
if val: val = wxBitmapPtr(val)
return val
def wxBitmapFromData(*_args, **_kwargs):
val = apply(gdic.wxBitmapFromData,_args,_kwargs)
if val: val = wxBitmapPtr(val); val.thisown = 1

View File

@@ -631,6 +631,40 @@ static PyObject *_wrap_wxToolBarTool_GetHeight(PyObject *self, PyObject *args, P
return _resultobj;
}
#define wxToolBarTool_GetControl(_swigobj) (_swigobj->GetControl())
static PyObject *_wrap_wxToolBarTool_GetControl(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxControl * _result;
wxToolBarTool * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxToolBarTool_GetControl",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolBarTool_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBarTool_GetControl. Expected _wxToolBarTool_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (wxControl *)wxToolBarTool_GetControl(_arg0);
wxPy_END_ALLOW_THREADS;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxControl_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
#define wxToolBarTool_m_toolStyle_set(_swigobj,_swigval) (_swigobj->m_toolStyle = _swigval,_swigval)
static PyObject *_wrap_wxToolBarTool_m_toolStyle_set(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@@ -1698,6 +1732,42 @@ static PyObject *_wrap_new_wxToolBar(PyObject *self, PyObject *args, PyObject *k
return _resultobj;
}
#define wxToolBar_AddControl(_swigobj,_swigarg0) (_swigobj->AddControl(_swigarg0))
static PyObject *_wrap_wxToolBar_AddControl(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxToolBar * _arg0;
wxControl * _arg1;
PyObject * _argo0 = 0;
PyObject * _argo1 = 0;
char *_kwnames[] = { "self","control", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxToolBar_AddControl",_kwnames,&_argo0,&_argo1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolBar_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBar_AddControl. Expected _wxToolBar_p.");
return NULL;
}
}
if (_argo1) {
if (_argo1 == Py_None) { _arg1 = NULL; }
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxControl_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxToolBar_AddControl. Expected _wxControl_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (bool )wxToolBar_AddControl(_arg0,_arg1);
wxPy_END_ALLOW_THREADS;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxToolBar_AddSeparator(_swigobj) (_swigobj->AddSeparator())
static PyObject *_wrap_wxToolBar_AddSeparator(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@@ -1725,6 +1795,33 @@ static PyObject *_wrap_wxToolBar_AddSeparator(PyObject *self, PyObject *args, Py
return _resultobj;
}
#define wxToolBar_ClearTools(_swigobj) (_swigobj->ClearTools())
static PyObject *_wrap_wxToolBar_ClearTools(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxToolBar * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxToolBar_ClearTools",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolBar_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBar_ClearTools. Expected _wxToolBar_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
wxToolBar_ClearTools(_arg0);
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
static wxToolBarTool * wxToolBar_AddTool(wxToolBar *self,int toolIndex,const wxBitmap & bitmap1,const wxBitmap & bitmap2,int isToggle,long xPos,long yPos,const wxString & shortHelpString,const wxString & longHelpString) {
return self->AddTool(toolIndex, bitmap1, bitmap2,
isToggle, xPos, yPos, NULL,
@@ -1925,14 +2022,14 @@ static PyObject *_wrap_wxToolBar_FindToolForPosition(PyObject *self, PyObject *a
PyObject * _resultobj;
wxToolBarTool * _result;
wxToolBar * _arg0;
float _arg1;
float _arg2;
long _arg1;
long _arg2;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self","x","y", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Off:wxToolBar_FindToolForPosition",_kwnames,&_argo0,&_arg1,&_arg2))
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oll:wxToolBar_FindToolForPosition",_kwnames,&_argo0,&_arg1,&_arg2))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -2049,6 +2146,35 @@ static PyObject *_wrap_wxToolBar_SetToolBitmapSize(PyObject *self, PyObject *arg
return _resultobj;
}
#define wxToolBar_GetToolMargins(_swigobj) (_swigobj->GetToolMargins())
static PyObject *_wrap_wxToolBar_GetToolMargins(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxSize * _result;
wxToolBar * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxToolBar_GetToolMargins",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolBar_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBar_GetToolMargins. Expected _wxToolBar_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = new wxSize (wxToolBar_GetToolMargins(_arg0));
wxPy_END_ALLOW_THREADS;
} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p");
_resultobj = Py_BuildValue("s",_ptemp);
return _resultobj;
}
#define wxToolBar_GetMaxSize(_swigobj) (_swigobj->GetMaxSize())
static PyObject *_wrap_wxToolBar_GetMaxSize(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@@ -2485,7 +2611,125 @@ static PyObject *_wrap_wxToolBar_ToggleTool(PyObject *self, PyObject *args, PyOb
return _resultobj;
}
#define wxToolBar_SetToggle(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetToggle(_swigarg0,_swigarg1))
static PyObject *_wrap_wxToolBar_SetToggle(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxToolBar * _arg0;
int _arg1;
bool _arg2;
PyObject * _argo0 = 0;
int tempbool2;
char *_kwnames[] = { "self","toolIndex","toggle", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxToolBar_SetToggle",_kwnames,&_argo0,&_arg1,&tempbool2))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolBar_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBar_SetToggle. Expected _wxToolBar_p.");
return NULL;
}
}
_arg2 = (bool ) tempbool2;
{
wxPy_BEGIN_ALLOW_THREADS;
wxToolBar_SetToggle(_arg0,_arg1,_arg2);
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxToolBar_SetMaxRowsCols(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetMaxRowsCols(_swigarg0,_swigarg1))
static PyObject *_wrap_wxToolBar_SetMaxRowsCols(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxToolBar * _arg0;
int _arg1;
int _arg2;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self","rows","cols", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxToolBar_SetMaxRowsCols",_kwnames,&_argo0,&_arg1,&_arg2))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolBar_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBar_SetMaxRowsCols. Expected _wxToolBar_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
wxToolBar_SetMaxRowsCols(_arg0,_arg1,_arg2);
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxToolBar_GetMaxRows(_swigobj) (_swigobj->GetMaxRows())
static PyObject *_wrap_wxToolBar_GetMaxRows(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
int _result;
wxToolBar * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxToolBar_GetMaxRows",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolBar_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBar_GetMaxRows. Expected _wxToolBar_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (int )wxToolBar_GetMaxRows(_arg0);
wxPy_END_ALLOW_THREADS;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxToolBar_GetMaxCols(_swigobj) (_swigobj->GetMaxCols())
static PyObject *_wrap_wxToolBar_GetMaxCols(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
int _result;
wxToolBar * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxToolBar_GetMaxCols",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolBar_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBar_GetMaxCols. Expected _wxToolBar_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (int )wxToolBar_GetMaxCols(_arg0);
wxPy_END_ALLOW_THREADS;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
static PyMethodDef stattoolcMethods[] = {
{ "wxToolBar_GetMaxCols", (PyCFunction) _wrap_wxToolBar_GetMaxCols, METH_VARARGS | METH_KEYWORDS },
{ "wxToolBar_GetMaxRows", (PyCFunction) _wrap_wxToolBar_GetMaxRows, METH_VARARGS | METH_KEYWORDS },
{ "wxToolBar_SetMaxRowsCols", (PyCFunction) _wrap_wxToolBar_SetMaxRowsCols, METH_VARARGS | METH_KEYWORDS },
{ "wxToolBar_SetToggle", (PyCFunction) _wrap_wxToolBar_SetToggle, METH_VARARGS | METH_KEYWORDS },
{ "wxToolBar_ToggleTool", (PyCFunction) _wrap_wxToolBar_ToggleTool, METH_VARARGS | METH_KEYWORDS },
{ "wxToolBar_SetToolSeparation", (PyCFunction) _wrap_wxToolBar_SetToolSeparation, METH_VARARGS | METH_KEYWORDS },
{ "wxToolBar_SetToolPacking", (PyCFunction) _wrap_wxToolBar_SetToolPacking, METH_VARARGS | METH_KEYWORDS },
@@ -2500,6 +2744,7 @@ static PyMethodDef stattoolcMethods[] = {
{ "wxToolBar_GetToolLongHelp", (PyCFunction) _wrap_wxToolBar_GetToolLongHelp, METH_VARARGS | METH_KEYWORDS },
{ "wxToolBar_GetToolEnabled", (PyCFunction) _wrap_wxToolBar_GetToolEnabled, METH_VARARGS | METH_KEYWORDS },
{ "wxToolBar_GetMaxSize", (PyCFunction) _wrap_wxToolBar_GetMaxSize, METH_VARARGS | METH_KEYWORDS },
{ "wxToolBar_GetToolMargins", (PyCFunction) _wrap_wxToolBar_GetToolMargins, METH_VARARGS | METH_KEYWORDS },
{ "wxToolBar_SetToolBitmapSize", (PyCFunction) _wrap_wxToolBar_SetToolBitmapSize, METH_VARARGS | METH_KEYWORDS },
{ "wxToolBar_GetToolBitmapSize", (PyCFunction) _wrap_wxToolBar_GetToolBitmapSize, METH_VARARGS | METH_KEYWORDS },
{ "wxToolBar_GetToolSize", (PyCFunction) _wrap_wxToolBar_GetToolSize, METH_VARARGS | METH_KEYWORDS },
@@ -2507,7 +2752,9 @@ static PyMethodDef stattoolcMethods[] = {
{ "wxToolBar_EnableTool", (PyCFunction) _wrap_wxToolBar_EnableTool, METH_VARARGS | METH_KEYWORDS },
{ "wxToolBar_AddSimpleTool", (PyCFunction) _wrap_wxToolBar_AddSimpleTool, METH_VARARGS | METH_KEYWORDS },
{ "wxToolBar_AddTool", (PyCFunction) _wrap_wxToolBar_AddTool, METH_VARARGS | METH_KEYWORDS },
{ "wxToolBar_ClearTools", (PyCFunction) _wrap_wxToolBar_ClearTools, METH_VARARGS | METH_KEYWORDS },
{ "wxToolBar_AddSeparator", (PyCFunction) _wrap_wxToolBar_AddSeparator, METH_VARARGS | METH_KEYWORDS },
{ "wxToolBar_AddControl", (PyCFunction) _wrap_wxToolBar_AddControl, METH_VARARGS | METH_KEYWORDS },
{ "new_wxToolBar", (PyCFunction) _wrap_new_wxToolBar, METH_VARARGS | METH_KEYWORDS },
{ "wxToolBarTool_m_longHelpString_get", (PyCFunction) _wrap_wxToolBarTool_m_longHelpString_get, METH_VARARGS | METH_KEYWORDS },
{ "wxToolBarTool_m_longHelpString_set", (PyCFunction) _wrap_wxToolBarTool_m_longHelpString_set, METH_VARARGS | METH_KEYWORDS },
@@ -2541,6 +2788,7 @@ static PyMethodDef stattoolcMethods[] = {
{ "wxToolBarTool_m_clientData_set", (PyCFunction) _wrap_wxToolBarTool_m_clientData_set, METH_VARARGS | METH_KEYWORDS },
{ "wxToolBarTool_m_toolStyle_get", (PyCFunction) _wrap_wxToolBarTool_m_toolStyle_get, METH_VARARGS | METH_KEYWORDS },
{ "wxToolBarTool_m_toolStyle_set", (PyCFunction) _wrap_wxToolBarTool_m_toolStyle_set, METH_VARARGS | METH_KEYWORDS },
{ "wxToolBarTool_GetControl", (PyCFunction) _wrap_wxToolBarTool_GetControl, METH_VARARGS | METH_KEYWORDS },
{ "wxToolBarTool_GetHeight", (PyCFunction) _wrap_wxToolBarTool_GetHeight, METH_VARARGS | METH_KEYWORDS },
{ "wxToolBarTool_GetWidth", (PyCFunction) _wrap_wxToolBarTool_GetWidth, METH_VARARGS | METH_KEYWORDS },
{ "wxToolBarTool_SetSize", (PyCFunction) _wrap_wxToolBarTool_SetSize, METH_VARARGS | METH_KEYWORDS },
@@ -2691,6 +2939,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxDataFormat","_wxDataFormat",0},
{ "_class_wxDropFilesEvent","_wxDropFilesEvent",0},
{ "_wxWindowDestroyEvent","_class_wxWindowDestroyEvent",0},
{ "_wxGDIImage","_class_wxGDIImage",0},
{ "_wxStaticText","_class_wxStaticText",0},
{ "_wxFont","_class_wxFont",0},
{ "_class_wxPyDropTarget","_wxPyDropTarget",0},
@@ -2792,6 +3041,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxSlider","_wxSlider",0},
{ "_class_wxImageList","_wxImageList",0},
{ "_class_wxBitmapButton","_wxBitmapButton",0},
{ "_class_wxGDIImage","_wxGDIImage",0},
{ "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0},
{ "_wxWindowID","_wxCoord",0},
{ "_wxWindowID","_wxPrintQuality",0},

View File

@@ -72,6 +72,10 @@ class wxToolBarToolPtr :
def GetHeight(self, *_args, **_kwargs):
val = apply(stattoolc.wxToolBarTool_GetHeight,(self,) + _args, _kwargs)
return val
def GetControl(self, *_args, **_kwargs):
val = apply(stattoolc.wxToolBarTool_GetControl,(self,) + _args, _kwargs)
if val: val = wxControlPtr(val)
return val
def __setattr__(self,name,value):
if name == "m_toolStyle" :
stattoolc.wxToolBarTool_m_toolStyle_set(self,value)
@@ -170,9 +174,15 @@ class wxToolBarPtr(wxControlPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def AddControl(self, *_args, **_kwargs):
val = apply(stattoolc.wxToolBar_AddControl,(self,) + _args, _kwargs)
return val
def AddSeparator(self, *_args, **_kwargs):
val = apply(stattoolc.wxToolBar_AddSeparator,(self,) + _args, _kwargs)
return val
def ClearTools(self, *_args, **_kwargs):
val = apply(stattoolc.wxToolBar_ClearTools,(self,) + _args, _kwargs)
return val
def AddTool(self, *_args, **_kwargs):
val = apply(stattoolc.wxToolBar_AddTool,(self,) + _args, _kwargs)
if val: val = wxToolBarToolPtr(val)
@@ -199,6 +209,10 @@ class wxToolBarPtr(wxControlPtr):
def SetToolBitmapSize(self, *_args, **_kwargs):
val = apply(stattoolc.wxToolBar_SetToolBitmapSize,(self,) + _args, _kwargs)
return val
def GetToolMargins(self, *_args, **_kwargs):
val = apply(stattoolc.wxToolBar_GetToolMargins,(self,) + _args, _kwargs)
if val: val = wxSizePtr(val) ; val.thisown = 1
return val
def GetMaxSize(self, *_args, **_kwargs):
val = apply(stattoolc.wxToolBar_GetMaxSize,(self,) + _args, _kwargs)
if val: val = wxSizePtr(val) ; val.thisown = 1
@@ -242,6 +256,18 @@ class wxToolBarPtr(wxControlPtr):
def ToggleTool(self, *_args, **_kwargs):
val = apply(stattoolc.wxToolBar_ToggleTool,(self,) + _args, _kwargs)
return val
def SetToggle(self, *_args, **_kwargs):
val = apply(stattoolc.wxToolBar_SetToggle,(self,) + _args, _kwargs)
return val
def SetMaxRowsCols(self, *_args, **_kwargs):
val = apply(stattoolc.wxToolBar_SetMaxRowsCols,(self,) + _args, _kwargs)
return val
def GetMaxRows(self, *_args, **_kwargs):
val = apply(stattoolc.wxToolBar_GetMaxRows,(self,) + _args, _kwargs)
return val
def GetMaxCols(self, *_args, **_kwargs):
val = apply(stattoolc.wxToolBar_GetMaxCols,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxToolBar instance at %s>" % (self.this,)
class wxToolBar(wxToolBarPtr):

View File

@@ -529,6 +529,40 @@ static PyObject *_wrap_wxEvtHandler_Connect(PyObject *self, PyObject *args, PyOb
return _resultobj;
}
static bool wxEvtHandler_Disconnect(wxEvtHandler *self,int id,int lastId,wxEventType eventType) {
return self->Disconnect(id, lastId, eventType,
(wxObjectEventFunction)
&wxPyCallback::EventThunker);
}
static PyObject *_wrap_wxEvtHandler_Disconnect(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxEvtHandler * _arg0;
int _arg1;
int _arg2 = (int ) -1;
wxEventType _arg3 = (wxEventType ) wxEVT_NULL;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self","id","lastId","eventType", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|ii:wxEvtHandler_Disconnect",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxEvtHandler_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEvtHandler_Disconnect. Expected _wxEvtHandler_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (bool )wxEvtHandler_Disconnect(_arg0,_arg1,_arg2,_arg3);
wxPy_END_ALLOW_THREADS;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
static void *SwigwxValidatorTowxEvtHandler(void *ptr) {
wxValidator *src;
wxEvtHandler *dest;
@@ -8651,6 +8685,7 @@ static PyMethodDef windowscMethods[] = {
{ "wxValidator_GetWindow", (PyCFunction) _wrap_wxValidator_GetWindow, METH_VARARGS | METH_KEYWORDS },
{ "wxValidator_Clone", (PyCFunction) _wrap_wxValidator_Clone, METH_VARARGS | METH_KEYWORDS },
{ "new_wxValidator", (PyCFunction) _wrap_new_wxValidator, METH_VARARGS | METH_KEYWORDS },
{ "wxEvtHandler_Disconnect", (PyCFunction) _wrap_wxEvtHandler_Disconnect, METH_VARARGS | METH_KEYWORDS },
{ "wxEvtHandler_Connect", (PyCFunction) _wrap_wxEvtHandler_Connect, METH_VARARGS | METH_KEYWORDS },
{ "wxEvtHandler_SetPreviousHandler", (PyCFunction) _wrap_wxEvtHandler_SetPreviousHandler, METH_VARARGS | METH_KEYWORDS },
{ "wxEvtHandler_SetNextHandler", (PyCFunction) _wrap_wxEvtHandler_SetNextHandler, METH_VARARGS | METH_KEYWORDS },
@@ -8769,6 +8804,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_EBool","_wxWindowID",0},
{ "_class_wxRegion","_wxRegion",0},
{ "_class_wxDataFormat","_wxDataFormat",0},
{ "_wxGDIImage","_class_wxGDIImage",0},
{ "_wxFont","_class_wxFont",0},
{ "_class_wxPyDropTarget","_wxPyDropTarget",0},
{ "_unsigned_long","_wxDash",0},
@@ -8844,6 +8880,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxPyDataObjectSimple","_wxPyDataObjectSimple",0},
{ "_class_wxPyDropSource","_wxPyDropSource",0},
{ "_class_wxImageList","_wxImageList",0},
{ "_class_wxGDIImage","_wxGDIImage",0},
{ "_wxWindowID","_wxCoord",0},
{ "_wxWindowID","_wxPrintQuality",0},
{ "_wxWindowID","_size_t",0},

View File

@@ -50,6 +50,9 @@ class wxEvtHandlerPtr :
def Connect(self, *_args, **_kwargs):
val = apply(windowsc.wxEvtHandler_Connect,(self,) + _args, _kwargs)
return val
def Disconnect(self, *_args, **_kwargs):
val = apply(windowsc.wxEvtHandler_Disconnect,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxEvtHandler instance at %s>" % (self.this,)
class wxEvtHandler(wxEvtHandlerPtr):

View File

@@ -57,8 +57,6 @@ public:
void DrawFieldText(wxDC& dc, int i);
void InitColours(void);
// OnSysColourChanged(wxSysColourChangedEvent& event);
void SetFieldsCount(int number = 1);
void SetStatusText(const wxString& text, int i = 0);
void SetStatusWidths(int LCOUNT, int* LIST);
@@ -71,22 +69,19 @@ class wxToolBarTool {
public:
wxToolBarTool();
~wxToolBarTool();
#ifdef __WXMSW__
void SetSize( long w, long h ) { m_width = w; m_height = h; }
long GetWidth () const { return m_width; }
long GetHeight () const { return m_height; }
#endif
wxControl *GetControl();
public:
int m_toolStyle;
wxObject * m_clientData;
int m_index;
#ifdef __WXMSW__
long m_x;
long m_y;
long m_width;
long m_height;
#endif
bool m_toggleState;
bool m_isToggle;
bool m_deleteSecondBitmap;
@@ -114,7 +109,9 @@ public:
%pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)"
bool AddControl(wxControl * control);
void AddSeparator();
void ClearTools();
// Ignoge the clientData for now...
%addmethods {
@@ -143,17 +140,14 @@ public:
}
// void DrawTool(wxMemoryDC& memDC, wxToolBarTool* tool);
void EnableTool(int toolIndex, const bool enable);
#ifdef __WXMSW__
wxToolBarTool* FindToolForPosition(const float x, const float y);
void EnableTool(int toolIndex, bool enable);
wxToolBarTool* FindToolForPosition(long x, long y);
wxSize GetToolSize();
wxSize GetToolBitmapSize();
void SetToolBitmapSize(const wxSize& size);
// wxSize GetMargins();
wxSize GetToolMargins();
wxSize GetMaxSize();
// wxObject* GetToolClientData(int toolIndex);
#endif
bool GetToolEnabled(int toolIndex);
wxString GetToolLongHelp(int toolIndex);
int GetToolPacking();
@@ -161,10 +155,6 @@ public:
wxString GetToolShortHelp(int toolIndex);
bool GetToolState(int toolIndex);
// TODO: figure out how to handle these
//bool OnLeftClick(int toolIndex, bool toggleDown);
//void OnMouseEnter(int toolIndex);
//void OnRightClick(int toolIndex, float x, float y);
bool Realize();
@@ -174,6 +164,12 @@ public:
void SetToolPacking(int packing);
void SetToolSeparation(int separation);
void ToggleTool(int toolIndex, const bool toggle);
void SetToggle(int toolIndex, bool toggle);
void SetMaxRowsCols(int rows, int cols);
int GetMaxRows();
int GetMaxCols();
};

View File

@@ -55,6 +55,14 @@ public:
new wxPyCallback(func));
}
}
bool Disconnect(int id, int lastId = -1,
wxEventType eventType = wxEVT_NULL) {
return self->Disconnect(id, lastId, eventType,
(wxObjectEventFunction)
&wxPyCallback::EventThunker);
}
}
};