Added XRCed to the wxPython Tools directory, contributed by Roman

Rolinsky.

Added wrappers for the default ctor and the Create methods for most
window classes.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11526 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2001-08-31 21:38:03 +00:00
parent f6010d8fad
commit 09f3d4e679
43 changed files with 8191 additions and 940 deletions

View File

@ -4,5 +4,6 @@ build
build.local
dist
licence
s.bat
temp
update.log

View File

@ -15,6 +15,19 @@ Added the new virtual list capabilities to wxListCtrl.
Added a wxSTC style editor from Riaan Booysen to the sample apps.
Added XRCed to the wxPython Tools directory, contributed by Roman
Rolinsky.
Added a new "constructor" to most of the window classes that calls the
default C++ contructor, (the on with no parameters) and also added the
coresponding Create(...) method. This allows you to do a 2-step
creation of windows which is sometimes required for doing things such
as setting extended style flags before the window is created, or for
passing the object to the XRC resource system to be created from the
resource. The name of the new "constructor" is the original name of
the class with a "Pre" in it. For example, wxPreWindow, wxPreFrame,
etc.

View File

@ -157,6 +157,15 @@ public:
const wxSize& size = wxDefaultSize,
long style = wxCAL_SHOW_HOLIDAYS,
const char* name = "calendar");
%name(wxPreCalendarCtrl)wxCalendarCtrl();
bool Create(wxWindow *parent,
wxWindowID id,
const wxDateTime& date = wxDefaultDateTime,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxCAL_SHOW_HOLIDAYS,
const char* name = "calendar");
// set/get the current date
// ------------------------

View File

@ -54,8 +54,6 @@ class wxColourDialog : public wxDialog {
public:
wxColourDialog(wxWindow* parent, wxColourData* data = NULL);
%pragma(python) addtomethod = "__init__:#wx._StdDialogCallbacks(self)"
wxColourData& GetColourData();
int ShowModal();
};
@ -71,8 +69,6 @@ public:
long style = 0,
const wxPoint& pos = wxDefaultPosition);
%pragma(python) addtomethod = "__init__:#wx._StdDialogCallbacks(self)"
wxString GetPath();
wxString GetMessage();
long GetStyle();
@ -93,8 +89,6 @@ public:
long style = 0,
const wxPoint& pos = wxDefaultPosition);
%pragma(python) addtomethod = "__init__:#wx._StdDialogCallbacks(self)"
wxString GetDirectory();
wxString GetFilename();
int GetFilterIndex();
@ -160,9 +154,8 @@ public:
return new wxSingleChoiceDialog(parent, *message, *caption,
LCOUNT, choices, NULL, style, *pos);
}
}
%pragma(python) addtomethod = "__init__:#wx._StdDialogCallbacks(self)"
}
int GetSelection();
wxString GetStringSelection();
@ -182,8 +175,6 @@ public:
long style = wxOK | wxCANCEL | wxCENTRE,
const wxPoint& pos = wxDefaultPosition);
%pragma(python) addtomethod = "__init__:#wx._StdDialogCallbacks(self)"
wxString GetValue();
void SetValue(const wxString& value);
int ShowModal();
@ -216,8 +207,6 @@ class wxFontDialog : public wxDialog {
public:
wxFontDialog(wxWindow* parent, wxFontData* data);
%pragma(python) addtomethod = "__init__:#wx._StdDialogCallbacks(self)"
wxFontData& GetFontData();
int ShowModal();
};
@ -233,8 +222,6 @@ public:
long style = wxOK | wxCANCEL | wxCENTRE,
const wxPoint& pos = wxDefaultPosition);
%pragma(python) addtomethod = "__init__:#wx._StdDialogCallbacks(self)"
int ShowModal();
};

View File

@ -64,8 +64,16 @@ public:
long style=0,
const wxValidator& validator=wxDefaultValidator,
const char* name="control");
%name(wxPreControl)wxControl();
bool Create(wxWindow *parent,
wxWindowID id,
const wxPoint& pos=wxDefaultPosition,
const wxSize& size=wxDefaultSize,
long style=0,
const wxValidator& validator=wxDefaultValidator,
const char* name="control");
%pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
void Command(wxCommandEvent& event);
wxString GetLabel();
@ -83,21 +91,26 @@ public:
long style = 0,
const wxValidator& validator = wxDefaultValidator,
char* name = "button");
%name(wxPreButton)wxButton();
bool Create(wxWindow* parent, wxWindowID id, const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
char* name = "button");
%pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
void SetDefault();
void SetBackgroundColour(const wxColour& colour);
void SetForegroundColour(const wxColour& colour);
void SetImageLabel(const wxBitmap& bitmap);
void SetImageMargins(wxCoord x, wxCoord y);
static wxSize GetDefaultSize();
};
%inline %{
wxSize wxButton_GetDefaultSize() {
return wxButton::GetDefaultSize();
}
%}
//----------------------------------------------------------------------
class wxBitmapButton : public wxButton {
@ -108,8 +121,15 @@ public:
long style = wxBU_AUTODRAW,
const wxValidator& validator = wxDefaultValidator,
char* name = "button");
%name(wxPreBitmapButton)wxBitmapButton();
bool Create(wxWindow* parent, wxWindowID id, const wxBitmap& bitmap,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxBU_AUTODRAW,
const wxValidator& validator = wxDefaultValidator,
char* name = "button");
%pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
wxBitmap& GetBitmapLabel();
wxBitmap& GetBitmapDisabled();
@ -135,8 +155,15 @@ public:
long style = 0,
const wxValidator& val = wxDefaultValidator,
char* name = "checkBox");
%name(wxPreCheckBox)wxCheckBox();
bool Create(wxWindow* parent, wxWindowID id, const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxValidator& val = wxDefaultValidator,
char* name = "checkBox");
%pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
bool GetValue();
void SetValue(const bool state);
@ -153,8 +180,16 @@ public:
long style = 0,
const wxValidator& validator = wxDefaultValidator,
char* name = "choice");
%name(wxPreChoice)wxChoice();
bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int LCOUNT=0, wxString* choices=NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
char* name = "choice");
%pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
void Append(const wxString& item);
void Clear();
@ -188,8 +223,16 @@ public:
long style = 0,
const wxValidator& validator = wxDefaultValidator,
char* name = "comboBox");
%name(wxPreComboBox)wxComboBox();
bool Create(wxWindow* parent, wxWindowID id, char* value = "",
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int LCOUNT=0, wxString* choices=NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
char* name = "comboBox");
%pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
void Append(const wxString& item);
// TODO: void Append(const wxString& item, char* clientData);
@ -228,8 +271,15 @@ public:
long style = wxGA_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
char* name = "gauge");
%name(wxPreGauge)wxGauge();
bool Create(wxWindow* parent, wxWindowID id, int range,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxGA_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
char* name = "gauge");
%pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
int GetBezelFace();
int GetRange();
@ -250,6 +300,13 @@ public:
const wxSize& size = wxDefaultSize,
long style = 0,
char* name = "staticBox");
%name(wxPreStaticBox)wxStaticBox();
bool Create(wxWindow* parent, wxWindowID id, const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
char* name = "staticBox");
};
@ -263,6 +320,13 @@ public:
const wxSize &size = wxDefaultSize,
long style = wxLI_HORIZONTAL,
const char* name = "staticLine" );
%name(wxPreStaticLine)wxStaticLine();
bool Create( wxWindow *parent, wxWindowID id,
const wxPoint &pos = wxDefaultPosition,
const wxSize &size = wxDefaultSize,
long style = wxLI_HORIZONTAL,
const char* name = "staticLine" );
};
@ -275,8 +339,14 @@ public:
const wxSize& size = wxDefaultSize,
long style = 0,
char* name = "staticText");
%name(wxPreStaticText)wxStaticText();
bool Create(wxWindow* parent, wxWindowID id, const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
char* name = "staticText");
%pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
wxString GetLabel();
void SetLabel(const wxString& label);
@ -293,8 +363,16 @@ public:
long style = 0,
const wxValidator& validator = wxDefaultValidator,
char* name = "listBox");
%name(wxPreListBox)wxListBox();
bool Create(wxWindow* parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int LCOUNT, wxString* choices = NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
char* name = "listBox");
%pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
void Append(const wxString& item);
// TODO: void Append(const wxString& item, char* clientData);
@ -348,8 +426,17 @@ public:
long style = 0,
const wxValidator& validator = wxDefaultValidator,
char* name = "listBox");
%name(wxPreCheckListBox)wxCheckListBox();
bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int LCOUNT = 0,
wxString* choices = NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
char* name = "listBox");
%pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
bool IsChecked(int uiIndex);
void Check(int uiIndex, int bCheck = TRUE);
@ -395,8 +482,15 @@ public:
long style = 0,
const wxValidator& validator = wxDefaultValidator,
char* name = "text");
%name(wxPreTextCtrl)wxTextCtrl();
bool Create(wxWindow* parent, wxWindowID id, char* value = "",
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
char* name = "text");
%pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
void Clear();
void Copy();
@ -458,8 +552,15 @@ public:
long style = wxSB_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
char* name = "scrollBar");
%name(wxPreScrollBar)wxScrollBar();
bool Create(wxWindow* parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxSB_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
char* name = "scrollBar");
%pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
int GetRange();
int GetPageSize();
@ -481,6 +582,13 @@ public:
const wxSize& size = wxDefaultSize,
long style = wxSP_HORIZONTAL,
char* name = "spinButton");
%name(wxPreSpinButton)wxSpinButton();
bool Create(wxWindow* parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxSP_HORIZONTAL,
char* name = "spinButton");
int GetMax();
int GetMin();
@ -499,8 +607,15 @@ public:
const wxSize& size = wxDefaultSize,
long style = 0,
char* name = "staticBitmap");
%name(wxPreStaticBitmap)wxStaticBitmap();
bool Create(wxWindow* parent, wxWindowID id,
const wxBitmap& bitmap,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
char* name = "staticBitmap");
%pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
const wxBitmap& GetBitmap();
void SetBitmap(const wxBitmap& bitmap);
@ -520,8 +635,18 @@ public:
long style = wxRA_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
char* name = "radioBox");
%name(wxPreRadioBox)wxRadioBox();
bool Create(wxWindow* parent, wxWindowID id,
const wxString& label,
const wxPoint& point = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int LCOUNT = 0, wxString* choices = NULL,
int majorDimension = 0,
long style = wxRA_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
char* name = "radioBox");
%pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
void Enable(bool enable);
%name(EnableItem)void Enable(int n, bool enable);
@ -564,8 +689,16 @@ public:
long style = 0,
const wxValidator& validator = wxDefaultValidator,
char* name = "radioButton");
%name(wxPreRadioButton)wxRadioButton();
bool Create(wxWindow* parent, wxWindowID id,
const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
char* name = "radioButton");
%pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
bool GetValue();
void SetValue(bool value);
@ -582,8 +715,16 @@ public:
long style = wxSL_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
char* name = "slider");
%name(wxPreSlider)wxSlider();
bool Create(wxWindow* parent, wxWindowID id,
int value, int minValue, int maxValue,
const wxPoint& point = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxSL_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
char* name = "slider");
%pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
void ClearSel();
void ClearTicks();
@ -619,6 +760,16 @@ public:
long style = wxSP_ARROW_KEYS,
int min = 0, int max = 100, int initial = 0,
const char* name = "wxSpinCtrl");
%name(wxPreSpinCtrl)wxSpinCtrl();
bool Create(wxWindow *parent,
wxWindowID id = -1,
const char* value = "",
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxSP_ARROW_KEYS,
int min = 0, int max = 100, int initial = 0,
const char* name = "wxSpinCtrl");
int GetMax();
@ -644,6 +795,16 @@ public:
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const char* name = "toggle");
%name(wxPreToggleButton)wxToggleButton();
bool Create(wxWindow *parent,
wxWindowID id,
const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const char* name = "toggle");
void SetValue(bool value);
bool GetValue() const ;

View File

