Some minor updates, fixes, etc.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5768 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2000-01-31 21:07:04 +00:00
parent 9e46ac75de
commit eec92d76f8
49 changed files with 891 additions and 466 deletions
-6
View File
@@ -29,12 +29,6 @@ def _checkForCallback(obj, name, event, theID=-1):
except: pass
else: obj.Connect(theID, -1, event, cb)
## def _checkClassCallback(obj, name):
## try: cb = getattr(obj, name)
## except: pass
## else: obj._addCallback(name, cb)
def _StdWindowCallbacks(win):
_checkForCallback(win, "OnChar", wxEVT_CHAR)
_checkForCallback(win, "OnSize", wxEVT_SIZE)
+2 -2
View File
@@ -127,12 +127,12 @@ public:
wxSingleChoiceDialog(wxWindow* parent,
wxString* message,
wxString* caption,
int LCOUNT, wxString* LIST,
int LCOUNT, wxString* choices,
//char** clientData = NULL,
long style = wxOK | wxCANCEL | wxCENTRE,
wxPoint* pos = &wxPyDefaultPosition) {
return new wxSingleChoiceDialog(parent, *message, *caption,
LCOUNT, LIST, NULL, style, *pos);
LCOUNT, choices, NULL, style, *pos);
}
}
+8 -8
View File
@@ -174,7 +174,7 @@ public:
wxChoice(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxPyDefaultPosition,
const wxSize& size = wxPyDefaultSize,
int LCOUNT=0, wxString* LIST=NULL,
int LCOUNT=0, wxString* choices=NULL,
long style = 0,
const wxValidator& validator = wxPyDefaultValidator,
char* name = "choice");
@@ -201,7 +201,7 @@ public:
wxComboBox(wxWindow* parent, wxWindowID id, char* value = "",
const wxPoint& pos = wxPyDefaultPosition,
const wxSize& size = wxPyDefaultSize,
int LCOUNT=0, wxString* LIST=NULL,
int LCOUNT=0, wxString* choices=NULL,
long style = 0,
const wxValidator& validator = wxPyDefaultValidator,
char* name = "comboBox");
@@ -306,7 +306,7 @@ public:
wxListBox(wxWindow* parent, wxWindowID id,
const wxPoint& pos = wxPyDefaultPosition,
const wxSize& size = wxPyDefaultSize,
int LCOUNT, wxString* LIST = NULL,
int LCOUNT, wxString* choices = NULL,
long style = 0,
const wxValidator& validator = wxPyDefaultValidator,
char* name = "listBox");
@@ -335,13 +335,13 @@ public:
}
}
void InsertItems(int LCOUNT, wxString* LIST, int pos);
void InsertItems(int LCOUNT, wxString* choices, int pos);
wxString GetString(int n);
wxString GetStringSelection();
int Number();
bool Selected(const int n);
void Set(int LCOUNT, wxString* LIST);
void Set(int LCOUNT, wxString* choices);
// TODO: void SetClientData(const int n, char* data);
void SetFirstItem(int n);
%name(SetFirstItemStr)void SetFirstItem(const wxString& string);
@@ -359,7 +359,7 @@ public:
const wxPoint& pos = wxPyDefaultPosition,
const wxSize& size = wxPyDefaultSize,
int LCOUNT = 0,
wxString* LIST = NULL,
wxString* choices = NULL,
long style = 0,
const wxValidator& validator = wxPyDefaultValidator,
char* name = "listBox");
@@ -368,7 +368,7 @@ public:
bool IsChecked(int uiIndex);
void Check(int uiIndex, int bCheck = TRUE);
void InsertItems(int LCOUNT, wxString* LIST, int pos);
void InsertItems(int LCOUNT, wxString* choices, int pos);
int GetItemHeight();
};
@@ -496,7 +496,7 @@ public:
const wxString& label,
const wxPoint& point = wxPyDefaultPosition,
const wxSize& size = wxPyDefaultSize,
int LCOUNT = 0, wxString* LIST = NULL,
int LCOUNT = 0, wxString* choices = NULL,
int majorDimension = 0,
long style = wxRA_HORIZONTAL,
const wxValidator& validator = wxPyDefaultValidator,
+1 -1
View File
@@ -176,7 +176,7 @@ public:
//---------------------------------------------------------------------------
class wxNavigationKeyEvent : public wxCommandEvent {
class wxNavigationKeyEvent : public wxEvent {
public:
wxNavigationKeyEvent();
+1 -1
View File
@@ -68,7 +68,7 @@ public:
void SetMenuBar(wxMenuBar* menuBar);
void SetStatusBar(wxStatusBar *statusBar);
void SetStatusText(const wxString& text, int number = 0);
void SetStatusWidths(int LCOUNT, int* LIST); // uses typemap
void SetStatusWidths(int LCOUNT, int* choices); // uses typemap
void SetTitle(const wxString& title);
void SetToolBar(wxToolBar* toolbar);
+21 -22
View File
@@ -350,7 +350,7 @@ public:
// **** This one needs to return a list of ints (wxDash)
int GetDashes(wxDash **dashes);
void SetDashes(int LCOUNT, wxDash* LIST);
void SetDashes(int LCOUNT, wxDash* choices);
#ifdef __WXMSW__
wxBitmap* GetStipple();
@@ -412,14 +412,14 @@ public:
void DrawEllipticArc(long x, long y, long width, long height, long start, long end);
void DrawIcon(const wxIcon& icon, long x, long y);
void DrawLine(long x1, long y1, long x2, long y2);
void DrawLines(int LCOUNT, wxPoint* LIST, long xoffset=0, long yoffset=0);
void DrawPolygon(int LCOUNT, wxPoint* LIST, long xoffset=0, long yoffset=0,
void DrawLines(int PCOUNT, wxPoint* points, long xoffset=0, long yoffset=0);
void DrawPolygon(int PCOUNT, wxPoint* points, long xoffset=0, long yoffset=0,
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 DrawSpline(int PCOUNT, wxPoint* points);
void DrawText(const wxString& text, long x, long y);
void EndDoc();
void EndDrawing();
@@ -433,6 +433,7 @@ public:
long *OUTPUT, long *OUTPUT);
wxFont& GetFont();
int GetLogicalFunction();
void GetLogicalScale(double *OUTPUT, double *OUTPUT);
int GetMapMode();
bool GetOptimization();
wxPen& GetPen();
@@ -445,12 +446,14 @@ public:
}
%name(GetSizeTuple)void GetSize(int* OUTPUT, int* OUTPUT);
wxSize GetSize();
wxSize GetSizeMM();
wxColour& GetTextBackground();
void GetTextExtent(const wxString& string, long *OUTPUT, long *OUTPUT);
%name(GetFullTextExtent)void GetTextExtent(const wxString& string,
long *OUTPUT, long *OUTPUT, long *OUTPUT, long* OUTPUT,
const wxFont* font = NULL);
wxColour& GetTextForeground();
void GetUserScale(double *OUTPUT, double *OUTPUT);
long LogicalToDeviceX(long x);
long LogicalToDeviceXRel(long x);
long LogicalToDeviceY(long y);
@@ -468,6 +471,7 @@ public:
void SetBrush(const wxBrush& brush);
void SetFont(const wxFont& font);
void SetLogicalFunction(int function);
void SetLogicalScale(double x, double y);
void SetMapMode(int mode);
void SetOptimization(bool optimize);
void SetPen(const wxPen& pen);
@@ -478,26 +482,21 @@ public:
void StartPage();
// Don't need this one anymore as wxWindows has one...
// %addmethods {
// // This one is my own creation...
// void DrawBitmap(wxBitmap& bitmap, long x, long y, bool swapPalette=TRUE) {
// wxMemoryDC* memDC = new wxMemoryDC;
// memDC->SelectObject(bitmap);
// #ifdef __WXMSW__
// if (swapPalette)
// self->SetPalette(*bitmap.GetPalette());
// #endif
// self->Blit(x, y, bitmap.GetWidth(), bitmap.GetHeight(), memDC,
// 0, 0, self->GetLogicalFunction());
// memDC->SelectObject(wxNullBitmap);
// delete memDC;
// }
// }
void DrawBitmap(const wxBitmap& bitmap, long x, long y,
int useMask = FALSE);
bool CanDrawBitmap();
bool CanGetTextExtent();
int GetDepth();
wxSize GetPPI();
void GetLogicalOrigin(int *OUTPUT, int *OUTPUT);
void SetLogicalOrigin(int x, int y);
void GetDeviceOrigin(int *OUTPUT, int *OUTPUT);
void SetDeviceOrigin(int x, int y);
void SetAxisOrientation(bool xLeftRight, bool yBottomUp);
};
@@ -644,7 +643,7 @@ extern wxColour wxNullColour;
class wxPalette {
public:
wxPalette(int LCOUNT, byte* LIST, byte* LIST, byte* LIST);
wxPalette(int LCOUNT, byte* choices, byte* choices, byte* choices);
~wxPalette();
int GetPixel(byte red, byte green, byte blue);
@@ -666,7 +665,7 @@ enum {
class wxImageList {
public:
wxImageList(int width, int height, int mask=TRUE, int initialCount=1);
wxImageList(int width, int height, int mask=FALSE, int initialCount=1);
~wxImageList();
#ifdef __WXMSW__
+1 -1
View File
@@ -422,7 +422,7 @@ public:
class wxAcceleratorTable {
public:
// Can also accept a list of 3-tuples
wxAcceleratorTable(int LCOUNT, wxAcceleratorEntry* LIST);
wxAcceleratorTable(int LCOUNT, wxAcceleratorEntry* choices);
~wxAcceleratorTable();
};
+3 -5
View File
@@ -56,21 +56,21 @@ wxString wxGetTextFromUser(const wxString& message,
// TODO: Need to custom wrap this one...
// int wxGetMultipleChoice(char* message, char* caption,
// int LCOUNT, char** LIST,
// int LCOUNT, char** choices,
// int nsel, int *selection,
// wxWindow *parent = NULL, int x = -1, int y = -1,
// bool centre = TRUE, int width=150, int height=200);
wxString wxGetSingleChoice(const wxString& message, const wxString& caption,
int LCOUNT, wxString* LIST,
int LCOUNT, wxString* choices,
wxWindow *parent = NULL,
int x = -1, int y = -1,
bool centre = TRUE,
int width=150, int height=200);
int wxGetSingleChoiceIndex(const wxString& message, const wxString& caption,
int LCOUNT, wxString* LIST,
int LCOUNT, wxString* choices,
wxWindow *parent = NULL,
int x = -1, int y = -1,
bool centre = TRUE,
@@ -280,8 +280,6 @@ public:
#endif
void Show(int show = TRUE);
void Hide();
void OnSetFocus();
void OnKillFocus();
};
%inline %{
+2 -2
View File
@@ -542,7 +542,7 @@ static PyObject *_wrap_wxDataFormat_GetId(PyObject *self, PyObject *args, PyObje
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -1234,7 +1234,7 @@ static PyObject *_wrap_wxTextDataObject_GetText(PyObject *self, PyObject *args,
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
+12 -12
View File
@@ -594,7 +594,7 @@ static PyObject *_wrap_wxDirDialog_GetPath(PyObject *self, PyObject *args, PyObj
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -626,7 +626,7 @@ static PyObject *_wrap_wxDirDialog_GetMessage(PyObject *self, PyObject *args, Py
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -872,7 +872,7 @@ static PyObject *_wrap_wxFileDialog_GetDirectory(PyObject *self, PyObject *args,
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -904,7 +904,7 @@ static PyObject *_wrap_wxFileDialog_GetFilename(PyObject *self, PyObject *args,
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -963,7 +963,7 @@ static PyObject *_wrap_wxFileDialog_GetMessage(PyObject *self, PyObject *args, P
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -995,7 +995,7 @@ static PyObject *_wrap_wxFileDialog_GetPath(PyObject *self, PyObject *args, PyOb
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -1054,7 +1054,7 @@ static PyObject *_wrap_wxFileDialog_GetWildcard(PyObject *self, PyObject *args,
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -1377,9 +1377,9 @@ static void *SwigwxSingleChoiceDialogTowxEvtHandler(void *ptr) {
return (void *) dest;
}
static wxSingleChoiceDialog *new_wxSingleChoiceDialog(wxWindow *parent,wxString *message,wxString *caption,int LCOUNT,wxString *LIST,long style,wxPoint *pos) {
static wxSingleChoiceDialog *new_wxSingleChoiceDialog(wxWindow *parent,wxString *message,wxString *caption,int LCOUNT,wxString *choices,long style,wxPoint *pos) {
return new wxSingleChoiceDialog(parent, *message, *caption,
LCOUNT, LIST, NULL, style, *pos);
LCOUNT, choices, NULL, style, *pos);
}
static PyObject *_wrap_new_wxSingleChoiceDialog(PyObject *self, PyObject *args, PyObject *kwargs) {
@@ -1398,7 +1398,7 @@ static PyObject *_wrap_new_wxSingleChoiceDialog(PyObject *self, PyObject *args,
PyObject * _obj4 = 0;
wxPoint temp;
PyObject * _obj6 = 0;
char *_kwnames[] = { "parent","message","caption","LIST","style","pos", NULL };
char *_kwnames[] = { "parent","message","caption","choices","style","pos", NULL };
char _ptemp[128];
self = self;
@@ -1523,7 +1523,7 @@ static PyObject *_wrap_wxSingleChoiceDialog_GetStringSelection(PyObject *self, P
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -1689,7 +1689,7 @@ static PyObject *_wrap_wxTextEntryDialog_GetValue(PyObject *self, PyObject *args
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
+22 -22
View File
@@ -302,7 +302,7 @@ static PyObject *_wrap_wxControl_GetLabel(PyObject *self, PyObject *args, PyObje
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -1141,7 +1141,7 @@ static PyObject *_wrap_new_wxChoice(PyObject *self, PyObject *args, PyObject *kw
PyObject * _obj3 = 0;
PyObject * _obj5 = 0;
PyObject * _argo7 = 0;
char *_kwnames[] = { "parent","id","pos","size","LIST","style","validator","name", NULL };
char *_kwnames[] = { "parent","id","pos","size","choices","style","validator","name", NULL };
char _ptemp[128];
self = self;
@@ -1392,7 +1392,7 @@ static PyObject *_wrap_wxChoice_GetString(PyObject *self, PyObject *args, PyObje
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -1424,7 +1424,7 @@ static PyObject *_wrap_wxChoice_GetStringSelection(PyObject *self, PyObject *arg
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -1608,7 +1608,7 @@ static PyObject *_wrap_new_wxComboBox(PyObject *self, PyObject *args, PyObject *
PyObject * _obj4 = 0;
PyObject * _obj6 = 0;
PyObject * _argo8 = 0;
char *_kwnames[] = { "parent","id","value","pos","size","LIST","style","validator","name", NULL };
char *_kwnames[] = { "parent","id","value","pos","size","choices","style","validator","name", NULL };
char _ptemp[128];
self = self;
@@ -1968,7 +1968,7 @@ static PyObject *_wrap_wxComboBox_GetString(PyObject *self, PyObject *args, PyOb
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -2000,7 +2000,7 @@ static PyObject *_wrap_wxComboBox_GetStringSelection(PyObject *self, PyObject *a
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -2032,7 +2032,7 @@ static PyObject *_wrap_wxComboBox_GetValue(PyObject *self, PyObject *args, PyObj
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -2913,7 +2913,7 @@ static PyObject *_wrap_wxStaticText_GetLabel(PyObject *self, PyObject *args, PyO
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -3005,7 +3005,7 @@ static PyObject *_wrap_new_wxListBox(PyObject *self, PyObject *args, PyObject *k
PyObject * _obj3 = 0;
PyObject * _obj5 = 0;
PyObject * _argo7 = 0;
char *_kwnames[] = { "parent","id","pos","size","LIST","style","validator","name", NULL };
char *_kwnames[] = { "parent","id","pos","size","choices","style","validator","name", NULL };
char _ptemp[128];
self = self;
@@ -3306,7 +3306,7 @@ static PyObject *_wrap_wxListBox_InsertItems(PyObject *self, PyObject *args, PyO
int _arg3;
PyObject * _argo0 = 0;
PyObject * _obj2 = 0;
char *_kwnames[] = { "self","LIST","pos", NULL };
char *_kwnames[] = { "self","choices","pos", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi:wxListBox_InsertItems",_kwnames,&_argo0,&_obj2,&_arg3))
@@ -3370,7 +3370,7 @@ static PyObject *_wrap_wxListBox_GetString(PyObject *self, PyObject *args, PyObj
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -3402,7 +3402,7 @@ static PyObject *_wrap_wxListBox_GetStringSelection(PyObject *self, PyObject *ar
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -3473,7 +3473,7 @@ static PyObject *_wrap_wxListBox_Set(PyObject *self, PyObject *args, PyObject *k
wxString * _arg2;
PyObject * _argo0 = 0;
PyObject * _obj2 = 0;
char *_kwnames[] = { "self","LIST", NULL };
char *_kwnames[] = { "self","choices", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxListBox_Set",_kwnames,&_argo0,&_obj2))
@@ -3748,7 +3748,7 @@ static PyObject *_wrap_new_wxCheckListBox(PyObject *self, PyObject *args, PyObje
PyObject * _obj3 = 0;
PyObject * _obj5 = 0;
PyObject * _argo7 = 0;
char *_kwnames[] = { "parent","id","pos","size","LIST","style","validator","name", NULL };
char *_kwnames[] = { "parent","id","pos","size","choices","style","validator","name", NULL };
char _ptemp[128];
self = self;
@@ -3879,7 +3879,7 @@ static PyObject *_wrap_wxCheckListBox_InsertItems(PyObject *self, PyObject *args
int _arg3;
PyObject * _argo0 = 0;
PyObject * _obj2 = 0;
char *_kwnames[] = { "self","LIST","pos", NULL };
char *_kwnames[] = { "self","choices","pos", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi:wxCheckListBox_InsertItems",_kwnames,&_argo0,&_obj2,&_arg3))
@@ -4249,7 +4249,7 @@ static PyObject *_wrap_wxTextCtrl_GetLineText(PyObject *self, PyObject *args, Py
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -4308,7 +4308,7 @@ static PyObject *_wrap_wxTextCtrl_GetValue(PyObject *self, PyObject *args, PyObj
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -5882,7 +5882,7 @@ static PyObject *_wrap_new_wxRadioBox(PyObject *self, PyObject *args, PyObject *
PyObject * _obj4 = 0;
PyObject * _obj6 = 0;
PyObject * _argo9 = 0;
char *_kwnames[] = { "parent","id","label","point","size","LIST","majorDimension","style","validator","name", NULL };
char *_kwnames[] = { "parent","id","label","point","size","choices","majorDimension","style","validator","name", NULL };
char _ptemp[128];
self = self;
@@ -6084,7 +6084,7 @@ static PyObject *_wrap_wxRadioBox_GetItemLabel(PyObject *self, PyObject *args, P
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -6144,7 +6144,7 @@ static PyObject *_wrap_wxRadioBox_GetString(PyObject *self, PyObject *args, PyOb
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -6176,7 +6176,7 @@ static PyObject *_wrap_wxRadioBox_GetStringSelection(PyObject *self, PyObject *a
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
+5 -5
View File
@@ -450,7 +450,7 @@ static PyObject *_wrap_wxListItem_m_text_set(PyObject *self, PyObject *args, PyO
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST (*_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
if (_obj1)
@@ -483,7 +483,7 @@ static PyObject *_wrap_wxListItem_m_text_get(PyObject *self, PyObject *args, PyO
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST (*_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
return _resultobj;
}
@@ -2084,7 +2084,7 @@ static PyObject *_wrap_wxListCtrl_GetItemText(PyObject *self, PyObject *args, Py
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -3391,7 +3391,7 @@ static PyObject *_wrap_wxTreeEvent_GetLabel(PyObject *self, PyObject *args, PyOb
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST (*_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
return _resultobj;
}
@@ -3794,7 +3794,7 @@ static PyObject *_wrap_wxTreeCtrl_GetItemText(PyObject *self, PyObject *args, Py
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
+2 -14
View File
@@ -896,7 +896,7 @@ static PyObject *_wrap_wxCommandEvent_GetString(PyObject *self, PyObject *args,
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -2475,14 +2475,6 @@ static PyObject *_wrap_wxKeyEvent_GetPositionTuple(PyObject *self, PyObject *arg
return _resultobj;
}
static void *SwigwxNavigationKeyEventTowxCommandEvent(void *ptr) {
wxNavigationKeyEvent *src;
wxCommandEvent *dest;
src = (wxNavigationKeyEvent *) ptr;
dest = (wxCommandEvent *) src;
return (void *) dest;
}
static void *SwigwxNavigationKeyEventTowxEvent(void *ptr) {
wxNavigationKeyEvent *src;
wxEvent *dest;
@@ -4031,7 +4023,7 @@ static PyObject *_wrap_wxUpdateUIEvent_GetText(PyObject *self, PyObject *args, P
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -5296,8 +5288,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxCommandEvent","_wxPyCommandEvent",SwigwxPyCommandEventTowxCommandEvent},
{ "_wxCommandEvent","_class_wxNotifyEvent",SwigwxNotifyEventTowxCommandEvent},
{ "_wxCommandEvent","_wxNotifyEvent",SwigwxNotifyEventTowxCommandEvent},
{ "_wxCommandEvent","_class_wxNavigationKeyEvent",SwigwxNavigationKeyEventTowxCommandEvent},
{ "_wxCommandEvent","_wxNavigationKeyEvent",SwigwxNavigationKeyEventTowxCommandEvent},
{ "_wxCommandEvent","_class_wxSpinEvent",SwigwxSpinEventTowxCommandEvent},
{ "_wxCommandEvent","_wxSpinEvent",SwigwxSpinEventTowxCommandEvent},
{ "_wxCommandEvent","_class_wxScrollEvent",SwigwxScrollEventTowxCommandEvent},
@@ -5417,8 +5407,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxCommandEvent","_wxPyCommandEvent",SwigwxPyCommandEventTowxCommandEvent},
{ "_class_wxCommandEvent","_class_wxNotifyEvent",SwigwxNotifyEventTowxCommandEvent},
{ "_class_wxCommandEvent","_wxNotifyEvent",SwigwxNotifyEventTowxCommandEvent},
{ "_class_wxCommandEvent","_class_wxNavigationKeyEvent",SwigwxNavigationKeyEventTowxCommandEvent},
{ "_class_wxCommandEvent","_wxNavigationKeyEvent",SwigwxNavigationKeyEventTowxCommandEvent},
{ "_class_wxCommandEvent","_class_wxSpinEvent",SwigwxSpinEventTowxCommandEvent},
{ "_class_wxCommandEvent","_wxSpinEvent",SwigwxSpinEventTowxCommandEvent},
{ "_class_wxCommandEvent","_class_wxScrollEvent",SwigwxScrollEventTowxCommandEvent},
+1 -1
View File
@@ -345,7 +345,7 @@ class wxKeyEvent(wxKeyEventPtr):
class wxNavigationKeyEventPtr(wxCommandEventPtr):
class wxNavigationKeyEventPtr(wxEventPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
+2 -2
View File
@@ -414,7 +414,7 @@ static PyObject *_wrap_wxFrame_GetTitle(PyObject *self, PyObject *args, PyObject
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -736,7 +736,7 @@ static PyObject *_wrap_wxFrame_SetStatusWidths(PyObject *self, PyObject *args, P
int * _arg2;
PyObject * _argo0 = 0;
PyObject * _obj2 = 0;
char *_kwnames[] = { "self","LIST", NULL };
char *_kwnames[] = { "self","choices", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFrame_SetStatusWidths",_kwnames,&_argo0,&_obj2))
File diff suppressed because it is too large Load Diff
+38
View File
@@ -499,6 +499,9 @@ class wxDCPtr :
def GetLogicalFunction(self, *_args, **_kwargs):
val = apply(gdic.wxDC_GetLogicalFunction,(self,) + _args, _kwargs)
return val
def GetLogicalScale(self, *_args, **_kwargs):
val = apply(gdic.wxDC_GetLogicalScale,(self,) + _args, _kwargs)
return val
def GetMapMode(self, *_args, **_kwargs):
val = apply(gdic.wxDC_GetMapMode,(self,) + _args, _kwargs)
return val
@@ -520,6 +523,10 @@ class wxDCPtr :
val = apply(gdic.wxDC_GetSize,(self,) + _args, _kwargs)
if val: val = wxSizePtr(val) ; val.thisown = 1
return val
def GetSizeMM(self, *_args, **_kwargs):
val = apply(gdic.wxDC_GetSizeMM,(self,) + _args, _kwargs)
if val: val = wxSizePtr(val) ; val.thisown = 1
return val
def GetTextBackground(self, *_args, **_kwargs):
val = apply(gdic.wxDC_GetTextBackground,(self,) + _args, _kwargs)
if val: val = wxColourPtr(val)
@@ -534,6 +541,9 @@ class wxDCPtr :
val = apply(gdic.wxDC_GetTextForeground,(self,) + _args, _kwargs)
if val: val = wxColourPtr(val)
return val
def GetUserScale(self, *_args, **_kwargs):
val = apply(gdic.wxDC_GetUserScale,(self,) + _args, _kwargs)
return val
def LogicalToDeviceX(self, *_args, **_kwargs):
val = apply(gdic.wxDC_LogicalToDeviceX,(self,) + _args, _kwargs)
return val
@@ -585,6 +595,9 @@ class wxDCPtr :
def SetLogicalFunction(self, *_args, **_kwargs):
val = apply(gdic.wxDC_SetLogicalFunction,(self,) + _args, _kwargs)
return val
def SetLogicalScale(self, *_args, **_kwargs):
val = apply(gdic.wxDC_SetLogicalScale,(self,) + _args, _kwargs)
return val
def SetMapMode(self, *_args, **_kwargs):
val = apply(gdic.wxDC_SetMapMode,(self,) + _args, _kwargs)
return val
@@ -612,6 +625,31 @@ class wxDCPtr :
def DrawBitmap(self, *_args, **_kwargs):
val = apply(gdic.wxDC_DrawBitmap,(self,) + _args, _kwargs)
return val
def CanDrawBitmap(self, *_args, **_kwargs):
val = apply(gdic.wxDC_CanDrawBitmap,(self,) + _args, _kwargs)
return val
def CanGetTextExtent(self, *_args, **_kwargs):
val = apply(gdic.wxDC_CanGetTextExtent,(self,) + _args, _kwargs)
return val
def GetDepth(self, *_args, **_kwargs):
val = apply(gdic.wxDC_GetDepth,(self,) + _args, _kwargs)
return val
def GetPPI(self, *_args, **_kwargs):
val = apply(gdic.wxDC_GetPPI,(self,) + _args, _kwargs)
if val: val = wxSizePtr(val) ; val.thisown = 1
return val
def GetLogicalOrigin(self, *_args, **_kwargs):
val = apply(gdic.wxDC_GetLogicalOrigin,(self,) + _args, _kwargs)
return val
def SetLogicalOrigin(self, *_args, **_kwargs):
val = apply(gdic.wxDC_SetLogicalOrigin,(self,) + _args, _kwargs)
return val
def GetDeviceOrigin(self, *_args, **_kwargs):
val = apply(gdic.wxDC_GetDeviceOrigin,(self,) + _args, _kwargs)
return val
def SetAxisOrientation(self, *_args, **_kwargs):
val = apply(gdic.wxDC_SetAxisOrientation,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxDC instance at %s>" % (self.this,)
class wxDC(wxDCPtr):
+3 -3
View File
@@ -327,7 +327,7 @@ static PyObject *_wrap_wxImageHandler_GetName(PyObject *self, PyObject *args, Py
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -359,7 +359,7 @@ static PyObject *_wrap_wxImageHandler_GetExtension(PyObject *self, PyObject *arg
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -418,7 +418,7 @@ static PyObject *_wrap_wxImageHandler_GetMimeType(PyObject *self, PyObject *args
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
+3 -3
View File
@@ -448,7 +448,7 @@ static PyObject *_wrap_wxNow(PyObject *self, PyObject *args, PyObject *kwargs) {
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -656,7 +656,7 @@ static PyObject *_wrap_wxStripMenuCodes(PyObject *self, PyObject *args, PyObject
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
if (_obj0)
@@ -4265,7 +4265,7 @@ static PyObject *_wrap_new_wxAcceleratorTable(PyObject *self, PyObject *args, Py
int _arg0;
wxAcceleratorEntry * _arg1;
PyObject * _obj1 = 0;
char *_kwnames[] = { "LIST", NULL };
char *_kwnames[] = { "choices", NULL };
char _ptemp[128];
self = self;
+6 -62
View File
@@ -185,7 +185,7 @@ static PyObject *_wrap_wxFileSelector(PyObject *self, PyObject *args, PyObject *
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -250,7 +250,7 @@ static PyObject *_wrap_wxGetTextFromUser(PyObject *self, PyObject *args, PyObjec
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
if (_obj0)
@@ -288,7 +288,7 @@ static PyObject *_wrap_wxGetSingleChoice(PyObject *self, PyObject *args, PyObjec
PyObject * _obj3 = 0;
PyObject * _argo4 = 0;
int tempbool7 = (int) TRUE;
char *_kwnames[] = { "message","caption","LIST","parent","x","y","centre","width","height", NULL };
char *_kwnames[] = { "message","caption","choices","parent","x","y","centre","width","height", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|Oiiiii:wxGetSingleChoice",_kwnames,&_obj0,&_obj1,&_obj3,&_argo4,&_arg5,&_arg6,&tempbool7,&_arg8,&_arg9))
@@ -336,7 +336,7 @@ static PyObject *_wrap_wxGetSingleChoice(PyObject *self, PyObject *args, PyObjec
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
if (_obj0)
@@ -373,7 +373,7 @@ static PyObject *_wrap_wxGetSingleChoiceIndex(PyObject *self, PyObject *args, Py
PyObject * _obj3 = 0;
PyObject * _argo4 = 0;
int tempbool7 = (int) TRUE;
char *_kwnames[] = { "message","caption","LIST","parent","x","y","centre","width","height", NULL };
char *_kwnames[] = { "message","caption","choices","parent","x","y","centre","width","height", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|Oiiiii:wxGetSingleChoiceIndex",_kwnames,&_obj0,&_obj1,&_obj3,&_argo4,&_arg5,&_arg6,&tempbool7,&_arg8,&_arg9))
@@ -1255,7 +1255,7 @@ static PyObject *_wrap_wxToolTip_GetTip(PyObject *self, PyObject *args, PyObject
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -1789,60 +1789,6 @@ static PyObject *_wrap_wxCaret_Hide(PyObject *self, PyObject *args, PyObject *kw
return _resultobj;
}
#define wxCaret_OnSetFocus(_swigobj) (_swigobj->OnSetFocus())
static PyObject *_wrap_wxCaret_OnSetFocus(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxCaret * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_OnSetFocus",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_OnSetFocus. Expected _wxCaret_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
wxCaret_OnSetFocus(_arg0);
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxCaret_OnKillFocus(_swigobj) (_swigobj->OnKillFocus())
static PyObject *_wrap_wxCaret_OnKillFocus(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxCaret * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_OnKillFocus",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_OnKillFocus. Expected _wxCaret_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
wxCaret_OnKillFocus(_arg0);
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define new_wxFontEnumerator() (new wxPyFontEnumerator())
static PyObject *_wrap_new_wxFontEnumerator(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@@ -2127,8 +2073,6 @@ static PyMethodDef misc2cMethods[] = {
{ "wxFontEnumerator__setSelf", (PyCFunction) _wrap_wxFontEnumerator__setSelf, METH_VARARGS | METH_KEYWORDS },
{ "delete_wxFontEnumerator", (PyCFunction) _wrap_delete_wxFontEnumerator, METH_VARARGS | METH_KEYWORDS },
{ "new_wxFontEnumerator", (PyCFunction) _wrap_new_wxFontEnumerator, METH_VARARGS | METH_KEYWORDS },
{ "wxCaret_OnKillFocus", (PyCFunction) _wrap_wxCaret_OnKillFocus, METH_VARARGS | METH_KEYWORDS },
{ "wxCaret_OnSetFocus", (PyCFunction) _wrap_wxCaret_OnSetFocus, METH_VARARGS | METH_KEYWORDS },
{ "wxCaret_Hide", (PyCFunction) _wrap_wxCaret_Hide, METH_VARARGS | METH_KEYWORDS },
{ "wxCaret_Show", (PyCFunction) _wrap_wxCaret_Show, METH_VARARGS | METH_KEYWORDS },
{ "wxCaret_SetSize", (PyCFunction) _wrap_wxCaret_SetSize, METH_VARARGS | METH_KEYWORDS },
-6
View File
@@ -83,12 +83,6 @@ class wxCaretPtr :
def Hide(self, *_args, **_kwargs):
val = apply(misc2c.wxCaret_Hide,(self,) + _args, _kwargs)
return val
def OnSetFocus(self, *_args, **_kwargs):
val = apply(misc2c.wxCaret_OnSetFocus,(self,) + _args, _kwargs)
return val
def OnKillFocus(self, *_args, **_kwargs):
val = apply(misc2c.wxCaret_OnKillFocus,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxCaret instance at %s>" % (self.this,)
class wxCaret(wxCaretPtr):
+1 -1
View File
@@ -326,7 +326,7 @@ static PyObject *_wrap_wxPrintData_GetPrinterName(PyObject *self, PyObject *args
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST (*_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
return _resultobj;
}
+6 -6
View File
@@ -270,7 +270,7 @@ static PyObject *_wrap_wxStatusBar_GetStatusText(PyObject *self, PyObject *args,
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -456,7 +456,7 @@ static PyObject *_wrap_wxStatusBar_SetStatusWidths(PyObject *self, PyObject *arg
int * _arg2;
PyObject * _argo0 = 0;
PyObject * _obj2 = 0;
char *_kwnames[] = { "self","LIST", NULL };
char *_kwnames[] = { "self","choices", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxStatusBar_SetStatusWidths",_kwnames,&_argo0,&_obj2))
@@ -936,7 +936,7 @@ static PyObject *_wrap_wxToolBarToolBase_GetShortHelp(PyObject *self, PyObject *
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -968,7 +968,7 @@ static PyObject *_wrap_wxToolBarToolBase_GetLongHelp(PyObject *self, PyObject *a
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -2309,7 +2309,7 @@ static PyObject *_wrap_wxToolBarBase_GetToolShortHelp(PyObject *self, PyObject *
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -2383,7 +2383,7 @@ static PyObject *_wrap_wxToolBarBase_GetToolLongHelp(PyObject *self, PyObject *a
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
+13 -13
View File
@@ -1842,7 +1842,7 @@ static PyObject *_wrap_wxWindow_GetLabel(PyObject *self, PyObject *args, PyObjec
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -1914,7 +1914,7 @@ static PyObject *_wrap_wxWindow_GetName(PyObject *self, PyObject *args, PyObject
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -2394,7 +2394,7 @@ static PyObject *_wrap_wxWindow_GetTitle(PyObject *self, PyObject *args, PyObjec
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -5160,7 +5160,7 @@ static PyObject *_wrap_wxDialog_GetTitle(PyObject *self, PyObject *args, PyObjec
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -6512,7 +6512,7 @@ static PyObject *_wrap_wxMenu_GetTitle(PyObject *self, PyObject *args, PyObject
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -6585,7 +6585,7 @@ static PyObject *_wrap_wxMenu_GetLabel(PyObject *self, PyObject *args, PyObject
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -6659,7 +6659,7 @@ static PyObject *_wrap_wxMenu_GetHelpString(PyObject *self, PyObject *args, PyOb
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -7728,7 +7728,7 @@ static PyObject *_wrap_wxMenuBar_GetLabelTop(PyObject *self, PyObject *args, PyO
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -8008,7 +8008,7 @@ static PyObject *_wrap_wxMenuBar_GetLabel(PyObject *self, PyObject *args, PyObje
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -8082,7 +8082,7 @@ static PyObject *_wrap_wxMenuBar_GetHelpString(PyObject *self, PyObject *args, P
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -8345,7 +8345,7 @@ static PyObject *_wrap_wxMenuItem_GetLabel(PyObject *self, PyObject *args, PyObj
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -8378,7 +8378,7 @@ static PyObject *_wrap_wxMenuItem_GetText(PyObject *self, PyObject *args, PyObje
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST (*_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
return _resultobj;
}
@@ -8743,7 +8743,7 @@ static PyObject *_wrap_wxMenuItem_GetHelp(PyObject *self, PyObject *args, PyObje
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST (*_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
return _resultobj;
}
+4 -4
View File
@@ -189,7 +189,7 @@ static PyObject *_wrap_wxGridCell_GetTextValue(PyObject *self, PyObject *args, P
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST (*_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
return _resultobj;
}
@@ -1409,7 +1409,7 @@ static PyObject *_wrap_wxGrid_GetCellValue(PyObject *self, PyObject *args, PyObj
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST (*_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
return _resultobj;
}
@@ -1801,7 +1801,7 @@ static PyObject *_wrap_wxGrid_GetLabelValue(PyObject *self, PyObject *args, PyOb
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST (*_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
return _resultobj;
}
@@ -3823,7 +3823,7 @@ static PyObject *_wrap_wxNotebook_GetPageText(PyObject *self, PyObject *args, Py
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
+3 -3
View File
@@ -966,7 +966,7 @@ static PyObject *_wrap_wxPyApp_GetAppName(PyObject *self, PyObject *args, PyObje
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -1025,7 +1025,7 @@ static PyObject *_wrap_wxPyApp_GetClassName(PyObject *self, PyObject *args, PyOb
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
@@ -1145,7 +1145,7 @@ static PyObject *_wrap_wxPyApp_GetVendorName(PyObject *self, PyObject *args, PyO
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
+10 -7
View File
@@ -851,12 +851,6 @@ def _checkForCallback(obj, name, event, theID=-1):
except: pass
else: obj.Connect(theID, -1, event, cb)
## def _checkClassCallback(obj, name):
## try: cb = getattr(obj, name)
## except: pass
## else: obj._addCallback(name, cb)
def _StdWindowCallbacks(win):
_checkForCallback(win, "OnChar", wxEVT_CHAR)
_checkForCallback(win, "OnSize", wxEVT_SIZE)
@@ -1555,15 +1549,18 @@ class wxPyOnDemandOutputWindow:
self.frame = None
self.title = title
def SetParent(self, parent):
self.parent = parent
def OnCloseWindow(self, event):
if self.frame != None:
self.frame.Destroy()
self.frame = None
self.text = None
# this provides the file-like behaviour
def write(self, str):
if not self.frame:
@@ -1575,7 +1572,10 @@ class wxPyOnDemandOutputWindow:
EVT_CLOSE(self.frame, self.OnCloseWindow)
self.text.AppendText(str)
def close(self):
if self.frame != None:
self.frame.Destroy()
self.frame = None
self.text = None
@@ -1611,19 +1611,22 @@ class wxApp(wxPyApp):
def SetTopWindow(self, frame):
if self.stdioWin:
self.stdioWin.SetParent(frame)
sys.stdout = self.stdioWin #sys.stderr =
sys.stderr = sys.stdout = self.stdioWin
wxPyApp.SetTopWindow(self, frame)
def MainLoop(self):
wxPyApp.MainLoop(self)
self.RestoreStdio()
def RedirectStdio(self, filename):
if filename:
sys.stdout = sys.stderr = open(filename, 'a')
else:
self.stdioWin = self.outputWindowClass() # wxPyOnDemandOutputWindow
def RestoreStdio(self):
sys.stdout, sys.stderr = self.saveStdio
if self.stdioWin != None:
+49 -36
View File
@@ -21,12 +21,12 @@
}
//----------------------------------------------------------------------
// LCOUNT and LIST go together. They allow a single Python list to be
// LCOUNT and choices go together. They allow a single Python list to be
// converted to an integer count and an array count items long.
%typemap(python,build) int LCOUNT {
if (_in_LIST) {
$target = PyList_Size(_in_LIST);
if (_in_choices) {
$target = PyList_Size(_in_choices);
}
else {
$target = 0;
@@ -35,112 +35,125 @@
%typemap(python,in) byte* LIST {
%typemap(python,in) byte* choices {
$target = byte_LIST_helper($source);
if ($target == NULL) {
return NULL;
}
}
%typemap(python,freearg) byte* LIST {
%typemap(python,freearg) byte* choices {
delete [] $source;
}
%typemap(python,in) int* LIST {
%typemap(python,in) int* choices {
$target = int_LIST_helper($source);
if ($target == NULL) {
return NULL;
}
}
%typemap(python,freearg) int* LIST {
%typemap(python,freearg) int* choices {
delete [] $source;
}
%typemap(python,in) long* LIST {
%typemap(python,in) long* choices {
$target = long_LIST_helper($source);
if ($target == NULL) {
return NULL;
}
}
%typemap(python,freearg) long* LIST {
%typemap(python,freearg) long* choices {
delete [] $source;
}
%typemap(python,in) unsigned long* LIST {
%typemap(python,in) unsigned long* choices {
$target = (unsigned long*)long_LIST_helper($source);
if ($target == NULL) {
return NULL;
}
}
%typemap(python,freearg) unsigned long* LIST {
%typemap(python,freearg) unsigned long* choices {
delete [] $source;
}
#ifdef __WXMSW__
%typemap(python,in) wxDash* LIST = unsigned long* LIST;
%typemap(python,freearg) wxDash* LIST = unsigned long* LIST;
%typemap(python,in) wxDash* choices = unsigned long* choices;
%typemap(python,freearg) wxDash* choices = unsigned long* choices;
#else
%typemap(python,in) wxDash* LIST = byte* LIST;
%typemap(python,freearg) wxDash* LIST = byte* LIST;
%typemap(python,in) wxDash* choices = byte* choices;
%typemap(python,freearg) wxDash* choices = byte* choices;
#endif
%typemap(python,in) char** LIST {
%typemap(python,in) char** choices {
$target = string_LIST_helper($source);
if ($target == NULL) {
return NULL;
}
}
%typemap(python,freearg) char** LIST {
%typemap(python,freearg) char** choices {
delete [] $source;
}
%typemap(python,in) wxPoint* LIST {
$target = wxPoint_LIST_helper($source);
if ($target == NULL) {
return NULL;
}
}
%typemap(python,freearg) wxPoint* LIST {
delete [] $source;
}
%typemap(python,in) wxBitmap** LIST {
%typemap(python,in) wxBitmap** choices {
$target = wxBitmap_LIST_helper($source);
if ($target == NULL) {
return NULL;
}
}
%typemap(python,freearg) wxBitmap** LIST {
%typemap(python,freearg) wxBitmap** choices {
delete [] $source;
}
%typemap(python,in) wxString* LIST {
%typemap(python,in) wxString* choices {
$target = wxString_LIST_helper($source);
if ($target == NULL) {
return NULL;
}
}
%typemap(python,freearg) wxString* LIST {
%typemap(python,freearg) wxString* choices {
delete [] $source;
}
%typemap(python,in) wxAcceleratorEntry* LIST {
%typemap(python,in) wxAcceleratorEntry* choices {
$target = wxAcceleratorEntry_LIST_helper($source);
if ($target == NULL) {
return NULL;
}
}
%typemap(python,freearg) wxAcceleratorEntry* LIST {
%typemap(python,freearg) wxAcceleratorEntry* choices {
delete [] $source;
}
%typemap(python,build) int PCOUNT {
if (_in_points) {
$target = PyList_Size(_in_points);
}
else {
$target = 0;
}
}
%typemap(python,in) wxPoint* points {
$target = wxPoint_LIST_helper($source);
if ($target == NULL) {
return NULL;
}
}
%typemap(python,freearg) wxPoint* points {
delete [] $source;
}
//---------------------------------------------------------------------------
%{
@@ -162,7 +175,7 @@ static char* wxStringErrorMsg = "string type is required for parameter";
%typemap(python, out) wxString {
$target = PyString_FromString(WXSTRINGCAST *($source));
$target = PyString_FromStringAndSize($source->c_str(), $source->Len());
}
%typemap(python, ret) wxString {
delete $source;
@@ -170,7 +183,7 @@ static char* wxStringErrorMsg = "string type is required for parameter";
%typemap(python, out) wxString* {
$target = PyString_FromString(WXSTRINGCAST (*$source));
$target = PyString_FromStringAndSize($source->c_str(), $source->Len());
}
+1 -1
View File
@@ -59,7 +59,7 @@ public:
void SetFieldsCount(int number = 1);
void SetStatusText(const wxString& text, int i = 0);
void SetStatusWidths(int LCOUNT, int* LIST);
void SetStatusWidths(int LCOUNT, int* choices);
};