};
+//---------------------------------------------------------------------------
+
+class wxPyDropSource : public wxDropSource {
+public:
+#ifndef __WXGTK__
+ wxPyDropSource(wxWindow *win = NULL,
+ const wxCursor © = wxNullCursor,
+ const wxCursor &move = wxNullCursor,
+ const wxCursor &none = wxNullCursor)
+ : wxDropSource(win, copy, move, none) {}
+#else
+ wxPyDropSource(wxWindow *win = NULL,
+ const wxIcon& copy = wxNullIcon,
+ const wxIcon& move = wxNullIcon,
+ const wxIcon& none = wxNullIcon)
+ : wxDropSource(win, copy, move, none) {}
+#endif
+ ~wxPyDropSource() { }
+
+ DEC_PYCALLBACK_BOOL_DR(GiveFeedback);
+ PYPRIVATE;
+};
+
+
+class wxPyDropTarget : public wxDropTarget {
+public:
+ wxPyDropTarget(wxDataObject *dataObject = NULL)
+ : wxDropTarget(dataObject) {}
+
+ // called when mouse leaves the window: might be used to remove the
+ // feedback which was given in OnEnter()
+ DEC_PYCALLBACK__(OnLeave);
+
+ // called when the mouse enters the window (only once until OnLeave())
+ DEC_PYCALLBACK_DR_2WXCDR(OnEnter);
+
+ // called when the mouse moves in the window - shouldn't take long to
+ // execute or otherwise mouse movement would be too slow
+ DEC_PYCALLBACK_DR_2WXCDR(OnDragOver);
+
+ // called after OnDrop() returns True: you will usually just call
+ // GetData() from here and, probably, also refresh something to update the
+ // new data and, finally, return the code indicating how did the operation
+ // complete (returning default value in case of success and wxDragError on
+ // failure is usually ok)
+ DEC_PYCALLBACK_DR_2WXCDR_pure(OnData);
+
+ // this function is called when data is dropped at position (x, y) - if it
+ // returns True, OnData() will be called immediately afterwards which will
+ // allow to retrieve the data dropped.
+ DEC_PYCALLBACK_BOOL_INTINT(OnDrop);
+
+ PYPRIVATE;
+};
+
+
+
+
//---------------------------------------------------------------------------
class wxPyVScrolledWindow;
#ifndef __pydrawxxx_h__
#define __pydrawxxx_h__
+void wxPyDrawList_SetAPIPtr();
+
typedef bool (*wxPyDrawListOp_t)(wxDC& dc, PyObject* coords);
PyObject* wxPyDrawXXXList(wxDC& dc, wxPyDrawListOp_t doDraw,
PyObject* pyCoords, PyObject* pyPens, PyObject* pyBrushes);
#include <wx/dcps.h>
#include <wx/dirctrl.h>
#include <wx/dirdlg.h>
+#include <wx/dnd.h>
#include <wx/docview.h>
#include <wx/encconv.h>
#include <wx/fdrepdlg.h>
//---------------------------------------------------------------------------
-%typemap(in) wxDateTime::TimeZone& {
+%typemap(in) wxDateTime::TimeZone& (bool temp=False) {
$1 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong($input));
+ temp = True;
}
%typemap(python,freearg) wxDateTime::TimeZone& {
- if ($1) delete $1;
+ if (temp$argnum) delete $1;
}
//---------------------------------------------------------------------------
%{
-#include <wx/dnd.h>
%}
//---------------------------------------------------------------------------
%{
-class wxPyDropSource : public wxDropSource {
-public:
-#ifndef __WXGTK__
- wxPyDropSource(wxWindow *win = NULL,
- const wxCursor © = wxNullCursor,
- const wxCursor &move = wxNullCursor,
- const wxCursor &none = wxNullCursor)
- : wxDropSource(win, copy, move, none) {}
-#else
- wxPyDropSource(wxWindow *win = NULL,
- const wxIcon& copy = wxNullIcon,
- const wxIcon& move = wxNullIcon,
- const wxIcon& none = wxNullIcon)
- : wxDropSource(win, copy, move, none) {}
-#endif
- ~wxPyDropSource() { }
-
- DEC_PYCALLBACK_BOOL_DR(GiveFeedback);
- PYPRIVATE;
-};
-
IMP_PYCALLBACK_BOOL_DR(wxPyDropSource, wxDropSource, GiveFeedback);
-
%}
%{
-class wxPyDropTarget : public wxDropTarget {
-public:
- wxPyDropTarget(wxDataObject *dataObject = NULL)
- : wxDropTarget(dataObject) {}
-
- // called when mouse leaves the window: might be used to remove the
- // feedback which was given in OnEnter()
- DEC_PYCALLBACK__(OnLeave);
-
- // called when the mouse enters the window (only once until OnLeave())
- DEC_PYCALLBACK_DR_2WXCDR(OnEnter);
-
- // called when the mouse moves in the window - shouldn't take long to
- // execute or otherwise mouse movement would be too slow
- DEC_PYCALLBACK_DR_2WXCDR(OnDragOver);
-
- // called after OnDrop() returns True: you will usually just call
- // GetData() from here and, probably, also refresh something to update the
- // new data and, finally, return the code indicating how did the operation
- // complete (returning default value in case of success and wxDragError on
- // failure is usually ok)
- DEC_PYCALLBACK_DR_2WXCDR_pure(OnData);
-
- // this function is called when data is dropped at position (x, y) - if it
- // returns True, OnData() will be called immediately afterwards which will
- // allow to retrieve the data dropped.
- DEC_PYCALLBACK_BOOL_INTINT(OnDrop);
-
- PYPRIVATE;
-};
-
IMP_PYCALLBACK__(wxPyDropTarget, wxDropTarget, OnLeave);
IMP_PYCALLBACK_DR_2WXCDR(wxPyDropTarget, wxDropTarget, OnEnter);
IMP_PYCALLBACK_DR_2WXCDR(wxPyDropTarget, wxDropTarget, OnDragOver);
IMP_PYCALLBACK_DR_2WXCDR_pure(wxPyDropTarget, wxDropTarget, OnData);
IMP_PYCALLBACK_BOOL_INTINT(wxPyDropTarget, wxDropTarget, OnDrop);
-
%}
virtual void SetStatusWidths(int widths, const int* widths_field); // uses typemap in _toplvl.i
// Get the position and size of the field's internal bounding rectangle
- virtual bool GetFieldRect(int i, wxRect& rect) const;
-
+ %extend {
+ wxRect GetFieldRect(int i) {
+ wxRect r;
+ self->GetFieldRect(i, r);
+ return r;
+ }
+ }
+
// sets the minimal vertical size of the status bar
virtual void SetMinHeight(int height);
%name(Timer) class wxPyTimer : public wxEvtHandler
{
public:
+ %addtofunc wxPyTimer "self._setCallbackInfo(self, Timer)"
// if you don't call SetOwner() or provide an owner in the contstructor
// then you must override Notify() inorder to receive the timer
wxPyTimer(wxEvtHandler *owner=NULL, int id = -1);
virtual ~wxPyTimer();
+ void _setCallbackInfo(PyObject* self, PyObject* _class);
+
// Set the owner instance that will receive the EVT_TIMER events using the
// given id.
void SetOwner(wxEvtHandler *owner, int id = -1);
// override this in your wxTimer-derived class if you want to process timer
// messages in it, use non default ctor or SetOwner() otherwise
- virtual void Notify();
+ //virtual void Notify();
// return True if the timer is running
virtual bool IsRunning() const;
// set/retrieve the drop target associated with this window (may be
// NULL; it's owned by the window and will be deleted by it)
%addtofunc SetDropTarget "args[1].thisown = 0"
- virtual void SetDropTarget( wxDropTarget *dropTarget );
- virtual wxDropTarget *GetDropTarget() const;
+ virtual void SetDropTarget( wxPyDropTarget *dropTarget );
+ virtual wxPyDropTarget *GetDropTarget() const;
#ifdef __WXMSW__ // TODO: should I drop-kick this?
void DragAcceptFiles(bool accept);
#include "wx/wxPython/pydrawxxx.h"
-//----------------------------------------------------------------------
+//---------------------------------------------------------------------------
+// Called from _gdiinit so we can do the API import while the GIL is held
+void wxPyDrawList_SetAPIPtr()
+{
+ wxPyCoreAPI_IMPORT();
+}
-PyObject* wxPyDrawXXXList(wxDC& dc, wxPyDrawListOp_t doDraw,
- PyObject* pyCoords, PyObject* pyPens, PyObject* pyBrushes) {
+PyObject* wxPyDrawXXXList(wxDC& dc, wxPyDrawListOp_t doDraw,
+ PyObject* pyCoords, PyObject* pyPens, PyObject* pyBrushes)
+{
wxPyBeginBlockThreads();
- if ( !wxPyCoreAPIPtr)
- wxPyCoreAPI_IMPORT();
-
bool isFastSeq = PyList_Check(pyCoords) || PyTuple_Check(pyCoords);
bool isFastPens = PyList_Check(pyPens) || PyTuple_Check(pyPens);
bool isFastBrushes = PyList_Check(pyBrushes) || PyTuple_Check(pyBrushes);
-bool wxPyDrawXXXPoint(wxDC& dc, PyObject* coords) {
+bool wxPyDrawXXXPoint(wxDC& dc, PyObject* coords)
+{
int x, y;
if (! wxPy2int_seq_helper(coords, &x, &y)) {
return True;
}
-bool wxPyDrawXXXLine(wxDC& dc, PyObject* coords) {
+bool wxPyDrawXXXLine(wxDC& dc, PyObject* coords)
+{
int x1, y1, x2, y2;
if (! wxPy4int_seq_helper(coords, &x1, &y1, &x2, &y2)) {
return True;
}
-bool wxPyDrawXXXRectangle(wxDC& dc, PyObject* coords) {
+bool wxPyDrawXXXRectangle(wxDC& dc, PyObject* coords)
+{
int x, y, w, h;
if (! wxPy4int_seq_helper(coords, &x, &y, &w, &h)) {
return True;
}
-bool wxPyDrawXXXEllipse(wxDC& dc, PyObject* coords) {
+bool wxPyDrawXXXEllipse(wxDC& dc, PyObject* coords)
+{
int x, y, w, h;
if (! wxPy4int_seq_helper(coords, &x, &y, &w, &h)) {
}
-bool wxPyDrawXXXPolygon(wxDC& dc, PyObject* coords) {
+bool wxPyDrawXXXPolygon(wxDC& dc, PyObject* coords)
+{
wxPoint* points;
int numPoints;
}
-//----------------------------------------------------------------------
+//---------------------------------------------------------------------------
-PyObject* wxPyDrawTextList(wxDC& dc, PyObject* textList, PyObject* pyPoints, PyObject* foregroundList, PyObject* backgroundList) {
+PyObject* wxPyDrawTextList(wxDC& dc, PyObject* textList, PyObject* pyPoints, PyObject* foregroundList, PyObject* backgroundList)
+{
wxPyBeginBlockThreads();
- if ( !wxPyCoreAPIPtr)
- wxPyCoreAPI_IMPORT();
-
bool isFastSeq = PyList_Check(pyPoints) || PyTuple_Check(pyPoints);
bool isFastText = PyList_Check(textList) || PyTuple_Check(textList);
bool isFastForeground = PyList_Check(foregroundList) || PyTuple_Check(foregroundList);
-//----------------------------------------------------------------------
+//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
+%init %{
+ // Work around a chicken/egg problem in drawlist.cpp
+ wxPyDrawList_SetAPIPtr();
+%}
+
//---------------------------------------------------------------------------
{
public:
%addtofunc wxGridCellChoiceEditor "self._setOORInfo(self)"
- wxGridCellChoiceEditor(int LCOUNT = 0,
- const wxString* choices = NULL,
+ wxGridCellChoiceEditor(int choices = 0,
+ const wxString* choices_array = NULL,
bool allowOthers = False);
virtual wxString GetValue();
};
return _core.Window_GetToolTip(*args, **kwargs)
def SetDropTarget(*args, **kwargs):
- """SetDropTarget(wxDropTarget dropTarget)"""
+ """SetDropTarget(wxPyDropTarget dropTarget)"""
val = _core.Window_SetDropTarget(*args, **kwargs)
args[1].thisown = 0
return val
def GetDropTarget(*args, **kwargs):
- """GetDropTarget() -> wxDropTarget"""
+ """GetDropTarget() -> wxPyDropTarget"""
return _core.Window_GetDropTarget(*args, **kwargs)
def SetConstraints(*args, **kwargs):
#define SWIGTYPE_p_wxPyApp swig_types[103]
#define SWIGTYPE_p_wxCommandEvent swig_types[104]
#define SWIGTYPE_p_wxPyCommandEvent swig_types[105]
-#define SWIGTYPE_p_wxDropTarget swig_types[106]
+#define SWIGTYPE_p_wxPyDropTarget swig_types[106]
#define SWIGTYPE_p_wxChildFocusEvent swig_types[107]
#define SWIGTYPE_p_wxFocusEvent swig_types[108]
#define SWIGTYPE_p_wxDropFilesEvent swig_types[109]
static PyObject *_wrap_Window_SetDropTarget(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxWindow *arg1 = (wxWindow *) 0 ;
- wxDropTarget *arg2 = (wxDropTarget *) 0 ;
+ wxPyDropTarget *arg2 = (wxPyDropTarget *) 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Window_SetDropTarget",kwnames,&obj0,&obj1)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
- if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxDropTarget,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
+ if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyDropTarget,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
(arg1)->SetDropTarget(arg2);
static PyObject *_wrap_Window_GetDropTarget(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxWindow *arg1 = (wxWindow *) 0 ;
- wxDropTarget *result;
+ wxPyDropTarget *result;
PyObject * obj0 = 0 ;
char *kwnames[] = {
(char *) "self", NULL
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (wxDropTarget *)((wxWindow const *)arg1)->GetDropTarget();
+ result = (wxPyDropTarget *)((wxWindow const *)arg1)->GetDropTarget();
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
- resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_wxDropTarget, 0);
+ resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_wxPyDropTarget, 0);
return resultobj;
fail:
return NULL;
static swig_type_info _swigt__p_wxPyApp[] = {{"_p_wxPyApp", 0, "wxPyApp *", 0},{"_p_wxPyApp"},{0}};
static swig_type_info _swigt__p_wxCommandEvent[] = {{"_p_wxCommandEvent", 0, "wxCommandEvent *", 0},{"_p_wxChildFocusEvent", _p_wxChildFocusEventTo_p_wxCommandEvent},{"_p_wxScrollEvent", _p_wxScrollEventTo_p_wxCommandEvent},{"_p_wxWindowCreateEvent", _p_wxWindowCreateEventTo_p_wxCommandEvent},{"_p_wxUpdateUIEvent", _p_wxUpdateUIEventTo_p_wxCommandEvent},{"_p_wxWindowDestroyEvent", _p_wxWindowDestroyEventTo_p_wxCommandEvent},{"_p_wxContextMenuEvent", _p_wxContextMenuEventTo_p_wxCommandEvent},{"_p_wxCommandEvent"},{"_p_wxNotifyEvent", _p_wxNotifyEventTo_p_wxCommandEvent},{"_p_wxPyCommandEvent", _p_wxPyCommandEventTo_p_wxCommandEvent},{0}};
static swig_type_info _swigt__p_wxPyCommandEvent[] = {{"_p_wxPyCommandEvent", 0, "wxPyCommandEvent *", 0},{"_p_wxPyCommandEvent"},{0}};
-static swig_type_info _swigt__p_wxDropTarget[] = {{"_p_wxDropTarget", 0, "wxDropTarget *", 0},{"_p_wxDropTarget"},{0}};
+static swig_type_info _swigt__p_wxPyDropTarget[] = {{"_p_wxPyDropTarget", 0, "wxPyDropTarget *", 0},{"_p_wxPyDropTarget"},{0}};
static swig_type_info _swigt__p_wxChildFocusEvent[] = {{"_p_wxChildFocusEvent", 0, "wxChildFocusEvent *", 0},{"_p_wxChildFocusEvent"},{0}};
static swig_type_info _swigt__p_wxFocusEvent[] = {{"_p_wxFocusEvent", 0, "wxFocusEvent *", 0},{"_p_wxFocusEvent"},{0}};
static swig_type_info _swigt__p_wxDropFilesEvent[] = {{"_p_wxDropFilesEvent", 0, "wxDropFilesEvent *", 0},{"_p_wxDropFilesEvent"},{0}};
_swigt__p_wxPyApp,
_swigt__p_wxCommandEvent,
_swigt__p_wxPyCommandEvent,
-_swigt__p_wxDropTarget,
+_swigt__p_wxPyDropTarget,
_swigt__p_wxChildFocusEvent,
_swigt__p_wxFocusEvent,
_swigt__p_wxDropFilesEvent,
SWIG_addvarlink(SWIG_globals,(char*)"ThePenList",_wrap_ThePenList_get, _wrap_ThePenList_set);
SWIG_addvarlink(SWIG_globals,(char*)"TheBrushList",_wrap_TheBrushList_get, _wrap_TheBrushList_set);
SWIG_addvarlink(SWIG_globals,(char*)"TheColourDatabase",_wrap_TheColourDatabase_get, _wrap_TheColourDatabase_set);
+
+ // Work around a chicken/egg problem in drawlist.cpp
+ wxPyDrawList_SetAPIPtr();
+
}
def __repr__(self):
return "<%s.%s; proxy of C++ wxGridCellChoiceEditor instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
- """__init__(int LCOUNT=0, wxString choices=None, bool allowOthers=False) -> GridCellChoiceEditor"""
+ """__init__(int choices=0, wxString choices_array=None, bool allowOthers=False) -> GridCellChoiceEditor"""
newobj = _grid.new_GridCellChoiceEditor(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
wxString *arg2 = (wxString *) NULL ;
bool arg3 = (bool) False ;
wxGridCellChoiceEditor *result;
+ PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
- PyObject * obj2 = 0 ;
char *kwnames[] = {
- (char *) "LCOUNT",(char *) "choices",(char *) "allowOthers", NULL
+ (char *) "choices",(char *) "allowOthers", NULL
};
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|iOO:new_GridCellChoiceEditor",kwnames,&arg1,&obj1,&obj2)) goto fail;
- if (obj1) {
- if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxString,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OO:new_GridCellChoiceEditor",kwnames,&obj0,&obj1)) goto fail;
+ if (obj0) {
+ {
+ arg1 = PyList_Size(obj0);
+ arg2 = wxString_LIST_helper(obj0);
+ if (arg2 == NULL) SWIG_fail;
+ }
}
- if (obj2) {
- arg3 = PyInt_AsLong(obj2) ? true : false;
+ if (obj1) {
+ arg3 = PyInt_AsLong(obj1) ? true : false;
if (PyErr_Occurred()) SWIG_fail;
}
{
if (PyErr_Occurred()) SWIG_fail;
}
resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_wxGridCellChoiceEditor, 1);
+ {
+ if (arg2) delete [] arg2;
+ }
return resultobj;
fail:
+ {
+ if (arg2) delete [] arg2;
+ }
return NULL;
}
self.this = newobj.this
self.thisown = 1
del newobj.thisown
+ self._setCallbackInfo(self, Timer)
+
def __del__(self, destroy=_misc.delete_Timer):
"""__del__()"""
try:
if self.thisown: destroy(self)
except: pass
+ def _setCallbackInfo(*args, **kwargs):
+ """_setCallbackInfo(PyObject self, PyObject _class)"""
+ return _misc.Timer__setCallbackInfo(*args, **kwargs)
+
def SetOwner(*args, **kwargs):
"""SetOwner(EvtHandler owner, int id=-1)"""
return _misc.Timer_SetOwner(*args, **kwargs)
"""Stop()"""
return _misc.Timer_Stop(*args, **kwargs)
- def Notify(*args, **kwargs):
- """Notify()"""
- return _misc.Timer_Notify(*args, **kwargs)
-
def IsRunning(*args, **kwargs):
"""IsRunning() -> bool"""
return _misc.Timer_IsRunning(*args, **kwargs)
};
-#include <wx/dnd.h>
-class wxPyDropSource : public wxDropSource {
-public:
-#ifndef __WXGTK__
- wxPyDropSource(wxWindow *win = NULL,
- const wxCursor © = wxNullCursor,
- const wxCursor &move = wxNullCursor,
- const wxCursor &none = wxNullCursor)
- : wxDropSource(win, copy, move, none) {}
-#else
- wxPyDropSource(wxWindow *win = NULL,
- const wxIcon& copy = wxNullIcon,
- const wxIcon& move = wxNullIcon,
- const wxIcon& none = wxNullIcon)
- : wxDropSource(win, copy, move, none) {}
-#endif
- ~wxPyDropSource() { }
-
- DEC_PYCALLBACK_BOOL_DR(GiveFeedback);
- PYPRIVATE;
-};
-
IMP_PYCALLBACK_BOOL_DR(wxPyDropSource, wxDropSource, GiveFeedback);
-
-class wxPyDropTarget : public wxDropTarget {
-public:
- wxPyDropTarget(wxDataObject *dataObject = NULL)
- : wxDropTarget(dataObject) {}
-
- // called when mouse leaves the window: might be used to remove the
- // feedback which was given in OnEnter()
- DEC_PYCALLBACK__(OnLeave);
-
- // called when the mouse enters the window (only once until OnLeave())
- DEC_PYCALLBACK_DR_2WXCDR(OnEnter);
-
- // called when the mouse moves in the window - shouldn't take long to
- // execute or otherwise mouse movement would be too slow
- DEC_PYCALLBACK_DR_2WXCDR(OnDragOver);
-
- // called after OnDrop() returns True: you will usually just call
- // GetData() from here and, probably, also refresh something to update the
- // new data and, finally, return the code indicating how did the operation
- // complete (returning default value in case of success and wxDragError on
- // failure is usually ok)
- DEC_PYCALLBACK_DR_2WXCDR_pure(OnData);
-
- // this function is called when data is dropped at position (x, y) - if it
- // returns True, OnData() will be called immediately afterwards which will
- // allow to retrieve the data dropped.
- DEC_PYCALLBACK_BOOL_INTINT(OnDrop);
-
- PYPRIVATE;
-};
-
IMP_PYCALLBACK__(wxPyDropTarget, wxDropTarget, OnLeave);
IMP_PYCALLBACK_DR_2WXCDR(wxPyDropTarget, wxDropTarget, OnEnter);
IMP_PYCALLBACK_DR_2WXCDR(wxPyDropTarget, wxDropTarget, OnDragOver);
IMP_PYCALLBACK_BOOL_INTINT(wxPyDropTarget, wxDropTarget, OnDrop);
-
class wxPyTextDropTarget : public wxTextDropTarget {
public:
wxPyTextDropTarget() {}
}
+static PyObject *_wrap_Timer__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject *resultobj;
+ wxPyTimer *arg1 = (wxPyTimer *) 0 ;
+ PyObject *arg2 = (PyObject *) 0 ;
+ PyObject *arg3 = (PyObject *) 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ PyObject * obj2 = 0 ;
+ char *kwnames[] = {
+ (char *) "self",(char *) "self",(char *) "_class", NULL
+ };
+
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:Timer__setCallbackInfo",kwnames,&obj0,&obj1,&obj2)) goto fail;
+ if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTimer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
+ arg2 = obj1;
+ arg3 = obj2;
+ {
+ PyThreadState* __tstate = wxPyBeginAllowThreads();
+ (arg1)->_setCallbackInfo(arg2,arg3);
+
+ wxPyEndAllowThreads(__tstate);
+ if (PyErr_Occurred()) SWIG_fail;
+ }
+ Py_INCREF(Py_None); resultobj = Py_None;
+ return resultobj;
+ fail:
+ return NULL;
+}
+
+
static PyObject *_wrap_Timer_SetOwner(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxPyTimer *arg1 = (wxPyTimer *) 0 ;
}
-static PyObject *_wrap_Timer_Notify(PyObject *self, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxPyTimer *arg1 = (wxPyTimer *) 0 ;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "self", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Timer_Notify",kwnames,&obj0)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTimer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- (arg1)->Notify();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
static PyObject *_wrap_Timer_IsRunning(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxPyTimer *arg1 = (wxPyTimer *) 0 ;
wxDateTime::TimeZone *arg2 = 0 ;
bool arg3 = (bool) False ;
wxDateTime result;
+ bool temp2 = False ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxDateTime,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
{
arg2 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(obj1));
+ temp2 = True;
}
if (obj2) {
arg3 = PyInt_AsLong(obj2) ? true : false;
resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_wxDateTime, 1);
}
{
- if (arg2) delete arg2;
+ if (temp2) delete arg2;
}
return resultobj;
fail:
{
- if (arg2) delete arg2;
+ if (temp2) delete arg2;
}
return NULL;
}
wxDateTime::TimeZone *arg2 = 0 ;
bool arg3 = (bool) False ;
wxDateTime *result;
+ bool temp2 = False ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxDateTime,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
{
arg2 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(obj1));
+ temp2 = True;
}
if (obj2) {
arg3 = PyInt_AsLong(obj2) ? true : false;
}
resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_wxDateTime, 0);
{
- if (arg2) delete arg2;
+ if (temp2) delete arg2;
}
return resultobj;
fail:
{
- if (arg2) delete arg2;
+ if (temp2) delete arg2;
}
return NULL;
}
wxDateTime::TimeZone const &arg2_defvalue = LOCAL_TZ ;
wxDateTime::TimeZone *arg2 = (wxDateTime::TimeZone *) &arg2_defvalue ;
int result;
+ bool temp2 = False ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
if (obj1) {
{
arg2 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(obj1));
+ temp2 = True;
}
}
{
}
resultobj = PyInt_FromLong((long)result);
{
- if (arg2) delete arg2;
+ if (temp2) delete arg2;
}
return resultobj;
fail:
{
- if (arg2) delete arg2;
+ if (temp2) delete arg2;
}
return NULL;
}
wxDateTime::TimeZone const &arg2_defvalue = LOCAL_TZ ;
wxDateTime::TimeZone *arg2 = (wxDateTime::TimeZone *) &arg2_defvalue ;
int result;
+ bool temp2 = False ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
if (obj1) {
{
arg2 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(obj1));
+ temp2 = True;
}
}
{
}
resultobj = PyInt_FromLong((long)result);
{
- if (arg2) delete arg2;
+ if (temp2) delete arg2;
}
return resultobj;
fail:
{
- if (arg2) delete arg2;
+ if (temp2) delete arg2;
}
return NULL;
}
wxDateTime::TimeZone const &arg2_defvalue = LOCAL_TZ ;
wxDateTime::TimeZone *arg2 = (wxDateTime::TimeZone *) &arg2_defvalue ;
int result;
+ bool temp2 = False ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
if (obj1) {
{
arg2 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(obj1));
+ temp2 = True;
}
}
{
}
resultobj = PyInt_FromLong((long)result);
{
- if (arg2) delete arg2;
+ if (temp2) delete arg2;
}
return resultobj;
fail:
{
- if (arg2) delete arg2;
+ if (temp2) delete arg2;
}
return NULL;
}
wxDateTime::TimeZone const &arg2_defvalue = LOCAL_TZ ;
wxDateTime::TimeZone *arg2 = (wxDateTime::TimeZone *) &arg2_defvalue ;
int result;
+ bool temp2 = False ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
if (obj1) {
{
arg2 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(obj1));
+ temp2 = True;
}
}
{
}
resultobj = PyInt_FromLong((long)result);
{
- if (arg2) delete arg2;
+ if (temp2) delete arg2;
}
return resultobj;
fail:
{
- if (arg2) delete arg2;
+ if (temp2) delete arg2;
}
return NULL;
}
wxDateTime::TimeZone const &arg2_defvalue = LOCAL_TZ ;
wxDateTime::TimeZone *arg2 = (wxDateTime::TimeZone *) &arg2_defvalue ;
int result;
+ bool temp2 = False ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
if (obj1) {
{
arg2 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(obj1));
+ temp2 = True;
}
}
{
}
resultobj = PyInt_FromLong((long)result);
{
- if (arg2) delete arg2;
+ if (temp2) delete arg2;
}
return resultobj;
fail:
{
- if (arg2) delete arg2;
+ if (temp2) delete arg2;
}
return NULL;
}
wxDateTime::TimeZone const &arg2_defvalue = LOCAL_TZ ;
wxDateTime::TimeZone *arg2 = (wxDateTime::TimeZone *) &arg2_defvalue ;
int result;
+ bool temp2 = False ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
if (obj1) {
{
arg2 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(obj1));
+ temp2 = True;
}
}
{
}
resultobj = PyInt_FromLong((long)result);
{
- if (arg2) delete arg2;
+ if (temp2) delete arg2;
}
return resultobj;
fail:
{
- if (arg2) delete arg2;
+ if (temp2) delete arg2;
}
return NULL;
}
wxDateTime::TimeZone const &arg2_defvalue = LOCAL_TZ ;
wxDateTime::TimeZone *arg2 = (wxDateTime::TimeZone *) &arg2_defvalue ;
int result;
+ bool temp2 = False ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
if (obj1) {
{
arg2 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(obj1));
+ temp2 = True;
}
}
{
}
resultobj = PyInt_FromLong((long)result);
{
- if (arg2) delete arg2;
+ if (temp2) delete arg2;
}
return resultobj;
fail:
{
- if (arg2) delete arg2;
+ if (temp2) delete arg2;
}
return NULL;
}
wxDateTime::TimeZone const &arg2_defvalue = LOCAL_TZ ;
wxDateTime::TimeZone *arg2 = (wxDateTime::TimeZone *) &arg2_defvalue ;
int result;
+ bool temp2 = False ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
if (obj1) {
{
arg2 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(obj1));
+ temp2 = True;
}
}
{
}
resultobj = PyInt_FromLong((long)result);
{
- if (arg2) delete arg2;
+ if (temp2) delete arg2;
}
return resultobj;
fail:
{
- if (arg2) delete arg2;
+ if (temp2) delete arg2;
}
return NULL;
}
wxDateTime::TimeZone const &arg2_defvalue = LOCAL_TZ ;
wxDateTime::TimeZone *arg2 = (wxDateTime::TimeZone *) &arg2_defvalue ;
int result;
+ bool temp2 = False ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
if (obj1) {
{
arg2 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(obj1));
+ temp2 = True;
}
}
{
}
resultobj = PyInt_FromLong((long)result);
{
- if (arg2) delete arg2;
+ if (temp2) delete arg2;
}
return resultobj;
fail:
{
- if (arg2) delete arg2;
+ if (temp2) delete arg2;
}
return NULL;
}
wxDateTime::TimeZone const &arg3_defvalue = LOCAL_TZ ;
wxDateTime::TimeZone *arg3 = (wxDateTime::TimeZone *) &arg3_defvalue ;
int result;
+ bool temp3 = False ;
PyObject * obj0 = 0 ;
PyObject * obj2 = 0 ;
char *kwnames[] = {
if (obj2) {
{
arg3 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(obj2));
+ temp3 = True;
}
}
{
}
resultobj = PyInt_FromLong((long)result);
{
- if (arg3) delete arg3;
+ if (temp3) delete arg3;
}
return resultobj;
fail:
{
- if (arg3) delete arg3;
+ if (temp3) delete arg3;
}
return NULL;
}
wxDateTime::TimeZone const &arg3_defvalue = LOCAL_TZ ;
wxDateTime::TimeZone *arg3 = (wxDateTime::TimeZone *) &arg3_defvalue ;
int result;
+ bool temp3 = False ;
PyObject * obj0 = 0 ;
PyObject * obj2 = 0 ;
char *kwnames[] = {
if (obj2) {
{
arg3 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(obj2));
+ temp3 = True;
}
}
{
}
resultobj = PyInt_FromLong((long)result);
{
- if (arg3) delete arg3;
+ if (temp3) delete arg3;
}
return resultobj;
fail:
{
- if (arg3) delete arg3;
+ if (temp3) delete arg3;
}
return NULL;
}
wxDateTime::TimeZone *arg3 = (wxDateTime::TimeZone *) &arg3_defvalue ;
wxString result;
bool temp2 = False ;
+ bool temp3 = False ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
if (obj2) {
{
arg3 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(obj2));
+ temp3 = True;
}
}
{
delete arg2;
}
{
- if (arg3) delete arg3;
+ if (temp3) delete arg3;
}
return resultobj;
fail:
delete arg2;
}
{
- if (arg3) delete arg3;
+ if (temp3) delete arg3;
}
return NULL;
}
{ (char *)"CreateFileTipProvider", (PyCFunction) _wrap_CreateFileTipProvider, METH_VARARGS | METH_KEYWORDS },
{ (char *)"new_Timer", (PyCFunction) _wrap_new_Timer, METH_VARARGS | METH_KEYWORDS },
{ (char *)"delete_Timer", (PyCFunction) _wrap_delete_Timer, METH_VARARGS | METH_KEYWORDS },
+ { (char *)"Timer__setCallbackInfo", (PyCFunction) _wrap_Timer__setCallbackInfo, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Timer_SetOwner", (PyCFunction) _wrap_Timer_SetOwner, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Timer_Start", (PyCFunction) _wrap_Timer_Start, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Timer_Stop", (PyCFunction) _wrap_Timer_Stop, METH_VARARGS | METH_KEYWORDS },
- { (char *)"Timer_Notify", (PyCFunction) _wrap_Timer_Notify, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Timer_IsRunning", (PyCFunction) _wrap_Timer_IsRunning, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Timer_GetInterval", (PyCFunction) _wrap_Timer_GetInterval, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Timer_IsOneShot", (PyCFunction) _wrap_Timer_IsOneShot, METH_VARARGS | METH_KEYWORDS },
return _windows.StatusBar_SetStatusWidths(*args, **kwargs)
def GetFieldRect(*args, **kwargs):
- """GetFieldRect(int i, Rect rect) -> bool"""
+ """GetFieldRect(int i) -> Rect"""
return _windows.StatusBar_GetFieldRect(*args, **kwargs)
def SetMinHeight(*args, **kwargs):
}
+wxRect wxStatusBar_GetFieldRect(wxStatusBar *self,int i){
+ wxRect r;
+ self->GetFieldRect(i, r);
+ return r;
+ }
static const wxChar* wxSplitterNameStr = wxT("splitter");
DECLARE_DEF_STRING(SplitterNameStr);
PyObject *resultobj;
wxStatusBar *arg1 = (wxStatusBar *) 0 ;
int arg2 ;
- wxRect *arg3 = 0 ;
- bool result;
- wxRect temp3 ;
+ wxRect result;
PyObject * obj0 = 0 ;
- PyObject * obj2 = 0 ;
char *kwnames[] = {
- (char *) "self",(char *) "i",(char *) "rect", NULL
+ (char *) "self",(char *) "i", NULL
};
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OiO:StatusBar_GetFieldRect",kwnames,&obj0,&arg2,&obj2)) goto fail;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oi:StatusBar_GetFieldRect",kwnames,&obj0,&arg2)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxStatusBar,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
- {
- arg3 = &temp3;
- if ( ! wxRect_helper(obj2, &arg3)) SWIG_fail;
- }
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (bool)((wxStatusBar const *)arg1)->GetFieldRect(arg2,*arg3);
+ result = wxStatusBar_GetFieldRect(arg1,arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
- resultobj = PyInt_FromLong((long)result);
+ {
+ wxRect * resultptr;
+ resultptr = new wxRect((wxRect &) result);
+ resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_wxRect, 1);
+ }
return resultobj;
fail:
return NULL;
"""Performs the blit of the buffer contents on-screen."""
width, height = self.buffer.GetSize()
dc.BeginDrawing()
- dc.Blit(0, 0, width, height, self.buffer, 0, 0)
+ dc.Blit((0, 0), (width, height), self.buffer, (0, 0))
dc.EndDrawing()
def GetBoundingRect(self):
self.custom_boxs.append(custom)
csizer = wxBoxSizer(wxVERTICAL)
- csizer.Add(1, 25)
+ csizer.Add((1, 25))
csizer.Add(self.basic_label, 0, wxEXPAND)
- csizer.Add(1, 5)
+ csizer.Add((1, 5))
csizer.Add(colour_grid, 0, wxEXPAND)
- csizer.Add(1, 25)
+ csizer.Add((1, 25))
csizer.Add(self.custom_label, 0, wxEXPAND)
- csizer.Add(1, 5)
+ csizer.Add((1, 5))
csizer.Add(custom_grid, 0, wxEXPAND)
- csizer.Add(1, 5)
+ csizer.Add((1, 5))
csizer.Add(self.add_button, 0, wxEXPAND)
self.palette = pypalette.PyPalette(self, -1)
EVT_COMMAND_SCROLL(self, self.idSCROLL, self.onScroll)
psizer = wxBoxSizer(wxHORIZONTAL)
psizer.Add(self.palette, 0, 0)
- psizer.Add(10, 1)
+ psizer.Add((10, 1))
psizer.Add(self.colour_slider, 0, wxALIGN_CENTER_VERTICAL)
psizer.Add(self.slider, 0, wxALIGN_CENTER_VERTICAL)
slabel = wxStaticText(self, -1, _("Solid Colour"))
ssizer = wxBoxSizer(wxVERTICAL)
ssizer.Add(self.solid, 0, 0)
- ssizer.Add(1, 2)
+ ssizer.Add((1, 2))
ssizer.Add(slabel, 0, wxALIGN_CENTER_HORIZONTAL)
hlabel = wxStaticText(self, -1, _("H:"))
hsizer.Add(gsizer, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL)
vsizer = wxBoxSizer(wxVERTICAL)
- vsizer.Add(1, 5)
+ vsizer.Add((1, 5))
vsizer.Add(psizer, 0, 0)
- vsizer.Add(1, 15)
+ vsizer.Add((1, 15))
vsizer.Add(hsizer, 0, wxEXPAND)
sizer = wxBoxSizer(wxHORIZONTAL)
- sizer.Add(5, 1)
+ sizer.Add((5, 1))
sizer.Add(csizer, 0, wxEXPAND)
- sizer.Add(10, 1)
+ sizer.Add((10, 1))
sizer.Add(vsizer, 0, wxEXPAND)
self.SetAutoLayout(True)
self.SetSizer(sizer)
"""Returns the colour value for a position on the slider. The position
must be within the valid height of the slider, or results can be
unpredictable."""
- return self.buffer.GetPixel(0, pos)
+ return self.buffer.GetPixel((0, pos))
def DrawBuffer(self):
"""Actual implementation of the widget's drawing. We simply draw
r,g,b = [c * 255.0 for c in colorsys.hsv_to_rgb(h,s,v)]
colour = wxColour(int(r), int(g), int(b))
self.buffer.SetPen(wxPen(colour, 1, wxSOLID))
- self.buffer.DrawRectangle(0, y_pos, 15, 1)
+ self.buffer.DrawRectangle((0, y_pos), (15, 1))
v = v - vstep
"""Returns a colour value at a specific x, y coordinate pair. This
is useful for determining the colour found a specific mouse click
in an external event handler."""
- return self.buffer.GetPixel(x, y)
+ return self.buffer.GetPixel((x, y))
def DrawBuffer(self):
"""Draws the palette XPM into the memory buffer."""
#self.GeneratePaletteBMP ("foo.bmp")
- self.buffer.DrawBitmap(self.palette, 0, 0, 0)
+ self.buffer.DrawBitmap(self.palette, (0, 0), 0)
def HighlightPoint(self, x, y):
"""Highlights an area of the palette with a little circle around
colour = wxColour(0, 0, 0)
self.buffer.SetPen(wxPen(colour, 1, wxSOLID))
self.buffer.SetBrush(wxBrush(colour, wxTRANSPARENT))
- self.buffer.DrawCircle(x, y, 3)
+ self.buffer.DrawCircle((x, y), 3)
self.Refresh()
def GeneratePaletteBMP(self, file_name, granularity=1):
colour = wxColour(int(r * 255.0), int(g * 255.0), int(b * 255.0))
self.buffer.SetPen(wxPen(colour, 1, wxSOLID))
self.buffer.SetBrush(wxBrush(colour, wxSOLID))
- self.buffer.DrawRectangle(x, y,
- self.HORIZONTAL_STEP,
- self.vertical_step)
+ self.buffer.DrawRectangle((x, y),
+ (self.HORIZONTAL_STEP, self.vertical_step))
# this code is now simpler (and works)
bitmap = self.buffer.GetBitmap()
def updateColourDB():
global _haveUpdated
if not _haveUpdated:
- from wxPython.wx import wxTheColourDatabase
+ import wx
+ assert wx.GetApp() is not None, "You must have a wx.App object before you can use the colour database."
cl = getColourInfoList()
for info in cl:
- wxTheColourDatabase.Append(*info)
+ wx.TheColourDatabase.Append(*info)
EVT_COMMAND_COLOURSELECT = wxNewId()
class ColourSelectEvent(wxPyCommandEvent):
- def __init__(self, id, value):
- wxPyCommandEvent.__init__(self, id = id)
- self.SetEventType(EVT_COMMAND_COLOURSELECT)
- self.value = value
+ def __init__(self, id, value):
+ wxPyCommandEvent.__init__(self, id = id)
+ self.SetEventType(EVT_COMMAND_COLOURSELECT)
+ self.value = value
- def GetValue(self):
- return self.value
+ def GetValue(self):
+ return self.value
def EVT_COLOURSELECT(win, id, func):
win.Connect(id, -1, EVT_COMMAND_COLOURSELECT, func)
-class ColourSelect(wxButton):
- def __init__(self, parent, id, label = "", bcolour=(0, 0, 0),
- pos = wxDefaultPosition, size = wxDefaultSize,
- callback = None):
- wxButton.__init__(self, parent, id, label, pos=pos, size=size)
- self.SetColour(bcolour)
+
+
+
+class ColourSelect(wxBitmapButton):
+ def __init__(self, parent, id, label="", colour=wxBLACK,
+ pos=wxDefaultPosition, size=wxDefaultSize,
+ callback=None, style=0):
+ if label:
+ w, h = parent.GetTextExtent(label)
+ w += 6
+ h += 6
+ else:
+ w, h = 20, 20
+ wxBitmapButton.__init__(self, parent, id, wxEmptyBitmap(w,h),
+ pos=pos, size=size, style=style|wxBU_AUTODRAW)
+ if type(colour) == type( () ):
+ colour = wxColour(*colour)
+ self.colour = colour
+ self.SetLabel(label)
self.callback = callback
+ bmp = self.MakeBitmap()
+ self.SetBitmap(bmp)
EVT_BUTTON(parent, self.GetId(), self.OnClick)
+
def GetColour(self):
- return self.set_colour
+ return self.colour
- def GetValue(self):
- return self.set_colour
- def SetColour(self, bcolour):
- self.set_colour_val = wxColor(bcolour[0], bcolour[1], bcolour[2])
- self.SetBackgroundColour(self.set_colour_val)
- avg = reduce(lambda a, b: a + b, bcolour) / 3
- fcolour = avg > 128 and (0, 0, 0) or (255, 255, 255)
- self.SetForegroundColour(apply(wxColour, fcolour))
- self.set_colour = bcolour
+ def GetValue(self):
+ return self.colour
+
+
+ def SetValue(self, colour):
+ self.SetColour(colour)
+
+
+ def SetColour(self, colour):
+ if type(colour) == type( () ):
+ colour = wxColour(*colour)
+ self.colour = colour
+ bmp = self.MakeBitmap()
+ self.SetBitmap(bmp)
+
+
+ def MakeBitmap(self):
+ bdr = 10
+ sz = self.GetSize()
+ bmp = wxEmptyBitmap(sz.width-bdr, sz.height-bdr)
+ dc = wxMemoryDC()
+ dc.SelectObject(bmp)
+ label = self.GetLabel()
+ # Just make a little colored bitmap
+ dc.SetBackground(wxBrush(self.colour))
+ dc.Clear()
+ if label:
+ # Add a label to it
+ avg = reduce(lambda a, b: a + b, self.colour.Get()) / 3
+ fcolour = avg > 128 and wxBLACK or wxWHITE
+ dc.SetTextForeground(fcolour)
+ dc.DrawLabel(label, (0,0, sz.width-bdr, sz.height-bdr),
+ wxALIGN_CENTER)
+
+ dc.SelectObject(wxNullBitmap)
+ return bmp
+
+
+ def SetBitmap(self, bmp):
+ self.SetBitmapLabel(bmp)
+ self.SetBitmapSelected(bmp)
+ self.SetBitmapDisabled(bmp)
+ self.SetBitmapFocus(bmp)
+ self.SetBitmapSelected(bmp)
- def SetValue(self, bcolour):
- self.SetColour(bcolour)
def OnChange(self):
wxPostEvent(self, ColourSelectEvent(self.GetId(), self.GetValue()))
def OnClick(self, event):
data = wxColourData()
data.SetChooseFull(True)
- data.SetColour(self.set_colour_val)
+ data.SetColour(self.colour)
dlg = wxColourDialog(self.GetParent(), data)
changed = dlg.ShowModal() == wxID_OK
if changed:
data = dlg.GetColourData()
- self.SetColour(data.GetColour().Get())
+ self.SetColour(data.GetColour())
dlg.Destroy()
if changed:
else:
self.sh = self.bh / self.fh
if self.LinesInFile() >= self.sh:
- self.bw = self.bw - wxSystemSettings_GetSystemMetric(wxSYS_VSCROLL_X)
+ self.bw = self.bw - wxSystemSettings_GetMetric(wxSYS_VSCROLL_X)
self.sw = (self.bw / self.fw) - 1
self.sw = (self.bw / self.fw) - 1
if self.CalcMaxLineLen() >= self.sw:
- self.bh = self.bh - wxSystemSettings_GetSystemMetric(wxSYS_HSCROLL_Y)
+ self.bh = self.bh - wxSystemSettings_GetMetric(wxSYS_HSCROLL_Y)
self.sh = self.bh / self.fh
pass
def DrawEditText(self, t, x, y, dc):
- dc.DrawText(t, x * self.fw, y * self.fh)
+ dc.DrawText(t, (x * self.fw, y * self.fh))
def DrawLine(self, line, dc):
if self.IsLine(line):
x = 0
y = (len(self.lines) - self.sy) * self.fh
hasTransparency = 1
- dc.DrawBitmap(self.eofMarker, x, y, hasTransparency)
+ dc.DrawBitmap(self.eofMarker, (x, y), hasTransparency)
##------------------ cursor-related functions
szy = self.fh
x = xp * szx
y = yp * szy
- dc.Blit(x,y,szx,szy,dc,x,y,wxSRC_INVERT)
+ dc.Blit((x,y), (szx,szy), dc, (x,y), wxSRC_INVERT)
self.sco_x = xp
self.sco_y = yp
dc.SetBrush(self.Brush)
radius = int(round(self.Diameter/2))
for (x,y) in Points:
- dc.DrawEllipse((x - radius), (y - radius), self.Diameter, self.Diameter)
+ dc.DrawEllipse(((x - radius), (y - radius)), (self.Diameter, self.Diameter))
dc.SetBrush(self.Brush)
radius = int(round(self.Diameter/2))
(X,Y) = WorldToPixel((self.X,self.Y))
- dc.DrawEllipse((X - radius), (Y - radius), self.Diameter, self.Diameter)
+ dc.DrawEllipse(((X - radius), (Y - radius)), (self.Diameter, self.Diameter))
class Rectangle(draw_object):
dc.SetPen(self.Pen)
dc.SetBrush(self.Brush)
- dc.DrawRectangle(X,Y,Width,Height)
+ dc.DrawRectangle((X,Y), (Width,Height))
class Ellipse(draw_object):
def __init__(self,x,y,width,height,LineColor,LineStyle,LineWidth,FillColor,FillStyle,Foreground = 0):
dc.SetPen(self.Pen)
dc.SetBrush(self.Brush)
- dc.DrawEllipse(X,Y,Width,Height)
+ dc.DrawEllipse((X,Y), (Width,Height))
class Circle(draw_object):
def __init__(self,x,y,Diameter,LineColor,LineStyle,LineWidth,FillColor,FillStyle,Foreground = 0):
dc.SetPen(self.Pen)
dc.SetBrush(self.Brush)
- dc.DrawEllipse(X-Diameter/2,Y-Diameter/2,Diameter,Diameter)
+ dc.DrawEllipse((X-Diameter/2,Y-Diameter/2), (Diameter,Diameter))
class Text(draw_object):
"""
raise "Invalid value for Text Object Position Attribute"
self.x_shift = x_shift
self.y_shift = y_shift
- dc.DrawText(self.String, X-self.x_shift, Y-self.y_shift)
+ dc.DrawText(self.String, (X-self.x_shift, Y-self.y_shift))
#---------------------------------------------------------------------------
tb.SetToolBitmapSize((23,23))
- tb.AddTool(ID_ZOOM_IN_BUTTON, GetPlusBitmap(), isToggle=true,shortHelpString = "Zoom In")
+ tb.AddTool(ID_ZOOM_IN_BUTTON, GetPlusBitmap(), isToggle=True,shortHelpString = "Zoom In")
EVT_TOOL(self, ID_ZOOM_IN_BUTTON, self.SetMode)
- tb.AddTool(ID_ZOOM_OUT_BUTTON, GetMinusBitmap(), isToggle=true,shortHelpString = "Zoom Out")
+ tb.AddTool(ID_ZOOM_OUT_BUTTON, GetMinusBitmap(), isToggle=True,shortHelpString = "Zoom Out")
EVT_TOOL(self, ID_ZOOM_OUT_BUTTON, self.SetMode)
- tb.AddTool(ID_MOVE_MODE_BUTTON, GetHandBitmap(), isToggle=true,shortHelpString = "Move")
+ tb.AddTool(ID_MOVE_MODE_BUTTON, GetHandBitmap(), isToggle=True,shortHelpString = "Move")
EVT_TOOL(self, ID_MOVE_MODE_BUTTON, self.SetMode)
tb.AddSeparator()
dc.SetBrush(wxTRANSPARENT_BRUSH)
dc.SetLogicalFunction(wxXOR)
if self.PrevRBBox:
- dc.DrawRectangle(*self.PrevRBBox)
- dc.DrawRectangle(x_c-w/2,y_c-h/2,w,h)
+ dc.DrawRectangleXY(*self.PrevRBBox)
+ dc.DrawRectangleXY(x_c-w/2,y_c-h/2,w,h)
self.PrevRBBox = (x_c-w/2,y_c-h/2,w,h)
dc.EndDrawing()
dc.SetBrush(wxTRANSPARENT_BRUSH)
dc.SetLogicalFunction(wxXOR)
if self.PrevMoveBox:
- dc.DrawRectangle(*self.PrevMoveBox)
- dc.DrawRectangle(x_tl,y_tl,w,h)
+ dc.DrawRectangleXY(*self.PrevMoveBox)
+ dc.DrawRectangleXY(x_tl,y_tl,w,h)
self.PrevMoveBox = (x_tl,y_tl,w,h)
dc.EndDrawing()
def OnPaint(self, event):
#dc = wxBufferedPaintDC(self.DrawPanel, self._Buffer)
dc = wxPaintDC(self.DrawPanel)
- dc.DrawBitmap(self._Buffer,0,0)
+ dc.DrawBitmap(self._Buffer, (0,0))
def Draw(self):
"""
i+=1
Object._Draw(dc,self.WorldToPixel,self.ScaleFunction)
if i % self.NumBetweenBlits == 0:
- ScreenDC.Blit(0, 0, self.PanelSize[0],self.PanelSize[1], dc, 0, 0)
+ ScreenDC.Blit((0, 0), self.PanelSize, dc, (0, 0))
dc.EndDrawing()
else:
dc.Clear()
i+=1
Object._Draw(dc,self.WorldToPixel,self.ScaleFunction)
if i % self.NumBetweenBlits == 0:
- ScreenDC.Blit(0, 0, self.PanelSize[0],self.PanelSize[1], dc, 0, 0)
+ ScreenDC.Blit((0, 0), self.PanelSize, dc, (0, 0))
dc.EndDrawing()
else: # not using a Background DC
dc = wxMemoryDC()
i+=1
Object._Draw(dc,self.WorldToPixel,self.ScaleFunction)
if i % self.NumBetweenBlits == 0:
- ScreenDC.Blit(0, 0, self.PanelSize[0],self.PanelSize[1], dc, 0, 0)
+ ScreenDC.Blit((0, 0), self.PanelSize, dc, (0, 0))
dc.EndDrawing()
else:
dc.Clear()
# now refresh the screen
#ScreenDC.DrawBitmap(self._Buffer,0,0) #NOTE: uisng DrawBitmap didn't work right on MSW
- ScreenDC.Blit(0, 0, self.PanelSize[0],self.PanelSize[1], dc, 0, 0)
+ ScreenDC.Blit((0, 0), self.PanelSize, dc, (0, 0))
# If the canvas is in the middle of a zoom or move, the Rubber Band box needs to be re-drawn
if self.PrevRBBox:
ScreenDC.SetPen(wxPen('WHITE', 2,wxSHORT_DASH))
ScreenDC.SetBrush(wxTRANSPARENT_BRUSH)
ScreenDC.SetLogicalFunction(wxXOR)
- ScreenDC.DrawRectangle(*self.PrevRBBox)
+ ScreenDC.DrawRectangleXY(*self.PrevRBBox)
elif self.PrevMoveBox:
ScreenDC.SetPen(wxPen('WHITE', 1,))
ScreenDC.SetBrush(wxTRANSPARENT_BRUSH)
ScreenDC.SetLogicalFunction(wxXOR)
- ScreenDC.DrawRectangle(*self.PrevMoveBox)
+ ScreenDC.DrawRectangleXY(*self.PrevMoveBox)
if self.Debug: print "Drawing took %f seconds of CPU time"%(clock()-start)
def BBCheck(self, BB1, BB2):
class ColDragWindow(wxWindow):
def __init__(self,parent,image,dragCol):
- wxWindow.__init__(self,parent,wxSIMPLE_BORDER)
+ wxWindow.__init__(self,parent,-1, style=wxSIMPLE_BORDER)
self.image = image
self.SetSize((self.image.GetWidth(),self.image.GetHeight()))
self.ux = parent.GetScrollPixelsPerUnit()[0]
def OnPaint(self,evt):
dc = wxPaintDC(self)
w,h = self.GetSize()
- dc.DrawBitmap(self.image,0,0)
+ dc.DrawBitmap(self.image, (0,0))
dc.SetPen(wxPen(wxBLACK,1,wxSOLID))
dc.SetBrush(wxTRANSPARENT_BRUSH)
- dc.DrawRectangle(0,0,w,h)
+ dc.DrawRectangle((0,0), (w,h))
iPos = self.GetInsertionPos()
- dc.DrawLine(iPos,h - 10,iPos,h)
+ dc.DrawLine((iPos,h - 10), (iPos,h))
class RowDragWindow(wxWindow):
def __init__(self,parent,image,dragRow):
- wxWindow.__init__(self,parent,wxSIMPLE_BORDER)
+ wxWindow.__init__(self,parent,-1, style=wxSIMPLE_BORDER)
self.image = image
self.SetSize((self.image.GetWidth(),self.image.GetHeight()))
self.uy = parent.GetScrollPixelsPerUnit()[1]
def OnPaint(self,evt):
dc = wxPaintDC(self)
w,h = self.GetSize()
- dc.DrawBitmap(self.image,0,0)
+ dc.DrawBitmap(self.image, (0,0))
dc.SetPen(wxPen(wxBLACK,1,wxSOLID))
dc.SetBrush(wxTRANSPARENT_BRUSH)
- dc.DrawRectangle(0,0,w,h)
+ dc.DrawRectangle((0,0), (w,h))
iPos = self.GetInsertionPos()
- dc.DrawLine(w - 10,iPos,w,iPos)
+ dc.DrawLine((w - 10,iPos), (w,iPos))
#----------------------------------------------------------------------------
memdc = wxMemoryDC()
memdc.SelectObject(bmp)
dc = wxWindowDC(self.lwin)
- memdc.Blit(0,0,rect.width,rect.height,dc,rect.x,rect.y)
+ memdc.Blit((0,0), rect.GetSize(), dc, rect.GetPosition())
memdc.SelectObject(wxNullBitmap)
return bmp
memdc = wxMemoryDC()
memdc.SelectObject(bmp)
dc = wxWindowDC(self.lwin)
- memdc.Blit(0,0,rect.width,rect.height,dc,rect.x,rect.y)
+ memdc.Blit((0,0), rect.GetSize(), dc, rect.GetPosition())
memdc.SelectObject(wxNullBitmap)
return bmp
'foregroundColour', 'signedForegroundColour'):
if ctrl_kwargs.has_key(key):
if type(ctrl_kwargs[key]) in (types.StringType, types.UnicodeType):
- c = wxNamedColor(ctrl_kwargs[key])
+ c = wxNamedColour(ctrl_kwargs[key])
if c.Get() == (-1, -1, -1):
raise TypeError('%s not a legal color specification for %s' % (repr(ctrl_kwargs[key]), key))
else:
# if no fillchar change, but old value == old template, replace it:
if newvalue == old_template:
newvalue = self._template
- reset_value = true
+ reset_value = True
else:
self._defaultValue = None
if newfield != field and newfield._selectOnFieldEntry:
dbg('queuing selection: (%d, %d)' % (newfield._extent[0], newfield._extent[1]))
wxCallAfter(self._SetSelection, newfield._extent[0], newfield._extent[1])
- keep_processing = false
+ keep_processing = False
elif keep_processing:
dbg('char not allowed')
def _OnCtrl_Z(self, event=None):
""" Handles ctrl-Z keypress in control and Undo operation on context menu.
- Should return false to skip other processing. """
+ Should return False to skip other processing. """
dbg("wxMaskedEditMixin::_OnCtrl_Z", indent=1)
self.Undo()
dbg(indent=0)
dbg('cursor before 1st field; cannot change to a previous field')
if not wxValidator_IsSilent():
wxBell()
- return false
+ return False
if event.ControlDown():
dbg('queuing select to beginning of field:', field_start, pos)
if self._isTemplateChar( pos ): ## if a template character, return empty
- dbg('%d is a template character; returning false' % pos, indent=0)
+ dbg('%d is a template character; returning False' % pos, indent=0)
return False
if self._isMaskChar( pos ):
dbg(indent=0)
return approved
else:
- dbg('%d is a !???! character; returning false', indent=0)
+ dbg('%d is a !???! character; returning False', indent=0)
return False
else:
text = candidate
- valid = True # assume true
+ valid = True # assume True
for i in [-1] + self._field_indices: # process global constraints first:
field = self._fields[i]
start, end = field._extent
self._isNeg = False # (clear current assumptions)
value = self._adjustInt(value)
elif self._isDate and not self.IsValid(value) and self._4digityear:
- value = self._adjustDate(value, fixcentury=true)
+ value = self._adjustDate(value, fixcentury=True)
except ValueError:
# If date, year might be 2 digits vs. 4; try adjusting it:
if self._isDate and self._4digityear:
dateparts = value.split(' ')
- dateparts[0] = self._adjustDate(dateparts[0], fixcentury=true)
+ dateparts[0] = self._adjustDate(dateparts[0], fixcentury=True)
value = string.join(dateparts, ' ')
dbg('adjusted value: "%s"' % value)
value = self._Paste(value, raise_on_invalid=True, just_return_value=True)
self._isNeg = False # (clear current assumptions)
value = self._adjustInt(value)
elif self._isDate and not self.IsValid(value) and self._4digityear:
- value = self._adjustDate(value, fixcentury=true)
+ value = self._adjustDate(value, fixcentury=True)
except ValueError:
# If date, year might be 2 digits vs. 4; try adjusting it:
if self._isDate and self._4digityear:
dateparts = value.split(' ')
- dateparts[0] = self._adjustDate(dateparts[0], fixcentury=true)
+ dateparts[0] = self._adjustDate(dateparts[0], fixcentury=True)
value = string.join(dateparts, ' ')
dbg('adjusted value: "%s"' % value)
value = self._Paste(value, raise_on_invalid=True, just_return_value=True)
dbg(indent=0)
raise ValueError('%s must be a string', str(value))
- bValid = True # assume true
+ bValid = True # assume True
parts = value.split('.')
if len(parts) != 4:
bValid = False
dc.SetBackground(wxBrush(self.GetBackgroundColour(),wxSOLID))
dc.Clear()
- highlight = wxPen(wxSystemSettings_GetSystemColour(
- wxSYS_COLOUR_BTNHIGHLIGHT),1,wxSOLID)
- shadow = wxPen(wxSystemSettings_GetSystemColour(
- wxSYS_COLOUR_BTNSHADOW),1,wxSOLID)
+ highlight = wxPen(wxSystemSettings_GetColour(wxSYS_COLOUR_BTNHIGHLIGHT), 1, wxSOLID)
+ shadow = wxPen(wxSystemSettings_GetColour(wxSYS_COLOUR_BTNSHADOW), 1, wxSOLID)
black = wxPen(wxBLACK,1,wxSOLID)
w,h = self.GetSizeTuple()
w -= 1
# Draw outline
dc.SetPen(highlight)
- dc.DrawLine(0,0,0,h)
- dc.DrawLine(0,0,w,0)
+ dc.DrawLine((0,0), (0,h))
+ dc.DrawLine((0,0), (w,0))
dc.SetPen(black)
- dc.DrawLine(0,h,w+1,h)
- dc.DrawLine(w,0,w,h)
+ dc.DrawLine((0,h), (w+1,h))
+ dc.DrawLine((w,0), (w,h))
dc.SetPen(shadow)
- dc.DrawLine(w-1,2,w-1,h)
+ dc.DrawLine((w-1,2), (w-1,h))
#----------------------------------------------------------------------
bmp = wxEmptyBitmap(8,8)
bdc = wxMemoryDC()
bdc.SelectObject(bmp)
- bdc.DrawRectangle(-1,-1,10,10)
+ bdc.DrawRectangle((-1,-1), (10,10))
for i in range(8):
for j in range(8):
if ((i + j) & 1):
- bdc.DrawPoint(i,j)
+ bdc.DrawPoint((i,j))
brush = wxBrush(wxColour(0,0,0))
brush.SetStipple(bmp)
h = body_h
if direction == MV_HOR:
- dc.DrawRectangle(x,y-2,w,4)
+ dc.DrawRectangle((x,y-2), (w,4))
else:
- dc.DrawRectangle(x-2,y,4,h)
+ dc.DrawRectangle((x-2,y), (4,h))
dc.EndDrawingOnTop()
EVT_PAINT(self, self.OnPaint)
def InitColours(self):
- faceClr = wxSystemSettings_GetSystemColour(wxSYS_COLOUR_BTNFACE)
+ faceClr = wxSystemSettings_GetColour(wxSYS_COLOUR_BTNFACE)
self.faceDnClr = faceClr
self.SetBackgroundColour(faceClr)
- shadowClr = wxSystemSettings_GetSystemColour(wxSYS_COLOUR_BTNSHADOW)
- highlightClr = wxSystemSettings_GetSystemColour(wxSYS_COLOUR_BTNHIGHLIGHT)
+ shadowClr = wxSystemSettings_GetColour(wxSYS_COLOUR_BTNSHADOW)
+ highlightClr = wxSystemSettings_GetColour(wxSYS_COLOUR_BTNHIGHLIGHT)
self.shadowPen = wxPen(shadowClr, 1, wxSOLID)
self.highlightPen = wxPen(highlightClr, 1, wxSOLID)
self.blackPen = wxPen(wxBLACK, 1, wxSOLID)
else:
dc.SetPen(self.shadowPen)
for i in range(2):
- dc.DrawLine(x1+i, y1, x1+i, y2-i)
- dc.DrawLine(x1, y1+i, x2-i, y1+i)
+ dc.DrawLine((x1+i, y1), (x1+i, y2-i))
+ dc.DrawLine((x1, y1+i), (x2-i, y1+i))
# draw the lower right sides
if self.up:
else:
dc.SetPen(self.highlightPen)
for i in range(2):
- dc.DrawLine(x1+i, y2-i, x2+1, y2-i)
- dc.DrawLine(x2-i, y1+i, x2-i, y2)
+ dc.DrawLine((x1+i, y2-i), (x2+1, y2-i))
+ dc.DrawLine((x2-i, y1+i), (x2-i, y2))
def DrawArrow(self,dc):
size = self.GetSize()
- mx = size.x / 2
- my = size.y / 2
+ mx = size.width / 2
+ my = size.height / 2
dc.SetPen(self.highlightPen)
- dc.DrawLine(mx-5,my-5,mx+5,my-5)
- dc.DrawLine(mx-5,my-5,mx,my+5)
+ dc.DrawLine((mx-5,my-5), (mx+5,my-5))
+ dc.DrawLine((mx-5,my-5), (mx,my+5))
dc.SetPen(self.shadowPen)
- dc.DrawLine(mx+4,my-5,mx,my+5)
+ dc.DrawLine((mx+4,my-5), (mx,my+5))
dc.SetPen(self.blackPen)
- dc.DrawLine(mx+5,my-5,mx,my+5)
+ dc.DrawLine((mx+5,my-5), (mx,my+5))
def OnPaint(self, event):
width, height = self.GetClientSizeTuple()
selfSize = self.GetSize()
tcSize = self.ctrl.GetSize()
- pos.x -= (selfSize.x - tcSize.x) / 2
- if pos.x + selfSize.x > dSize.x:
- pos.x = dSize.x - selfSize.x
+ pos.x -= (selfSize.width - tcSize.width) / 2
+ if pos.x + selfSize.width > dSize.width:
+ pos.x = dSize.width - selfSize.width
if pos.x < 0:
pos.x = 0
pos.y += tcSize.height
- if pos.y + selfSize.y > dSize.y:
- pos.y = dSize.y - selfSize.y
+ if pos.y + selfSize.height > dSize.height:
+ pos.y = dSize.height - selfSize.height
if pos.y < 0:
pos.y = 0
wxCalendarCtrl = wx.calendar.CalendarCtrl
+d = globals()
+for k, v in wx.calendar.__dict__.iteritems():
+ if k.startswith('EVT'):
+ d[k] = v
+del d, k, v
+
+
+
-#
+"""
+wxPyColourChooser
+Copyright (C) 2002 Michael Gilfix <mgilfix@eecs.tufts.edu>
+
+This file is part of wxPyColourChooser.
+
+This version of wxPyColourChooser is open source; you can redistribute it
+and/or modify it under the licensed terms.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+"""
+
+from pycolourchooser import *
+
+# For the American in you
+wxPyColorChooser = wxPyColourChooser
+
+__all__ = [
+ 'canvas',
+ 'pycolourbox',
+ 'pycolourchooser',
+ 'pycolourslider',
+ 'pypalette',
+]
+
+
-#
+from editor import wxEditor
+