@ -332,10 +332,11 @@ public:
};
%{
%{ // C++ Version of a Python aware class
class wxPyListCtrl : public wxListCtrl {
DECLARE_ABSTRACT_CLASS(wxPyListCtrl);
public:
wxPyListCtrl() : wxListCtrl() {}
wxPyListCtrl(wxWindow* parent, wxWindowID id,
const wxPoint& pos,
const wxSize& size,
@ -344,6 +345,15 @@ public:
char* name) :
wxListCtrl(parent, id, pos, size, style, validator, name) {}
bool Create(wxWindow* parent, wxWindowID id,
const wxPoint& pos,
const wxSize& size,
long style,
const wxValidator& validator,
char* name) {
return wxListCtrl::Create(parent, id, pos, size, style, validator, name);
}
DEC_PYCALLBACK_STRING_LONGLONG(OnGetItemText);
DEC_PYCALLBACK_INT_LONG(OnGetItemImage);
DEC_PYCALLBACK_LISTATTR_LONG(OnGetItemAttr);
@ -367,9 +377,16 @@ public:
long style = wxLC_ICON,
const wxValidator& validator = wxDefaultValidator,
char* name = "listCtrl");
%name(wxPreListCtrl)wxPyListCtrl();
bool Create(wxWindow* parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxLC_ICON,
const wxValidator& validator = wxDefaultValidator,
char* name = "listCtrl");
void _setSelf(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
%pragma(python) addtomethod = "__init__:self._setSelf(self, wxListCtrl)"
@ -875,10 +892,11 @@ public:
%{
%{ // C++ version of Python aware wxTreeCtrl
class wxPyTreeCtrl : public wxTreeCtrl {
DECLARE_ABSTRACT_CLASS(wxPyTreeCtrl);
public:
wxPyTreeCtrl() : wxTreeCtrl() {}
wxPyTreeCtrl(wxWindow *parent, wxWindowID id,
const wxPoint& pos,
const wxSize& size,
@ -887,6 +905,16 @@ public:
char* name) :
wxTreeCtrl(parent, id, pos, size, style, validator, name) {}
bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos,
const wxSize& size,
long style,
const wxValidator& validator,
char* name) {
return wxTreeCtrl::Create(parent, id, pos, size, style, validator, name);
}
int OnCompareItems(const wxTreeItemId& item1,
const wxTreeItemId& item2) {
int rval = 0;
@ -921,9 +949,16 @@ public:
long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT,
const wxValidator& validator = wxDefaultValidator,
char* name = "wxTreeCtrl");
%name(wxPreTreeCtrl)wxPyTreeCtrl();
bool Create(wxWindow *parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT,
const wxValidator& validator = wxDefaultValidator,
char* name = "wxTreeCtrl");
void _setSelf(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
%pragma(python) addtomethod = "__init__:self._setSelf(self, wxTreeCtrl)"
size_t GetCount();
@ -1135,69 +1170,6 @@ public:
};
//----------------------------------------------------------------------
#ifdef SKIPTHIS
#ifdef __WXMSW__
enum {
/* tab control event types */
wxEVT_COMMAND_TAB_SEL_CHANGED,
wxEVT_COMMAND_TAB_SEL_CHANGING,
};
class wxTabEvent : public wxCommandEvent {
public:
};
class wxTabCtrl : public wxControl {
public:
wxTabCtrl(wxWindow* parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
char* name = "tabCtrl");
%pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
bool DeleteAllItems();
bool DeleteItem(int item);
wxImageList* GetImageList();
int GetItemCount();
// TODO: void* GetItemData();
int GetItemImage(int item);
%addmethods {
%new wxRect* GetItemRect(int item) {
wxRect* rect = new wxRect;
self->GetItemRect(item, *rect);
return rect;
}
}
wxString GetItemText(int item);
bool GetRowCount();
int GetSelection();
int HitTest(const wxPoint& pt, long& OUTPUT);
void InsertItem(int item, const wxString& text,
int imageId = -1, void* clientData = NULL);
// TODO: bool SetItemData(int item, void* data);
bool SetItemImage(int item, int image);
void SetImageList(wxImageList* imageList);
void SetItemSize(const wxSize& size);
bool SetItemText(int item, const wxString& text);
void SetPadding(const wxSize& padding);
int SetSelection(int item);
};
#endif
#endif
//----------------------------------------------------------------------
%init %{

View File

@ -52,8 +52,13 @@ public:
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
char* name = "frame");
%name(wxPreFrame)wxFrame();
%pragma(python) addtomethod = "__init__:#wx._StdFrameCallbacks(self)"
bool Create(wxWindow* parent, const wxWindowID id, const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
char* name = "frame");
void Centre(int direction = wxBOTH);
wxStatusBar* CreateStatusBar(int number = 1,
@ -99,8 +104,13 @@ public:
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
char* name = "frame");
%name(wxPreMiniFrame)wxMiniFrame();
%pragma(python) addtomethod = "__init__:#wx._StdFrameCallbacks(self)"
bool Create(wxWindow* parent, const wxWindowID id, const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
char* name = "frame");
};

View File

@ -1265,7 +1265,6 @@ public:
long style = wxWANTS_CHARS,
const char* name = wxPanelNameStr );
//~wxGrid();
enum wxGridSelectionModes {wxGridSelectCells,
wxGridSelectRows,

View File

@ -41,8 +41,15 @@ public:
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
const char* name = "frame");
%name(wxPreMDIParentFrame)wxMDIParentFrame();
%pragma(python) addtomethod = "__init__:#wx._StdFrameCallbacks(self)"
bool Create(wxWindow *parent,
const wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
const char* name = "frame");
void ActivateNext();
void ActivatePrevious();
@ -75,8 +82,16 @@ public:
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
const char* name = "frame");
%name(wxPreMDIChildFrame)wxMDIChildFrame();
bool Create(wxMDIParentFrame* parent,
const wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
const char* name = "frame");
%pragma(python) addtomethod = "__init__:#wx._StdFrameCallbacks(self)"
void Activate();
void Maximize(bool maximize);
@ -90,6 +105,13 @@ public:
class wxMDIClientWindow : public wxWindow {
public:
wxMDIClientWindow(wxMDIParentFrame* parent, long style = 0);
%name(wxPreMDIClientWindow)wxMDIClientWindow();
%pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
%pragma(python) addtomethod = "__init__:#wx._StdOnScrollCallbacks(self)"
bool Create(wxMDIParentFrame* parent, long style = 0);
%pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
%pragma(python) addtomethod = "__init__:#wx._StdOnScrollCallbacks(self)"
};

View File

@ -957,6 +957,99 @@ static PyObject *_wrap_new_wxCalendarCtrl(PyObject *self, PyObject *args, PyObje
return _resultobj;
}
#define new_wxPreCalendarCtrl() (new wxCalendarCtrl())
static PyObject *_wrap_new_wxPreCalendarCtrl(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxCalendarCtrl * _result;
char *_kwnames[] = { NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreCalendarCtrl",_kwnames))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (wxCalendarCtrl *)new_wxPreCalendarCtrl();
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxCalendarCtrl_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
#define wxCalendarCtrl_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6))
static PyObject *_wrap_wxCalendarCtrl_Create(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxCalendarCtrl * _arg0;
wxWindow * _arg1;
wxWindowID _arg2;
wxDateTime * _arg3 = (wxDateTime *) &wxDefaultDateTime;
wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition;
wxSize * _arg5 = (wxSize *) &wxDefaultSize;
long _arg6 = (long ) (wxCAL_SHOW_HOLIDAYS);
char * _arg7 = (char *) "calendar";
PyObject * _argo0 = 0;
PyObject * _argo1 = 0;
PyObject * _argo3 = 0;
wxPoint temp;
PyObject * _obj4 = 0;
wxSize temp0;
PyObject * _obj5 = 0;
char *_kwnames[] = { "self","parent","id","date","pos","size","style","name", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOOls:wxCalendarCtrl_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_argo3,&_obj4,&_obj5,&_arg6,&_arg7))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_Create. Expected _wxCalendarCtrl_p.");
return NULL;
}
}
if (_argo1) {
if (_argo1 == Py_None) { _arg1 = NULL; }
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxCalendarCtrl_Create. Expected _wxWindow_p.");
return NULL;
}
}
if (_argo3) {
if (_argo3 == Py_None) { _arg3 = NULL; }
else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxDateTime_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxCalendarCtrl_Create. Expected _wxDateTime_p.");
return NULL;
}
}
if (_obj4)
{
_arg4 = &temp;
if (! wxPoint_helper(_obj4, &_arg4))
return NULL;
}
if (_obj5)
{
_arg5 = &temp0;
if (! wxSize_helper(_obj5, &_arg5))
return NULL;
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (bool )wxCalendarCtrl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxCalendarCtrl_SetDate(_swigobj,_swigarg0) (_swigobj->SetDate(_swigarg0))
static PyObject *_wrap_wxCalendarCtrl_SetDate(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@ -1677,6 +1770,8 @@ static PyMethodDef calendarcMethods[] = {
{ "wxCalendarCtrl_EnableYearChange", (PyCFunction) _wrap_wxCalendarCtrl_EnableYearChange, METH_VARARGS | METH_KEYWORDS },
{ "wxCalendarCtrl_GetDate", (PyCFunction) _wrap_wxCalendarCtrl_GetDate, METH_VARARGS | METH_KEYWORDS },
{ "wxCalendarCtrl_SetDate", (PyCFunction) _wrap_wxCalendarCtrl_SetDate, METH_VARARGS | METH_KEYWORDS },
{ "wxCalendarCtrl_Create", (PyCFunction) _wrap_wxCalendarCtrl_Create, METH_VARARGS | METH_KEYWORDS },
{ "new_wxPreCalendarCtrl", (PyCFunction) _wrap_new_wxPreCalendarCtrl, METH_VARARGS | METH_KEYWORDS },
{ "new_wxCalendarCtrl", (PyCFunction) _wrap_new_wxCalendarCtrl, METH_VARARGS | METH_KEYWORDS },
{ "wxCalendarEvent_GetWeekDay", (PyCFunction) _wrap_wxCalendarEvent_GetWeekDay, METH_VARARGS | METH_KEYWORDS },
{ "wxCalendarEvent_GetDate", (PyCFunction) _wrap_wxCalendarEvent_GetDate, METH_VARARGS | METH_KEYWORDS },

View File

@ -134,6 +134,9 @@ class wxCalendarCtrlPtr(wxControlPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(calendarc.wxCalendarCtrl_Create,(self,) + _args, _kwargs)
return val
def SetDate(self, *_args, **_kwargs):
val = apply(calendarc.wxCalendarCtrl_SetDate,(self,) + _args, _kwargs)
return val
@ -208,6 +211,11 @@ class wxCalendarCtrl(wxCalendarCtrlPtr):
def wxPreCalendarCtrl(*_args,**_kwargs):
val = wxCalendarCtrlPtr(apply(calendarc.new_wxPreCalendarCtrl,_args,_kwargs))
val.thisown = 1
return val

View File

@ -71,7 +71,6 @@ class wxColourDialog(wxColourDialogPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(cmndlgsc.new_wxColourDialog,_args,_kwargs)
self.thisown = 1
#wx._StdDialogCallbacks(self)
@ -104,7 +103,6 @@ class wxDirDialog(wxDirDialogPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(cmndlgsc.new_wxDirDialog,_args,_kwargs)
self.thisown = 1
#wx._StdDialogCallbacks(self)
@ -170,7 +168,6 @@ class wxFileDialog(wxFileDialogPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(cmndlgsc.new_wxFileDialog,_args,_kwargs)
self.thisown = 1
#wx._StdDialogCallbacks(self)
@ -197,7 +194,6 @@ class wxSingleChoiceDialog(wxSingleChoiceDialogPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(cmndlgsc.new_wxSingleChoiceDialog,_args,_kwargs)
self.thisown = 1
#wx._StdDialogCallbacks(self)
@ -221,7 +217,6 @@ class wxTextEntryDialog(wxTextEntryDialogPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(cmndlgsc.new_wxTextEntryDialog,_args,_kwargs)
self.thisown = 1
#wx._StdDialogCallbacks(self)
@ -302,7 +297,6 @@ class wxFontDialog(wxFontDialogPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(cmndlgsc.new_wxFontDialog,_args,_kwargs)
self.thisown = 1
#wx._StdDialogCallbacks(self)
@ -320,7 +314,6 @@ class wxMessageDialog(wxMessageDialogPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(cmndlgsc.new_wxMessageDialog,_args,_kwargs)
self.thisown = 1
#wx._StdDialogCallbacks(self)

File diff suppressed because it is too large Load Diff

View File

@ -15,6 +15,9 @@ class wxControlPtr(wxWindowPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(controlsc.wxControl_Create,(self,) + _args, _kwargs)
return val
def Command(self, *_args, **_kwargs):
val = apply(controlsc.wxControl_Command,(self,) + _args, _kwargs)
return val
@ -30,15 +33,22 @@ class wxControl(wxControlPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(controlsc.new_wxControl,_args,_kwargs)
self.thisown = 1
#wx._StdWindowCallbacks(self)
def wxPreControl(*_args,**_kwargs):
val = wxControlPtr(apply(controlsc.new_wxPreControl,_args,_kwargs))
val.thisown = 1
return val
class wxButtonPtr(wxControlPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(controlsc.wxButton_Create,(self,) + _args, _kwargs)
return val
def SetDefault(self, *_args, **_kwargs):
val = apply(controlsc.wxButton_SetDefault,(self,) + _args, _kwargs)
return val
@ -48,21 +58,34 @@ class wxButtonPtr(wxControlPtr):
def SetForegroundColour(self, *_args, **_kwargs):
val = apply(controlsc.wxButton_SetForegroundColour,(self,) + _args, _kwargs)
return val
def SetImageLabel(self, *_args, **_kwargs):
val = apply(controlsc.wxButton_SetImageLabel,(self,) + _args, _kwargs)
return val
def SetImageMargins(self, *_args, **_kwargs):
val = apply(controlsc.wxButton_SetImageMargins,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxButton instance at %s>" % (self.this,)
class wxButton(wxButtonPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(controlsc.new_wxButton,_args,_kwargs)
self.thisown = 1
#wx._StdWindowCallbacks(self)
def wxPreButton(*_args,**_kwargs):
val = wxButtonPtr(apply(controlsc.new_wxPreButton,_args,_kwargs))
val.thisown = 1
return val
class wxBitmapButtonPtr(wxButtonPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(controlsc.wxBitmapButton_Create,(self,) + _args, _kwargs)
return val
def GetBitmapLabel(self, *_args, **_kwargs):
val = apply(controlsc.wxBitmapButton_GetBitmapLabel,(self,) + _args, _kwargs)
if val: val = wxBitmapPtr(val)
@ -106,15 +129,22 @@ class wxBitmapButton(wxBitmapButtonPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(controlsc.new_wxBitmapButton,_args,_kwargs)
self.thisown = 1
#wx._StdWindowCallbacks(self)
def wxPreBitmapButton(*_args,**_kwargs):
val = wxBitmapButtonPtr(apply(controlsc.new_wxPreBitmapButton,_args,_kwargs))
val.thisown = 1
return val
class wxCheckBoxPtr(wxControlPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(controlsc.wxCheckBox_Create,(self,) + _args, _kwargs)
return val
def GetValue(self, *_args, **_kwargs):
val = apply(controlsc.wxCheckBox_GetValue,(self,) + _args, _kwargs)
return val
@ -127,15 +157,22 @@ class wxCheckBox(wxCheckBoxPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(controlsc.new_wxCheckBox,_args,_kwargs)
self.thisown = 1
#wx._StdWindowCallbacks(self)
def wxPreCheckBox(*_args,**_kwargs):
val = wxCheckBoxPtr(apply(controlsc.new_wxPreCheckBox,_args,_kwargs))
val.thisown = 1
return val
class wxChoicePtr(wxControlPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(controlsc.wxChoice_Create,(self,) + _args, _kwargs)
return val
def Append(self, *_args, **_kwargs):
val = apply(controlsc.wxChoice_Append,(self,) + _args, _kwargs)
return val
@ -185,15 +222,22 @@ class wxChoice(wxChoicePtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(controlsc.new_wxChoice,_args,_kwargs)
self.thisown = 1
#wx._StdWindowCallbacks(self)
def wxPreChoice(*_args,**_kwargs):
val = wxChoicePtr(apply(controlsc.new_wxPreChoice,_args,_kwargs))
val.thisown = 1
return val
class wxComboBoxPtr(wxChoicePtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(controlsc.wxComboBox_Create,(self,) + _args, _kwargs)
return val
def Append(self, *_args, **_kwargs):
val = apply(controlsc.wxComboBox_Append,(self,) + _args, _kwargs)
return val
@ -263,15 +307,22 @@ class wxComboBox(wxComboBoxPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(controlsc.new_wxComboBox,_args,_kwargs)
self.thisown = 1
#wx._StdWindowCallbacks(self)
def wxPreComboBox(*_args,**_kwargs):
val = wxComboBoxPtr(apply(controlsc.new_wxPreComboBox,_args,_kwargs))
val.thisown = 1
return val
class wxGaugePtr(wxControlPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(controlsc.wxGauge_Create,(self,) + _args, _kwargs)
return val
def GetBezelFace(self, *_args, **_kwargs):
val = apply(controlsc.wxGauge_GetBezelFace,(self,) + _args, _kwargs)
return val
@ -302,15 +353,22 @@ class wxGauge(wxGaugePtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(controlsc.new_wxGauge,_args,_kwargs)
self.thisown = 1
#wx._StdWindowCallbacks(self)
def wxPreGauge(*_args,**_kwargs):
val = wxGaugePtr(apply(controlsc.new_wxPreGauge,_args,_kwargs))
val.thisown = 1
return val
class wxStaticBoxPtr(wxControlPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(controlsc.wxStaticBox_Create,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxStaticBox instance at %s>" % (self.this,)
class wxStaticBox(wxStaticBoxPtr):
@ -320,11 +378,19 @@ class wxStaticBox(wxStaticBoxPtr):
def wxPreStaticBox(*_args,**_kwargs):
val = wxStaticBoxPtr(apply(controlsc.new_wxPreStaticBox,_args,_kwargs))
val.thisown = 1
return val
class wxStaticLinePtr(wxControlPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(controlsc.wxStaticLine_Create,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxStaticLine instance at %s>" % (self.this,)
class wxStaticLine(wxStaticLinePtr):
@ -334,11 +400,19 @@ class wxStaticLine(wxStaticLinePtr):
def wxPreStaticLine(*_args,**_kwargs):
val = wxStaticLinePtr(apply(controlsc.new_wxPreStaticLine,_args,_kwargs))
val.thisown = 1
return val
class wxStaticTextPtr(wxControlPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(controlsc.wxStaticText_Create,(self,) + _args, _kwargs)
return val
def GetLabel(self, *_args, **_kwargs):
val = apply(controlsc.wxStaticText_GetLabel,(self,) + _args, _kwargs)
return val
@ -351,15 +425,22 @@ class wxStaticText(wxStaticTextPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(controlsc.new_wxStaticText,_args,_kwargs)
self.thisown = 1
#wx._StdWindowCallbacks(self)
def wxPreStaticText(*_args,**_kwargs):
val = wxStaticTextPtr(apply(controlsc.new_wxPreStaticText,_args,_kwargs))
val.thisown = 1
return val
class wxListBoxPtr(wxControlPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(controlsc.wxListBox_Create,(self,) + _args, _kwargs)
return val
def Append(self, *_args, **_kwargs):
val = apply(controlsc.wxListBox_Append,(self,) + _args, _kwargs)
return val
@ -424,15 +505,22 @@ class wxListBox(wxListBoxPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(controlsc.new_wxListBox,_args,_kwargs)
self.thisown = 1
#wx._StdWindowCallbacks(self)
def wxPreListBox(*_args,**_kwargs):
val = wxListBoxPtr(apply(controlsc.new_wxPreListBox,_args,_kwargs))
val.thisown = 1
return val
class wxCheckListBoxPtr(wxListBoxPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(controlsc.wxCheckListBox_Create,(self,) + _args, _kwargs)
return val
def IsChecked(self, *_args, **_kwargs):
val = apply(controlsc.wxCheckListBox_IsChecked,(self,) + _args, _kwargs)
return val
@ -451,10 +539,14 @@ class wxCheckListBox(wxCheckListBoxPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(controlsc.new_wxCheckListBox,_args,_kwargs)
self.thisown = 1
#wx._StdWindowCallbacks(self)
def wxPreCheckListBox(*_args,**_kwargs):
val = wxCheckListBoxPtr(apply(controlsc.new_wxPreCheckListBox,_args,_kwargs))
val.thisown = 1
return val
class wxTextAttrPtr :
def __init__(self,this):
@ -507,6 +599,9 @@ class wxTextCtrlPtr(wxControlPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(controlsc.wxTextCtrl_Create,(self,) + _args, _kwargs)
return val
def Clear(self, *_args, **_kwargs):
val = apply(controlsc.wxTextCtrl_Clear,(self,) + _args, _kwargs)
return val
@ -634,15 +729,22 @@ class wxTextCtrl(wxTextCtrlPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(controlsc.new_wxTextCtrl,_args,_kwargs)
self.thisown = 1
#wx._StdWindowCallbacks(self)
def wxPreTextCtrl(*_args,**_kwargs):
val = wxTextCtrlPtr(apply(controlsc.new_wxPreTextCtrl,_args,_kwargs))
val.thisown = 1
return val
class wxScrollBarPtr(wxControlPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(controlsc.wxScrollBar_Create,(self,) + _args, _kwargs)
return val
def GetRange(self, *_args, **_kwargs):
val = apply(controlsc.wxScrollBar_GetRange,(self,) + _args, _kwargs)
return val
@ -670,15 +772,22 @@ class wxScrollBar(wxScrollBarPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(controlsc.new_wxScrollBar,_args,_kwargs)
self.thisown = 1
#wx._StdWindowCallbacks(self)
def wxPreScrollBar(*_args,**_kwargs):
val = wxScrollBarPtr(apply(controlsc.new_wxPreScrollBar,_args,_kwargs))
val.thisown = 1
return val
class wxSpinButtonPtr(wxControlPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(controlsc.wxSpinButton_Create,(self,) + _args, _kwargs)
return val
def GetMax(self, *_args, **_kwargs):
val = apply(controlsc.wxSpinButton_GetMax,(self,) + _args, _kwargs)
return val
@ -703,11 +812,19 @@ class wxSpinButton(wxSpinButtonPtr):
def wxPreSpinButton(*_args,**_kwargs):
val = wxSpinButtonPtr(apply(controlsc.new_wxPreSpinButton,_args,_kwargs))
val.thisown = 1
return val
class wxStaticBitmapPtr(wxControlPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(controlsc.wxStaticBitmap_Create,(self,) + _args, _kwargs)
return val
def GetBitmap(self, *_args, **_kwargs):
val = apply(controlsc.wxStaticBitmap_GetBitmap,(self,) + _args, _kwargs)
if val: val = wxBitmapPtr(val)
@ -724,15 +841,22 @@ class wxStaticBitmap(wxStaticBitmapPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(controlsc.new_wxStaticBitmap,_args,_kwargs)
self.thisown = 1
#wx._StdWindowCallbacks(self)
def wxPreStaticBitmap(*_args,**_kwargs):
val = wxStaticBitmapPtr(apply(controlsc.new_wxPreStaticBitmap,_args,_kwargs))
val.thisown = 1
return val
class wxRadioBoxPtr(wxControlPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(controlsc.wxRadioBox_Create,(self,) + _args, _kwargs)
return val
def Enable(self, *_args, **_kwargs):
val = apply(controlsc.wxRadioBox_Enable,(self,) + _args, _kwargs)
return val
@ -786,15 +910,22 @@ class wxRadioBox(wxRadioBoxPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(controlsc.new_wxRadioBox,_args,_kwargs)
self.thisown = 1
#wx._StdWindowCallbacks(self)
def wxPreRadioBox(*_args,**_kwargs):
val = wxRadioBoxPtr(apply(controlsc.new_wxPreRadioBox,_args,_kwargs))
val.thisown = 1
return val
class wxRadioButtonPtr(wxControlPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(controlsc.wxRadioButton_Create,(self,) + _args, _kwargs)
return val
def GetValue(self, *_args, **_kwargs):
val = apply(controlsc.wxRadioButton_GetValue,(self,) + _args, _kwargs)
return val
@ -807,15 +938,22 @@ class wxRadioButton(wxRadioButtonPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(controlsc.new_wxRadioButton,_args,_kwargs)
self.thisown = 1
#wx._StdWindowCallbacks(self)
def wxPreRadioButton(*_args,**_kwargs):
val = wxRadioButtonPtr(apply(controlsc.new_wxPreRadioButton,_args,_kwargs))
val.thisown = 1
return val
class wxSliderPtr(wxControlPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(controlsc.wxSlider_Create,(self,) + _args, _kwargs)
return val
def ClearSel(self, *_args, **_kwargs):
val = apply(controlsc.wxSlider_ClearSel,(self,) + _args, _kwargs)
return val
@ -879,15 +1017,22 @@ class wxSlider(wxSliderPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(controlsc.new_wxSlider,_args,_kwargs)
self.thisown = 1
#wx._StdWindowCallbacks(self)
def wxPreSlider(*_args,**_kwargs):
val = wxSliderPtr(apply(controlsc.new_wxPreSlider,_args,_kwargs))
val.thisown = 1
return val
class wxSpinCtrlPtr(wxSpinButtonPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(controlsc.wxSpinCtrl_Create,(self,) + _args, _kwargs)
return val
def GetMax(self, *_args, **_kwargs):
val = apply(controlsc.wxSpinCtrl_GetMax,(self,) + _args, _kwargs)
return val
@ -912,11 +1057,19 @@ class wxSpinCtrl(wxSpinCtrlPtr):
def wxPreSpinCtrl(*_args,**_kwargs):
val = wxSpinCtrlPtr(apply(controlsc.new_wxPreSpinCtrl,_args,_kwargs))
val.thisown = 1
return val
class wxToggleButtonPtr(wxControlPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(controlsc.wxToggleButton_Create,(self,) + _args, _kwargs)
return val
def SetValue(self, *_args, **_kwargs):
val = apply(controlsc.wxToggleButton_SetValue,(self,) + _args, _kwargs)
return val
@ -935,6 +1088,11 @@ class wxToggleButton(wxToggleButtonPtr):
def wxPreToggleButton(*_args,**_kwargs):
val = wxToggleButtonPtr(apply(controlsc.new_wxPreToggleButton,_args,_kwargs))
val.thisown = 1
return val

View File

@ -95,10 +95,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
#else
static char* wxStringErrorMsg = "string type is required for parameter";
#endif
// C++ Version of a Python aware class
class wxPyListCtrl : public wxListCtrl {
DECLARE_ABSTRACT_CLASS(wxPyListCtrl);
public:
wxPyListCtrl() : wxListCtrl() {}
wxPyListCtrl(wxWindow* parent, wxWindowID id,
const wxPoint& pos,
const wxSize& size,
@ -107,6 +108,15 @@ public:
char* name) :
wxListCtrl(parent, id, pos, size, style, validator, name) {}
bool Create(wxWindow* parent, wxWindowID id,
const wxPoint& pos,
const wxSize& size,
long style,
const wxValidator& validator,
char* name) {
return wxListCtrl::Create(parent, id, pos, size, style, validator, name);
}
DEC_PYCALLBACK_STRING_LONGLONG(OnGetItemText);
DEC_PYCALLBACK_INT_LONG(OnGetItemImage);
DEC_PYCALLBACK_LISTATTR_LONG(OnGetItemAttr);
@ -168,10 +178,11 @@ public:
PyObject* m_obj;
};
// C++ version of Python aware wxTreeCtrl
class wxPyTreeCtrl : public wxTreeCtrl {
DECLARE_ABSTRACT_CLASS(wxPyTreeCtrl);
public:
wxPyTreeCtrl() : wxTreeCtrl() {}
wxPyTreeCtrl(wxWindow *parent, wxWindowID id,
const wxPoint& pos,
const wxSize& size,
@ -180,6 +191,16 @@ public:
char* name) :
wxTreeCtrl(parent, id, pos, size, style, validator, name) {}
bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos,
const wxSize& size,
long style,
const wxValidator& validator,
char* name) {
return wxTreeCtrl::Create(parent, id, pos, size, style, validator, name);
}
int OnCompareItems(const wxTreeItemId& item1,
const wxTreeItemId& item2) {
int rval = 0;
@ -3033,6 +3054,99 @@ static PyObject *_wrap_new_wxListCtrl(PyObject *self, PyObject *args, PyObject *
return _resultobj;
}
#define new_wxPreListCtrl() (new wxPyListCtrl())
static PyObject *_wrap_new_wxPreListCtrl(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxPyListCtrl * _result;
char *_kwnames[] = { NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreListCtrl",_kwnames))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (wxPyListCtrl *)new_wxPreListCtrl();
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyListCtrl_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
#define wxListCtrl_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6))
static PyObject *_wrap_wxListCtrl_Create(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxPyListCtrl * _arg0;
wxWindow * _arg1;
wxWindowID _arg2 = (wxWindowID ) -1;
wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition;
wxSize * _arg4 = (wxSize *) &wxDefaultSize;
long _arg5 = (long ) (wxLC_ICON);
wxValidator * _arg6 = (wxValidator *) &wxDefaultValidator;
char * _arg7 = (char *) "listCtrl";
PyObject * _argo0 = 0;
PyObject * _argo1 = 0;
wxPoint temp;
PyObject * _obj3 = 0;
wxSize temp0;
PyObject * _obj4 = 0;
PyObject * _argo6 = 0;
char *_kwnames[] = { "self","parent","id","pos","size","style","validator","name", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|iOOlOs:wxListCtrl_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_argo6,&_arg7))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyListCtrl_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_Create. Expected _wxPyListCtrl_p.");
return NULL;
}
}
if (_argo1) {
if (_argo1 == Py_None) { _arg1 = NULL; }
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxListCtrl_Create. Expected _wxWindow_p.");
return NULL;
}
}
if (_obj3)
{
_arg3 = &temp;
if (! wxPoint_helper(_obj3, &_arg3))
return NULL;
}
if (_obj4)
{
_arg4 = &temp0;
if (! wxSize_helper(_obj4, &_arg4))
return NULL;
}
if (_argo6) {
if (_argo6 == Py_None) { _arg6 = NULL; }
else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of wxListCtrl_Create. Expected _wxValidator_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (bool )wxListCtrl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxListCtrl__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1))
static PyObject *_wrap_wxListCtrl__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@ -6063,6 +6177,99 @@ static PyObject *_wrap_new_wxTreeCtrl(PyObject *self, PyObject *args, PyObject *
return _resultobj;
}
#define new_wxPreTreeCtrl() (new wxPyTreeCtrl())
static PyObject *_wrap_new_wxPreTreeCtrl(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxPyTreeCtrl * _result;
char *_kwnames[] = { NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreTreeCtrl",_kwnames))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (wxPyTreeCtrl *)new_wxPreTreeCtrl();
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyTreeCtrl_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
#define wxTreeCtrl_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6))
static PyObject *_wrap_wxTreeCtrl_Create(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxPyTreeCtrl * _arg0;
wxWindow * _arg1;
wxWindowID _arg2 = (wxWindowID ) -1;
wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition;
wxSize * _arg4 = (wxSize *) &wxDefaultSize;
long _arg5 = (long ) (wxTR_HAS_BUTTONS)|(wxTR_LINES_AT_ROOT);
wxValidator * _arg6 = (wxValidator *) &wxDefaultValidator;
char * _arg7 = (char *) "wxTreeCtrl";
PyObject * _argo0 = 0;
PyObject * _argo1 = 0;
wxPoint temp;
PyObject * _obj3 = 0;
wxSize temp0;
PyObject * _obj4 = 0;
PyObject * _argo6 = 0;
char *_kwnames[] = { "self","parent","id","pos","size","style","validator","name", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|iOOlOs:wxTreeCtrl_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_argo6,&_arg7))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_Create. Expected _wxPyTreeCtrl_p.");
return NULL;
}
}
if (_argo1) {
if (_argo1 == Py_None) { _arg1 = NULL; }
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_Create. Expected _wxWindow_p.");
return NULL;
}
}
if (_obj3)
{
_arg3 = &temp;
if (! wxPoint_helper(_obj3, &_arg3))
return NULL;
}
if (_obj4)
{
_arg4 = &temp0;
if (! wxSize_helper(_obj4, &_arg4))
return NULL;
}
if (_argo6) {
if (_argo6 == Py_None) { _arg6 = NULL; }
else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of wxTreeCtrl_Create. Expected _wxValidator_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (bool )wxTreeCtrl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxTreeCtrl__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1))
static PyObject *_wrap_wxTreeCtrl__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@ -8945,6 +9152,8 @@ static PyMethodDef controls2cMethods[] = {
{ "wxTreeCtrl_GetIndent", (PyCFunction) _wrap_wxTreeCtrl_GetIndent, METH_VARARGS | METH_KEYWORDS },
{ "wxTreeCtrl_GetCount", (PyCFunction) _wrap_wxTreeCtrl_GetCount, METH_VARARGS | METH_KEYWORDS },
{ "wxTreeCtrl__setSelf", (PyCFunction) _wrap_wxTreeCtrl__setSelf, METH_VARARGS | METH_KEYWORDS },
{ "wxTreeCtrl_Create", (PyCFunction) _wrap_wxTreeCtrl_Create, METH_VARARGS | METH_KEYWORDS },
{ "new_wxPreTreeCtrl", (PyCFunction) _wrap_new_wxPreTreeCtrl, METH_VARARGS | METH_KEYWORDS },
{ "new_wxTreeCtrl", (PyCFunction) _wrap_new_wxTreeCtrl, METH_VARARGS | METH_KEYWORDS },
{ "wxTreeEvent_GetLabel", (PyCFunction) _wrap_wxTreeEvent_GetLabel, METH_VARARGS | METH_KEYWORDS },
{ "wxTreeEvent_GetCode", (PyCFunction) _wrap_wxTreeEvent_GetCode, METH_VARARGS | METH_KEYWORDS },
@ -9031,6 +9240,8 @@ static PyMethodDef controls2cMethods[] = {
{ "wxListCtrl_SetBackgroundColour", (PyCFunction) _wrap_wxListCtrl_SetBackgroundColour, METH_VARARGS | METH_KEYWORDS },
{ "wxListCtrl_SetForegroundColour", (PyCFunction) _wrap_wxListCtrl_SetForegroundColour, METH_VARARGS | METH_KEYWORDS },
{ "wxListCtrl__setSelf", (PyCFunction) _wrap_wxListCtrl__setSelf, METH_VARARGS | METH_KEYWORDS },
{ "wxListCtrl_Create", (PyCFunction) _wrap_wxListCtrl_Create, METH_VARARGS | METH_KEYWORDS },
{ "new_wxPreListCtrl", (PyCFunction) _wrap_new_wxPreListCtrl, METH_VARARGS | METH_KEYWORDS },
{ "new_wxListCtrl", (PyCFunction) _wrap_new_wxListCtrl, METH_VARARGS | METH_KEYWORDS },
{ "wxListEvent_GetItem", (PyCFunction) _wrap_wxListEvent_GetItem, METH_VARARGS | METH_KEYWORDS },
{ "wxListEvent_GetMask", (PyCFunction) _wrap_wxListEvent_GetMask, METH_VARARGS | METH_KEYWORDS },

View File

@ -423,6 +423,9 @@ class wxListCtrlPtr(wxControlPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_Create,(self,) + _args, _kwargs)
return val
def _setSelf(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl__setSelf,(self,) + _args, _kwargs)
return val
@ -619,11 +622,15 @@ class wxListCtrl(wxListCtrlPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(controls2c.new_wxListCtrl,_args,_kwargs)
self.thisown = 1
#wx._StdWindowCallbacks(self)
self._setSelf(self, wxListCtrl)
def wxPreListCtrl(*_args,**_kwargs):
val = wxListCtrlPtr(apply(controls2c.new_wxPreListCtrl,_args,_kwargs))
val.thisown = 1
return val
class wxTreeItemAttrPtr :
def __init__(self,this):
@ -755,6 +762,9 @@ class wxTreeCtrlPtr(wxControlPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(controls2c.wxTreeCtrl_Create,(self,) + _args, _kwargs)
return val
def _setSelf(self, *_args, **_kwargs):
val = apply(controls2c.wxTreeCtrl__setSelf,(self,) + _args, _kwargs)
return val
@ -1003,11 +1013,15 @@ class wxTreeCtrl(wxTreeCtrlPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(controls2c.new_wxTreeCtrl,_args,_kwargs)
self.thisown = 1
#wx._StdWindowCallbacks(self)
self._setSelf(self, wxTreeCtrl)
def wxPreTreeCtrl(*_args,**_kwargs):
val = wxTreeCtrlPtr(apply(controls2c.new_wxPreTreeCtrl,_args,_kwargs))
val.thisown = 1
return val

View File

@ -198,6 +198,114 @@ static PyObject *_wrap_new_wxFrame(PyObject *self, PyObject *args, PyObject *kwa
return _resultobj;
}
#define new_wxPreFrame() (new wxFrame())
static PyObject *_wrap_new_wxPreFrame(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxFrame * _result;
char *_kwnames[] = { NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreFrame",_kwnames))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (wxFrame *)new_wxPreFrame();
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxFrame_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
#define wxFrame_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6))
static PyObject *_wrap_wxFrame_Create(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxFrame * _arg0;
wxWindow * _arg1;
wxWindowID _arg2;
wxString * _arg3;
wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition;
wxSize * _arg5 = (wxSize *) &wxDefaultSize;
long _arg6 = (long ) wxDEFAULT_FRAME_STYLE;
char * _arg7 = (char *) "frame";
PyObject * _argo0 = 0;
PyObject * _argo1 = 0;
PyObject * _obj3 = 0;
wxPoint temp;
PyObject * _obj4 = 0;
wxSize temp0;
PyObject * _obj5 = 0;
char *_kwnames[] = { "self","parent","id","title","pos","size","style","name", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOls:wxFrame_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_arg7))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_Create. Expected _wxFrame_p.");
return NULL;
}
}
if (_argo1) {
if (_argo1 == Py_None) { _arg1 = NULL; }
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFrame_Create. Expected _wxWindow_p.");
return NULL;
}
}
{
#if PYTHON_API_VERSION >= 1009
char* tmpPtr; int tmpSize;
if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1)
return NULL;
_arg3 = new wxString(tmpPtr, tmpSize);
#else
if (!PyString_Check(_obj3)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
_arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3));
#endif
}
if (_obj4)
{
_arg4 = &temp;
if (! wxPoint_helper(_obj4, &_arg4))
return NULL;
}
if (_obj5)
{
_arg5 = &temp0;
if (! wxSize_helper(_obj5, &_arg5))
return NULL;
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (bool )wxFrame_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
{
if (_obj3)
delete _arg3;
}
return _resultobj;
}
#define wxFrame_Centre(_swigobj,_swigarg0) (_swigobj->Centre(_swigarg0))
static PyObject *_wrap_wxFrame_Centre(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@ -1219,6 +1327,114 @@ static PyObject *_wrap_new_wxMiniFrame(PyObject *self, PyObject *args, PyObject
return _resultobj;
}
#define new_wxPreMiniFrame() (new wxMiniFrame())
static PyObject *_wrap_new_wxPreMiniFrame(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxMiniFrame * _result;
char *_kwnames[] = { NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreMiniFrame",_kwnames))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (wxMiniFrame *)new_wxPreMiniFrame();
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxMiniFrame_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
#define wxMiniFrame_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6))
static PyObject *_wrap_wxMiniFrame_Create(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxMiniFrame * _arg0;
wxWindow * _arg1;
wxWindowID _arg2;
wxString * _arg3;
wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition;
wxSize * _arg5 = (wxSize *) &wxDefaultSize;
long _arg6 = (long ) wxDEFAULT_FRAME_STYLE;
char * _arg7 = (char *) "frame";
PyObject * _argo0 = 0;
PyObject * _argo1 = 0;
PyObject * _obj3 = 0;
wxPoint temp;
PyObject * _obj4 = 0;
wxSize temp0;
PyObject * _obj5 = 0;
char *_kwnames[] = { "self","parent","id","title","pos","size","style","name", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOls:wxMiniFrame_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_arg7))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMiniFrame_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMiniFrame_Create. Expected _wxMiniFrame_p.");
return NULL;
}
}
if (_argo1) {
if (_argo1 == Py_None) { _arg1 = NULL; }
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMiniFrame_Create. Expected _wxWindow_p.");
return NULL;
}
}
{
#if PYTHON_API_VERSION >= 1009
char* tmpPtr; int tmpSize;
if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1)
return NULL;
_arg3 = new wxString(tmpPtr, tmpSize);
#else
if (!PyString_Check(_obj3)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
_arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3));
#endif
}
if (_obj4)
{
_arg4 = &temp;
if (! wxPoint_helper(_obj4, &_arg4))
return NULL;
}
if (_obj5)
{
_arg5 = &temp0;
if (! wxSize_helper(_obj5, &_arg5))
return NULL;
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (bool )wxMiniFrame_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
{
if (_obj3)
delete _arg3;
}
return _resultobj;
}
static void *SwigwxTipWindowTowxFrame(void *ptr) {
wxTipWindow *src;
wxFrame *dest;
@ -1313,6 +1529,8 @@ static PyObject *_wrap_new_wxTipWindow(PyObject *self, PyObject *args, PyObject
static PyMethodDef framescMethods[] = {
{ "new_wxTipWindow", (PyCFunction) _wrap_new_wxTipWindow, METH_VARARGS | METH_KEYWORDS },
{ "wxMiniFrame_Create", (PyCFunction) _wrap_wxMiniFrame_Create, METH_VARARGS | METH_KEYWORDS },
{ "new_wxPreMiniFrame", (PyCFunction) _wrap_new_wxPreMiniFrame, METH_VARARGS | METH_KEYWORDS },
{ "new_wxMiniFrame", (PyCFunction) _wrap_new_wxMiniFrame, METH_VARARGS | METH_KEYWORDS },
{ "wxFrame_IsFullScreen", (PyCFunction) _wrap_wxFrame_IsFullScreen, METH_VARARGS | METH_KEYWORDS },
{ "wxFrame_ShowFullScreen", (PyCFunction) _wrap_wxFrame_ShowFullScreen, METH_VARARGS | METH_KEYWORDS },
@ -1341,6 +1559,8 @@ static PyMethodDef framescMethods[] = {
{ "wxFrame_CreateToolBar", (PyCFunction) _wrap_wxFrame_CreateToolBar, METH_VARARGS | METH_KEYWORDS },
{ "wxFrame_CreateStatusBar", (PyCFunction) _wrap_wxFrame_CreateStatusBar, METH_VARARGS | METH_KEYWORDS },
{ "wxFrame_Centre", (PyCFunction) _wrap_wxFrame_Centre, METH_VARARGS | METH_KEYWORDS },
{ "wxFrame_Create", (PyCFunction) _wrap_wxFrame_Create, METH_VARARGS | METH_KEYWORDS },
{ "new_wxPreFrame", (PyCFunction) _wrap_new_wxPreFrame, METH_VARARGS | METH_KEYWORDS },
{ "new_wxFrame", (PyCFunction) _wrap_new_wxFrame, METH_VARARGS | METH_KEYWORDS },
{ NULL, NULL }
};

View File

@ -19,6 +19,9 @@ class wxFramePtr(wxWindowPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(framesc.wxFrame_Create,(self,) + _args, _kwargs)
return val
def Centre(self, *_args, **_kwargs):
val = apply(framesc.wxFrame_Centre,(self,) + _args, _kwargs)
return val
@ -108,25 +111,36 @@ class wxFrame(wxFramePtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(framesc.new_wxFrame,_args,_kwargs)
self.thisown = 1
#wx._StdFrameCallbacks(self)
def wxPreFrame(*_args,**_kwargs):
val = wxFramePtr(apply(framesc.new_wxPreFrame,_args,_kwargs))
val.thisown = 1
return val
class wxMiniFramePtr(wxFramePtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(framesc.wxMiniFrame_Create,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxMiniFrame instance at %s>" % (self.this,)
class wxMiniFrame(wxMiniFramePtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(framesc.new_wxMiniFrame,_args,_kwargs)
self.thisown = 1
#wx._StdFrameCallbacks(self)
def wxPreMiniFrame(*_args,**_kwargs):
val = wxMiniFramePtr(apply(framesc.new_wxPreMiniFrame,_args,_kwargs))
val.thisown = 1
return val
class wxTipWindowPtr(wxFramePtr):
def __init__(self,this):

View File

@ -204,6 +204,114 @@ static PyObject *_wrap_new_wxMDIParentFrame(PyObject *self, PyObject *args, PyOb
return _resultobj;
}
#define new_wxPreMDIParentFrame() (new wxMDIParentFrame())
static PyObject *_wrap_new_wxPreMDIParentFrame(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxMDIParentFrame * _result;
char *_kwnames[] = { NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreMDIParentFrame",_kwnames))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (wxMDIParentFrame *)new_wxPreMDIParentFrame();
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxMDIParentFrame_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
#define wxMDIParentFrame_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6))
static PyObject *_wrap_wxMDIParentFrame_Create(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxMDIParentFrame * _arg0;
wxWindow * _arg1;
wxWindowID _arg2;
wxString * _arg3;
wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition;
wxSize * _arg5 = (wxSize *) &wxDefaultSize;
long _arg6 = (long ) wxDEFAULT_FRAME_STYLE|wxVSCROLL|wxHSCROLL;
char * _arg7 = (char *) "frame";
PyObject * _argo0 = 0;
PyObject * _argo1 = 0;
PyObject * _obj3 = 0;
wxPoint temp;
PyObject * _obj4 = 0;
wxSize temp0;
PyObject * _obj5 = 0;
char *_kwnames[] = { "self","parent","id","title","pos","size","style","name", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOls:wxMDIParentFrame_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_arg7))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMDIParentFrame_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIParentFrame_Create. Expected _wxMDIParentFrame_p.");
return NULL;
}
}
if (_argo1) {
if (_argo1 == Py_None) { _arg1 = NULL; }
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMDIParentFrame_Create. Expected _wxWindow_p.");
return NULL;
}
}
{
#if PYTHON_API_VERSION >= 1009
char* tmpPtr; int tmpSize;
if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1)
return NULL;
_arg3 = new wxString(tmpPtr, tmpSize);
#else
if (!PyString_Check(_obj3)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
_arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3));
#endif
}
if (_obj4)
{
_arg4 = &temp;
if (! wxPoint_helper(_obj4, &_arg4))
return NULL;
}
if (_obj5)
{
_arg5 = &temp0;
if (! wxSize_helper(_obj5, &_arg5))
return NULL;
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (bool )wxMDIParentFrame_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
{
if (_obj3)
delete _arg3;
}
return _resultobj;
}
#define wxMDIParentFrame_ActivateNext(_swigobj) (_swigobj->ActivateNext())
static PyObject *_wrap_wxMDIParentFrame_ActivateNext(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@ -642,6 +750,114 @@ static PyObject *_wrap_new_wxMDIChildFrame(PyObject *self, PyObject *args, PyObj
return _resultobj;
}
#define new_wxPreMDIChildFrame() (new wxMDIChildFrame())
static PyObject *_wrap_new_wxPreMDIChildFrame(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxMDIChildFrame * _result;
char *_kwnames[] = { NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreMDIChildFrame",_kwnames))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (wxMDIChildFrame *)new_wxPreMDIChildFrame();
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxMDIChildFrame_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
#define wxMDIChildFrame_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6))
static PyObject *_wrap_wxMDIChildFrame_Create(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxMDIChildFrame * _arg0;
wxMDIParentFrame * _arg1;
wxWindowID _arg2;
wxString * _arg3;
wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition;
wxSize * _arg5 = (wxSize *) &wxDefaultSize;
long _arg6 = (long ) wxDEFAULT_FRAME_STYLE;
char * _arg7 = (char *) "frame";
PyObject * _argo0 = 0;
PyObject * _argo1 = 0;
PyObject * _obj3 = 0;
wxPoint temp;
PyObject * _obj4 = 0;
wxSize temp0;
PyObject * _obj5 = 0;
char *_kwnames[] = { "self","parent","id","title","pos","size","style","name", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOls:wxMDIChildFrame_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_arg7))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMDIChildFrame_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIChildFrame_Create. Expected _wxMDIChildFrame_p.");
return NULL;
}
}
if (_argo1) {
if (_argo1 == Py_None) { _arg1 = NULL; }
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxMDIParentFrame_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMDIChildFrame_Create. Expected _wxMDIParentFrame_p.");
return NULL;
}
}
{
#if PYTHON_API_VERSION >= 1009
char* tmpPtr; int tmpSize;
if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1)
return NULL;
_arg3 = new wxString(tmpPtr, tmpSize);
#else
if (!PyString_Check(_obj3)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
_arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3));
#endif
}
if (_obj4)
{
_arg4 = &temp;
if (! wxPoint_helper(_obj4, &_arg4))
return NULL;
}
if (_obj5)
{
_arg5 = &temp0;
if (! wxSize_helper(_obj5, &_arg5))
return NULL;
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (bool )wxMDIChildFrame_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
{
if (_obj3)
delete _arg3;
}
return _resultobj;
}
#define wxMDIChildFrame_Activate(_swigobj) (_swigobj->Activate())
static PyObject *_wrap_wxMDIChildFrame_Activate(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@ -789,11 +1005,79 @@ static PyObject *_wrap_new_wxMDIClientWindow(PyObject *self, PyObject *args, PyO
return _resultobj;
}
#define new_wxPreMDIClientWindow() (new wxMDIClientWindow())
static PyObject *_wrap_new_wxPreMDIClientWindow(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxMDIClientWindow * _result;
char *_kwnames[] = { NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreMDIClientWindow",_kwnames))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (wxMDIClientWindow *)new_wxPreMDIClientWindow();
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxMDIClientWindow_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
#define wxMDIClientWindow_Create(_swigobj,_swigarg0,_swigarg1) (_swigobj->Create(_swigarg0,_swigarg1))
static PyObject *_wrap_wxMDIClientWindow_Create(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxMDIClientWindow * _arg0;
wxMDIParentFrame * _arg1;
long _arg2 = (long ) 0;
PyObject * _argo0 = 0;
PyObject * _argo1 = 0;
char *_kwnames[] = { "self","parent","style", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|l:wxMDIClientWindow_Create",_kwnames,&_argo0,&_argo1,&_arg2))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMDIClientWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIClientWindow_Create. Expected _wxMDIClientWindow_p.");
return NULL;
}
}
if (_argo1) {
if (_argo1 == Py_None) { _arg1 = NULL; }
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxMDIParentFrame_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMDIClientWindow_Create. Expected _wxMDIParentFrame_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (bool )wxMDIClientWindow_Create(_arg0,_arg1,_arg2);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
static PyMethodDef mdicMethods[] = {
{ "wxMDIClientWindow_Create", (PyCFunction) _wrap_wxMDIClientWindow_Create, METH_VARARGS | METH_KEYWORDS },
{ "new_wxPreMDIClientWindow", (PyCFunction) _wrap_new_wxPreMDIClientWindow, METH_VARARGS | METH_KEYWORDS },
{ "new_wxMDIClientWindow", (PyCFunction) _wrap_new_wxMDIClientWindow, METH_VARARGS | METH_KEYWORDS },
{ "wxMDIChildFrame_Restore", (PyCFunction) _wrap_wxMDIChildFrame_Restore, METH_VARARGS | METH_KEYWORDS },
{ "wxMDIChildFrame_Maximize", (PyCFunction) _wrap_wxMDIChildFrame_Maximize, METH_VARARGS | METH_KEYWORDS },
{ "wxMDIChildFrame_Activate", (PyCFunction) _wrap_wxMDIChildFrame_Activate, METH_VARARGS | METH_KEYWORDS },
{ "wxMDIChildFrame_Create", (PyCFunction) _wrap_wxMDIChildFrame_Create, METH_VARARGS | METH_KEYWORDS },
{ "new_wxPreMDIChildFrame", (PyCFunction) _wrap_new_wxPreMDIChildFrame, METH_VARARGS | METH_KEYWORDS },
{ "new_wxMDIChildFrame", (PyCFunction) _wrap_new_wxMDIChildFrame, METH_VARARGS | METH_KEYWORDS },
{ "wxMDIParentFrame_Tile", (PyCFunction) _wrap_wxMDIParentFrame_Tile, METH_VARARGS | METH_KEYWORDS },
{ "wxMDIParentFrame_SetToolBar", (PyCFunction) _wrap_wxMDIParentFrame_SetToolBar, METH_VARARGS | METH_KEYWORDS },
@ -806,6 +1090,8 @@ static PyMethodDef mdicMethods[] = {
{ "wxMDIParentFrame_ArrangeIcons", (PyCFunction) _wrap_wxMDIParentFrame_ArrangeIcons, METH_VARARGS | METH_KEYWORDS },
{ "wxMDIParentFrame_ActivatePrevious", (PyCFunction) _wrap_wxMDIParentFrame_ActivatePrevious, METH_VARARGS | METH_KEYWORDS },
{ "wxMDIParentFrame_ActivateNext", (PyCFunction) _wrap_wxMDIParentFrame_ActivateNext, METH_VARARGS | METH_KEYWORDS },
{ "wxMDIParentFrame_Create", (PyCFunction) _wrap_wxMDIParentFrame_Create, METH_VARARGS | METH_KEYWORDS },
{ "new_wxPreMDIParentFrame", (PyCFunction) _wrap_new_wxPreMDIParentFrame, METH_VARARGS | METH_KEYWORDS },
{ "new_wxMDIParentFrame", (PyCFunction) _wrap_new_wxMDIParentFrame, METH_VARARGS | METH_KEYWORDS },
{ NULL, NULL }
};

View File

@ -21,6 +21,9 @@ class wxMDIParentFramePtr(wxFramePtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(mdic.wxMDIParentFrame_Create,(self,) + _args, _kwargs)
return val
def ActivateNext(self, *_args, **_kwargs):
val = apply(mdic.wxMDIParentFrame_ActivateNext,(self,) + _args, _kwargs)
return val
@ -60,15 +63,22 @@ class wxMDIParentFrame(wxMDIParentFramePtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(mdic.new_wxMDIParentFrame,_args,_kwargs)
self.thisown = 1
#wx._StdFrameCallbacks(self)
def wxPreMDIParentFrame(*_args,**_kwargs):
val = wxMDIParentFramePtr(apply(mdic.new_wxPreMDIParentFrame,_args,_kwargs))
val.thisown = 1
return val
class wxMDIChildFramePtr(wxFramePtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(mdic.wxMDIChildFrame_Create,(self,) + _args, _kwargs)
return val
def Activate(self, *_args, **_kwargs):
val = apply(mdic.wxMDIChildFrame_Activate,(self,) + _args, _kwargs)
return val
@ -84,15 +94,22 @@ class wxMDIChildFrame(wxMDIChildFramePtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(mdic.new_wxMDIChildFrame,_args,_kwargs)
self.thisown = 1
#wx._StdFrameCallbacks(self)
def wxPreMDIChildFrame(*_args,**_kwargs):
val = wxMDIChildFramePtr(apply(mdic.new_wxPreMDIChildFrame,_args,_kwargs))
val.thisown = 1
return val
class wxMDIClientWindowPtr(wxWindowPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(mdic.wxMDIClientWindow_Create,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxMDIClientWindow instance at %s>" % (self.this,)
class wxMDIClientWindow(wxMDIClientWindowPtr):
@ -101,9 +118,16 @@ class wxMDIClientWindow(wxMDIClientWindowPtr):
self.thisown = 1
#wx._StdWindowCallbacks(self)
#wx._StdOnScrollCallbacks(self)
#wx._StdWindowCallbacks(self)
#wx._StdOnScrollCallbacks(self)
def wxPreMDIClientWindow(*_args,**_kwargs):
val = wxMDIClientWindowPtr(apply(mdic.new_wxPreMDIClientWindow,_args,_kwargs))
val.thisown = 1
return val

View File

@ -118,6 +118,36 @@ static void *SwigwxSizerItemTowxObject(void *ptr) {
return (void *) dest;
}
#define wxSizerItem_GetPosition(_swigobj) (_swigobj->GetPosition())
static PyObject *_wrap_wxSizerItem_GetPosition(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxPoint * _result;
wxSizerItem * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSizerItem_GetPosition",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizerItem_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_GetPosition. Expected _wxSizerItem_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = new wxPoint (wxSizerItem_GetPosition(_arg0));
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p");
_resultobj = Py_BuildValue("s",_ptemp);
return _resultobj;
}
#define wxSizerItem_GetSize(_swigobj) (_swigobj->GetSize())
static PyObject *_wrap_wxSizerItem_GetSize(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@ -2904,6 +2934,7 @@ static PyMethodDef sizerscMethods[] = {
{ "wxSizerItem_SetDimension", (PyCFunction) _wrap_wxSizerItem_SetDimension, METH_VARARGS | METH_KEYWORDS },
{ "wxSizerItem_CalcMin", (PyCFunction) _wrap_wxSizerItem_CalcMin, METH_VARARGS | METH_KEYWORDS },
{ "wxSizerItem_GetSize", (PyCFunction) _wrap_wxSizerItem_GetSize, METH_VARARGS | METH_KEYWORDS },
{ "wxSizerItem_GetPosition", (PyCFunction) _wrap_wxSizerItem_GetPosition, METH_VARARGS | METH_KEYWORDS },
{ NULL, NULL }
};
#ifdef __cplusplus

View File

@ -18,6 +18,10 @@ class wxSizerItemPtr(wxObjectPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def GetPosition(self, *_args, **_kwargs):
val = apply(sizersc.wxSizerItem_GetPosition,(self,) + _args, _kwargs)
if val: val = wxPointPtr(val) ; val.thisown = 1
return val
def GetSize(self, *_args, **_kwargs):
val = apply(sizersc.wxSizerItem_GetSize,(self,) + _args, _kwargs)
if val: val = wxSizePtr(val) ; val.thisown = 1

View File

@ -176,6 +176,72 @@ static PyObject *_wrap_new_wxStatusBar(PyObject *self, PyObject *args, PyObject
return _resultobj;
}
#define new_wxPreStatusBar() (new wxStatusBar())
static PyObject *_wrap_new_wxPreStatusBar(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxStatusBar * _result;
char *_kwnames[] = { NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreStatusBar",_kwnames))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (wxStatusBar *)new_wxPreStatusBar();
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxStatusBar_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
#define wxStatusBar_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3))
static PyObject *_wrap_wxStatusBar_Create(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxStatusBar * _arg0;
wxWindow * _arg1;
wxWindowID _arg2;
long _arg3 = (long ) wxST_SIZEGRIP;
char * _arg4 = (char *) "statusBar";
PyObject * _argo0 = 0;
PyObject * _argo1 = 0;
char *_kwnames[] = { "self","parent","id","style","name", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|ls:wxStatusBar_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3,&_arg4))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStatusBar_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStatusBar_Create. Expected _wxStatusBar_p.");
return NULL;
}
}
if (_argo1) {
if (_argo1 == Py_None) { _arg1 = NULL; }
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxStatusBar_Create. Expected _wxWindow_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (bool )wxStatusBar_Create(_arg0,_arg1,_arg2,_arg3,_arg4);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
static wxRect * wxStatusBar_GetFieldRect(wxStatusBar *self,long item) {
wxRect* rect= new wxRect;
self->GetFieldRect(item, *rect);
@ -3058,6 +3124,90 @@ static PyObject *_wrap_new_wxToolBar(PyObject *self, PyObject *args, PyObject *k
return _resultobj;
}
#define new_wxPreToolBar() (new wxToolBar())
static PyObject *_wrap_new_wxPreToolBar(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxToolBar * _result;
char *_kwnames[] = { NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreToolBar",_kwnames))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (wxToolBar *)new_wxPreToolBar();
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxToolBar_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
#define wxToolBar_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5))
static PyObject *_wrap_wxToolBar_Create(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxToolBar * _arg0;
wxWindow * _arg1;
wxWindowID _arg2;
wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition;
wxSize * _arg4 = (wxSize *) &wxDefaultSize;
long _arg5 = (long ) wxNO_BORDER|wxTB_HORIZONTAL;
char * _arg6 = (char *) wxToolBarNameStr;
PyObject * _argo0 = 0;
PyObject * _argo1 = 0;
wxPoint temp;
PyObject * _obj3 = 0;
wxSize temp0;
PyObject * _obj4 = 0;
char *_kwnames[] = { "self","parent","id","pos","size","style","name", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOls:wxToolBar_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolBar_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBar_Create. Expected _wxToolBar_p.");
return NULL;
}
}
if (_argo1) {
if (_argo1 == Py_None) { _arg1 = NULL; }
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxToolBar_Create. Expected _wxWindow_p.");
return NULL;
}
}
if (_obj3)
{
_arg3 = &temp;
if (! wxPoint_helper(_obj3, &_arg3))
return NULL;
}
if (_obj4)
{
_arg4 = &temp0;
if (! wxSize_helper(_obj4, &_arg4))
return NULL;
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (bool )wxToolBar_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxToolBar_FindToolForPosition(_swigobj,_swigarg0,_swigarg1) (_swigobj->FindToolForPosition(_swigarg0,_swigarg1))
static PyObject *_wrap_wxToolBar_FindToolForPosition(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@ -3184,6 +3334,90 @@ static PyObject *_wrap_new_wxToolBarSimple(PyObject *self, PyObject *args, PyObj
return _resultobj;
}
#define new_wxPreToolBarSimple() (new wxToolBarSimple())
static PyObject *_wrap_new_wxPreToolBarSimple(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxToolBarSimple * _result;
char *_kwnames[] = { NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreToolBarSimple",_kwnames))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (wxToolBarSimple *)new_wxPreToolBarSimple();
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxToolBarSimple_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
#define wxToolBarSimple_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5))
static PyObject *_wrap_wxToolBarSimple_Create(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxToolBarSimple * _arg0;
wxWindow * _arg1;
wxWindowID _arg2;
wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition;
wxSize * _arg4 = (wxSize *) &wxDefaultSize;
long _arg5 = (long ) wxNO_BORDER|wxTB_HORIZONTAL;
char * _arg6 = (char *) wxToolBarNameStr;
PyObject * _argo0 = 0;
PyObject * _argo1 = 0;
wxPoint temp;
PyObject * _obj3 = 0;
wxSize temp0;
PyObject * _obj4 = 0;
char *_kwnames[] = { "self","parent","id","pos","size","style","name", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOls:wxToolBarSimple_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolBarSimple_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBarSimple_Create. Expected _wxToolBarSimple_p.");
return NULL;
}
}
if (_argo1) {
if (_argo1 == Py_None) { _arg1 = NULL; }
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxToolBarSimple_Create. Expected _wxWindow_p.");
return NULL;
}
}
if (_obj3)
{
_arg3 = &temp;
if (! wxPoint_helper(_obj3, &_arg3))
return NULL;
}
if (_obj4)
{
_arg4 = &temp0;
if (! wxSize_helper(_obj4, &_arg4))
return NULL;
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (bool )wxToolBarSimple_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxToolBarSimple_FindToolForPosition(_swigobj,_swigarg0,_swigarg1) (_swigobj->FindToolForPosition(_swigarg0,_swigarg1))
static PyObject *_wrap_wxToolBarSimple_FindToolForPosition(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@ -3216,8 +3450,12 @@ static PyObject *_wrap_wxToolBarSimple_FindToolForPosition(PyObject *self, PyObj
static PyMethodDef stattoolcMethods[] = {
{ "wxToolBarSimple_FindToolForPosition", (PyCFunction) _wrap_wxToolBarSimple_FindToolForPosition, METH_VARARGS | METH_KEYWORDS },
{ "wxToolBarSimple_Create", (PyCFunction) _wrap_wxToolBarSimple_Create, METH_VARARGS | METH_KEYWORDS },
{ "new_wxPreToolBarSimple", (PyCFunction) _wrap_new_wxPreToolBarSimple, METH_VARARGS | METH_KEYWORDS },
{ "new_wxToolBarSimple", (PyCFunction) _wrap_new_wxToolBarSimple, METH_VARARGS | METH_KEYWORDS },
{ "wxToolBar_FindToolForPosition", (PyCFunction) _wrap_wxToolBar_FindToolForPosition, METH_VARARGS | METH_KEYWORDS },
{ "wxToolBar_Create", (PyCFunction) _wrap_wxToolBar_Create, METH_VARARGS | METH_KEYWORDS },
{ "new_wxPreToolBar", (PyCFunction) _wrap_new_wxPreToolBar, METH_VARARGS | METH_KEYWORDS },
{ "new_wxToolBar", (PyCFunction) _wrap_new_wxToolBar, METH_VARARGS | METH_KEYWORDS },
{ "wxToolBarBase_GetToolSize", (PyCFunction) _wrap_wxToolBarBase_GetToolSize, METH_VARARGS | METH_KEYWORDS },
{ "wxToolBarBase_GetToolBitmapSize", (PyCFunction) _wrap_wxToolBarBase_GetToolBitmapSize, METH_VARARGS | METH_KEYWORDS },
@ -3294,6 +3532,8 @@ static PyMethodDef stattoolcMethods[] = {
{ "wxStatusBar_GetStatusText", (PyCFunction) _wrap_wxStatusBar_GetStatusText, METH_VARARGS | METH_KEYWORDS },
{ "wxStatusBar_GetFieldsCount", (PyCFunction) _wrap_wxStatusBar_GetFieldsCount, METH_VARARGS | METH_KEYWORDS },
{ "wxStatusBar_GetFieldRect", (PyCFunction) _wrap_wxStatusBar_GetFieldRect, METH_VARARGS | METH_KEYWORDS },
{ "wxStatusBar_Create", (PyCFunction) _wrap_wxStatusBar_Create, METH_VARARGS | METH_KEYWORDS },
{ "new_wxPreStatusBar", (PyCFunction) _wrap_new_wxPreStatusBar, METH_VARARGS | METH_KEYWORDS },
{ "new_wxStatusBar", (PyCFunction) _wrap_new_wxStatusBar, METH_VARARGS | METH_KEYWORDS },
{ NULL, NULL }
};

View File

@ -17,6 +17,9 @@ class wxStatusBarPtr(wxWindowPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(stattoolc.wxStatusBar_Create,(self,) + _args, _kwargs)
return val
def GetFieldRect(self, *_args, **_kwargs):
val = apply(stattoolc.wxStatusBar_GetFieldRect,(self,) + _args, _kwargs)
if val: val = wxRectPtr(val) ; val.thisown = 1
@ -55,6 +58,11 @@ class wxStatusBar(wxStatusBarPtr):
def wxPreStatusBar(*_args,**_kwargs):
val = wxStatusBarPtr(apply(stattoolc.new_wxPreStatusBar,_args,_kwargs))
val.thisown = 1
return val
class wxToolBarToolBasePtr(wxObjectPtr):
def __init__(self,this):
@ -291,6 +299,9 @@ class wxToolBarPtr(wxToolBarBasePtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(stattoolc.wxToolBar_Create,(self,) + _args, _kwargs)
return val
def FindToolForPosition(self, *_args, **_kwargs):
val = apply(stattoolc.wxToolBar_FindToolForPosition,(self,) + _args, _kwargs)
return val
@ -304,11 +315,19 @@ class wxToolBar(wxToolBarPtr):
def wxPreToolBar(*_args,**_kwargs):
val = wxToolBarPtr(apply(stattoolc.new_wxPreToolBar,_args,_kwargs))
val.thisown = 1
return val
class wxToolBarSimplePtr(wxToolBarBasePtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(stattoolc.wxToolBarSimple_Create,(self,) + _args, _kwargs)
return val
def FindToolForPosition(self, *_args, **_kwargs):
val = apply(stattoolc.wxToolBarSimple_FindToolForPosition,(self,) + _args, _kwargs)
return val
@ -322,6 +341,11 @@ class wxToolBarSimple(wxToolBarSimplePtr):
def wxPreToolBarSimple(*_args,**_kwargs):
val = wxToolBarSimplePtr(apply(stattoolc.new_wxPreToolBarSimple,_args,_kwargs))
val.thisown = 1
return val

View File

@ -141,47 +141,15 @@ IMP_PYCALLBACK_BOOL_(wxPyValidator, wxValidator, TransferFromWindow);
IMPLEMENT_DYNAMIC_CLASS(wxPyValidator, wxValidator);
wxWindow* wxWindow_FindFocus() {
return wxWindow::FindFocus();
}
wxWindow* wxWindow_FromHWND(unsigned long hWnd) {
wxWindow* win = new wxWindow;
win->SetHWND(hWnd);
win->SubclassWin(hWnd);
return win;
}
int wxWindow_NewControlId() {
return wxWindow::NewControlId();
}
int wxWindow_NextControlId(int id) {
return wxWindow::NextControlId(id);
}
int wxWindow_PrevControlId(int id) {
return wxWindow::PrevControlId(id);
}
#ifdef __cplusplus
extern "C" {
#endif
static PyObject *_wrap_wxWindow_FindFocus(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxWindow * _result;
char *_kwnames[] = { NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxWindow_FindFocus",_kwnames))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (wxWindow *)wxWindow_FindFocus();
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
}{ _resultobj = wxPyMake_wxObject(_result); }
return _resultobj;
}
static PyObject *_wrap_wxWindow_FromHWND(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxWindow * _result;
@ -201,62 +169,6 @@ static PyObject *_wrap_wxWindow_FromHWND(PyObject *self, PyObject *args, PyObjec
return _resultobj;
}
static PyObject *_wrap_wxWindow_NewControlId(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
int _result;
char *_kwnames[] = { NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxWindow_NewControlId",_kwnames))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (int )wxWindow_NewControlId();
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
static PyObject *_wrap_wxWindow_NextControlId(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
int _result;
int _arg0;
char *_kwnames[] = { "id", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxWindow_NextControlId",_kwnames,&_arg0))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (int )wxWindow_NextControlId(_arg0);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
static PyObject *_wrap_wxWindow_PrevControlId(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
int _result;
int _arg0;
char *_kwnames[] = { "id", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxWindow_PrevControlId",_kwnames,&_arg0))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (int )wxWindow_PrevControlId(_arg0);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
static void *SwigwxEvtHandlerTowxObject(void *ptr) {
wxEvtHandler *src;
wxObject *dest;
@ -964,6 +876,90 @@ static PyObject *_wrap_new_wxWindow(PyObject *self, PyObject *args, PyObject *kw
return _resultobj;
}
#define new_wxPreWindow() (new wxWindow())
static PyObject *_wrap_new_wxPreWindow(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxWindow * _result;
char *_kwnames[] = { NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreWindow",_kwnames))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (wxWindow *)new_wxPreWindow();
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
#define wxWindow_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5))
static PyObject *_wrap_wxWindow_Create(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxWindow * _arg0;
wxWindow * _arg1;
wxWindowID _arg2;
wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition;
wxSize * _arg4 = (wxSize *) &wxDefaultSize;
long _arg5 = (long ) 0;
char * _arg6 = (char *) "panel";
PyObject * _argo0 = 0;
PyObject * _argo1 = 0;
wxPoint temp;
PyObject * _obj3 = 0;
wxSize temp0;
PyObject * _obj4 = 0;
char *_kwnames[] = { "self","parent","id","pos","size","style","name", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOls:wxWindow_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_Create. Expected _wxWindow_p.");
return NULL;
}
}
if (_argo1) {
if (_argo1 == Py_None) { _arg1 = NULL; }
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_Create. Expected _wxWindow_p.");
return NULL;
}
}
if (_obj3)
{
_arg3 = &temp;
if (! wxPoint_helper(_obj3, &_arg3))
return NULL;
}
if (_obj4)
{
_arg4 = &temp0;
if (! wxSize_helper(_obj4, &_arg4))
return NULL;
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (bool )wxWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxWindow_CaptureMouse(_swigobj) (_swigobj->CaptureMouse())
static PyObject *_wrap_wxWindow_CaptureMouse(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@ -3436,6 +3432,42 @@ static PyObject *_wrap_wxWindow_Refresh(PyObject *self, PyObject *args, PyObject
return _resultobj;
}
#define wxWindow_RefreshRect(_swigobj,_swigarg0) (_swigobj->RefreshRect(_swigarg0))
static PyObject *_wrap_wxWindow_RefreshRect(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxWindow * _arg0;
wxRect * _arg1;
PyObject * _argo0 = 0;
wxRect temp;
PyObject * _obj1 = 0;
char *_kwnames[] = { "self","rect", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxWindow_RefreshRect",_kwnames,&_argo0,&_obj1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_RefreshRect. Expected _wxWindow_p.");
return NULL;
}
}
{
_arg1 = &temp;
if (! wxRect_helper(_obj1, &_arg1))
return NULL;
}
{
wxPy_BEGIN_ALLOW_THREADS;
wxWindow_RefreshRect(_arg0,*_arg1);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxWindow_ReleaseMouse(_swigobj) (_swigobj->ReleaseMouse())
static PyObject *_wrap_wxWindow_ReleaseMouse(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@ -5326,6 +5358,34 @@ static PyObject *_wrap_wxWindow_Thaw(PyObject *self, PyObject *args, PyObject *k
return _resultobj;
}
#define wxWindow_Update(_swigobj) (_swigobj->Update())
static PyObject *_wrap_wxWindow_Update(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxWindow * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWindow_Update",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_Update. Expected _wxWindow_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
wxWindow_Update(_arg0);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxWindow_GetHelpText(_swigobj) (_swigobj->GetHelpText())
static PyObject *_wrap_wxWindow_GetHelpText(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@ -5581,6 +5641,80 @@ static PyObject *_wrap_wxWindow_PageDown(PyObject *self, PyObject *args, PyObjec
return _resultobj;
}
static PyObject *_wrap_wxWindow_FindFocus(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxWindow * _result;
char *_kwnames[] = { NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxWindow_FindFocus",_kwnames))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (wxWindow *)wxWindow::FindFocus();
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
}{ _resultobj = wxPyMake_wxObject(_result); }
return _resultobj;
}
static PyObject *_wrap_wxWindow_NewControlId(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
int _result;
char *_kwnames[] = { NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxWindow_NewControlId",_kwnames))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (int )wxWindow::NewControlId();
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
static PyObject *_wrap_wxWindow_NextControlId(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
int _result;
int _arg0;
char *_kwnames[] = { "id", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxWindow_NextControlId",_kwnames,&_arg0))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (int )wxWindow::NextControlId(_arg0);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
static PyObject *_wrap_wxWindow_PrevControlId(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
int _result;
int _arg0;
char *_kwnames[] = { "id", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxWindow_PrevControlId",_kwnames,&_arg0))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (int )wxWindow::PrevControlId(_arg0);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
static void *SwigwxPanelTowxWindow(void *ptr) {
wxPanel *src;
wxWindow *dest;
@ -5661,6 +5795,90 @@ static PyObject *_wrap_new_wxPanel(PyObject *self, PyObject *args, PyObject *kwa
return _resultobj;
}
#define new_wxPrePanel() (new wxPanel())
static PyObject *_wrap_new_wxPrePanel(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxPanel * _result;
char *_kwnames[] = { NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPrePanel",_kwnames))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (wxPanel *)new_wxPrePanel();
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxPanel_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
#define wxPanel_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5))
static PyObject *_wrap_wxPanel_Create(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxPanel * _arg0;
wxWindow * _arg1;
wxWindowID _arg2;
wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition;
wxSize * _arg4 = (wxSize *) &wxDefaultSize;
long _arg5 = (long ) wxTAB_TRAVERSAL;
char * _arg6 = (char *) "panel";
PyObject * _argo0 = 0;
PyObject * _argo1 = 0;
wxPoint temp;
PyObject * _obj3 = 0;
wxSize temp0;
PyObject * _obj4 = 0;
char *_kwnames[] = { "self","parent","id","pos","size","style","name", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOls:wxPanel_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPanel_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPanel_Create. Expected _wxPanel_p.");
return NULL;
}
}
if (_argo1) {
if (_argo1 == Py_None) { _arg1 = NULL; }
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPanel_Create. Expected _wxWindow_p.");
return NULL;
}
}
if (_obj3)
{
_arg3 = &temp;
if (! wxPoint_helper(_obj3, &_arg3))
return NULL;
}
if (_obj4)
{
_arg4 = &temp0;
if (! wxSize_helper(_obj4, &_arg4))
return NULL;
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (bool )wxPanel_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxPanel_InitDialog(_swigobj) (_swigobj->InitDialog())
static PyObject *_wrap_wxPanel_InitDialog(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@ -5866,6 +6084,114 @@ static PyObject *_wrap_new_wxDialog(PyObject *self, PyObject *args, PyObject *kw
return _resultobj;
}
#define new_wxPreDialog() (new wxDialog())
static PyObject *_wrap_new_wxPreDialog(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxDialog * _result;
char *_kwnames[] = { NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreDialog",_kwnames))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (wxDialog *)new_wxPreDialog();
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxDialog_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
#define wxDialog_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6))
static PyObject *_wrap_wxDialog_Create(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxDialog * _arg0;
wxWindow * _arg1;
wxWindowID _arg2;
wxString * _arg3;
wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition;
wxSize * _arg5 = (wxSize *) &wxDefaultSize;
long _arg6 = (long ) wxDEFAULT_DIALOG_STYLE;
char * _arg7 = (char *) "dialogBox";
PyObject * _argo0 = 0;
PyObject * _argo1 = 0;
PyObject * _obj3 = 0;
wxPoint temp;
PyObject * _obj4 = 0;
wxSize temp0;
PyObject * _obj5 = 0;
char *_kwnames[] = { "self","parent","id","title","pos","size","style","name", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOls:wxDialog_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_arg7))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDialog_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_Create. Expected _wxDialog_p.");
return NULL;
}
}
if (_argo1) {
if (_argo1 == Py_None) { _arg1 = NULL; }
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDialog_Create. Expected _wxWindow_p.");
return NULL;
}
}
{
#if PYTHON_API_VERSION >= 1009
char* tmpPtr; int tmpSize;
if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1)
return NULL;
_arg3 = new wxString(tmpPtr, tmpSize);
#else
if (!PyString_Check(_obj3)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
_arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3));
#endif
}
if (_obj4)
{
_arg4 = &temp;
if (! wxPoint_helper(_obj4, &_arg4))
return NULL;
}
if (_obj5)
{
_arg5 = &temp0;
if (! wxSize_helper(_obj5, &_arg5))
return NULL;
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (bool )wxDialog_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
{
if (_obj3)
delete _arg3;
}
return _resultobj;
}
#define wxDialog_Centre(_swigobj,_swigarg0) (_swigobj->Centre(_swigarg0))
static PyObject *_wrap_wxDialog_Centre(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@ -6412,6 +6738,90 @@ static PyObject *_wrap_new_wxScrolledWindow(PyObject *self, PyObject *args, PyOb
return _resultobj;
}
#define new_wxPreScrolledWindow() (new wxScrolledWindow())
static PyObject *_wrap_new_wxPreScrolledWindow(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxScrolledWindow * _result;
char *_kwnames[] = { NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreScrolledWindow",_kwnames))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (wxScrolledWindow *)new_wxPreScrolledWindow();
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxScrolledWindow_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
#define wxScrolledWindow_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5))
static PyObject *_wrap_wxScrolledWindow_Create(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxScrolledWindow * _arg0;
wxWindow * _arg1;
wxWindowID _arg2 = (wxWindowID ) -1;
wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition;
wxSize * _arg4 = (wxSize *) &wxDefaultSize;
long _arg5 = (long ) wxHSCROLL|wxVSCROLL;
char * _arg6 = (char *) "scrolledWindow";
PyObject * _argo0 = 0;
PyObject * _argo1 = 0;
wxPoint temp;
PyObject * _obj3 = 0;
wxSize temp0;
PyObject * _obj4 = 0;
char *_kwnames[] = { "self","parent","id","pos","size","style","name", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|iOOls:wxScrolledWindow_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxScrolledWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrolledWindow_Create. Expected _wxScrolledWindow_p.");
return NULL;
}
}
if (_argo1) {
if (_argo1 == Py_None) { _arg1 = NULL; }
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxScrolledWindow_Create. Expected _wxWindow_p.");
return NULL;
}
}
if (_obj3)
{
_arg3 = &temp;
if (! wxPoint_helper(_obj3, &_arg3))
return NULL;
}
if (_obj4)
{
_arg4 = &temp0;
if (! wxSize_helper(_obj4, &_arg4))
return NULL;
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (bool )wxScrolledWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxScrolledWindow_EnableScrolling(_swigobj,_swigarg0,_swigarg1) (_swigobj->EnableScrolling(_swigarg0,_swigarg1))
static PyObject *_wrap_wxScrolledWindow_EnableScrolling(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@ -10761,6 +11171,8 @@ static PyMethodDef windowscMethods[] = {
{ "wxScrolledWindow_GetScrollPixelsPerUnit", (PyCFunction) _wrap_wxScrolledWindow_GetScrollPixelsPerUnit, METH_VARARGS | METH_KEYWORDS },
{ "wxScrolledWindow_GetScrollPageSize", (PyCFunction) _wrap_wxScrolledWindow_GetScrollPageSize, METH_VARARGS | METH_KEYWORDS },
{ "wxScrolledWindow_EnableScrolling", (PyCFunction) _wrap_wxScrolledWindow_EnableScrolling, METH_VARARGS | METH_KEYWORDS },
{ "wxScrolledWindow_Create", (PyCFunction) _wrap_wxScrolledWindow_Create, METH_VARARGS | METH_KEYWORDS },
{ "new_wxPreScrolledWindow", (PyCFunction) _wrap_new_wxPreScrolledWindow, METH_VARARGS | METH_KEYWORDS },
{ "new_wxScrolledWindow", (PyCFunction) _wrap_new_wxScrolledWindow, METH_VARARGS | METH_KEYWORDS },
{ "wxDialog_CreateButtonSizer", (PyCFunction) _wrap_wxDialog_CreateButtonSizer, METH_VARARGS | METH_KEYWORDS },
{ "wxDialog_CreateTextSizer", (PyCFunction) _wrap_wxDialog_CreateTextSizer, METH_VARARGS | METH_KEYWORDS },
@ -10776,11 +11188,19 @@ static PyMethodDef windowscMethods[] = {
{ "wxDialog_GetTitle", (PyCFunction) _wrap_wxDialog_GetTitle, METH_VARARGS | METH_KEYWORDS },
{ "wxDialog_EndModal", (PyCFunction) _wrap_wxDialog_EndModal, METH_VARARGS | METH_KEYWORDS },
{ "wxDialog_Centre", (PyCFunction) _wrap_wxDialog_Centre, METH_VARARGS | METH_KEYWORDS },
{ "wxDialog_Create", (PyCFunction) _wrap_wxDialog_Create, METH_VARARGS | METH_KEYWORDS },
{ "new_wxPreDialog", (PyCFunction) _wrap_new_wxPreDialog, METH_VARARGS | METH_KEYWORDS },
{ "new_wxDialog", (PyCFunction) _wrap_new_wxDialog, METH_VARARGS | METH_KEYWORDS },
{ "wxPanel_SetDefaultItem", (PyCFunction) _wrap_wxPanel_SetDefaultItem, METH_VARARGS | METH_KEYWORDS },
{ "wxPanel_GetDefaultItem", (PyCFunction) _wrap_wxPanel_GetDefaultItem, METH_VARARGS | METH_KEYWORDS },
{ "wxPanel_InitDialog", (PyCFunction) _wrap_wxPanel_InitDialog, METH_VARARGS | METH_KEYWORDS },
{ "wxPanel_Create", (PyCFunction) _wrap_wxPanel_Create, METH_VARARGS | METH_KEYWORDS },
{ "new_wxPrePanel", (PyCFunction) _wrap_new_wxPrePanel, METH_VARARGS | METH_KEYWORDS },
{ "new_wxPanel", (PyCFunction) _wrap_new_wxPanel, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_PrevControlId", (PyCFunction) _wrap_wxWindow_PrevControlId, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_NextControlId", (PyCFunction) _wrap_wxWindow_NextControlId, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_NewControlId", (PyCFunction) _wrap_wxWindow_NewControlId, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_FindFocus", (PyCFunction) _wrap_wxWindow_FindFocus, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_PageDown", (PyCFunction) _wrap_wxWindow_PageDown, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_PageUp", (PyCFunction) _wrap_wxWindow_PageUp, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_LineDown", (PyCFunction) _wrap_wxWindow_LineDown, METH_VARARGS | METH_KEYWORDS },
@ -10789,6 +11209,7 @@ static PyMethodDef windowscMethods[] = {
{ "wxWindow_ScrollLines", (PyCFunction) _wrap_wxWindow_ScrollLines, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_SetHelpText", (PyCFunction) _wrap_wxWindow_SetHelpText, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_GetHelpText", (PyCFunction) _wrap_wxWindow_GetHelpText, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_Update", (PyCFunction) _wrap_wxWindow_Update, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_Thaw", (PyCFunction) _wrap_wxWindow_Thaw, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_Freeze", (PyCFunction) _wrap_wxWindow_Freeze, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_GetCaret", (PyCFunction) _wrap_wxWindow_GetCaret, METH_VARARGS | METH_KEYWORDS },
@ -10845,6 +11266,7 @@ static PyMethodDef windowscMethods[] = {
{ "wxWindow_Reparent", (PyCFunction) _wrap_wxWindow_Reparent, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_RemoveChild", (PyCFunction) _wrap_wxWindow_RemoveChild, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_ReleaseMouse", (PyCFunction) _wrap_wxWindow_ReleaseMouse, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_RefreshRect", (PyCFunction) _wrap_wxWindow_RefreshRect, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_Refresh", (PyCFunction) _wrap_wxWindow_Refresh, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_Raise", (PyCFunction) _wrap_wxWindow_Raise, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_PopupMenu", (PyCFunction) _wrap_wxWindow_PopupMenu, METH_VARARGS | METH_KEYWORDS },
@ -10917,6 +11339,8 @@ static PyMethodDef windowscMethods[] = {
{ "wxWindow_Centre", (PyCFunction) _wrap_wxWindow_Centre, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_Center", (PyCFunction) _wrap_wxWindow_Center, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_CaptureMouse", (PyCFunction) _wrap_wxWindow_CaptureMouse, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_Create", (PyCFunction) _wrap_wxWindow_Create, METH_VARARGS | METH_KEYWORDS },
{ "new_wxPreWindow", (PyCFunction) _wrap_new_wxPreWindow, METH_VARARGS | METH_KEYWORDS },
{ "new_wxWindow", (PyCFunction) _wrap_new_wxWindow, METH_VARARGS | METH_KEYWORDS },
{ "wxPyValidator__setSelf", (PyCFunction) _wrap_wxPyValidator__setSelf, METH_VARARGS | METH_KEYWORDS },
{ "new_wxPyValidator", (PyCFunction) _wrap_new_wxPyValidator, METH_VARARGS | METH_KEYWORDS },
@ -10937,11 +11361,7 @@ static PyMethodDef windowscMethods[] = {
{ "wxEvtHandler_AddPendingEvent", (PyCFunction) _wrap_wxEvtHandler_AddPendingEvent, METH_VARARGS | METH_KEYWORDS },
{ "wxEvtHandler_ProcessEvent", (PyCFunction) _wrap_wxEvtHandler_ProcessEvent, METH_VARARGS | METH_KEYWORDS },
{ "new_wxEvtHandler", (PyCFunction) _wrap_new_wxEvtHandler, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_PrevControlId", (PyCFunction) _wrap_wxWindow_PrevControlId, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_NextControlId", (PyCFunction) _wrap_wxWindow_NextControlId, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_NewControlId", (PyCFunction) _wrap_wxWindow_NewControlId, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_FromHWND", (PyCFunction) _wrap_wxWindow_FromHWND, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_FindFocus", (PyCFunction) _wrap_wxWindow_FindFocus, METH_VARARGS | METH_KEYWORDS },
{ NULL, NULL }
};
#ifdef __cplusplus

View File

@ -109,6 +109,9 @@ class wxWindowPtr(wxEvtHandlerPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_Create,(self,) + _args, _kwargs)
return val
def CaptureMouse(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_CaptureMouse,(self,) + _args, _kwargs)
return val
@ -335,6 +338,9 @@ class wxWindowPtr(wxEvtHandlerPtr):
def Refresh(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_Refresh,(self,) + _args, _kwargs)
return val
def RefreshRect(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_RefreshRect,(self,) + _args, _kwargs)
return val
def ReleaseMouse(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_ReleaseMouse,(self,) + _args, _kwargs)
return val
@ -514,6 +520,9 @@ class wxWindowPtr(wxEvtHandlerPtr):
def Thaw(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_Thaw,(self,) + _args, _kwargs)
return val
def Update(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_Update,(self,) + _args, _kwargs)
return val
def GetHelpText(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_GetHelpText,(self,) + _args, _kwargs)
return val
@ -551,15 +560,22 @@ class wxWindow(wxWindowPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(windowsc.new_wxWindow,_args,_kwargs)
self.thisown = 1
#wx._StdWindowCallbacks(self)
def wxPreWindow(*_args,**_kwargs):
val = wxWindowPtr(apply(windowsc.new_wxPreWindow,_args,_kwargs))
val.thisown = 1
return val
class wxPanelPtr(wxWindowPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(windowsc.wxPanel_Create,(self,) + _args, _kwargs)
return val
def InitDialog(self, *_args, **_kwargs):
val = apply(windowsc.wxPanel_InitDialog,(self,) + _args, _kwargs)
return val
@ -575,15 +591,22 @@ class wxPanel(wxPanelPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(windowsc.new_wxPanel,_args,_kwargs)
self.thisown = 1
#wx._StdWindowCallbacks(self)
def wxPrePanel(*_args,**_kwargs):
val = wxPanelPtr(apply(windowsc.new_wxPrePanel,_args,_kwargs))
val.thisown = 1
return val
class wxDialogPtr(wxPanelPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(windowsc.wxDialog_Create,(self,) + _args, _kwargs)
return val
def Centre(self, *_args, **_kwargs):
val = apply(windowsc.wxDialog_Centre,(self,) + _args, _kwargs)
return val
@ -632,15 +655,22 @@ class wxDialog(wxDialogPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(windowsc.new_wxDialog,_args,_kwargs)
self.thisown = 1
#wx._StdDialogCallbacks(self)
def wxPreDialog(*_args,**_kwargs):
val = wxDialogPtr(apply(windowsc.new_wxPreDialog,_args,_kwargs))
val.thisown = 1
return val
class wxScrolledWindowPtr(wxPanelPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(windowsc.wxScrolledWindow_Create,(self,) + _args, _kwargs)
return val
def EnableScrolling(self, *_args, **_kwargs):
val = apply(windowsc.wxScrolledWindow_EnableScrolling,(self,) + _args, _kwargs)
return val
@ -702,11 +732,14 @@ class wxScrolledWindow(wxScrolledWindowPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(windowsc.new_wxScrolledWindow,_args,_kwargs)
self.thisown = 1
#wx._StdWindowCallbacks(self)
#wx._StdOnScrollCallbacks(self)
def wxPreScrolledWindow(*_args,**_kwargs):
val = wxScrolledWindowPtr(apply(windowsc.new_wxPreScrolledWindow,_args,_kwargs))
val.thisown = 1
return val
class wxMenuPtr(wxEvtHandlerPtr):
def __init__(self,this):
@ -1029,24 +1062,24 @@ class wxMenuItem(wxMenuItemPtr):
#-------------- FUNCTION WRAPPERS ------------------
def wxWindow_FindFocus(*_args, **_kwargs):
val = apply(windowsc.wxWindow_FindFocus,_args,_kwargs)
return val
def wxWindow_FromHWND(*_args, **_kwargs):
val = apply(windowsc.wxWindow_FromHWND,_args,_kwargs)
return val
wxValidator_IsSilent = windowsc.wxValidator_IsSilent
wxValidator_SetBellOnError = windowsc.wxValidator_SetBellOnError
def wxWindow_FindFocus(*_args, **_kwargs):
val = apply(windowsc.wxWindow_FindFocus,_args,_kwargs)
return val
wxWindow_NewControlId = windowsc.wxWindow_NewControlId
wxWindow_NextControlId = windowsc.wxWindow_NextControlId
wxWindow_PrevControlId = windowsc.wxWindow_PrevControlId
wxValidator_IsSilent = windowsc.wxValidator_IsSilent
wxValidator_SetBellOnError = windowsc.wxValidator_SetBellOnError
wxMenuItem_GetLabelFromText = windowsc.wxMenuItem_GetLabelFromText
wxMenuItem_GetDefaultMarginWidth = windowsc.wxMenuItem_GetDefaultMarginWidth

File diff suppressed because it is too large Load Diff

View File

@ -32,8 +32,9 @@ class wxNotebookEventPtr(wxNotifyEventPtr):
def __repr__(self):
return "<C wxNotebookEvent instance at %s>" % (self.this,)
class wxNotebookEvent(wxNotebookEventPtr):
def __init__(self,this):
self.this = this
def __init__(self,*_args,**_kwargs):
self.this = apply(windows2c.new_wxNotebookEvent,_args,_kwargs)
self.thisown = 1
@ -42,6 +43,9 @@ class wxNotebookPtr(wxControlPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(windows2c.wxNotebook_Create,(self,) + _args, _kwargs)
return val
def GetPageCount(self, *_args, **_kwargs):
val = apply(windows2c.wxNotebook_GetPageCount,(self,) + _args, _kwargs)
return val
@ -108,10 +112,14 @@ class wxNotebook(wxNotebookPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(windows2c.new_wxNotebook,_args,_kwargs)
self.thisown = 1
#wx._StdWindowCallbacks(self)
def wxPreNotebook(*_args,**_kwargs):
val = wxNotebookPtr(apply(windows2c.new_wxPreNotebook,_args,_kwargs))
val.thisown = 1
return val
class wxSplitterEventPtr(wxCommandEventPtr):
def __init__(self,this):
@ -135,8 +143,9 @@ class wxSplitterEventPtr(wxCommandEventPtr):
def __repr__(self):
return "<C wxSplitterEvent instance at %s>" % (self.this,)
class wxSplitterEvent(wxSplitterEventPtr):
def __init__(self,this):
self.this = this
def __init__(self,*_args,**_kwargs):
self.this = apply(windows2c.new_wxSplitterEvent,_args,_kwargs)
self.thisown = 1
@ -145,20 +154,8 @@ class wxSplitterWindowPtr(wxWindowPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def GetBorderSize(self, *_args, **_kwargs):
val = apply(windows2c.wxSplitterWindow_GetBorderSize,(self,) + _args, _kwargs)
return val
def GetMinimumPaneSize(self, *_args, **_kwargs):
val = apply(windows2c.wxSplitterWindow_GetMinimumPaneSize,(self,) + _args, _kwargs)
return val
def GetSashPosition(self, *_args, **_kwargs):
val = apply(windows2c.wxSplitterWindow_GetSashPosition,(self,) + _args, _kwargs)
return val
def GetSashSize(self, *_args, **_kwargs):
val = apply(windows2c.wxSplitterWindow_GetSashSize,(self,) + _args, _kwargs)
return val
def GetSplitMode(self, *_args, **_kwargs):
val = apply(windows2c.wxSplitterWindow_GetSplitMode,(self,) + _args, _kwargs)
def Create(self, *_args, **_kwargs):
val = apply(windows2c.wxSplitterWindow_Create,(self,) + _args, _kwargs)
return val
def GetWindow1(self, *_args, **_kwargs):
val = apply(windows2c.wxSplitterWindow_GetWindow1,(self,) + _args, _kwargs)
@ -166,49 +163,68 @@ class wxSplitterWindowPtr(wxWindowPtr):
def GetWindow2(self, *_args, **_kwargs):
val = apply(windows2c.wxSplitterWindow_GetWindow2,(self,) + _args, _kwargs)
return val
def Initialize(self, *_args, **_kwargs):
val = apply(windows2c.wxSplitterWindow_Initialize,(self,) + _args, _kwargs)
return val
def IsSplit(self, *_args, **_kwargs):
val = apply(windows2c.wxSplitterWindow_IsSplit,(self,) + _args, _kwargs)
return val
def ReplaceWindow(self, *_args, **_kwargs):
val = apply(windows2c.wxSplitterWindow_ReplaceWindow,(self,) + _args, _kwargs)
return val
def SetBorderSize(self, *_args, **_kwargs):
val = apply(windows2c.wxSplitterWindow_SetBorderSize,(self,) + _args, _kwargs)
return val
def SetSashPosition(self, *_args, **_kwargs):
val = apply(windows2c.wxSplitterWindow_SetSashPosition,(self,) + _args, _kwargs)
return val
def SetSashSize(self, *_args, **_kwargs):
val = apply(windows2c.wxSplitterWindow_SetSashSize,(self,) + _args, _kwargs)
return val
def SetMinimumPaneSize(self, *_args, **_kwargs):
val = apply(windows2c.wxSplitterWindow_SetMinimumPaneSize,(self,) + _args, _kwargs)
return val
def SetSplitMode(self, *_args, **_kwargs):
val = apply(windows2c.wxSplitterWindow_SetSplitMode,(self,) + _args, _kwargs)
return val
def SplitHorizontally(self, *_args, **_kwargs):
val = apply(windows2c.wxSplitterWindow_SplitHorizontally,(self,) + _args, _kwargs)
def GetSplitMode(self, *_args, **_kwargs):
val = apply(windows2c.wxSplitterWindow_GetSplitMode,(self,) + _args, _kwargs)
return val
def Initialize(self, *_args, **_kwargs):
val = apply(windows2c.wxSplitterWindow_Initialize,(self,) + _args, _kwargs)
return val
def SplitVertically(self, *_args, **_kwargs):
val = apply(windows2c.wxSplitterWindow_SplitVertically,(self,) + _args, _kwargs)
return val
def SplitHorizontally(self, *_args, **_kwargs):
val = apply(windows2c.wxSplitterWindow_SplitHorizontally,(self,) + _args, _kwargs)
return val
def Unsplit(self, *_args, **_kwargs):
val = apply(windows2c.wxSplitterWindow_Unsplit,(self,) + _args, _kwargs)
return val
def ReplaceWindow(self, *_args, **_kwargs):
val = apply(windows2c.wxSplitterWindow_ReplaceWindow,(self,) + _args, _kwargs)
return val
def IsSplit(self, *_args, **_kwargs):
val = apply(windows2c.wxSplitterWindow_IsSplit,(self,) + _args, _kwargs)
return val
def SetSashSize(self, *_args, **_kwargs):
val = apply(windows2c.wxSplitterWindow_SetSashSize,(self,) + _args, _kwargs)
return val
def SetBorderSize(self, *_args, **_kwargs):
val = apply(windows2c.wxSplitterWindow_SetBorderSize,(self,) + _args, _kwargs)
return val
def GetSashSize(self, *_args, **_kwargs):
val = apply(windows2c.wxSplitterWindow_GetSashSize,(self,) + _args, _kwargs)
return val
def GetBorderSize(self, *_args, **_kwargs):
val = apply(windows2c.wxSplitterWindow_GetBorderSize,(self,) + _args, _kwargs)
return val
def SetSashPosition(self, *_args, **_kwargs):
val = apply(windows2c.wxSplitterWindow_SetSashPosition,(self,) + _args, _kwargs)
return val
def GetSashPosition(self, *_args, **_kwargs):
val = apply(windows2c.wxSplitterWindow_GetSashPosition,(self,) + _args, _kwargs)
return val
def SetMinimumPaneSize(self, *_args, **_kwargs):
val = apply(windows2c.wxSplitterWindow_SetMinimumPaneSize,(self,) + _args, _kwargs)
return val
def GetMinimumPaneSize(self, *_args, **_kwargs):
val = apply(windows2c.wxSplitterWindow_GetMinimumPaneSize,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxSplitterWindow instance at %s>" % (self.this,)
class wxSplitterWindow(wxSplitterWindowPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(windows2c.new_wxSplitterWindow,_args,_kwargs)
self.thisown = 1
#wx._StdWindowCallbacks(self)
def wxPreSplitterWindow(*_args,**_kwargs):
val = wxSplitterWindowPtr(apply(windows2c.new_wxPreSplitterWindow,_args,_kwargs))
val.thisown = 1
return val
class wxTaskBarIconPtr(wxEvtHandlerPtr):
def __init__(self,this):

View File

@ -118,6 +118,34 @@ static void *SwigwxSashEventTowxObject(void *ptr) {
return (void *) dest;
}
#define new_wxSashEvent(_swigarg0,_swigarg1) (new wxSashEvent(_swigarg0,_swigarg1))
static PyObject *_wrap_new_wxSashEvent(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxSashEvent * _result;
int _arg0 = (int ) 0;
wxSashEdgePosition _arg1 = (wxSashEdgePosition ) (wxSASH_NONE);
char *_kwnames[] = { "id","edge", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|ii:new_wxSashEvent",_kwnames,&_arg0,&_arg1))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (wxSashEvent *)new_wxSashEvent(_arg0,_arg1);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxSashEvent_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
#define wxSashEvent_SetEdge(_swigobj,_swigarg0) (_swigobj->SetEdge(_swigarg0))
static PyObject *_wrap_wxSashEvent_SetEdge(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@ -378,6 +406,90 @@ static PyObject *_wrap_new_wxSashWindow(PyObject *self, PyObject *args, PyObject
return _resultobj;
}
#define new_wxPreSashWindow() (new wxSashWindow())
static PyObject *_wrap_new_wxPreSashWindow(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxSashWindow * _result;
char *_kwnames[] = { NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreSashWindow",_kwnames))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (wxSashWindow *)new_wxPreSashWindow();
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxSashWindow_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
#define wxSashWindow_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5))
static PyObject *_wrap_wxSashWindow_Create(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxSashWindow * _arg0;
wxWindow * _arg1;
wxWindowID _arg2;
wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition;
wxSize * _arg4 = (wxSize *) &wxDefaultSize;
long _arg5 = (long ) wxCLIP_CHILDREN|(wxSW_3D);
char * _arg6 = (char *) "sashWindow";
PyObject * _argo0 = 0;
PyObject * _argo1 = 0;
wxPoint temp;
PyObject * _obj3 = 0;
wxSize temp0;
PyObject * _obj4 = 0;
char *_kwnames[] = { "self","parent","id","pos","size","style","name", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOls:wxSashWindow_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSashWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSashWindow_Create. Expected _wxSashWindow_p.");
return NULL;
}
}
if (_argo1) {
if (_argo1 == Py_None) { _arg1 = NULL; }
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSashWindow_Create. Expected _wxWindow_p.");
return NULL;
}
}
if (_obj3)
{
_arg3 = &temp;
if (! wxPoint_helper(_obj3, &_arg3))
return NULL;
}
if (_obj4)
{
_arg4 = &temp0;
if (! wxSize_helper(_obj4, &_arg4))
return NULL;
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (bool )wxSashWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxSashWindow_GetSashVisible(_swigobj,_swigarg0) (_swigobj->GetSashVisible(_swigarg0))
static PyObject *_wrap_wxSashWindow_GetSashVisible(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@ -887,6 +999,33 @@ static void *SwigwxQueryLayoutInfoEventTowxObject(void *ptr) {
return (void *) dest;
}
#define new_wxQueryLayoutInfoEvent(_swigarg0) (new wxQueryLayoutInfoEvent(_swigarg0))
static PyObject *_wrap_new_wxQueryLayoutInfoEvent(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxQueryLayoutInfoEvent * _result;
wxWindowID _arg0 = (wxWindowID ) 0;
char *_kwnames[] = { "id", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|i:new_wxQueryLayoutInfoEvent",_kwnames,&_arg0))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (wxQueryLayoutInfoEvent *)new_wxQueryLayoutInfoEvent(_arg0);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxQueryLayoutInfoEvent_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
#define wxQueryLayoutInfoEvent_SetRequestedLength(_swigobj,_swigarg0) (_swigobj->SetRequestedLength(_swigarg0))
static PyObject *_wrap_wxQueryLayoutInfoEvent_SetRequestedLength(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@ -1197,6 +1336,33 @@ static void *SwigwxCalculateLayoutEventTowxObject(void *ptr) {
return (void *) dest;
}
#define new_wxCalculateLayoutEvent(_swigarg0) (new wxCalculateLayoutEvent(_swigarg0))
static PyObject *_wrap_new_wxCalculateLayoutEvent(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxCalculateLayoutEvent * _result;
wxWindowID _arg0 = (wxWindowID ) 0;
char *_kwnames[] = { "id", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|i:new_wxCalculateLayoutEvent",_kwnames,&_arg0))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (wxCalculateLayoutEvent *)new_wxCalculateLayoutEvent(_arg0);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxCalculateLayoutEvent_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
#define wxCalculateLayoutEvent_SetFlags(_swigobj,_swigarg0) (_swigobj->SetFlags(_swigarg0))
static PyObject *_wrap_wxCalculateLayoutEvent_SetFlags(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@ -1408,6 +1574,90 @@ static PyObject *_wrap_new_wxSashLayoutWindow(PyObject *self, PyObject *args, Py
return _resultobj;
}
#define new_wxPreSashLayoutWindow() (new wxSashLayoutWindow())
static PyObject *_wrap_new_wxPreSashLayoutWindow(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxSashLayoutWindow * _result;
char *_kwnames[] = { NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreSashLayoutWindow",_kwnames))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (wxSashLayoutWindow *)new_wxPreSashLayoutWindow();
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxSashLayoutWindow_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
#define wxSashLayoutWindow_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5))
static PyObject *_wrap_wxSashLayoutWindow_Create(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxSashLayoutWindow * _arg0;
wxWindow * _arg1;
wxWindowID _arg2;
wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition;
wxSize * _arg4 = (wxSize *) &wxDefaultSize;
long _arg5 = (long ) wxCLIP_CHILDREN|(wxSW_3D);
char * _arg6 = (char *) "layoutWindow";
PyObject * _argo0 = 0;
PyObject * _argo1 = 0;
wxPoint temp;
PyObject * _obj3 = 0;
wxSize temp0;
PyObject * _obj4 = 0;
char *_kwnames[] = { "self","parent","id","pos","size","style","name", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOls:wxSashLayoutWindow_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSashLayoutWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSashLayoutWindow_Create. Expected _wxSashLayoutWindow_p.");
return NULL;
}
}
if (_argo1) {
if (_argo1 == Py_None) { _arg1 = NULL; }
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSashLayoutWindow_Create. Expected _wxWindow_p.");
return NULL;
}
}
if (_obj3)
{
_arg3 = &temp;
if (! wxPoint_helper(_obj3, &_arg3))
return NULL;
}
if (_obj4)
{
_arg4 = &temp0;
if (! wxSize_helper(_obj4, &_arg4))
return NULL;
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (bool )wxSashLayoutWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxSashLayoutWindow_GetAlignment(_swigobj) (_swigobj->GetAlignment())
static PyObject *_wrap_wxSashLayoutWindow_GetAlignment(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@ -1769,11 +2019,14 @@ static PyMethodDef windows3cMethods[] = {
{ "wxSashLayoutWindow_SetAlignment", (PyCFunction) _wrap_wxSashLayoutWindow_SetAlignment, METH_VARARGS | METH_KEYWORDS },
{ "wxSashLayoutWindow_GetOrientation", (PyCFunction) _wrap_wxSashLayoutWindow_GetOrientation, METH_VARARGS | METH_KEYWORDS },
{ "wxSashLayoutWindow_GetAlignment", (PyCFunction) _wrap_wxSashLayoutWindow_GetAlignment, METH_VARARGS | METH_KEYWORDS },
{ "wxSashLayoutWindow_Create", (PyCFunction) _wrap_wxSashLayoutWindow_Create, METH_VARARGS | METH_KEYWORDS },
{ "new_wxPreSashLayoutWindow", (PyCFunction) _wrap_new_wxPreSashLayoutWindow, METH_VARARGS | METH_KEYWORDS },
{ "new_wxSashLayoutWindow", (PyCFunction) _wrap_new_wxSashLayoutWindow, METH_VARARGS | METH_KEYWORDS },
{ "wxCalculateLayoutEvent_GetRect", (PyCFunction) _wrap_wxCalculateLayoutEvent_GetRect, METH_VARARGS | METH_KEYWORDS },
{ "wxCalculateLayoutEvent_SetRect", (PyCFunction) _wrap_wxCalculateLayoutEvent_SetRect, METH_VARARGS | METH_KEYWORDS },
{ "wxCalculateLayoutEvent_GetFlags", (PyCFunction) _wrap_wxCalculateLayoutEvent_GetFlags, METH_VARARGS | METH_KEYWORDS },
{ "wxCalculateLayoutEvent_SetFlags", (PyCFunction) _wrap_wxCalculateLayoutEvent_SetFlags, METH_VARARGS | METH_KEYWORDS },
{ "new_wxCalculateLayoutEvent", (PyCFunction) _wrap_new_wxCalculateLayoutEvent, METH_VARARGS | METH_KEYWORDS },
{ "wxQueryLayoutInfoEvent_GetAlignment", (PyCFunction) _wrap_wxQueryLayoutInfoEvent_GetAlignment, METH_VARARGS | METH_KEYWORDS },
{ "wxQueryLayoutInfoEvent_SetAlignment", (PyCFunction) _wrap_wxQueryLayoutInfoEvent_SetAlignment, METH_VARARGS | METH_KEYWORDS },
{ "wxQueryLayoutInfoEvent_GetOrientation", (PyCFunction) _wrap_wxQueryLayoutInfoEvent_GetOrientation, METH_VARARGS | METH_KEYWORDS },
@ -1784,6 +2037,7 @@ static PyMethodDef windows3cMethods[] = {
{ "wxQueryLayoutInfoEvent_SetFlags", (PyCFunction) _wrap_wxQueryLayoutInfoEvent_SetFlags, METH_VARARGS | METH_KEYWORDS },
{ "wxQueryLayoutInfoEvent_GetRequestedLength", (PyCFunction) _wrap_wxQueryLayoutInfoEvent_GetRequestedLength, METH_VARARGS | METH_KEYWORDS },
{ "wxQueryLayoutInfoEvent_SetRequestedLength", (PyCFunction) _wrap_wxQueryLayoutInfoEvent_SetRequestedLength, METH_VARARGS | METH_KEYWORDS },
{ "new_wxQueryLayoutInfoEvent", (PyCFunction) _wrap_new_wxQueryLayoutInfoEvent, METH_VARARGS | METH_KEYWORDS },
{ "wxSashWindow_SetSashBorder", (PyCFunction) _wrap_wxSashWindow_SetSashBorder, METH_VARARGS | METH_KEYWORDS },
{ "wxSashWindow_SetSashVisible", (PyCFunction) _wrap_wxSashWindow_SetSashVisible, METH_VARARGS | METH_KEYWORDS },
{ "wxSashWindow_SetMinimumSizeY", (PyCFunction) _wrap_wxSashWindow_SetMinimumSizeY, METH_VARARGS | METH_KEYWORDS },
@ -1801,6 +2055,8 @@ static PyMethodDef windows3cMethods[] = {
{ "wxSashWindow_GetEdgeMargin", (PyCFunction) _wrap_wxSashWindow_GetEdgeMargin, METH_VARARGS | METH_KEYWORDS },
{ "wxSashWindow_GetDefaultBorderSize", (PyCFunction) _wrap_wxSashWindow_GetDefaultBorderSize, METH_VARARGS | METH_KEYWORDS },
{ "wxSashWindow_GetSashVisible", (PyCFunction) _wrap_wxSashWindow_GetSashVisible, METH_VARARGS | METH_KEYWORDS },
{ "wxSashWindow_Create", (PyCFunction) _wrap_wxSashWindow_Create, METH_VARARGS | METH_KEYWORDS },
{ "new_wxPreSashWindow", (PyCFunction) _wrap_new_wxPreSashWindow, METH_VARARGS | METH_KEYWORDS },
{ "new_wxSashWindow", (PyCFunction) _wrap_new_wxSashWindow, METH_VARARGS | METH_KEYWORDS },
{ "wxSashEvent_GetDragStatus", (PyCFunction) _wrap_wxSashEvent_GetDragStatus, METH_VARARGS | METH_KEYWORDS },
{ "wxSashEvent_SetDragStatus", (PyCFunction) _wrap_wxSashEvent_SetDragStatus, METH_VARARGS | METH_KEYWORDS },
@ -1808,6 +2064,7 @@ static PyMethodDef windows3cMethods[] = {
{ "wxSashEvent_SetDragRect", (PyCFunction) _wrap_wxSashEvent_SetDragRect, METH_VARARGS | METH_KEYWORDS },
{ "wxSashEvent_GetEdge", (PyCFunction) _wrap_wxSashEvent_GetEdge, METH_VARARGS | METH_KEYWORDS },
{ "wxSashEvent_SetEdge", (PyCFunction) _wrap_wxSashEvent_SetEdge, METH_VARARGS | METH_KEYWORDS },
{ "new_wxSashEvent", (PyCFunction) _wrap_new_wxSashEvent, METH_VARARGS | METH_KEYWORDS },
{ NULL, NULL }
};
#ifdef __cplusplus

View File

@ -47,8 +47,9 @@ class wxSashEventPtr(wxCommandEventPtr):
def __repr__(self):
return "<C wxSashEvent instance at %s>" % (self.this,)
class wxSashEvent(wxSashEventPtr):
def __init__(self,this):
self.this = this
def __init__(self,*_args,**_kwargs):
self.this = apply(windows3c.new_wxSashEvent,_args,_kwargs)
self.thisown = 1
@ -57,6 +58,9 @@ class wxSashWindowPtr(wxWindowPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(windows3c.wxSashWindow_Create,(self,) + _args, _kwargs)
return val
def GetSashVisible(self, *_args, **_kwargs):
val = apply(windows3c.wxSashWindow_GetSashVisible,(self,) + _args, _kwargs)
return val
@ -114,10 +118,14 @@ class wxSashWindow(wxSashWindowPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(windows3c.new_wxSashWindow,_args,_kwargs)
self.thisown = 1
#wx._StdWindowCallbacks(self)
def wxPreSashWindow(*_args,**_kwargs):
val = wxSashWindowPtr(apply(windows3c.new_wxPreSashWindow,_args,_kwargs))
val.thisown = 1
return val
class wxQueryLayoutInfoEventPtr(wxEventPtr):
def __init__(self,this):
@ -157,8 +165,9 @@ class wxQueryLayoutInfoEventPtr(wxEventPtr):
def __repr__(self):
return "<C wxQueryLayoutInfoEvent instance at %s>" % (self.this,)
class wxQueryLayoutInfoEvent(wxQueryLayoutInfoEventPtr):
def __init__(self,this):
self.this = this
def __init__(self,*_args,**_kwargs):
self.this = apply(windows3c.new_wxQueryLayoutInfoEvent,_args,_kwargs)
self.thisown = 1
@ -183,8 +192,9 @@ class wxCalculateLayoutEventPtr(wxEventPtr):
def __repr__(self):
return "<C wxCalculateLayoutEvent instance at %s>" % (self.this,)
class wxCalculateLayoutEvent(wxCalculateLayoutEventPtr):
def __init__(self,this):
self.this = this
def __init__(self,*_args,**_kwargs):
self.this = apply(windows3c.new_wxCalculateLayoutEvent,_args,_kwargs)
self.thisown = 1
@ -193,6 +203,9 @@ class wxSashLayoutWindowPtr(wxSashWindowPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(windows3c.wxSashLayoutWindow_Create,(self,) + _args, _kwargs)
return val
def GetAlignment(self, *_args, **_kwargs):
val = apply(windows3c.wxSashLayoutWindow_GetAlignment,(self,) + _args, _kwargs)
return val
@ -214,12 +227,14 @@ class wxSashLayoutWindow(wxSashLayoutWindowPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(windows3c.new_wxSashLayoutWindow,_args,_kwargs)
self.thisown = 1
#wx._StdWindowCallbacks(self)
#wx._checkForCallback(self, 'OnCalculateLayout', wxEVT_CALCULATE_LAYOUT)
#wx._checkForCallback(self, 'OnQueryLayoutInfo', wxEVT_QUERY_LAYOUT_INFO)
def wxPreSashLayoutWindow(*_args,**_kwargs):
val = wxSashLayoutWindowPtr(apply(windows3c.new_wxPreSashLayoutWindow,_args,_kwargs))
val.thisown = 1
return val
class wxLayoutAlgorithmPtr(wxObjectPtr):
def __init__(self,this):

View File

@ -43,6 +43,7 @@ public:
//wxSizerItem( wxWindow *window, int option, int flag, int border, wxObject* userData );
//wxSizerItem( wxSizer *sizer, int option, int flag, int border, wxObject* userData );
wxPoint GetPosition();
wxSize GetSize();
wxSize CalcMin();
void SetDimension( wxPoint pos, wxSize size );

View File

@ -46,6 +46,11 @@ public:
const wxSize& size = wxDefaultSize,
long style = wxST_SIZEGRIP,
char* name = "statusBar");
%name(wxPreStatusBar)wxStatusBar();
bool Create(wxWindow* parent, wxWindowID id,
long style = wxST_SIZEGRIP,
char* name = "statusBar");
%pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
@ -61,10 +66,6 @@ public:
int GetBorderX();
int GetBorderY();
// void DrawField(wxDC& dc, int i);
// void DrawFieldText(wxDC& dc, int i);
// void InitColours(void);
void SetFieldsCount(int number = 1);
void SetStatusText(const wxString& text, int i = 0);
void SetStatusWidths(int LCOUNT, int* choices);
@ -283,6 +284,14 @@ public:
const wxSize& size = wxDefaultSize,
long style = wxNO_BORDER | wxTB_HORIZONTAL,
const char* name = wxToolBarNameStr);
%name(wxPreToolBar)wxToolBar();
bool Create(wxWindow *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxNO_BORDER | wxTB_HORIZONTAL,
const char* name = wxToolBarNameStr);
%pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
@ -300,6 +309,14 @@ public:
const wxSize& size = wxDefaultSize,
long style = wxNO_BORDER | wxTB_HORIZONTAL,
const char* name = wxToolBarNameStr);
%name(wxPreToolBarSimple)wxToolBarSimple();
bool Create(wxWindow *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxNO_BORDER | wxTB_HORIZONTAL,
const char* name = wxToolBarNameStr);
%pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"

View File

@ -73,30 +73,6 @@ public:
}
}
// %pragma(python) addtoclass = "
// _prop_list_ = {}
// "
// %pragma(python) addtoclass = "
// def __getattr__(self, name):
// pl = self._prop_list_
// if pl.has_key(name):
// getFunc, setFunc = pl[name]
// if getFunc:
// return getattr(self, getFunc)()
// else:
// raise TypeError, '%s property is write-only' % name
// raise AttributeError, name
// def __setattr__(self, name, value):
// pl = self._prop_list_
// if pl.has_key(name):
// getFunc, setFunc = pl[name]
// if setFunc:
// return getattr(self, setFunc)(value)
// else:
// raise TypeError, '%s property is read-only' % name
// self.__dict__[name] = value
// "
};
@ -114,13 +90,6 @@ public:
static bool IsSilent();
static void SetBellOnError(int doIt = TRUE);
// // Properties list
// %pragma(python) addtoclass = "
// _prop_list_ = {
// 'window' : ('GetWindow', 'SetWindow'),
// }
// _prop_list_.update(wxEvtHandler._prop_list_)
// "
};
@ -189,14 +158,18 @@ public:
class wxWindow : public wxEvtHandler {
public:
wxWindow(wxWindow* parent, const wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
char* name = "panel");
%name(wxPreWindow)wxWindow();
%pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
bool Create(wxWindow* parent, const wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
char* name = "panel");
void CaptureMouse();
void Center(int direction = wxBOTH);
@ -295,6 +268,8 @@ public:
void Raise();
void Refresh(bool eraseBackground = TRUE, const wxRect* rect = NULL);
void RefreshRect(const wxRect& rect);
void ReleaseMouse();
void RemoveChild(wxWindow* child);
bool Reparent( wxWindow* newParent );
@ -385,6 +360,7 @@ public:
void Freeze();
void Thaw();
void Update();
wxString GetHelpText();
void SetHelpText(const wxString& helpText);
@ -396,40 +372,11 @@ public:
bool PageUp();
bool PageDown();
static wxWindow* FindFocus();
static int NewControlId();
static int NextControlId(int id);
static int PrevControlId(int id);
// // Properties list
// %pragma(python) addtoclass = "
// _prop_list_ = {
// 'size' : ('GetSize', 'SetSize'),
// 'enabled' : ('IsEnabled', 'Enable'),
// 'background' : ('GetBackgroundColour', 'SetBackgroundColour'),
// 'foreground' : ('GetForegroundColour', 'SetForegroundColour'),
// 'children' : ('GetChildren', None),
// 'charHeight' : ('GetCharHeight', None),
// 'charWidth' : ('GetCharWidth', None),
// 'clientSize' : ('GetClientSize', 'SetClientSize'),
// 'font' : ('GetFont', 'SetFont'),
// 'grandParent' : ('GetGrandParent', None),
// 'handle' : ('GetHandle', None),
// 'label' : ('GetLabel', 'SetLabel'),
// 'name' : ('GetName', 'SetName'),
// 'parent' : ('GetParent', None),
// 'position' : ('GetPosition', 'SetPosition'),
// 'title' : ('GetTitle', 'SetTitle'),
// 'style' : ('GetWindowStyleFlag', 'SetWindowStyleFlag'),
// 'visible' : ('IsShown', 'Show'),
// 'toolTip' : ('GetToolTip', 'SetToolTip'),
// 'sizer' : ('GetSizer', 'SetSizer'),
// 'validator' : ('GetValidator', 'SetValidator'),
// 'dropTarget' : ('GetDropTarget', 'SetDropTarget'),
// 'caret' : ('GetCaret', 'SetCaret'),
// 'autoLayout' : ('GetAutoLayout', 'SetAutoLayout'),
// 'constraints' : ('GetConstraints', 'SetConstraints'),
// }
// _prop_list_.update(wxEvtHandler._prop_list_)
// "
};
@ -449,12 +396,6 @@ def wxDLG_SZE(win, size_width, height=None):
return win.ConvertDialogSizeToPixels(wxSize(size_width, height))
"
%inline %{
wxWindow* wxWindow_FindFocus() {
return wxWindow::FindFocus();
}
%}
#ifdef __WXMSW__
%inline %{
@ -467,18 +408,6 @@ wxWindow* wxWindow_FromHWND(unsigned long hWnd) {
%}
#endif
%inline %{
int wxWindow_NewControlId() {
return wxWindow::NewControlId();
}
int wxWindow_NextControlId(int id) {
return wxWindow::NextControlId(id);
}
int wxWindow_PrevControlId(int id) {
return wxWindow::PrevControlId(id);
}
%}
//---------------------------------------------------------------------------
@ -490,8 +419,14 @@ public:
const wxSize& size = wxDefaultSize,
long style = wxTAB_TRAVERSAL,
const char* name = "panel");
%name(wxPrePanel)wxPanel();
%pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
bool Create(wxWindow* parent,
const wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTAB_TRAVERSAL,
const char* name = "panel");
void InitDialog();
wxButton* GetDefaultItem();
@ -510,8 +445,15 @@ public:
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE,
const char* name = "dialogBox");
%name(wxPreDialog)wxDialog();
%pragma(python) addtomethod = "__init__:#wx._StdDialogCallbacks(self)"
bool Create(wxWindow* parent,
const wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE,
const char* name = "dialogBox");
void Centre(int direction = wxBOTH);
void EndModal(int retCode);
@ -547,9 +489,14 @@ public:
const wxSize& size = wxDefaultSize,
long style = wxHSCROLL | wxVSCROLL,
char* name = "scrolledWindow");
%name(wxPreScrolledWindow)wxScrolledWindow();
%pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
%pragma(python) addtomethod = "__init__:#wx._StdOnScrollCallbacks(self)"
bool Create(wxWindow* parent,
const wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxHSCROLL | wxVSCROLL,
char* name = "scrolledWindow");
void EnableScrolling(bool xScrolling, bool yScrolling);
int GetScrollPageSize(int orient);

View File

@ -42,207 +42,6 @@
//---------------------------------------------------------------------------
#ifdef OLD_GRID
enum {
wxGRID_TEXT_CTRL,
wxGRID_HSCROLL,
wxGRID_VSCROLL
};
class wxGridCell {
public:
wxGridCell();
~wxGridCell();
wxString& GetTextValue();
void SetTextValue(const wxString& str);
wxFont& GetFont();
void SetFont(wxFont& f);
wxColour GetTextColour();
void SetTextColour(const wxColour& colour);
wxColour GetBackgroundColour();
void SetBackgroundColour(const wxColour& colour);
wxBrush& GetBackgroundBrush();
int GetAlignment();
void SetAlignment(int align);
wxBitmap* GetCellBitmap();
void SetCellBitmap(wxBitmap* bitmap);
};
class wxGrid : public wxPanel {
public:
wxGrid(wxWindow* parent, wxWindowID id,
const wxPoint& pos=wxDefaultPosition,
const wxSize& size=wxDefaultSize,
long style=0,
char* name="grid");
%pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
%pragma(python) addtomethod = "__init__:#wx._checkForCallback(self, 'OnSelectCell', wxEVT_GRID_SELECT_CELL)"
%pragma(python) addtomethod = "__init__:#wx._checkForCallback(self, 'OnCreateCell', wxEVT_GRID_CREATE_CELL)"
%pragma(python) addtomethod = "__init__:#wx._checkForCallback(self, 'OnChangeLabels', wxEVT_GRID_CHANGE_LABELS)"
%pragma(python) addtomethod = "__init__:#wx._checkForCallback(self, 'OnChangeSelectionLabel', wxEVT_GRID_CHANGE_SEL_LABEL)"
%pragma(python) addtomethod = "__init__:#wx._checkForCallback(self, 'OnCellChange', wxEVT_GRID_CELL_CHANGE)"
%pragma(python) addtomethod = "__init__:#wx._checkForCallback(self, 'OnCellLeftClick', wxEVT_GRID_CELL_LCLICK)"
%pragma(python) addtomethod = "__init__:#wx._checkForCallback(self, 'OnCellRightClick', wxEVT_GRID_CELL_RCLICK)"
%pragma(python) addtomethod = "__init__:#wx._checkForCallback(self, 'OnLabelLeftClick', wxEVT_GRID_LABEL_LCLICK)"
%pragma(python) addtomethod = "__init__:#wx._checkForCallback(self, 'OnLabelRightClick', wxEVT_GRID_LABEL_RCLICK)"
void AdjustScrollbars();
bool AppendCols(int n=1, int updateLabels=TRUE);
bool AppendRows(int n=1, int updateLabels=TRUE);
void BeginBatch();
bool CellHitTest(int x, int y, int *OUTPUT, int *OUTPUT);
%addmethods {
// TODO: For now we are just ignoring the initial cellValues
// and widths. Add support for loading them from
// Python sequence objects.
bool CreateGrid(int rows, int cols,
//PyObject* cellValues = NULL,
//PyObject* widths = NULL,
short defaultWidth = wxGRID_DEFAULT_CELL_WIDTH,
short defaultHeight = wxGRID_DEFAULT_CELL_HEIGHT) {
return self->CreateGrid(rows, cols, NULL, NULL,
defaultWidth, defaultHeight);
}
}
bool CurrentCellVisible();
bool DeleteCols(int pos=0, int n=1, bool updateLabels=TRUE);
bool DeleteRows(int pos=0, int n=1, bool updateLabels=TRUE);
void EndBatch();
int GetBatchCount();
wxGridCell* GetCell(int row, int col);
int GetCellAlignment(int row, int col);
%name(GetDefCellAlignment)int GetCellAlignment();
wxColour GetCellBackgroundColour(int row, int col);
%name(GetDefCellBackgroundColour) wxColour& GetCellBackgroundColour();
//wxGridCell *** GetCells();
%addmethods {
PyObject* GetCells() {
int row, col;
PyObject* rows = PyList_New(0);
for (row=0; row < self->GetRows(); row++) {
PyObject* rowList = PyList_New(0);
for (col=0; col < self->GetCols(); col++) {
wxGridCell* cell = self->GetCell(row, col);
bool doSave = wxPyRestoreThread();
PyObject* pyCell = wxPyConstructObject(cell, "wxGridCell");
wxPySaveThread(doSave);
if (PyList_Append(rowList, pyCell) == -1)
return NULL;
}
if (PyList_Append(rows, rowList) == -1)
return NULL;
}
return rows;
}
}
wxColour GetCellTextColour(int row, int col);
%name(GetDefCellTextColour)wxColour& GetCellTextColour();
wxFont& GetCellTextFont(int row, int col);
%name(GetDefCellTextFont)wxFont& GetCellTextFont();
wxString& GetCellValue(int row, int col);
int GetCols();
int GetColumnWidth(int col);
wxRect GetCurrentRect();
int GetCursorColumn();
int GetCursorRow();
bool GetEditable();
wxScrollBar * GetHorizScrollBar();
int GetLabelAlignment(int orientation);
wxColour GetLabelBackgroundColour();
int GetLabelSize(int orientation);
wxColour GetLabelTextColour();
wxFont& GetLabelTextFont();
wxString& GetLabelValue(int orientation, int pos);
int GetRowHeight(int row);
int GetRows();
int GetScrollPosX();
int GetScrollPosY();
wxTextCtrl* GetTextItem();
wxScrollBar* GetVertScrollBar();
bool InsertCols(int pos=0, int n=1, bool updateLabels=TRUE);
bool InsertRows(int pos=0, int n=1, bool updateLabels=TRUE);
void OnActivate(bool active);
void SetCellAlignment(int alignment, int row, int col);
%name(SetDefCellAlignment)void SetCellAlignment(int alignment);
void SetCellBackgroundColour(const wxColour& colour, int row, int col);
%name(SetDefCellBackgroundColour)
void SetCellBackgroundColour(const wxColour& colour);
void SetCellTextColour(const wxColour& colour, int row, int col);
%name(SetDefCellTextColour)void SetCellTextColour(const wxColour& colour);
void SetCellTextFont(wxFont& font, int row, int col);
%name(SetDefCellTextFont)void SetCellTextFont(wxFont& font);
void SetCellValue(const wxString& val, int row, int col);
void SetColumnWidth(int col, int width);
void SetDividerPen(wxPen& pen);
void SetEditable(bool editable);
void SetGridCursor(int row, int col);
void SetLabelAlignment(int orientation, int alignment);
void SetLabelBackgroundColour(const wxColour& value);
void SetLabelSize(int orientation, int size);
void SetLabelTextColour(const wxColour& value);
void SetLabelTextFont(wxFont& font);
void SetLabelValue(int orientation, const wxString& value, int pos);
void SetRowHeight(int row, int height);
void UpdateDimensions();
bool GetEditInPlace();
void SetEditInPlace(int edit = TRUE);
};
class wxGridEvent : public wxEvent {
public:
int m_row;
int m_col;
int m_x;
int m_y;
bool m_control;
bool m_shift;
wxGridCell* m_cell;
int GetRow();
int GetCol();
wxPoint GetPosition();
bool ControlDown();
bool ShiftDown();
wxGridCell* GetCell();
};
enum {
wxEVT_GRID_SELECT_CELL,
wxEVT_GRID_CREATE_CELL,
wxEVT_GRID_CHANGE_LABELS,
wxEVT_GRID_CHANGE_SEL_LABEL,
wxEVT_GRID_CELL_CHANGE,
wxEVT_GRID_CELL_LCLICK,
wxEVT_GRID_CELL_RCLICK,
wxEVT_GRID_LABEL_LCLICK,
wxEVT_GRID_LABEL_RCLICK,
};
#endif
//---------------------------------------------------------------------------
enum {
/* notebook control event types */
wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED,
@ -252,6 +51,9 @@ enum {
class wxNotebookEvent : public wxNotifyEvent {
public:
wxNotebookEvent(wxEventType commandType = wxEVT_NULL, int id = 0,
int nSel = -1, int nOldSel = -1);
int GetSelection();
int GetOldSelection();
void SetOldSelection(int page);
@ -268,8 +70,14 @@ public:
const wxSize& size = wxDefaultSize,
long style = 0,
char* name = "notebook");
%name(wxPreNotebook)wxNotebook();
%pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
bool Create(wxWindow *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
char* name = "notebook");
int GetPageCount();
int SetSelection(int nPage);
@ -333,6 +141,9 @@ enum
class wxSplitterEvent : public wxCommandEvent {
public:
wxSplitterEvent(wxEventType type = wxEVT_NULL,
wxSplitterWindow *splitter = NULL);
int GetSashPosition();
int GetX();
int GetY();
@ -350,28 +161,76 @@ public:
const wxSize& size = wxDefaultSize,
long style=wxSP_3D|wxCLIP_CHILDREN,
char* name = "splitterWindow");
%name(wxPreSplitterWindow)wxSplitterWindow();
%pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
bool Create(wxWindow* parent, wxWindowID id,
const wxPoint& point = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style=wxSP_3D|wxCLIP_CHILDREN,
char* name = "splitterWindow");
int GetBorderSize();
int GetMinimumPaneSize();
int GetSashPosition();
int GetSashSize();
// Gets the only or left/top pane
wxWindow *GetWindow1();
// Gets the right/bottom pane
wxWindow *GetWindow2();
// Sets the split mode
void SetSplitMode(int mode);
// Gets the split mode
int GetSplitMode();
wxWindow* GetWindow1();
wxWindow* GetWindow2();
void Initialize(wxWindow* window);
// Initialize with one window
void Initialize(wxWindow *window);
// Associates the given window with window 2, drawing the appropriate sash
// and changing the split mode.
// Does nothing and returns FALSE if the window is already split.
// A sashPosition of 0 means choose a default sash position,
// negative sashPosition specifies the size of right/lower pane as it's
// absolute value rather than the size of left/upper pane.
virtual bool SplitVertically(wxWindow *window1,
wxWindow *window2,
int sashPosition = 0);
virtual bool SplitHorizontally(wxWindow *window1,
wxWindow *window2,
int sashPosition = 0);
// Removes the specified (or second) window from the view
// Doesn't actually delete the window.
bool Unsplit(wxWindow *toRemove = NULL);
// Replaces one of the windows with another one (neither old nor new
// parameter should be NULL)
bool ReplaceWindow(wxWindow *winOld, wxWindow *winNew);
// Is the window split?
bool IsSplit();
bool ReplaceWindow(wxWindow * winOld, wxWindow * winNew);
void SetBorderSize(int width);
void SetSashPosition(int position, int redraw = TRUE);
// Sets the sash size
void SetSashSize(int width);
void SetMinimumPaneSize(int paneSize);
void SetSplitMode(int mode);
bool SplitHorizontally(wxWindow* window1, wxWindow* window2, int sashPosition = 0);
bool SplitVertically(wxWindow* window1, wxWindow* window2, int sashPosition = 0);
bool Unsplit(wxWindow* toRemove = NULL);
// Sets the border size
void SetBorderSize(int width);
// Gets the sash size
int GetSashSize();
// Gets the border size
int GetBorderSize();
// Set the sash position
void SetSashPosition(int position, bool redraw = TRUE);
// Gets the sash position
int GetSashPosition();
// If this is zero, we can remove panes by dragging the sash.
void SetMinimumPaneSize(int min);
int GetMinimumPaneSize();
};
//---------------------------------------------------------------------------

View File

@ -61,6 +61,8 @@ enum wxSashDragStatus
class wxSashEvent : public wxCommandEvent {
public:
wxSashEvent(int id = 0, wxSashEdgePosition edge = wxSASH_NONE);
void SetEdge(wxSashEdgePosition edge);
wxSashEdgePosition GetEdge();
void SetDragRect(const wxRect& rect);
@ -78,8 +80,13 @@ public:
const wxSize& size = wxDefaultSize,
long style = wxCLIP_CHILDREN | wxSW_3D,
const char* name = "sashWindow");
%name(wxPreSashWindow)wxSashWindow();
%pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
bool Create(wxWindow* parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxCLIP_CHILDREN | wxSW_3D,
const char* name = "sashWindow");
bool GetSashVisible(wxSashEdgePosition edge);
int GetDefaultBorderSize();
@ -126,6 +133,7 @@ enum {
class wxQueryLayoutInfoEvent: public wxEvent {
public:
wxQueryLayoutInfoEvent(wxWindowID id = 0);
void SetRequestedLength(int length);
int GetRequestedLength();
@ -143,6 +151,8 @@ public:
class wxCalculateLayoutEvent: public wxEvent {
public:
wxCalculateLayoutEvent(wxWindowID id = 0);
void SetFlags(int flags);
int GetFlags();
void SetRect(const wxRect& rect);
@ -157,11 +167,13 @@ public:
const wxSize& size = wxDefaultSize,
long style = wxCLIP_CHILDREN | wxSW_3D,
const char* name = "layoutWindow");
%name(wxPreSashLayoutWindow)wxSashLayoutWindow();
%pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
%pragma(python) addtomethod = "__init__:#wx._checkForCallback(self, 'OnCalculateLayout', wxEVT_CALCULATE_LAYOUT)"
%pragma(python) addtomethod = "__init__:#wx._checkForCallback(self, 'OnQueryLayoutInfo', wxEVT_QUERY_LAYOUT_INFO)"
bool Create(wxWindow* parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxCLIP_CHILDREN | wxSW_3D,
const char* name = "layoutWindow");
wxLayoutAlignment GetAlignment();
wxLayoutOrientation GetOrientation();
@ -185,6 +197,3 @@ public:
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------

View File

@ -0,0 +1,19 @@
0.0.3
-----
Faster preview window refresh.
Cut/Paste works better.
Some tree icons.
Tree item names.
Bugfixes.
0.0.2
-----
The first release.

View File

@ -0,0 +1,60 @@
********************************************************************************
XRCed README
********************************************************************************
Installation on UNIX
--------------------
XRCed was developed using Python 2.1.1. xml.dom.minidom module should be
available. XML support requires Expat package (http://expat.sourceforge.net),
and you have to uncomment expat lines in Modules/Setup file of Python source:
EXPAT_DIR=$(HOME)/expat
pyexpat pyexpat.c -I$(EXPAT_DIR)/xmlparse -L$(EXPAT_DIR) -lexpat
wxPython version used was 2.3.1, which itself uses wxGTK 2.3.1. wxPython
should be modified to support some extra functions. To update it, go to
wxPython source directory and untar "wxPython-update.tgz" (included with
xrced) file there. Then recompile (run "b 21" for example) it and install as
usual (or you can set your environment to use it from the source tree).
Short manual
------------
To start xrced, change to the directory where you installed it and run
"python2.1 xrced.py".
To create an object, first you should select some object in the tree (or the
root item if it's empty) then press the right mouse button and select right
(in another sense now :) ) command. The pulldown menu is context-dependent on
the selected object.
XRCed tries to guess if new object should be added as a next sibling or a
child of current object, depending on the possibility of the object to have
child objects and expanded state (if tree item is collapsed, new object will
be sibling). You can change this behavior to create siblings by pressing and
holding the Control key before clicking the mouse.
Same applies for copy/paste, but at the moment Control key is ignored.
Panel on the right contains object properties. Properties which are optional
should be "checked" first. XMLID of the object is the textbox to the right of
the class name.
All properties can be edited as text, and some are supplied with special
editing controls.
To display the preview window double-click a top-level object (you should
assign an XMLID to it first). After that, if you select a child object, it
becomes highlighted, and if you change it, preview is updated when you select
another item or press Ctrl-R (refresh). To turn off automatic update, toggle
"View->Auto-refresh" or toolbar auto-refresh button (to the right of refresh
button).
--------------------------------------------------------------------------------
Copyright 2001 Roman Rolinsky <rolinsky@mema.ucl.ac.be>

28
wxPython/tools/XRCed/TODO Normal file
View File

@ -0,0 +1,28 @@
TODO for XRCed
==============
* Undo/Redo
* menu - accel not displayed in preview
* tree icons
* paste as sibling (toolbar toggle button)
* replace object with abother, keeping children
* write tmp file for current dialog/panel/etc.
* XML indents
* select same notebook pages after update
* put some default values in tree ctrl etc.
* special (fast) update for some values: pos/size, value/content, sizeritem
stuff (?), well, as much as possible
* highlighting with better method
* import XRC/WXR files

View File

@ -0,0 +1,286 @@
#----------------------------------------------------------------------
# This file was generated by img2py.py
#
from wxPython.wx import wxBitmapFromXPMData, wxImageFromBitmap
import cPickle, zlib
def getNewData():
return cPickle.loads(zlib.decompress(
"x\xda\xd3\xc8)0\xe4\nV72Q02V0Q0T\xe7J\x0cV\xd7SHVp\xcaIL\xce\x06\xf3\xf2\
\x81<eK\x03\x10\x04\xf3\x15\x80|\xbf\xfc\xbcT0'\x02$\xe9f\xe1\xe6\xecf\x01\
\x95\xc4\x0e\x06ZR\x0f\n\xb0KF\x80\x01B\x16\x9bd\x84\x1e>\x9d0\xbdX$A\xf2\
\xf9\xc3Z\x12\x010%\x15\xf2\x11` S\x82\x1e\x00-\xd9\x8b\xfa" ))
def getNewBitmap():
return wxBitmapFromXPMData(getNewData())
def getNewImage():
return wxImageFromBitmap(getNewBitmap())
#----------------------------------------------------------------------
def getOpenData():
return cPickle.loads(zlib.decompress(
'x\xda\xcd\x92\xb1\n\xc3 \x10\x86\xf7<\xc5A\x07\x0b\x81#IK\xb1\xab\x01\xc7:d\
\xb95\x84N\r\xbd\xbe\xff\xd4hb\xb5j\xbb\xb6\xbf\x08~|\xde)\xe2~~\xb4\xd5 \
\xba#t\x078A+\xaaq\x10\x08\x13\xa8y\x9cn\x8e\xccB\xbbsc\x87c\xb2\xac\xa5\xee\
\x9b\x95a\xe1\x0b\xdf\xaf\x0e\xd8K-\x1d\xd7\x96\x95Tas9\x7f"\x11\xf1\xa3D7\
\xf1K[Leh\xe7\x97A"1\xe1\x9a\xfcB\xc8\xb4\r4\xb9\xf4\x8eJ\x92C\xdf\xf2\x99\
\xb5\x8f\xab\x8e+9v\x89\xa4\xd4\xc52so\xf2\x95\xcd\xc5/dB~\xfb\x13\xf0\t\x81\
T\x87G' ))
def getOpenBitmap():
return wxBitmapFromXPMData(getOpenData())
def getOpenImage():
return wxImageFromBitmap(getOpenBitmap())
#----------------------------------------------------------------------
def getSaveData():
return cPickle.loads(zlib.decompress(
'x\xda\xd3\xc8)0\xe4\nV72Q02V0U0T\xe7J\x0cV\xd7SHVp\xcaIL\xce\x06\xf3\xfc\
\x81<eK\x03\x10\x04\xf3#@|\x0b\x03\x0b\x03\x03\x08_\x01\xc8\xf7\xcb\xcfK\x05\
s\xf2A\x92n\x16n\xcen\x16PI\xec\x80\xe6\x92z(\x00]2B/\x1f\n\x80L\x7f\xdc\x92\
z\xf8$#\xe8&\x19\x01\xf3G\x046I\x04\xc0\xa3\x13\x8f\xb1x\xed$Y\x125\xe4\xd1%\
\x15\xfc\x91\x01]R\x02vI=\x00\xd8\x14\x96@' ))
def getSaveBitmap():
return wxBitmapFromXPMData(getSaveData())
def getSaveImage():
return wxImageFromBitmap(getSaveBitmap())
#----------------------------------------------------------------------
def getCutData():
return cPickle.loads(zlib.decompress(
'x\xda\xd3\xc8)0\xe4\nV72Q02V0Q0T\xe7J\x0cV\xd7SHVp\xcaIL\xce\x06\xf3\xf2\
\x81<e\x03 \xb00\x00\xf3#@|K\x03\x10\x04\xf3\x15\x80|\xbf\xfc\xbcT(\x07;\xa0\
\x96\xa4\x1e^\xc9\x08\x145h\x92z\x102\x02\xab\x9d a\xa0\x1c\x0eI=$9L\xc9\x08\
\xb8\xa1\x98^\xd1C\xd2\x88U\x12W \xe4\xe7\xeb\xe5\xe7\xe3\x96\x8c\xc8\xcf\
\x87K\xa3H\x82\xc4#\xc0\x08S\x12&\x03B\xe4H\x82\x0c\x8f\x88\xc0j\'H8\x02{\
\xf0E \x02\x80\x9a)\x81DI=\x00\x12\xa5\x85\x9f' ))
def getCutBitmap():
return wxBitmapFromXPMData(getCutData())
def getCutImage():
return wxImageFromBitmap(getCutBitmap())
#----------------------------------------------------------------------
def getCopyData():
return cPickle.loads(zlib.decompress(
'x\xda\xc5\x92\xb1\n\xc20\x10\x86\xf7>\xc5\x81C\x9c\x8e\xb4*\xc4\xd5BF3t\xc9\
Z\x8a\x93\xc5\xf3\xfd\'\xef.vP\xee\xe6\xfe\t\x81\x9f/\xdf\r!\xc7\xf5\xddwS\
\x18\xce0\x9c\xe0\x02}\xe8\xe6) ,p[\xe7\xe5\xa9\x8d\xb8\x1d"\'E\xedE\xfa5\
\xca\xd2\x0e\xdc\xef\xf4zh\xa9\x02s\xcacN_hg_\x88\x1a\x0fV\xce/\xfd\x87\x15\
\x1d\x88\xbcIc\x9b\x95\xf4 \xcbDl\xb0\x92c\xf2\xf0m\xb2i\xca\xa5\xe2\x98(r1\
\x1e\xc11\xa1H\x1c\xb3\xc53\x1b\xdcb\xc16\\\xb2\xdfO\xc0\x0f5t\x92\x06' ))
def getCopyBitmap():
return wxBitmapFromXPMData(getCopyData())
def getCopyImage():
return wxImageFromBitmap(getCopyBitmap())
#----------------------------------------------------------------------
def getPasteData():
return cPickle.loads(zlib.decompress(
'x\xda\xcd\x92\xb1\n\x830\x10\x86w\x9f\xe2\xa0\x83\x85\xc0\x11m\xa1\xe9\x16Z\
p\xec\r.YE:U\x9a\xbe\xff\xe4]48x\xe9V\xe8\'\xc2\xfd|\xf7g\x88\x1e\xa7OS\xf5u\
{\x86\xf6\x04\x17h\xeaj\xe8k\x84\x11n\xd30\xbeR2\x9c\x0e\x96q6e\x92|\xb5\xf2\
\xa4\x1c$w\xae\xbb\xdb%G\xc9\xce\xba\xbc\x0f\x9c\x1f\xf1\xfdL\xc1\xe7\xe5\
\xce\xadR\xe7\x0f$2\xaa\x14\x81!\xe0\xb6\xb0I\x8c1"\xab\x90\x86\xbd\xe4\x9e \
\x13\xed\xe5\x8a*7ti\x16\n\xd2\x0b\xc6|\x93\xde\xe8\x92\x0f\x95\x97\x8aM\xee\
R\xa9)]R\xae\xaf\xd0\x04 \xc6dH\xfbd\x94\xf9\xe9\x9f\x803\xb0L\x99\x05' ))
def getPasteBitmap():
return wxBitmapFromXPMData(getPasteData())
def getPasteImage():
return wxImageFromBitmap(getPasteBitmap())
#----------------------------------------------------------------------
def getRefreshData():
return cPickle.loads(zlib.decompress(
'x\xda\xad\xd2\xbb\x0e\xc20\x0c\x05\xd0\xbd_q%\x860]\xf55\xc0\x0f0\xb2t\xf1\
\x8a\x10\x1bj\xf9\xff\x89\xbc\x9a\x9a\xe2\xc2Rg\x89u\x14+vr|\xbe\x9ajpm\x8f\
\xb6C\x87\xc6U\xb7\xc1\t\xee8\x9c\xeb\xb0b\x0e\x9f_\xa7\xf1\x11\x13\x06\xbc\
\x9cj\x1f\x19\xed\xd8\r\x19b\x03\xbd\x88R\x85\x8c&XTc\xb2\xb0\x11\x13\x89_\
\xc8\xb4\xd9(\xab\xeb~`"\x13\x91\xc9F\xd5\xee\x9e8w@\x1bY\xae\xfd]6\x9f\xb0&\
4\x1f\xa5\x8dQY\xaa\x9a\x8f]\x86\xb1nED\x8a\xfd\xfdC|\x03\xab\xaaw\xdd' ))
def getRefreshBitmap():
return wxBitmapFromXPMData(getRefreshData())
def getRefreshImage():
return wxImageFromBitmap(getRefreshBitmap())
#----------------------------------------------------------------------
def getAutoRefreshData():
return cPickle.loads(zlib.decompress(
'x\xda\xad\xd21\x0e\xc20\x0c\x05\xd0\xbd\xa7\xb0\xc4\x10&+-\x1d\xca\x05\x18Y\
\xba\xfc\x15!6\x84\xb9\xffD\x9c8%R\x92\x8a\x01gh\xacW9\xb2\x93\xe3\xf3=\x0e\
\xab\x9bf\x9aN4\xd3\xe8\x86\xdb\xea@w:\x9c\xbd\xae\x98S\xc8\xaf\xf2z\xc4D\
\x14\xbd_\x16\x9f\x905\xbf\x84\xcc\xe7\x9f\xdb\xf17d\x8d\x0e\x06A\xa1\x05r4\
\xd0WKL\xa6\x1b4\x91i\x0f9m:eA\x12\x025*\x05\x03\x9b\x96\xad\x00\xf6i\xa1\
\x85luk\xec\x94\xdd\xc5\xd4\x81\xb4\xcb\xf2\xa6\x10\xa9\xca\xdahbO\xa8\xd1\
\x06\x84\xce\x95Q\x1e\x7f\xe7\xb2\xb3U\xad\xc0\x8e\xfb\xe9\r\xf1\x07\xdbD\
\x86\x9f' ))
def getAutoRefreshBitmap():
return wxBitmapFromXPMData(getAutoRefreshData())
def getAutoRefreshImage():
return wxImageFromBitmap(getAutoRefreshBitmap())
#----------------------------------------------------------------------
def getTreePanelData():
return cPickle.loads(zlib.decompress(
'x\xda\xd3\xc8)0\xe4\nV74S04Q0Q0T\xe7J\x0cV\xd7SHVp\xcaIL\xce\x06\xf3\xf2\
\x81<eK\x03K\x13K\x030_\x01\xc4w\xb3psv\xb3\x00\xf3#@|\x17\x03\x17\x13\x17\
\x98<\n\xd0\x83\x08F \x83\xfca+\x98\x8f\x02 \x82zh\x00(\xa8\x07\x00&\x96e\
\x83' ))
def getTreePanelBitmap():
return wxBitmapFromXPMData(getTreePanelData())
def getTreePanelImage():
return wxImageFromBitmap(getTreePanelBitmap())
#----------------------------------------------------------------------
def getTreeDialogData():
return cPickle.loads(zlib.decompress(
'x\xda\xd3\xc8)0\xe4\nV74S\x00"\x13\x05Cu\xae\xc4`u\x05\x85d\x05\xa7\x9c\xc4\
\xe4l0/\x1f\xc8S\xb64\xb04\xb14\x00\xf3\xf5@|\x03 p\xb3\x00\xf3#@|\x17\x03\
\x17\x13\x17\x03\xa8nT\x00\x11\xd4C\x01$\x0bb53\x02\x05\x0c\x98`>1\x82\xf9`@\
\xc8LLo\xea\x01\x00\xb5\x9cde' ))
def getTreeDialogBitmap():
return wxBitmapFromXPMData(getTreeDialogData())
def getTreeDialogImage():
return wxImageFromBitmap(getTreeDialogBitmap())
#----------------------------------------------------------------------
def getTreeFrameData():
return cPickle.loads(zlib.decompress(
'x\xda\xd3\xc8)0\xe4\nV74S\x00"c\x05Cu\xae\xc4`u\x05\x85d\x05\xa7\x9c\xc4\
\xe4l0O\x0f\xc8S6\x00\x027\x0b0?\x02\xc4w1p1q1\x80\xaaF\x05\x10A=\x14@\xb2 V\
3#P\xc0p\x10\xc4\xf4\xa6\x1e\x00\xe3\x8f`,' ))
def getTreeFrameBitmap():
return wxBitmapFromXPMData(getTreeFrameData())
def getTreeFrameImage():
return wxImageFromBitmap(getTreeFrameBitmap())
#----------------------------------------------------------------------
def getTreeMenuBarData():
return cPickle.loads(zlib.decompress(
'x\xda\xd3\xc8)0\xe4\nV74S\x00"S\x05Cu\xae\xc4`\xf5\x08\x85d\x05\xa7\x9c\xc4\
\xe4l0\xcf\x1f\xc8S\xb64\xb04\xb14\x00\xf3\x15\x80|\xbf\xfc\xbcT0G\x0f$\xe9f\
\xe1\xe6\xecf\x01\xe6\xe7\x83\xf8.\x06.&.0\xc5\xa8\x80\x1a\x82z\xa8 \x02"\
\x98\x8f\x0c\xfca\x82\xfe \x00#I\x17\xc4b\xa6?*\x80\x08F\xa0\x01\x1a\xf9]\
\x0f\x00\x9b\xde`\xb2' ))
def getTreeMenuBarBitmap():
return wxBitmapFromXPMData(getTreeMenuBarData())
def getTreeMenuBarImage():
return wxImageFromBitmap(getTreeMenuBarBitmap())
#----------------------------------------------------------------------
def getTreeMenuData():
return cPickle.loads(zlib.decompress(
'x\xda\xd3\xc8)0\xe4\nV74S\x00"S\x05Cu\xae\xc4`\xf5\x08\x85d\x05\xa7\x9c\xc4\
\xe4l0\xcf\x1f\xc8S\xb64\xb04\xb14\x00\xf3\x15\x80|\xbf\xfc\xbcT0G\x0f$\xe9f\
\xe1\xe6\xecf\x01\xe6\xe7\x83\xf8.\x06.&.0\xc5\nzp\x10\xa1\xa0\x00\x17\xcc\
\x87\x02\x7f\x14A\x7f0 [p(\x9b\xe9\x0f\x03H\x82\x11\x08\x00\x16\xd4\x03\x00&\
sj\xf9' ))
def getTreeMenuBitmap():
return wxBitmapFromXPMData(getTreeMenuData())
def getTreeMenuImage():
return wxImageFromBitmap(getTreeMenuBitmap())
#----------------------------------------------------------------------
def getTreeSizerHData():
return cPickle.loads(zlib.decompress(
'x\xda\xd3\xc8)0\xe4\nV74S\x00"#\x05Cu\xae\xc4`u=\x85d\x05e3\x033\x133\x030_\
\x01\xc8\xf7\xcb\xcfK\x85rP\x01\xa9\x82z\xa8\x00*\x08Q\x01\xa3\x06\xaf 6\xc7\
S\x12 z\x00\xf8\xc9>T' ))
def getTreeSizerHBitmap():
return wxBitmapFromXPMData(getTreeSizerHData())
def getTreeSizerHImage():
return wxImageFromBitmap(getTreeSizerHBitmap())
#----------------------------------------------------------------------
def getTreeSizerVData():
return cPickle.loads(zlib.decompress(
'x\xda\xd3\xc8)0\xe4\nV74S\x00"#\x05Cu\xae\xc4`u=\x85d\x05e3\x033\x133\x030_\
\x01\xc8\xf7\xcb\xcfK\x85r\x14\x14\xf4`\x00\xc8F\x08*@\xc0\x00\t\x0e\x11\'!\
\x03\xa0\xa0\x1e\x00\xfaC>*' ))
def getTreeSizerVBitmap():
return wxBitmapFromXPMData(getTreeSizerVData())
def getTreeSizerVImage():
return wxImageFromBitmap(getTreeSizerVBitmap())
#----------------------------------------------------------------------
def getTreeStaticBoxSizerHData():
return cPickle.loads(zlib.decompress(
'x\xda\xd3\xc8)0\xe4\nV74S\x00"c\x05Cu\xae\xc4`u=\x85d\x05\xa7\x9c\xc4\xe4l0\
/\x02\xc8S630313\x00\xf3\x15\x80|\xbf\xfc\xbcT(\x07\x15\xc0\x05\xf5\xb0\x08\
\xea!\x8bB\x04#\x14\xf4\xf4\xf4\x14"`\x00.\x08R\x19\x01Q\x08\x17\x84\xf0\x06\
\x93 *\xc0\x1f \xc4\x08\xea\x01\x00\x0b\xa9Jm' ))
def getTreeStaticBoxSizerHBitmap():
return wxBitmapFromXPMData(getTreeStaticBoxSizerHData())
def getTreeStaticBoxSizerHImage():
return wxImageFromBitmap(getTreeStaticBoxSizerHBitmap())
#----------------------------------------------------------------------
def getTreeStaticBoxSizerVData():
return cPickle.loads(zlib.decompress(
'x\xda\xd3\xc8)0\xe4\nV74S\x00"c\x05Cu\xae\xc4`u=\x85d\x05\xa7\x9c\xc4\xe4l0\
/\x02\xc8S630313\x00\xf3\x15\x80|\xbf\xfc\xbcT(\x07\x0c\xf4\xa0\xb4\x02\x92\
\xa0\x1e\\\x14.\x18\xa1\xa0\xa7\xa7\xa7\x10\x11\x11\x81&\x08V\x89&\x08\x01\
\xb4\x17\x84\x81\xc1`\xbb\x1e\x00U+IU' ))
def getTreeStaticBoxSizerVBitmap():
return wxBitmapFromXPMData(getTreeStaticBoxSizerVData())
def getTreeStaticBoxSizerVImage():
return wxImageFromBitmap(getTreeStaticBoxSizerVBitmap())
#----------------------------------------------------------------------
def getTreeSizerGridData():
return cPickle.loads(zlib.decompress(
'x\xda\xd3\xc8)0\xe4\nV74S\x00"#\x05Cu\xae\xc4`u=\x85d\x05e3\x033\x133\x030_\
\x01\xc8\xf7\xcb\xcfK\x85p\xf4P\x01TP\x01\x0c`\x14\xbd\x05\x87\x88\x93\xd0\
\x00PP\x0f\x00!\xb1?\xce' ))
def getTreeSizerGridBitmap():
return wxBitmapFromXPMData(getTreeSizerGridData())
def getTreeSizerGridImage():
return wxImageFromBitmap(getTreeSizerGridBitmap())
#----------------------------------------------------------------------
def getTreeSizerFlexGridData():
return cPickle.loads(zlib.decompress(
'x\xda\xd3\xc8)0\xe4\nV74S\x00"#\x05Cu\xae\xc4`u=\x85d\x05e3\x033\x133\x030_\
\x01\xc8\xf7\xcb\xcfK\x85p\xf4P\x01TP\x01\x08\xc0\x04\x98A\x1dA\xbaYD/\xc7\
\xa3\x01\xa0\xa0\x1e\x00>\x91?\xce' ))
def getTreeSizerFlexGridBitmap():
return wxBitmapFromXPMData(getTreeSizerFlexGridData())
def getTreeSizerFlexGridImage():
return wxImageFromBitmap(getTreeSizerFlexGridBitmap())

View File

@ -0,0 +1,317 @@
# Name: params.py
# Purpose: Classes for parameter introduction
# Author: Roman Rolinsky <rolinsky@mema.ucl.ac.be>
# Created: 22.08.2001
from wxPython.wx import *
from wxPython.xrc import *
import string
# Object which is currently processed
currentXXX = None
def SetCurrentXXX(xxx):
global currentXXX
currentXXX = xxx
# Register objects in the view
registered = {}
def Register(param, obj):
registered[param] = obj
def GetRegistered(param):
return registered[param]
def ClearRegister():
registered.clear()
genericStyles = ['wxSIMPLE_BORDER', 'wxSUNKEN_BORDER', 'wxRAISED_BORDER',
'wxTAB_TRAVERSAL', 'wxWANTS_CHARS', 'wxVSCROLL', 'wxHSCROLL']
class ParamBinaryOr(wxPanel):
ID_TEXT_CTRL = wxNewId()
ID_BUTTON_CHOICES = wxNewId()
def __init__(self, parent, id, value, size, name, param):
wxPanel.__init__(self, parent, id, name=name)
self.SetBackgroundColour(panel.GetBackgroundColour())
Register(param, self)
sizer = wxBoxSizer()
self.text = wxTextCtrl(self, self.ID_TEXT_CTRL, value, size=wxSize(200,-1))
sizer.Add(self.text, 0, wxRIGHT, 10)
self.button = wxButton(self, self.ID_BUTTON_CHOICES, 'Edit...')
sizer.Add(self.button)
self.SetAutoLayout(true)
self.SetSizer(sizer)
sizer.Fit(self)
EVT_BUTTON(self, self.ID_BUTTON_CHOICES, self.OnButtonChoices)
EVT_TEXT(self, self.ID_TEXT_CTRL, self.OnChange)
def OnChange(self, evt):
panel.SetModified(true)
evt.Skip()
def GetValue(self):
return self.text.GetValue()
def SetValue(self, value):
self.text.SetValue(value)
def OnButtonChoices(self, evt):
dlg = wxDialog(self, -1, 'Choices', size=wxSize(250,300))
topSizer = wxBoxSizer(wxVERTICAL)
listBox = wxCheckListBox(dlg, -1, choices=self.values)
value = map(string.strip, string.split(self.text.GetValue(), '|'))
if value == ['']: value = []
ignored = []
for i in value:
try:
listBox.Check(self.values.index(i))
except ValueError:
# Try to find equal
if self.equal.has_key(i):
listBox.Check(self.values.index(self.equal[i]))
else:
print 'Unknown flag: %s: ignored.' % i
ignored.append(i)
topSizer.Add(listBox, 1, wxEXPAND)
sizer = wxBoxSizer()
buttonOk = wxButton(dlg, wxID_OK, 'OK')
buttonOk.SetDefault()
sizer.Add(buttonOk, 0, wxRIGHT, 10)
sizer.Add(0, 0, 1)
sizer.Add(wxButton(dlg, wxID_CANCEL, 'Cancel'))
topSizer.Add(sizer, 0, wxALL | wxEXPAND, 10)
dlg.SetAutoLayout(true)
dlg.SetSizer(topSizer)
dlg.Center()
if dlg.ShowModal() != wxID_OK: return
value = []
for i in range(listBox.Number()):
if listBox.IsChecked(i):
value.append(self.values[i])
# Add ignored flags
value.extend(ignored)
self.SetValue(reduce(lambda a,b: a+'|'+b, value))
panel.SetModified(true)
class ParamFlag(ParamBinaryOr):
values = ['wxTOP', 'wxBOTTOM', 'wxLEFT', 'wxRIGHT', 'wxALL',
'wxEXPAND', 'wxSHAPED', 'wxALIGN_CENTRE', 'wxALIGN_RIGHT',
'wxALIGN_BOTTOM', 'wxALIGN_CENTRE_VERTICAL',
'wxALIGN_CENTRE_HORIZONTAL']
equal = {'wxALIGN_CENTER': 'wxALIGN_CENTRE',
'wxALIGN_CENTER_VERTICAL': 'wxALIGN_CENTRE_VERTICAL',
'wxALIGN_CENTER_HORIZONTAL': 'wxALIGN_CENTRE_HORIZONTAL'}
def __init__(self, parent, id, value, size, name, param):
ParamBinaryOr.__init__(self, parent, id, value, size, name, param)
class ParamStyle(ParamBinaryOr):
equal = {'wxALIGN_CENTER': 'wxALIGN_CENTRE'}
def __init__(self, parent, id, value, size, name, param):
self.values = currentXXX.styles + genericStyles
ParamBinaryOr.__init__(self, parent, id, value, size, name, param)
class ParamInt(wxPanel):
ID_SPIN_CTRL = wxNewId()
def __init__(self, parent, id, value, size, name, param):
wxPanel.__init__(self, parent, id, name=name)
sizer = wxBoxSizer()
self.spin = wxSpinCtrl(self, self.ID_SPIN_CTRL, value, size=wxSize(50,-1))
self.SetBackgroundColour(panel.GetBackgroundColour())
sizer.Add(self.spin)
self.SetAutoLayout(true)
self.SetSizer(sizer)
sizer.Fit(self)
Register(param, self)
EVT_SPINCTRL(self, self.ID_SPIN_CTRL, self.OnChange)
def GetValue(self):
return str(self.spin.GetValue())
def SetValue(self, value):
if not value: value = 0
self.spin.SetValue(int(value))
def OnChange(self, evt):
panel.SetModified(true)
evt.Skip()
class ParamText(wxTextCtrl):
def __init__(self, parent, id, value, size, name, param):
wxTextCtrl.__init__(self, parent, id, value, size=wxSize(200,-1), name=name)
Register(param, self)
EVT_TEXT(self, id, self.OnChange)
def OnChange(self, evt):
panel.SetModified(true)
evt.Skip()
class ParamAccel(wxTextCtrl):
def __init__(self, parent, id, value, size, name, param):
wxTextCtrl.__init__(self, parent, id, value, size=wxSize(50,-1), name=name)
Register(param, self)
EVT_TEXT(self, id, self.OnChange)
def OnChange(self, evt):
panel.SetModified(true)
evt.Skip()
class ParamPosSize(wxTextCtrl):
def __init__(self, parent, id, value, size, name, param):
wxTextCtrl.__init__(self, parent, id, value, size=wxSize(80,-1), name=name)
Register(param, self)
EVT_TEXT(self, id, self.OnChange)
def OnChange(self, evt):
panel.SetModified(true)
evt.Skip()
class ContentDialog(wxDialog):
def __init__(self, parent, value):
# Use another constructor
w = frame.res.LoadDialog(parent, 'ID_DIALOG_CONTENT')
self.this = w.this
w.thisown = 0
self.thisown = 1
#frame.res.LoadOnDialog(self, parent, 'ID_DIALOG_CONTENT')
self.Center()
self.list = self.FindWindowByName('ID_LIST')
# Set list items
for v in value:
self.list.Append(v)
# !!! Bug in XRC or wxWin listbox select random items
self.FindWindowByName('wxID_OK').SetFocus()
# Callbacks
self.ID_BUTTON_APPEND = XMLID('ID_BUTTON_APPEND')
self.ID_BUTTON_REMOVE = XMLID('ID_BUTTON_REMOVE')
self.ID_BUTTON_UP = XMLID('ID_BUTTON_UP')
self.ID_BUTTON_DOWN = XMLID('ID_BUTTON_DOWN')
EVT_BUTTON(self, self.ID_BUTTON_UP, self.OnButtonUp)
EVT_BUTTON(self, self.ID_BUTTON_DOWN, self.OnButtonDown)
EVT_BUTTON(self, self.ID_BUTTON_APPEND, self.OnButtonAppend)
EVT_BUTTON(self, self.ID_BUTTON_REMOVE, self.OnButtonRemove)
EVT_UPDATE_UI(self, self.ID_BUTTON_UP, self.OnUpdateUI)
EVT_UPDATE_UI(self, self.ID_BUTTON_DOWN, self.OnUpdateUI)
EVT_UPDATE_UI(self, self.ID_BUTTON_REMOVE, self.OnUpdateUI)
def OnButtonUp(self, evt):
i = self.list.GetSelection()
str = self.list.GetString(i)
self.list.Delete(i)
self.list.InsertItems([str], i-1)
self.list.SetSelection(i-1)
def OnButtonDown(self, evt):
i = self.list.GetSelection()
str = self.list.GetString(i)
self.list.Delete(i)
self.list.InsertItems([str], i+1)
self.list.SetSelection(i+1)
def OnButtonAppend(self, evt):
str = wxGetTextFromUser('Enter new item:', 'Append', '', self)
self.list.Append(str)
def OnButtonRemove(self, evt):
self.list.Delete(self.list.GetSelection())
def OnUpdateUI(self, evt):
if evt.GetId() == self.ID_BUTTON_REMOVE:
evt.Enable(self.list.GetSelection() != -1)
elif evt.GetId() == self.ID_BUTTON_UP:
evt.Enable(self.list.GetSelection() > 0)
elif evt.GetId() == self.ID_BUTTON_DOWN:
evt.Enable(self.list.GetSelection() < self.list.Number() - 1)
class ParamContent(wxPanel):
ID_TEXT_CTRL = wxNewId()
ID_BUTTON_EDIT = wxNewId()
def __init__(self, parent, id, value, size, name, param):
wxPanel.__init__(self, parent, id, name=name)
self.SetBackgroundColour(panel.GetBackgroundColour())
Register(param, self)
sizer = wxBoxSizer()
self.text = wxTextCtrl(self, self.ID_TEXT_CTRL, str(value), size=wxSize(200,-1))
sizer.Add(self.text, 0, wxRIGHT, 10)
self.button = wxButton(self, self.ID_BUTTON_EDIT, 'Edit...')
sizer.Add(self.button)
self.SetAutoLayout(true)
self.SetSizer(sizer)
sizer.Fit(self)
self.textModified = false
EVT_BUTTON(self, self.ID_BUTTON_EDIT, self.OnButtonEdit)
EVT_TEXT(self, self.ID_TEXT_CTRL, self.OnChange)
def OnChange(self, evt):
panel.SetModified(true)
self.textModified = true
evt.Skip()
def GetValue(self):
if self.textModified: # text has newer value
return eval(self.text.GetValue())
return self.value
def SetValue(self, value):
self.value = value
self.text.SetValue(str(value)) # update text ctrl
def OnButtonEdit(self, evt):
if self.textModified: # text has newer value
self.value = eval(self.text.GetValue())
dlg = ContentDialog(self, self.value)
if dlg.ShowModal() != wxID_OK: return
value = []
for i in range(dlg.list.Number()):
value.append(dlg.list.GetString(i))
# Add ignored flags
self.SetValue(value)
panel.SetModified(true)
self.textModified = false
# Boxless radiobox
class RadioBox(wxPanel):
ID_RADIO_CHOICE = wxNewId() # economize on IDs, use names
def __init__(self, parent, id, choices,
pos=wxDefaultPosition, size=wxDefaultSize, name='radiobox'):
wxPanel.__init__(self, parent, id, pos, size, name=name)
self.SetBackgroundColour(panel.GetBackgroundColour())
self.choices = choices
topSizer = wxBoxSizer()
for i in choices:
topSizer.Add(wxRadioButton(self, self.ID_RADIO_CHOICE, i, name=i))
self.SetAutoLayout(true)
self.SetSizer(topSizer)
topSizer.Fit(self)
EVT_RADIOBUTTON(self, self.ID_RADIO_CHOICE, self.OnRadioChoice)
def SetStringSelection(self, value):
self.value = None
for i in self.choices:
w = self.FindWindowByName(i)
w.SetValue(i == value)
self.value = value
def OnRadioChoice(self, evt):
if not self.value: # procedure call
evt.Skip()
return
self.FindWindowByName(self.value).SetValue(false)
self.value = evt.GetEventObject().GetName()
panel.SetModified(true)
def GetStringSelection(self):
return self.value
class ParamBool(RadioBox):
values = {'yes': '1', 'no': '0'}
seulav = {'1': 'yes', '0': 'no'}
def __init__(self, parent, id, value, size, name, param):
RadioBox.__init__(self, parent, id, choices = self.values.keys(), name=name)
Register(param, self)
self.SetValue(value)
def GetValue(self):
return self.values[self.GetStringSelection()]
def SetValue(self, value):
if not value: value = '1'
self.SetStringSelection(self.seulav[value])
class ParamOrient(RadioBox):
values = {'horizontal': 'wxHORIZONTAL', 'vertical': 'wxVERTICAL'}
seulav = {'wxHORIZONTAL': 'horizontal', 'wxVERTICAL': 'vertical'}
def __init__(self, parent, id, value, size, name, param):
RadioBox.__init__(self, parent, id, choices = self.values.keys(), name=name)
Register(param, self)
self.SetValue(value)
def GetValue(self):
return self.values[self.GetStringSelection()]
def SetValue(self, value):
if not value: value = 'wxHORIZONTAL'
self.SetStringSelection(self.seulav[value])
paramDict = {
'flag': ParamFlag,
'style': ParamStyle,
'pos': ParamPosSize, 'size': ParamPosSize,
'border': ParamInt, 'cols': ParamInt, 'rows': ParamInt,
'vgap': ParamInt, 'hgap': ParamInt,
'checkable': ParamBool, 'accel': ParamAccel,
'label': ParamText, 'title': ParamText, 'value': ParamText,
'content': ParamContent, 'selection': ParamInt,
'min': ParamInt, 'max': ParamInt,
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,89 @@
<?xml version="1.0" ?>
<resource>
<object class="wxDialog" name="ID_DIALOG_CONTENT">
<title>Content</title>
<size>250,300</size>
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<object class="wxListBox" name="ID_LIST">
<content/>
</object>
<option>1</option>
<flag>wxTOP|wxBOTTOM|wxLEFT|wxEXPAND</flag>
<border>5</border>
</object>
<object class="sizeritem">
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<object class="wxButton" name="ID_BUTTON_UP">
<label>Move Up</label>
</object>
<flag>wxBOTTOM</flag>
<border>5</border>
</object>
<object class="sizeritem">
<object class="wxButton" name="ID_BUTTON_DOWN">
<label>Move Down</label>
</object>
</object>
<object class="spacer">
<option>1</option>
</object>
<object class="sizeritem">
<object class="wxButton" name="ID_BUTTON_APPEND">
<label>Append...</label>
</object>
<flag>wxBOTTOM</flag>
<border>5</border>
</object>
<object class="sizeritem">
<object class="wxButton" name="ID_BUTTON_REMOVE">
<label>Remove</label>
</object>
</object>
</object>
<flag>wxALL|wxEXPAND</flag>
<border>5</border>
</object>
</object>
<option>1</option>
<flag>wxEXPAND</flag>
</object>
<object class="sizeritem">
<object class="wxStaticLine">
</object>
<flag>wxEXPAND</flag>
</object>
<object class="sizeritem">
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<object class="wxButton" name="wxID_OK">
<label>OK</label>
<default>1</default>
</object>
<flag>wxRIGHT</flag>
<border>10</border>
</object>
<object class="sizeritem">
<object class="wxButton" name="wxID_CANCEL">
<label>Cancel</label>
</object>
</object>
</object>
<flag>wxALL|wxALIGN_CENTRE_HORIZONTAL</flag>
<border>10</border>
</object>
</object>
</object>
</resource>

507
wxPython/tools/XRCed/xxx.py Normal file
View File

@ -0,0 +1,507 @@
# Name: xxx.py (xxx is easy to distinguish from 'wx' :) )
# Purpose: XML interface classes
# Author: Roman Rolinsky <rolinsky@mema.ucl.ac.be>
# Created: 22.08.2001
from wxPython.wx import *
from wxPython.xrc import *
from xml.dom import minidom
import wxPython.lib.wxpTag
from params import *
# Classes to interface DOM objects
class xxxObject:
# Param ids for controls
ID_CHECK_PARAMS = wxNewId()
ID_TEXT_PARAMS = wxNewId()
# Default behavior
hasChildren = false # has children elements?
hasName = true # has name attribute?
isSizer = hasChild = false
# Required paremeters: none by default
required = []
# Default parameters with default values
default = {}
# Parameter types
paramDict = {}
# Additional styles
styles = []
# Tree icon index
image = -1
# Construct a new xxx object from DOM element
# parent is parent xxx object (or None if none), element is DOM element object
def __init__(self, parent, element):
self.parent = parent
self.element = element
self.undo = None
# Get attributes
self.className = element.getAttribute('class')
if self.hasName: self.name = element.getAttribute('name')
# Set parameters (text element children)
self.params = {}
nodes = element.childNodes[:]
for node in nodes:
if node.nodeType == minidom.Node.ELEMENT_NODE:
if node.tagName == 'object':
continue # do nothing for object children here
if not node.tagName in self.allParams:
print 'WARNING: unknown parameter for %s: %s' % \
(self.className, node.tagName)
if node.tagName == 'content': # has items
# Param value is a list of text nodes
l = []
nodes = node.childNodes[:]
for n in nodes:
if n.nodeType == minidom.Node.ELEMENT_NODE:
assert n.tagName == 'item', 'bad content content'
if not n.hasChildNodes():
# If does not have child nodes, create empty text node
text = tree.dom.createTextNode('')
node.appendChild(text)
else:
# !!! normalize?
text = n.childNodes[0] # first child must be text node
assert text.nodeType == minidom.Node.TEXT_NODE
l.append(text)
else:
node.removeChild(n)
n.unlink()
self.params[node.tagName] = l
else: # simple parameter
if not node.hasChildNodes():
# If does not have child nodes, create empty text node
text = tree.dom.createTextNode('')
node.appendChild(text)
else:
text = node.childNodes[0] # first child must be text node
assert text.nodeType == minidom.Node.TEXT_NODE
self.params[node.tagName] = text
else:
# Remove all other nodes
element.removeChild(node)
node.unlink()
# Generate HTML
def generateHtml(self, prefix=''):
SetCurrentXXX(self)
html = '<table cellspacing=0 cellpadding=0><tr><td width=130>\
<font size="+1"><b>%s</b></font></td>' % self.className
# Has id (name) attribute
if self.hasName:
html += """\
<td><wxp module="xxx" class="ParamText" width=150>
<param name="id" value="%d">
<param name="name" value="text_name">
<param name="value" value='("%s")'>
<param name="param" value="name">
</wxp></td>""" % (self.ID_TEXT_PARAMS, self.name)
html += '</table><p>'
html += '<table cellspacing=0 cellpadding=0>\n'
# Add required parameters
for param in self.allParams:
# Add checkbox or just text
if param in self.required:
html += '<tr><td width=25></td><td width=110>%s: </td>' % param
else: # optional parameter
html += """\
<tr><td width=20><wxp class="wxCheckBox">
<param name="id" value="%d">
<param name="size" value="(20,-1)">
<param name="name" value="check_%s">
<param name="label" value=("")>
</wxp></td><td width=110>%s: </td>
""" % (self.ID_CHECK_PARAMS, param, param + '&nbsp;')
# Add value part
if self.params.has_key(param):
if param == 'content':
l = []
for text in self.params[param]:
l.append(str(text.data)) # convert from unicode
value = str(l)
else:
value = "('" + self.params[param].data + "')"
else:
value = "('')"
# Get parameter type
try:
# Local or overriden type
typeClass = self.paramDict[param].__name__
except KeyError:
try:
# Standart type
typeClass = paramDict[param].__name__
except KeyError:
# Default
typeClass = 'ParamText'
html += """\
<td><wxp module="xxx" class="%s">
<param name="id" value="%d">
<param name="name" value="text_%s">
<param name="value" value="%s">
<param name="param" value="%s">
</wxp></td>
""" % (typeClass, self.ID_TEXT_PARAMS,
prefix + param, value, prefix + param)
html += '</table>\n'
return html
# Returns real tree object
def treeObject(self):
if self.hasChild: return self.child
return self
# Returns tree image index
def treeImage(self):
if self.hasChild: return self.child.treeImage()
return self.image
# Class name plus wx name
def treeName(self):
if self.hasChild: return self.child.treeName()
if self.hasName and self.name: return self.className + ' "' + self.name + '"'
return self.className
################################################################################
class xxxContainer(xxxObject):
hasChildren = true
################################################################################
# Top-level windwos
class xxxPanel(xxxContainer):
allParams = ['pos', 'size', 'style']
class xxxDialog(xxxContainer):
allParams = ['title', 'pos', 'size', 'style']
required = ['title']
styles = ['wxDIALOG_MODAL', 'wxCAPTION', 'wxDEFAULT_DIALOG_STYLE',
'wxRESIZE_BORDER', 'wxSYSTEM_MENU', 'wxTHICK_FRAME', 'wxSTAY_ON_TOP']
class xxxFrame(xxxContainer):
allParams = ['title', 'centered', 'pos', 'size', 'style']
paramDict = {'centered': ParamBool}
required = ['title']
styles = ['wxDEFAULT_FRAME_STYLE', 'wxICONIZE', 'wxCAPTION', 'wxMINIMIZE',
'wxICONIZE', 'wxMINIMIZE_BOX', 'wxMAXIMIZE', 'wxMAXIMIZE_BOX',
'wxSTAY_ON_TOP', 'wxSYSTEM_MENU', 'wxRESIZE_BORDER',
'wxFRAME_FLOAT_ON_PARENT', 'wxFRAME_TOOL_WINDOW']
################################################################################
# Controls
class xxxStaticText(xxxObject):
allParams = ['label', 'pos', 'size', 'style']
required = ['label']
styles = ['wxALIGN_LEFT', 'wxALIGN_RIGHT', 'wxALIGN_CENTRE', 'wxST_NO_AUTORESIZE']
class xxxStaticLine(xxxObject):
allParams = ['pos', 'size', 'style']
styles = ['wxLI_HORIZONTAL', 'wxLI_VERTICAL']
class xxxTextCtrl(xxxObject):
allParams = ['value', 'pos', 'size', 'style']
styles = ['wxTE_PROCESS_ENTER', 'wxTE_PROCESS_TAB', 'wxTE_MULTILINE',
'wxTE_PASSWORD', 'wxTE_READONLY']
class xxxChoice(xxxObject):
allParams = ['content', 'selection', 'pos', 'size', 'style']
required = ['content']
class xxxSlider(xxxObject):
allParams = ['value', 'min', 'max', 'pos', 'size', 'style',
'tickfreq', 'pagesize', 'linesize', 'thumb', 'tick',
'selmin', 'selmax']
paramDict = {'value': ParamInt, 'tickfreq': ParamInt, 'pagesize': ParamInt,
'linesize': ParamInt, 'thumb': ParamInt, 'thumb': ParamInt,
'tick': ParamInt, 'selmin': ParamInt, 'selmax': ParamInt}
required = ['value', 'min', 'max']
styles = ['wxSL_HORIZONTAL', 'wxSL_VERTICAL', 'wxSL_AUTOTICKS', 'wxSL_LABELS',
'wxSL_LEFT', 'wxSL_RIGHT', 'wxSL_TOP', 'wxSL_SELRANGE']
class xxxGauge(xxxObject):
allParams = ['range', 'pos', 'size', 'style', 'value', 'shadow', 'bezel']
paramDict = {'range': ParamInt, 'value': ParamInt,
'shadow': ParamInt, 'bezel': ParamInt}
styles = ['wxGA_HORIZONTAL', 'wxGA_VERTICAL', 'wxGA_PROGRESSBAR', 'wxGA_SMOOTH']
class xxxScrollBar(xxxObject):
allParams = ['pos', 'size', 'style', 'value', 'thumbsize', 'range', 'pagesize']
paramDict = {'value': ParamInt, 'range': ParamInt, 'thumbsize': ParamInt,
'pagesize': ParamInt}
styles = ['wxSB_HORIZONTAL', 'wxSB_VERTICAL']
class xxxListCtrl(xxxObject):
allParams = ['pos', 'size', 'style']
styles = ['wxLC_LIST', 'wxLC_REPORT', 'wxLC_ICON', 'wxLC_SMALL_ICON',
'wxLC_ALIGN_TOP', 'wxLC_ALIGN_LEFT', 'wxLC_AUTOARRANGE',
'wxLC_USER_TEXT', 'wxLC_EDIT_LABELS', 'wxLC_NO_HEADER',
'wxLC_SINGLE_SEL', 'wxLC_SORT_ASCENDING', 'wxLC_SORT_DESCENDING']
# !!! temporary
xxxCheckList = xxxListCtrl
class xxxTreeCtrl(xxxObject):
allParams = ['pos', 'size', 'style']
styles = ['wxTR_HAS_BUTTONS', 'wxTR_NO_LINES', 'wxTR_LINES_AT_ROOT',
'wxTR_EDIT_LABELS', 'wxTR_MULTIPLE']
class xxxHtmlWindow(xxxObject):
allParams = ['pos', 'size', 'style', 'borders', 'url', 'htmlcode']
paramDict = {'borders': ParamInt}
styles = ['wxHW_SCROLLBAR_NEVER', 'wxHW_SCROLLBAR_AUTO']
class xxxCalendar(xxxObject):
allParams = ['pos', 'size', 'style']
class xxxNotebook(xxxContainer):
allParams = ['usenotebooksizer', 'pos', 'size', 'style']
paramDict = {'usenotebooksizer': ParamBool}
styles = ['wxNB_FIXEDWIDTH', 'wxNB_LEFT', 'wxNB_RIGHT', 'wxNB_BOTTOM']
################################################################################
# Buttons
class xxxButton(xxxObject):
allParams = ['label', 'default', 'pos', 'size', 'style']
paramDict = {'default': ParamBool}
required = ['label']
styles = ['wxBU_LEFT', 'wxBU_TOP', 'wxBU_RIGHT', 'wxBU_BOTTOM']
class xxxBitmapButton(xxxObject):
allParams = ['bitmap', 'selected', 'focus', 'disabled', 'default',
'pos', 'size', 'style']
required = ['bitmap']
styles = ['wxBU_LEFT', 'wxBU_TOP', 'wxBU_RIGHT', 'wxBU_BOTTOM']
class xxxRadioButton(xxxObject):
allParams = ['label', 'value', 'pos', 'size', 'style']
paramDict = {'value': ParamBool}
required = ['label']
styles = ['wxRB_GROUP']
class xxxSpinButton(xxxObject):
allParams = ['pos', 'size', 'style']
styles = ['wxSP_HORIZONTAL', 'wxSP_VERTICAL', 'wxSP_ARROW_KEYS', 'wxSP_WRAP']
################################################################################
# Boxes
class xxxStaticBox(xxxObject):
allParams = ['label', 'pos', 'size', 'style']
required = ['label']
class xxxRadioBox(xxxObject):
allParams = ['label', 'content', 'selection', 'dimension', 'pos', 'size', 'style']
paramDict = {'dimension': ParamInt}
required = ['label', 'content']
styles = ['wxRA_SPECIFY_ROWS', 'wxRA_SPECIFY_COLS']
class xxxCheckBox(xxxObject):
allParams = ['label', 'pos', 'size', 'style']
required = ['label']
class xxxComboBox(xxxObject):
allParams = ['content', 'selection', 'value', 'pos', 'size', 'style']
required = ['content']
styles = ['wxCB_SIMPLE', 'wxCB_DROPDOWN', 'wxCB_READONLY', 'wxCB_DROPDOWN',
'wxCB_SORT']
class xxxListBox(xxxObject):
allParams = ['content', 'selection', 'pos', 'size', 'style']
required = ['content']
styles = ['wxLB_SINGLE', 'wxLB_MULTIPLE', 'wxLB_EXTENDED', 'wxLB_HSCROLL',
'wxLB_ALWAYS_SB', 'wxLB_NEEDED_SB', 'wxLB_SORT']
################################################################################
# Sizers
class xxxSizer(xxxContainer):
hasName = false
paramDict = {'orient': ParamOrient}
isSizer = true
class xxxBoxSizer(xxxSizer):
allParams = ['orient']
required = ['orient']
default = {'orient': 'wxVERTICAL'}
# Tree icon depends on orientation
def treeImage(self):
if self.params['orient'].data == 'wxHORIZONTAL': return self.imageH
else: return self.imageV
class xxxStaticBoxSizer(xxxBoxSizer):
allParams = ['label', 'orient']
required = ['label', 'orient']
default = {'orient': 'wxVERTICAL'}
class xxxGridSizer(xxxSizer):
allParams = ['cols', 'rows', 'vgap', 'hgap']
required = ['cols']
default = {'cols': '2', 'rows': '2'}
class xxxFlexGridSizer(xxxGridSizer):
pass
# Container with only one child.
# Not shown in tree.
class xxxChildContainer(xxxObject):
# Special param ids
ID_CHECK_PARAMS = wxNewId()
ID_TEXT_PARAMS = wxNewId()
hasName = false
hasChild = true
def __init__(self, parent, element):
xxxObject.__init__(self, parent, element)
# Must have one child with 'object' tag, but we don't check it
nodes = element.childNodes[:] # create copy
for node in nodes:
if node.nodeType == minidom.Node.ELEMENT_NODE:
if node.tagName == 'object':
# Create new xxx object for child node
self.child = MakeXXXFromDOM(self, node)
self.child.parent = parent
# Copy hasChildren and isSizer attributes
self.hasChildren = self.child.hasChildren
self.isSizer = self.child.isSizer
return # success
else:
element.removeChild(node)
node.unlink()
assert 0, 'no child found'
def generateHtml(self):
return xxxObject.generateHtml(self, '_') + '<hr>\n' + \
self.child.generateHtml()
class xxxSizerItem(xxxChildContainer):
allParams = ['option', 'flag', 'border']
paramDict = {'option': ParamInt}
def __init__(self, parent, element):
xxxChildContainer.__init__(self, parent, element)
# Remove pos parameter - unnecessary for sizeritems
if 'pos' in self.child.allParams:
self.child.allParams = self.child.allParams[:]
self.child.allParams.remove('pos')
class xxxNotebookPage(xxxChildContainer):
allParams = ['label', 'selected']
paramDict = {'selected': ParamBool}
required = ['label']
def __init__(self, parent, element):
xxxChildContainer.__init__(self, parent, element)
# pos and size dont matter for notebookpages
if 'pos' in self.child.allParams:
self.child.allParams = self.child.allParams[:]
self.child.allParams.remove('pos')
if 'size' in self.child.allParams:
self.child.allParams = self.child.allParams[:]
self.child.allParams.remove('size')
class xxxSpacer(xxxObject):
hasName = false
allParams = ['size', 'option', 'flag', 'border']
paramDict = {'option': ParamInt}
default = {'size': '0,0'}
class xxxMenuBar(xxxContainer):
allParams = []
class xxxMenu(xxxContainer):
allParams = ['label']
default = {'label': ''}
class xxxMenuItem(xxxObject):
allParams = ['checkable', 'label', 'accel', 'help']
default = {'label': ''}
class xxxSeparator(xxxObject):
hasName = false
allParams = []
xxxDict = {
'wxPanel': xxxPanel,
'wxDialog': xxxDialog,
'wxFrame': xxxFrame,
'wxButton': xxxButton,
'wxBitmapButton': xxxBitmapButton,
'wxRadioButton': xxxRadioButton,
'wxSpinButton': xxxSpinButton,
'wxStaticBox': xxxStaticBox,
'wxRadioBox': xxxRadioBox,
'wxComboBox': xxxComboBox,
'wxCheckBox': xxxCheckBox,
'wxListBox': xxxListBox,
'wxStaticText': xxxStaticText,
'wxStaticLine': xxxStaticLine,
'wxTextCtrl': xxxTextCtrl,
'wxChoice': xxxChoice,
'wxSlider': xxxSlider,
'wxGauge': xxxGauge,
'wxScrollBar': xxxScrollBar,
'wxTreeCtrl': xxxTreeCtrl,
'wxListCtrl': xxxListCtrl,
'wxCheckList': xxxCheckList,
'wxNotebook': xxxNotebook,
'notebookpage': xxxNotebookPage,
'wxHtmlWindow': xxxHtmlWindow,
'wxCalendar': xxxCalendar,
'wxBoxSizer': xxxBoxSizer,
'wxStaticBoxSizer': xxxStaticBoxSizer,
'wxGridSizer': xxxGridSizer,
'wxFlexGridSizer': xxxFlexGridSizer,
'sizeritem': xxxSizerItem,
'spacer': xxxSpacer,
'wxMenuBar': xxxMenuBar,
'wxMenu': xxxMenu,
'wxMenuItem': xxxMenuItem,
'separator': xxxSeparator,
}
# Helper functions
# Test for object elements
def IsObject(node):
return node.nodeType == minidom.Node.ELEMENT_NODE and node.tagName == 'object'
# Make XXX object from some DOM object, selecting correct class
def MakeXXXFromDOM(parent, element):
return xxxDict[element.getAttribute('class')](parent, element)
# Make empty DOM element
def MakeEmptyDOM(className):
elem = tree.dom.createElement('object')
elem.setAttribute('class', className)
# Set required and default parameters
xxxClass = xxxDict[className]
defaultNotRequired = filter(lambda x, l=xxxClass.required: x not in l,
xxxClass.default.keys())
for param in xxxClass.required + defaultNotRequired:
textElem = tree.dom.createElement(param)
try:
textNode = tree.dom.createTextNode(xxxClass.default[param])
except KeyError:
textNode = tree.dom.createTextNode('')
textElem.appendChild(textNode)
elem.appendChild(textElem)
return elem
# Make empty XXX object
def MakeEmptyXXX(parent, className):
# Make corresponding DOM object first
elem = MakeEmptyDOM(className)
# If parent is a sizer, we should create sizeritem object, except for spacers
if parent:
if parent.isSizer and className != 'spacer':
sizerItemElem = MakeEmptyDOM('sizeritem')
sizerItemElem.appendChild(elem)
elem = sizerItemElem
elif isinstance(parent, xxxNotebook):
pageElem = MakeEmptyDOM('notebookpage')
pageElem.appendChild(elem)
elem = pageElem
# Now just make object
return MakeXXXFromDOM(parent, elem)