Some little tweaks and cleanups.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14611 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
69ca6f3cd5
commit
26e335b844
@ -367,6 +367,7 @@ enum {
|
||||
wxPRINT_QUALITY_MEDIUM,
|
||||
wxPRINT_QUALITY_LOW,
|
||||
wxPRINT_QUALITY_DRAFT,
|
||||
|
||||
wxID_OPEN,
|
||||
wxID_CLOSE,
|
||||
wxID_NEW,
|
||||
@ -386,6 +387,7 @@ enum {
|
||||
wxID_HELP_PROCEDURES,
|
||||
wxID_HELP_CONTEXT,
|
||||
wxID_CLOSE_ALL,
|
||||
|
||||
wxID_CUT,
|
||||
wxID_COPY,
|
||||
wxID_PASTE,
|
||||
@ -393,6 +395,7 @@ enum {
|
||||
wxID_FIND,
|
||||
wxID_DUPLICATE,
|
||||
wxID_SELECTALL,
|
||||
|
||||
wxID_FILE1,
|
||||
wxID_FILE2,
|
||||
wxID_FILE3,
|
||||
@ -402,17 +405,25 @@ enum {
|
||||
wxID_FILE7,
|
||||
wxID_FILE8,
|
||||
wxID_FILE9,
|
||||
|
||||
wxID_OK,
|
||||
wxID_CANCEL,
|
||||
wxID_APPLY,
|
||||
wxID_YES,
|
||||
wxID_NO,
|
||||
wxID_STATIC,
|
||||
wxID_SEPARATOR,
|
||||
wxID_FORWARD,
|
||||
wxID_BACKWARD,
|
||||
wxID_SETUP,
|
||||
wxID_DEFAULT,
|
||||
wxID_MORE,
|
||||
wxID_SETUP,
|
||||
wxID_RESET,
|
||||
wxID_CONTEXT_HELP,
|
||||
wxID_YESTOALL,
|
||||
wxID_NOTOALL,
|
||||
wxID_ABORT,
|
||||
wxID_RETRY,
|
||||
wxID_IGNORE,
|
||||
|
||||
wxOPEN,
|
||||
wxSAVE,
|
||||
|
@ -32,6 +32,17 @@
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
const int IDM_WINDOWTILE = 4001;
|
||||
const int IDM_WINDOWTILEHOR = 4001;
|
||||
const int IDM_WINDOWCASCADE = 4002;
|
||||
const int IDM_WINDOWICONS = 4003;
|
||||
const int IDM_WINDOWNEXT = 4004;
|
||||
const int IDM_WINDOWTILEVERT = 4005;
|
||||
const int wxFIRST_MDI_CHILD = 4100;
|
||||
const int wxLAST_MDI_CHILD = 4600;
|
||||
|
||||
|
||||
|
||||
class wxMDIParentFrame : public wxFrame {
|
||||
public:
|
||||
wxMDIParentFrame(wxWindow *parent,
|
||||
|
@ -1178,6 +1178,14 @@ SWIGEXPORT(void) initmdic() {
|
||||
SWIG_globals = SWIG_newvarlink();
|
||||
m = Py_InitModule("mdic", mdicMethods);
|
||||
d = PyModule_GetDict(m);
|
||||
PyDict_SetItemString(d,"IDM_WINDOWTILE", PyInt_FromLong((long) 4001));
|
||||
PyDict_SetItemString(d,"IDM_WINDOWTILEHOR", PyInt_FromLong((long) 4001));
|
||||
PyDict_SetItemString(d,"IDM_WINDOWCASCADE", PyInt_FromLong((long) 4002));
|
||||
PyDict_SetItemString(d,"IDM_WINDOWICONS", PyInt_FromLong((long) 4003));
|
||||
PyDict_SetItemString(d,"IDM_WINDOWNEXT", PyInt_FromLong((long) 4004));
|
||||
PyDict_SetItemString(d,"IDM_WINDOWTILEVERT", PyInt_FromLong((long) 4005));
|
||||
PyDict_SetItemString(d,"wxFIRST_MDI_CHILD", PyInt_FromLong((long) 4100));
|
||||
PyDict_SetItemString(d,"wxLAST_MDI_CHILD", PyInt_FromLong((long) 4600));
|
||||
{
|
||||
int i;
|
||||
for (i = 0; _swig_mapping[i].n1; i++)
|
||||
|
@ -139,3 +139,11 @@ def wxPreMDIClientWindow(*_args,**_kwargs):
|
||||
|
||||
#-------------- VARIABLE WRAPPERS ------------------
|
||||
|
||||
IDM_WINDOWTILE = mdic.IDM_WINDOWTILE
|
||||
IDM_WINDOWTILEHOR = mdic.IDM_WINDOWTILEHOR
|
||||
IDM_WINDOWCASCADE = mdic.IDM_WINDOWCASCADE
|
||||
IDM_WINDOWICONS = mdic.IDM_WINDOWICONS
|
||||
IDM_WINDOWNEXT = mdic.IDM_WINDOWNEXT
|
||||
IDM_WINDOWTILEVERT = mdic.IDM_WINDOWTILEVERT
|
||||
wxFIRST_MDI_CHILD = mdic.wxFIRST_MDI_CHILD
|
||||
wxLAST_MDI_CHILD = mdic.wxLAST_MDI_CHILD
|
||||
|
@ -6076,7 +6076,7 @@ static PyObject *_wrap_wxWindow_OnPaint(PyObject *self, PyObject *args, PyObject
|
||||
#define wxWindow_GetDefaultItem(_swigobj) (_swigobj->GetDefaultItem())
|
||||
static PyObject *_wrap_wxWindow_GetDefaultItem(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxButton * _result;
|
||||
wxWindow * _result;
|
||||
wxWindow * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
@ -6093,7 +6093,7 @@ static PyObject *_wrap_wxWindow_GetDefaultItem(PyObject *self, PyObject *args, P
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (wxButton *)wxWindow_GetDefaultItem(_arg0);
|
||||
_result = (wxWindow *)wxWindow_GetDefaultItem(_arg0);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
@ -6104,8 +6104,9 @@ static PyObject *_wrap_wxWindow_GetDefaultItem(PyObject *self, PyObject *args, P
|
||||
#define wxWindow_SetDefaultItem(_swigobj,_swigarg0) (_swigobj->SetDefaultItem(_swigarg0))
|
||||
static PyObject *_wrap_wxWindow_SetDefaultItem(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxWindow * _result;
|
||||
wxWindow * _arg0;
|
||||
wxButton * _arg1;
|
||||
wxWindow * _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _argo1 = 0;
|
||||
char *_kwnames[] = { "self","btn", NULL };
|
||||
@ -6122,19 +6123,18 @@ static PyObject *_wrap_wxWindow_SetDefaultItem(PyObject *self, PyObject *args, P
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxButton_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_SetDefaultItem. Expected _wxButton_p.");
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_SetDefaultItem. Expected _wxWindow_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
wxWindow_SetDefaultItem(_arg0,_arg1);
|
||||
_result = (wxWindow *)wxWindow_SetDefaultItem(_arg0,_arg1);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
}{ _resultobj = wxPyMake_wxObject(_result); }
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
@ -7148,6 +7148,34 @@ static PyObject *_wrap_wxScrolledWindow_AdjustScrollbars(PyObject *self, PyObjec
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxScrolledWindow_Layout(_swigobj) (_swigobj->Layout())
|
||||
static PyObject *_wrap_wxScrolledWindow_Layout(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
bool _result;
|
||||
wxScrolledWindow * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxScrolledWindow_Layout",_kwnames,&_argo0))
|
||||
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_Layout. Expected _wxScrolledWindow_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (bool )wxScrolledWindow_Layout(_arg0);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} _resultobj = Py_BuildValue("i",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static void *SwigwxMenuTowxEvtHandler(void *ptr) {
|
||||
wxMenu *src;
|
||||
wxEvtHandler *dest;
|
||||
@ -10562,6 +10590,7 @@ static PyMethodDef windowscMethods[] = {
|
||||
{ "wxMenu_AppendMenu", (PyCFunction) _wrap_wxMenu_AppendMenu, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxMenu_Append", (PyCFunction) _wrap_wxMenu_Append, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "new_wxMenu", (PyCFunction) _wrap_new_wxMenu, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxScrolledWindow_Layout", (PyCFunction) _wrap_wxScrolledWindow_Layout, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxScrolledWindow_AdjustScrollbars", (PyCFunction) _wrap_wxScrolledWindow_AdjustScrollbars, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxScrolledWindow_GetScaleY", (PyCFunction) _wrap_wxScrolledWindow_GetScaleY, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxScrolledWindow_GetScaleX", (PyCFunction) _wrap_wxScrolledWindow_GetScaleX, METH_VARARGS | METH_KEYWORDS },
|
||||
|
@ -713,6 +713,9 @@ class wxScrolledWindowPtr(wxPanelPtr):
|
||||
def AdjustScrollbars(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxScrolledWindow_AdjustScrollbars,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Layout(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxScrolledWindow_Layout,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxScrolledWindow instance at %s>" % (self.this,)
|
||||
ViewStart = GetViewStart
|
||||
|
@ -2123,11 +2123,18 @@ SWIGEXPORT(void) initwxc() {
|
||||
PyDict_SetItemString(d,"wxID_YES", PyInt_FromLong((long) wxID_YES));
|
||||
PyDict_SetItemString(d,"wxID_NO", PyInt_FromLong((long) wxID_NO));
|
||||
PyDict_SetItemString(d,"wxID_STATIC", PyInt_FromLong((long) wxID_STATIC));
|
||||
PyDict_SetItemString(d,"wxID_SEPARATOR", PyInt_FromLong((long) wxID_SEPARATOR));
|
||||
PyDict_SetItemString(d,"wxID_FORWARD", PyInt_FromLong((long) wxID_FORWARD));
|
||||
PyDict_SetItemString(d,"wxID_BACKWARD", PyInt_FromLong((long) wxID_BACKWARD));
|
||||
PyDict_SetItemString(d,"wxID_SETUP", PyInt_FromLong((long) wxID_SETUP));
|
||||
PyDict_SetItemString(d,"wxID_DEFAULT", PyInt_FromLong((long) wxID_DEFAULT));
|
||||
PyDict_SetItemString(d,"wxID_MORE", PyInt_FromLong((long) wxID_MORE));
|
||||
PyDict_SetItemString(d,"wxID_SETUP", PyInt_FromLong((long) wxID_SETUP));
|
||||
PyDict_SetItemString(d,"wxID_RESET", PyInt_FromLong((long) wxID_RESET));
|
||||
PyDict_SetItemString(d,"wxID_CONTEXT_HELP", PyInt_FromLong((long) wxID_CONTEXT_HELP));
|
||||
PyDict_SetItemString(d,"wxID_YESTOALL", PyInt_FromLong((long) wxID_YESTOALL));
|
||||
PyDict_SetItemString(d,"wxID_NOTOALL", PyInt_FromLong((long) wxID_NOTOALL));
|
||||
PyDict_SetItemString(d,"wxID_ABORT", PyInt_FromLong((long) wxID_ABORT));
|
||||
PyDict_SetItemString(d,"wxID_RETRY", PyInt_FromLong((long) wxID_RETRY));
|
||||
PyDict_SetItemString(d,"wxID_IGNORE", PyInt_FromLong((long) wxID_IGNORE));
|
||||
PyDict_SetItemString(d,"wxOPEN", PyInt_FromLong((long) wxOPEN));
|
||||
PyDict_SetItemString(d,"wxSAVE", PyInt_FromLong((long) wxSAVE));
|
||||
PyDict_SetItemString(d,"wxHIDE_READONLY", PyInt_FromLong((long) wxHIDE_READONLY));
|
||||
|
@ -384,11 +384,18 @@ wxID_APPLY = wxc.wxID_APPLY
|
||||
wxID_YES = wxc.wxID_YES
|
||||
wxID_NO = wxc.wxID_NO
|
||||
wxID_STATIC = wxc.wxID_STATIC
|
||||
wxID_SEPARATOR = wxc.wxID_SEPARATOR
|
||||
wxID_FORWARD = wxc.wxID_FORWARD
|
||||
wxID_BACKWARD = wxc.wxID_BACKWARD
|
||||
wxID_SETUP = wxc.wxID_SETUP
|
||||
wxID_DEFAULT = wxc.wxID_DEFAULT
|
||||
wxID_MORE = wxc.wxID_MORE
|
||||
wxID_SETUP = wxc.wxID_SETUP
|
||||
wxID_RESET = wxc.wxID_RESET
|
||||
wxID_CONTEXT_HELP = wxc.wxID_CONTEXT_HELP
|
||||
wxID_YESTOALL = wxc.wxID_YESTOALL
|
||||
wxID_NOTOALL = wxc.wxID_NOTOALL
|
||||
wxID_ABORT = wxc.wxID_ABORT
|
||||
wxID_RETRY = wxc.wxID_RETRY
|
||||
wxID_IGNORE = wxc.wxID_IGNORE
|
||||
wxOPEN = wxc.wxOPEN
|
||||
wxSAVE = wxc.wxSAVE
|
||||
wxHIDE_READONLY = wxc.wxHIDE_READONLY
|
||||
|
@ -428,8 +428,8 @@ public:
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
#endif
|
||||
|
||||
wxButton* GetDefaultItem();
|
||||
void SetDefaultItem(wxButton *btn);
|
||||
wxWindow* GetDefaultItem();
|
||||
wxWindow* SetDefaultItem(wxWindow *btn);
|
||||
};
|
||||
|
||||
|
||||
@ -539,6 +539,8 @@ public:
|
||||
double GetScaleY();
|
||||
|
||||
void AdjustScrollbars();
|
||||
|
||||
bool Layout();
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -12,14 +12,11 @@
|
||||
|
||||
%module wx
|
||||
|
||||
|
||||
%{
|
||||
#include "helpers.h"
|
||||
%}
|
||||
|
||||
// %pragma(python) code="
|
||||
// # This gives this module's dictionary to the C++ extension code...
|
||||
// wxc._wxSetDictionary(vars())
|
||||
// "
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// This is where we include the other wrapper definition files for SWIG
|
||||
|
Loading…
Reference in New Issue
Block a user