From 044a2f2ed1e3c14a2fe5e9f146a589359a3f0e00 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 7 Dec 2010 03:18:21 +0000 Subject: [PATCH] updates to the sip files git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@66353 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- sip/gen/_core.sip | 50 +- sip/gen/app.sip | 55 +- sip/gen/apptrait.sip | 1 - sip/gen/colour.sip | 67 ++- sip/gen/defs.sip | 32 +- sip/gen/display.sip | 1 - sip/gen/event.sip | 27 +- sip/gen/evtloop.sip | 1 - sip/gen/font.sip | 24 +- sip/gen/gdicmn.sip | 100 ++-- sip/gen/gdiobj.sip | 1 - sip/gen/geometry.sip | 51 +- sip/gen/intl.sip | 1 - sip/gen/kbdstate.sip | 1 - sip/gen/layout.sip | 217 +++++++ sip/gen/mousestate.sip | 1 - sip/gen/object.sip | 17 +- sip/gen/platinfo.sip | 1 - sip/gen/region.sip | 256 ++++++++ sip/gen/tooltip.sip | 62 ++ sip/gen/toplevel.sip | 269 +++++++++ sip/gen/tracker.sip | 1 - sip/gen/validate.sip | 58 ++ sip/gen/vidmode.sip | 1 - sip/gen/window.sip | 1273 ++++++++++++++++++++++++++++++++++++++++ sip/gen/windowid.sip | 1 - 26 files changed, 2396 insertions(+), 173 deletions(-) create mode 100644 sip/gen/layout.sip create mode 100644 sip/gen/region.sip create mode 100644 sip/gen/tooltip.sip create mode 100644 sip/gen/toplevel.sip create mode 100644 sip/gen/validate.sip create mode 100644 sip/gen/window.sip diff --git a/sip/gen/_core.sip b/sip/gen/_core.sip index 36e6089c..88cdecd8 100644 --- a/sip/gen/_core.sip +++ b/sip/gen/_core.sip @@ -7,7 +7,7 @@ %Module(name=wxPhoenix._core, use_argument_names=True, language="C++") { %AutoPyName(remove_leading="wx") -} +}; %Copying Copyright: (c) 2010 by Total Control Software @@ -51,7 +51,6 @@ from _core import * %End - %Include defs.sip %Include wxpy_utils.sip %Include string.sip @@ -63,6 +62,7 @@ from _core import * %Include intl.sip %Include gdiobj.sip %Include font.sip +%Include region.sip %Include gdicmn.sip %Include geometry.sip %Include object.sip @@ -70,10 +70,16 @@ from _core import * %Include tracker.sip %Include kbdstate.sip %Include mousestate.sip +%Include tooltip.sip +%Include layout.sip %Include event.sip %Include evtloop.sip %Include apptrait.sip %Include app.sip +%Include validate.sip +%Include window.sip +%Include toplevel.sip + %ModuleCode void wxPyCoreModuleInject(PyObject* moduleDict) @@ -155,20 +161,18 @@ void wxPyCoreModuleInject(PyObject* moduleDict) //--------------------------------------------------------------------------- %Extract(id=pycode, order=10) +#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +# This code block was included from src/core_ex.py + + # A little trick to make 'wx' be a reference to this module so wx.Names can # be used in the python code here. import sys as _sys wx = _sys.modules[__name__] - -%End - -%Extract(id=pycode) -#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -# This code block was included from src/core_ex.py + # Load version numbers from __version__... Ensure that major and minor # versions are the same for both wxPython and wxWidgets. - from __version__ import * __version__ = VERSION_STRING import _core @@ -182,22 +186,36 @@ del _core def version(): """Returns a string containing version and port info""" - if wx.Platform == '__WXMSW__': + if wx.Port == '__WXMSW__': port = 'msw' - elif wx.Platform == '__WXMAC__': - if 'wxOSX-carbon' in wx.PlatformInfo: + elif wx.Port == '__WXMAC__': + if 'wxOSX-carbon' in wx.PortInfo: port = 'osx-carbon' else: port = 'osx-cocoa' - elif wx.Platform == '__WXGTK__': + elif wx.Port == '__WXGTK__': port = 'gtk' - if 'gtk2' in wx.PlatformInfo: + if 'gtk2' in wx.PortInfo: port = 'gtk2' else: - port = '?' + port = '???' return "%s %s" % (wx.VERSION_STRING, port) - + + +def deprecated(func): + def new_func(*args, **kwargs): + import warnings + warnings.warn("Call to deprecated item %s." % func.__name__, + category=DeprecationWarning) + return func(*args, **kwargs) + new_func.__name__ = func.__name__ + new_func.__doc__ = func.__doc__ + new_func.__dict__.update(func.__dict__) + return new_func + + + ## #---------------------------------------------------------------------------- ## class PyDeadObjectError(AttributeError): diff --git a/sip/gen/app.sip b/sip/gen/app.sip index 795f5a50..3232ce9f 100644 --- a/sip/gen/app.sip +++ b/sip/gen/app.sip @@ -22,7 +22,6 @@ %End - //--------------------------------------------------------------------------- class wxAppConsole : wxEvtHandler @@ -527,11 +526,17 @@ public: %Property(name=TopWindow, get=GetTopWindow, set=SetTopWindow) + %TypeCode + void _wxPyApp_MacHideApp(wxPyApp* self, int& _isErr) + { + #ifdef __WXMAC__ + self->MacHideApp(); + #endif + } + %End void MacHideApp(); %MethodCode - #ifdef __WXMAC__ - sipCpp->MacHideApp(); - #endif + _wxPyApp_MacHideApp(sipCpp, sipIsErr); %End wxAppAssertMode GetAssertMode(); @@ -746,11 +751,10 @@ logged in on the main display of your Mac.""" def OnPreInit(self): """ - Things that must be done after _BootstrapApp has done its - thing, but would be nice if they were already done by the time - that OnInit is called. + Things that must be done after _BootstrapApp has done its thing, but + would be nice if they were already done by the time that OnInit is + called. """ - print 'OnPreInit' ## wx.StockGDI._initStockObjects() @@ -792,9 +796,9 @@ logged in on the main display of your Mac.""" def SetOutputWindowAttributes(self, title=None, pos=None, size=None): """ - Set the title, position and/or size of the output window if - the stdio has been redirected. This should be called before - any output would cause the output window to be created. + Set the title, position and/or size of the output window if the stdio + has been redirected. This should be called before any output would + cause the output window to be created. """ if self.stdioWin: if title is not None: @@ -804,28 +808,15 @@ logged in on the main display of your Mac.""" if size is not None: self.stdioWin.size = size -## #---------------------------------------------------------------------------- +#---------------------------------------------------------------------------- -## # TODO: Move this someplace else? -## def deprecated(func): -## def new_func(*args, **kwargs): -## import warnings -## warnings.warn("Call to deprecated function %s." % func.__name__, -## category=DeprecationWarning) -## return func(*args, **kwargs) -## new_func.__name__ = func.__name__ -## new_func.__doc__ = func.__doc__ -## new_func.__dict__.update(func.__dict__) -## return new_func - - -## @deprecated -## class PySimpleApp(App): -## """ -## This class is deprecated. Please use wx.App isntead. -## """ -## def __init__(self, *args, **kw): -## App.__init__(self, *args, **kw) +@deprecated +class PySimpleApp(App): + """ + This class is deprecated. Please use wx.App instead. + """ + def __init__(self, *args, **kw): + App.__init__(self, *args, **kw) ## #---------------------------------------------------------------------------- diff --git a/sip/gen/apptrait.sip b/sip/gen/apptrait.sip index 0dda8070..4d896cb8 100644 --- a/sip/gen/apptrait.sip +++ b/sip/gen/apptrait.sip @@ -8,7 +8,6 @@ // //--------------------------------------------------------------------------- - //--------------------------------------------------------------------------- class wxAppTraits /Abstract/ diff --git a/sip/gen/colour.sip b/sip/gen/colour.sip index 124bf08d..c0b162e3 100644 --- a/sip/gen/colour.sip +++ b/sip/gen/colour.sip @@ -7,10 +7,9 @@ // This file will be included by _core.sip // //--------------------------------------------------------------------------- - %ModuleCode #ifdef __WXMAC__ - #include + #include #endif #undef wxTransparentColour @@ -166,27 +165,39 @@ public: %Property(name=alpha, get=Alpha) + %TypeCode + wxIntPtr _wxColour_GetPixel(wxColour* self, int& _isErr) + { + return (wxIntPtr)self->GetPixel(); + } + %End wxIntPtr GetPixel(); %MethodCode - sipRes = (wxIntPtr)sipCpp->GetPixel(); + sipRes = _wxColour_GetPixel(sipCpp, sipIsErr); %End - SIP_PYOBJECT Get(bool includeAlpha=true); - %MethodCode + %TypeCode + PyObject* _wxColour_Get(wxColour* self, int& _isErr, bool includeAlpha) + { int red = -1; int green = -1; int blue = -1; int alpha = wxALPHA_OPAQUE; - if (sipCpp->IsOk()) { - red = sipCpp->Red(); - green = sipCpp->Green(); - blue = sipCpp->Blue(); - alpha = sipCpp->Alpha(); + if (self->IsOk()) { + red = self->Red(); + green = self->Green(); + blue = self->Blue(); + alpha = self->Alpha(); } if (includeAlpha) - sipRes = sipBuildResult(&sipIsErr, "(iiii)", red, green, blue, alpha); + return sipBuildResult(&_isErr, "(iiii)", red, green, blue, alpha); else - sipRes = sipBuildResult(&sipIsErr, "(iii)", red, green, blue); + return sipBuildResult(&_isErr, "(iii)", red, green, blue); + } + %End + SIP_PYOBJECT Get(bool includeAlpha=true); + %MethodCode + sipRes = _wxColour_Get(sipCpp, sipIsErr, includeAlpha); %End %ConvertToTypeCode @@ -283,7 +294,7 @@ public: }; // end of class wxColour -%Extract pycode +%Extract(id=pycode) def _Colour___str__(self): return str(self.Get()) Colour.__str__ = _Colour___str__ @@ -291,7 +302,7 @@ del _Colour___str__ %End -%Extract pycode +%Extract(id=pycode) def _Colour___repr__(self): return "wx.Colour"+str(self.Get()) Colour.__repr__ = _Colour___repr__ @@ -299,7 +310,7 @@ del _Colour___repr__ %End -%Extract pycode +%Extract(id=pycode) def _Colour___len__(self): return len(self.Get()) Colour.__len__ = _Colour___len__ @@ -307,7 +318,7 @@ del _Colour___len__ %End -%Extract pycode +%Extract(id=pycode) def _Colour___nonzero__(self): return self.IsOk() Colour.__nonzero__ = _Colour___nonzero__ @@ -315,7 +326,7 @@ del _Colour___nonzero__ %End -%Extract pycode +%Extract(id=pycode) def _Colour___reduce__(self): return (Colour, self.Get()) Colour.__reduce__ = _Colour___reduce__ @@ -323,7 +334,7 @@ del _Colour___reduce__ %End -%Extract pycode +%Extract(id=pycode) def _Colour___getitem__(self, idx): return self.Get()[idx] Colour.__getitem__ = _Colour___getitem__ @@ -331,9 +342,9 @@ del _Colour___getitem__ %End -%Extract pycode +%Extract(id=pycode) def _Colour___setitem__(self, idx, val): - if idx == 0: self.red = val + if idx == 0: self.red = val elif idx == 1: self.green = val elif idx == 2: self.blue = val elif idx == 3: self.alpha = val @@ -343,7 +354,7 @@ del _Colour___setitem__ %End -%Extract pycode +%Extract(id=pycode) Rect.__safe_for_unpickling__ = True %End @@ -363,15 +374,21 @@ const int wxALPHA_TRANSPARENT; const int wxALPHA_OPAQUE; -wxColour MacThemeColour(int themeBrushID) /Factory/; -%MethodCode +%ModuleCode +wxColour* _MacThemeColour_function(int& _isErr, int themeBrushID) +{ #ifdef __WXMAC__ - sipRes = new wxColour(wxMacCreateCGColorFromHITheme(themeBrushID)); + return new wxColour(wxMacCreateCGColorFromHITheme(themeBrushID)); #else wxPyRaiseNotImplemented(); sipIsErr = 1; - sipRes = NULL; + return NULL; #endif +} +%End +wxColour* MacThemeColour(int themeBrushID) /Factory/; +%MethodCode + sipRes = _MacThemeColour_function(sipIsErr, themeBrushID); %End wxColour testColourTypeMap(const wxColour& c); diff --git a/sip/gen/defs.sip b/sip/gen/defs.sip index 4ef539e4..744d48a6 100644 --- a/sip/gen/defs.sip +++ b/sip/gen/defs.sip @@ -7,7 +7,6 @@ // This file will be included by _core.sip // //--------------------------------------------------------------------------- - %ModuleCode #include @@ -20,23 +19,26 @@ //--------------------------------------------------------------------------- -class wxCursor; // forward declaration + // forward declarations + class wxDC; + class wxMenu; + class wxCursor; + class wxBitmap; + class wxWindowList; + class wxSizer; + class wxPalette; + class wxAcceleratorTable; + class wxDropTarget; + class wxCaret; + class wxIcon; + class wxIconBundle; -class wxMenu; // forward declaration +typedef signed char wxInt8 /PyInt/; +typedef unsigned char wxUint8 /PyInt/; -class wxDC; // forward declaration - - -class wxWindow; // forward declaration - - -typedef signed char wxInt8; - -typedef unsigned char wxUint8; - -typedef wxUint8 wxByte; +typedef wxUint8 wxByte /PyInt/; typedef short wxInt16; @@ -62,6 +64,8 @@ typedef long wxIntPtr; typedef unsigned long wxUIntPtr; +typedef unsigned int size_t; + typedef wchar_t wxChar; typedef wchar_t wxUChar; diff --git a/sip/gen/display.sip b/sip/gen/display.sip index 9659bf8f..29c7c41c 100644 --- a/sip/gen/display.sip +++ b/sip/gen/display.sip @@ -13,7 +13,6 @@ %End - //--------------------------------------------------------------------------- class wxDisplay diff --git a/sip/gen/event.sip b/sip/gen/event.sip index e641c7e8..1b5f1d8c 100644 --- a/sip/gen/event.sip +++ b/sip/gen/event.sip @@ -7,7 +7,6 @@ // This file will be included by _core.sip // //--------------------------------------------------------------------------- - %ModuleCode #if !wxUSE_HOTKEY @@ -225,22 +224,34 @@ public: const wxString & string ); - SIP_PYOBJECT GetClientData(); - %MethodCode - wxPyClientData* data = (wxPyClientData*)sipCpp->GetClientObject(); + %TypeCode + PyObject* _wxCommandEvent_GetClientData(wxCommandEvent* self, int& _isErr) + { + wxPyClientData* data = (wxPyClientData*)self->GetClientObject(); if (data) { Py_INCREF(data->m_obj); - sipRes = data->m_obj; + return data->m_obj; } else { Py_INCREF(Py_None); - sipRes = Py_None; + return Py_None; } + } + %End + SIP_PYOBJECT GetClientData(); + %MethodCode + sipRes = _wxCommandEvent_GetClientData(sipCpp, sipIsErr); %End + %TypeCode + void _wxCommandEvent_SetClientData(wxCommandEvent* self, int& _isErr, PyObject* clientData) + { + wxPyClientData* data = new wxPyClientData(clientData); + self->SetClientObject(data); + } + %End void SetClientData(SIP_PYOBJECT clientData); %MethodCode - wxPyClientData* data = new wxPyClientData(clientData); - sipCpp->SetClientObject(data); + _wxCommandEvent_SetClientData(sipCpp, sipIsErr, clientData); %End %Property(name=ClientData, get=GetClientData, set=SetClientData) diff --git a/sip/gen/evtloop.sip b/sip/gen/evtloop.sip index 50284c47..8f3c44f7 100644 --- a/sip/gen/evtloop.sip +++ b/sip/gen/evtloop.sip @@ -8,7 +8,6 @@ // //--------------------------------------------------------------------------- - //--------------------------------------------------------------------------- class wxEventLoopBase /Abstract/ diff --git a/sip/gen/font.sip b/sip/gen/font.sip index c19d4eb2..80af9180 100644 --- a/sip/gen/font.sip +++ b/sip/gen/font.sip @@ -8,7 +8,6 @@ // //--------------------------------------------------------------------------- - //--------------------------------------------------------------------------- class wxFont : wxGDIObject @@ -55,11 +54,9 @@ public: int pointSize, wxFontFamily family, int flags = wxFONTFLAG_DEFAULT, - const wxString & faceName = wxEmptyString, - wxFontEncoding encoding = wxFONTENCODING_DEFAULT - ) /NoDerived/; + const wxString& faceName = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) /NoDerived/; %MethodCode - // YUCK! wxFont* font = wxFont::New(pointSize, family, flags, *faceName, encoding); sipCpp = new sipwxFont(*font); delete font; @@ -379,6 +376,23 @@ enum wxFontEncoding wxFont wxNullFont; +%ModuleCode +wxFont* _FFont_function(int& _isErr, int pointSize, wxFontFamily family, int flags, const wxString* faceName, wxFontEncoding encoding) +{ + wxFont* font = wxFont::New(pointSize, family, flags, *faceName, encoding); + return font; +} +%End +wxFont* FFont( + int pointSize, + wxFontFamily family, + int flags = wxFONTFLAG_DEFAULT, + const wxString& faceName = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) /Factory/; +%MethodCode + sipRes = _FFont_function(sipIsErr, pointSize, family, flags, faceName, encoding); +%End + //--------------------------------------------------------------------------- diff --git a/sip/gen/gdicmn.sip b/sip/gen/gdicmn.sip index 1608a397..a456be25 100644 --- a/sip/gen/gdicmn.sip +++ b/sip/gen/gdicmn.sip @@ -7,7 +7,6 @@ // This file will be included by _core.sip // //--------------------------------------------------------------------------- - %ModuleCode #if !defined(__WXMAC__) #define wxCURSOR_COPY_ARROW wxCURSOR_ARROW @@ -62,9 +61,15 @@ public: int y; + %TypeCode + PyObject* _wxPoint_Get(wxPoint* self, int& _isErr) + { + return sipBuildResult(&_isErr, "(ii)", self->x, self->y); + } + %End SIP_PYOBJECT Get(); %MethodCode - sipRes = sipBuildResult(&sipIsErr, "(ii)", sipCpp->x, sipCpp->y); + sipRes = _wxPoint_Get(sipCpp, sipIsErr); %End %ConvertToTypeCode @@ -102,7 +107,7 @@ public: }; // end of class wxPoint -%Extract pycode +%Extract(id=pycode) def _Point___str__(self): return str(self.Get()) Point.__str__ = _Point___str__ @@ -110,7 +115,7 @@ del _Point___str__ %End -%Extract pycode +%Extract(id=pycode) def _Point___repr__(self): return "wx.Point"+str(self.Get()) Point.__repr__ = _Point___repr__ @@ -118,7 +123,7 @@ del _Point___repr__ %End -%Extract pycode +%Extract(id=pycode) def _Point___len__(self): return len(self.Get()) Point.__len__ = _Point___len__ @@ -126,7 +131,7 @@ del _Point___len__ %End -%Extract pycode +%Extract(id=pycode) def _Point___nonzero__(self): return self.Get() != (0,0) Point.__nonzero__ = _Point___nonzero__ @@ -134,7 +139,7 @@ del _Point___nonzero__ %End -%Extract pycode +%Extract(id=pycode) def _Point___reduce__(self): return (Point, self.Get()) Point.__reduce__ = _Point___reduce__ @@ -142,7 +147,7 @@ del _Point___reduce__ %End -%Extract pycode +%Extract(id=pycode) def _Point___getitem__(self, idx): return self.Get()[idx] Point.__getitem__ = _Point___getitem__ @@ -150,7 +155,7 @@ del _Point___getitem__ %End -%Extract pycode +%Extract(id=pycode) def _Point___setitem__(self, idx, val): if idx == 0: self.x = val elif idx == 1: self.y = val @@ -160,7 +165,7 @@ del _Point___setitem__ %End -%Extract pycode +%Extract(id=pycode) Point.__safe_for_unpickling__ = True %End @@ -284,9 +289,15 @@ public: %Property(name=height, get=GetHeight, set=SetHeight) + %TypeCode + PyObject* _wxSize_Get(wxSize* self, int& _isErr) + { + return sipBuildResult(&_isErr, "(ii)", self->GetWidth(), self->GetHeight()); + } + %End SIP_PYOBJECT Get(); %MethodCode - sipRes = sipBuildResult(&sipIsErr, "(ii)", sipCpp->GetWidth(), sipCpp->GetHeight()); + sipRes = _wxSize_Get(sipCpp, sipIsErr); %End %ConvertToTypeCode @@ -324,7 +335,7 @@ public: }; // end of class wxSize -%Extract pycode +%Extract(id=pycode) def _Size___str__(self): return str(self.Get()) Size.__str__ = _Size___str__ @@ -332,7 +343,7 @@ del _Size___str__ %End -%Extract pycode +%Extract(id=pycode) def _Size___repr__(self): return "wx.Size"+str(self.Get()) Size.__repr__ = _Size___repr__ @@ -340,7 +351,7 @@ del _Size___repr__ %End -%Extract pycode +%Extract(id=pycode) def _Size___len__(self): return len(self.Get()) Size.__len__ = _Size___len__ @@ -348,7 +359,7 @@ del _Size___len__ %End -%Extract pycode +%Extract(id=pycode) def _Size___nonzero__(self): return self.Get() != (0,0) Size.__nonzero__ = _Size___nonzero__ @@ -356,7 +367,7 @@ del _Size___nonzero__ %End -%Extract pycode +%Extract(id=pycode) def _Size___reduce__(self): return (Size, self.Get()) Size.__reduce__ = _Size___reduce__ @@ -364,7 +375,7 @@ del _Size___reduce__ %End -%Extract pycode +%Extract(id=pycode) def _Size___getitem__(self, idx): return self.Get()[idx] Size.__getitem__ = _Size___getitem__ @@ -372,7 +383,7 @@ del _Size___getitem__ %End -%Extract pycode +%Extract(id=pycode) def _Size___setitem__(self, idx, val): if idx == 0: self.width = val elif idx == 1: self.height = val @@ -382,7 +393,7 @@ del _Size___setitem__ %End -%Extract pycode +%Extract(id=pycode) Size.__safe_for_unpickling__ = True %End @@ -579,10 +590,16 @@ public: %Property(name=topRight, get=GetTopRight) + %TypeCode + PyObject* _wxRect_Get(wxRect* self, int& _isErr) + { + return sipBuildResult(&_isErr, "(iiii)", + self->x, self->y, self->width, self->height); + } + %End SIP_PYOBJECT Get(); %MethodCode - sipRes = sipBuildResult(&sipIsErr, "(iiii)", - sipCpp->x, sipCpp->y, sipCpp->width, sipCpp->height); + sipRes = _wxRect_Get(sipCpp, sipIsErr); %End %ConvertToTypeCode @@ -627,7 +644,7 @@ public: }; // end of class wxRect -%Extract pycode +%Extract(id=pycode) def _Rect___str__(self): return str(self.Get()) Rect.__str__ = _Rect___str__ @@ -635,7 +652,7 @@ del _Rect___str__ %End -%Extract pycode +%Extract(id=pycode) def _Rect___repr__(self): return "wx.Rect"+str(self.Get()) Rect.__repr__ = _Rect___repr__ @@ -643,7 +660,7 @@ del _Rect___repr__ %End -%Extract pycode +%Extract(id=pycode) def _Rect___len__(self): return len(self.Get()) Rect.__len__ = _Rect___len__ @@ -651,7 +668,7 @@ del _Rect___len__ %End -%Extract pycode +%Extract(id=pycode) def _Rect___nonzero__(self): return self.Get() != (0,0,0,0) Rect.__nonzero__ = _Rect___nonzero__ @@ -659,7 +676,7 @@ del _Rect___nonzero__ %End -%Extract pycode +%Extract(id=pycode) def _Rect___reduce__(self): return (Rect, self.Get()) Rect.__reduce__ = _Rect___reduce__ @@ -667,7 +684,7 @@ del _Rect___reduce__ %End -%Extract pycode +%Extract(id=pycode) def _Rect___getitem__(self, idx): return self.Get()[idx] Rect.__getitem__ = _Rect___getitem__ @@ -675,7 +692,7 @@ del _Rect___getitem__ %End -%Extract pycode +%Extract(id=pycode) def _Rect___setitem__(self, idx, val): if idx == 0: self.x = val elif idx == 1: self.y = val @@ -687,7 +704,7 @@ del _Rect___setitem__ %End -%Extract pycode +%Extract(id=pycode) Rect.__safe_for_unpickling__ = True %End @@ -737,10 +754,15 @@ public: double y; + %TypeCode + PyObject* _wxRealPoint_Get(wxRealPoint* self, int& _isErr) + { + return sipBuildResult(&_isErr, "(dd)", self->x, self->y); + } + %End SIP_PYOBJECT Get(); %MethodCode - sipRes = sipBuildResult(&sipIsErr, "(dd)", - sipCpp->x, sipCpp->y); + sipRes = _wxRealPoint_Get(sipCpp, sipIsErr); %End %ConvertToTypeCode @@ -778,7 +800,7 @@ public: }; // end of class wxRealPoint -%Extract pycode +%Extract(id=pycode) def _RealPoint___str__(self): return str(self.Get()) RealPoint.__str__ = _RealPoint___str__ @@ -786,7 +808,7 @@ del _RealPoint___str__ %End -%Extract pycode +%Extract(id=pycode) def _RealPoint___repr__(self): return "wx.RealPoint"+str(self.Get()) RealPoint.__repr__ = _RealPoint___repr__ @@ -794,7 +816,7 @@ del _RealPoint___repr__ %End -%Extract pycode +%Extract(id=pycode) def _RealPoint___len__(self): return len(self.Get()) RealPoint.__len__ = _RealPoint___len__ @@ -802,7 +824,7 @@ del _RealPoint___len__ %End -%Extract pycode +%Extract(id=pycode) def _RealPoint___nonzero__(self): return self.Get() != (0,0) RealPoint.__nonzero__ = _RealPoint___nonzero__ @@ -810,7 +832,7 @@ del _RealPoint___nonzero__ %End -%Extract pycode +%Extract(id=pycode) def _RealPoint___reduce__(self): return (Rect, self.Get()) RealPoint.__reduce__ = _RealPoint___reduce__ @@ -818,7 +840,7 @@ del _RealPoint___reduce__ %End -%Extract pycode +%Extract(id=pycode) def _RealPoint___getitem__(self, idx): return self.Get()[idx] RealPoint.__getitem__ = _RealPoint___getitem__ @@ -826,7 +848,7 @@ del _RealPoint___getitem__ %End -%Extract pycode +%Extract(id=pycode) def _RealPoint___setitem__(self, idx, val): if idx == 0: self.x = val elif idx == 1: self.y = val @@ -836,7 +858,7 @@ del _RealPoint___setitem__ %End -%Extract pycode +%Extract(id=pycode) RealPoint.__safe_for_unpickling__ = True %End diff --git a/sip/gen/gdiobj.sip b/sip/gen/gdiobj.sip index 4d4f8681..44b3279a 100644 --- a/sip/gen/gdiobj.sip +++ b/sip/gen/gdiobj.sip @@ -8,7 +8,6 @@ // //--------------------------------------------------------------------------- - //--------------------------------------------------------------------------- class wxGDIObject : wxObject /Abstract/ diff --git a/sip/gen/geometry.sip b/sip/gen/geometry.sip index 94985b1a..7ba913fe 100644 --- a/sip/gen/geometry.sip +++ b/sip/gen/geometry.sip @@ -13,7 +13,6 @@ %End - //--------------------------------------------------------------------------- class wxPoint2DDouble /PyName=Point2D/ @@ -109,9 +108,15 @@ public: const wxPoint2DDouble & pt ); + %TypeCode + PyObject* _wxPoint2DDouble_Get(wxPoint2DDouble* self, int& _isErr) + { + return sipBuildResult(&_isErr, "(dd)", self->m_x, self->m_y); + } + %End SIP_PYOBJECT Get(); %MethodCode - sipRes = sipBuildResult(&sipIsErr, "(dd)", sipCpp->m_x, sipCpp->m_y); + sipRes = _wxPoint2DDouble_Get(sipCpp, sipIsErr); %End %ConvertToTypeCode @@ -149,7 +154,7 @@ public: }; // end of class wxPoint2DDouble -%Extract pycode +%Extract(id=pycode) def _Point2D___str__(self): return str(self.Get()) Point2D.__str__ = _Point2D___str__ @@ -157,7 +162,7 @@ del _Point2D___str__ %End -%Extract pycode +%Extract(id=pycode) def _Point2D___repr__(self): return "wx.Point2D"+str(self.Get()) Point2D.__repr__ = _Point2D___repr__ @@ -165,7 +170,7 @@ del _Point2D___repr__ %End -%Extract pycode +%Extract(id=pycode) def _Point2D___len__(self): return len(self.Get()) Point2D.__len__ = _Point2D___len__ @@ -173,7 +178,7 @@ del _Point2D___len__ %End -%Extract pycode +%Extract(id=pycode) def _Point2D___nonzero__(self): return self.Get() != (0,0) Point2D.__nonzero__ = _Point2D___nonzero__ @@ -181,7 +186,7 @@ del _Point2D___nonzero__ %End -%Extract pycode +%Extract(id=pycode) def _Point2D___reduce__(self): return (Point2D, self.Get()) Point2D.__reduce__ = _Point2D___reduce__ @@ -189,7 +194,7 @@ del _Point2D___reduce__ %End -%Extract pycode +%Extract(id=pycode) def _Point2D___getitem__(self, idx): return self.Get()[idx] Point2D.__getitem__ = _Point2D___getitem__ @@ -197,7 +202,7 @@ del _Point2D___getitem__ %End -%Extract pycode +%Extract(id=pycode) def _Point2D___setitem__(self, idx, val): if idx == 0: self.x = val elif idx == 1: self.y = val @@ -207,7 +212,7 @@ del _Point2D___setitem__ %End -%Extract pycode +%Extract(id=pycode) Point2D.__safe_for_unpickling__ = True %End @@ -433,10 +438,16 @@ public: const wxRect2DDouble & rect ); + %TypeCode + PyObject* _wxRect2DDouble_Get(wxRect2DDouble* self, int& _isErr) + { + return sipBuildResult(&_isErr, "(dddd)", + self->m_x, self->m_y, self->m_width, self->m_height); + } + %End SIP_PYOBJECT Get(); %MethodCode - sipRes = sipBuildResult(&sipIsErr, "(dddd)", - sipCpp->m_x, sipCpp->m_y, sipCpp->m_width, sipCpp->m_height); + sipRes = _wxRect2DDouble_Get(sipCpp, sipIsErr); %End %ConvertToTypeCode @@ -481,7 +492,7 @@ public: }; // end of class wxRect2DDouble -%Extract pycode +%Extract(id=pycode) def _Rect2D___str__(self): return str(self.Get()) Rect2D.__str__ = _Rect2D___str__ @@ -489,7 +500,7 @@ del _Rect2D___str__ %End -%Extract pycode +%Extract(id=pycode) def _Rect2D___repr__(self): return "wx.Rect2D"+str(self.Get()) Rect2D.__repr__ = _Rect2D___repr__ @@ -497,7 +508,7 @@ del _Rect2D___repr__ %End -%Extract pycode +%Extract(id=pycode) def _Rect2D___len__(self): return len(self.Get()) Rect2D.__len__ = _Rect2D___len__ @@ -505,7 +516,7 @@ del _Rect2D___len__ %End -%Extract pycode +%Extract(id=pycode) def _Rect2D___nonzero__(self): return self.Get() != (0,0,0,0) Rect2D.__nonzero__ = _Rect2D___nonzero__ @@ -513,7 +524,7 @@ del _Rect2D___nonzero__ %End -%Extract pycode +%Extract(id=pycode) def _Rect2D___reduce__(self): return (Rect2D, self.Get()) Rect2D.__reduce__ = _Rect2D___reduce__ @@ -521,7 +532,7 @@ del _Rect2D___reduce__ %End -%Extract pycode +%Extract(id=pycode) def _Rect2D___getitem__(self, idx): return self.Get()[idx] Rect2D.__getitem__ = _Rect2D___getitem__ @@ -529,7 +540,7 @@ del _Rect2D___getitem__ %End -%Extract pycode +%Extract(id=pycode) def _Rect2D___setitem__(self, idx, val): if idx == 0: self.x = val elif idx == 1: self.y = val @@ -541,7 +552,7 @@ del _Rect2D___setitem__ %End -%Extract pycode +%Extract(id=pycode) Rect2D.__safe_for_unpickling__ = True %End diff --git a/sip/gen/intl.sip b/sip/gen/intl.sip index 0e9679be..45adf8ad 100644 --- a/sip/gen/intl.sip +++ b/sip/gen/intl.sip @@ -8,7 +8,6 @@ // //--------------------------------------------------------------------------- - //--------------------------------------------------------------------------- struct wxLanguageInfo diff --git a/sip/gen/kbdstate.sip b/sip/gen/kbdstate.sip index 3ab007f9..f5d91ba5 100644 --- a/sip/gen/kbdstate.sip +++ b/sip/gen/kbdstate.sip @@ -8,7 +8,6 @@ // //--------------------------------------------------------------------------- - //--------------------------------------------------------------------------- class wxKeyboardState diff --git a/sip/gen/layout.sip b/sip/gen/layout.sip new file mode 100644 index 00000000..bf2bec32 --- /dev/null +++ b/sip/gen/layout.sip @@ -0,0 +1,217 @@ +//--------------------------------------------------------------------------- +// This file is generated by wxPython's SIP generator. Do not edit by hand. +// +// Copyright: (c) 2010 by Total Control Software +// License: wxWindows License +// +// This file will be included by _core.sip +// +//--------------------------------------------------------------------------- + +//--------------------------------------------------------------------------- + +class wxIndividualLayoutConstraint : wxObject +{ + %TypeHeaderCode + #include + %End + + +public: + wxIndividualLayoutConstraint(); + + virtual + ~wxIndividualLayoutConstraint(); + + void Set( + wxRelationship rel, + wxWindow * otherW, + wxEdge otherE, + int val = 0, + int margin = wxLAYOUT_DEFAULT_MARGIN + ); + + void LeftOf( + wxWindow * sibling, + int margin = wxLAYOUT_DEFAULT_MARGIN + ); + + void RightOf( + wxWindow * sibling, + int margin = wxLAYOUT_DEFAULT_MARGIN + ); + + void Above( + wxWindow * sibling, + int margin = wxLAYOUT_DEFAULT_MARGIN + ); + + void Below( + wxWindow * sibling, + int margin = wxLAYOUT_DEFAULT_MARGIN + ); + + void SameAs( + wxWindow * otherW, + wxEdge edge, + int margin = wxLAYOUT_DEFAULT_MARGIN + ); + + void PercentOf( + wxWindow * otherW, + wxEdge wh, + int per + ); + + void Absolute( + int val + ); + + void Unconstrained(); + + void AsIs(); + + wxWindow * GetOtherWindow(); + %MethodCode + sipRes = (wxWindow*)sipCpp->GetOtherWindow(); + %End + + wxEdge GetMyEdge(); + + void SetEdge( + wxEdge which + ); + + void SetValue( + int v + ); + + int GetMargin(); + + void SetMargin( + int m + ); + + int GetValue(); + + int GetPercent(); + + int GetOtherEdge(); + + bool GetDone(); + + void SetDone( + bool d + ); + + wxRelationship GetRelationship(); + + void SetRelationship( + wxRelationship r + ); + + bool ResetIfWin( + wxWindow * otherW + ); + + bool SatisfyConstraint( + wxLayoutConstraints * constraints, + wxWindow * win + ); + + int GetEdge( + wxEdge which, + wxWindow * thisWin, + wxWindow * other + ); + + %Property(name=Done, get=GetDone, set=SetDone) + + %Property(name=Margin, get=GetMargin, set=SetMargin) + + %Property(name=MyEdge, get=GetMyEdge) + + %Property(name=OtherEdge, get=GetOtherEdge) + + %Property(name=OtherWindow, get=GetOtherWindow) + + %Property(name=Percent, get=GetPercent) + + %Property(name=Relationship, get=GetRelationship, set=SetRelationship) + + %Property(name=Value, get=GetValue, set=SetValue) + +}; // end of class wxIndividualLayoutConstraint + + +class wxLayoutConstraints : wxObject +{ + %TypeHeaderCode + #include + %End + + +public: + wxLayoutConstraints(); + + virtual + ~wxLayoutConstraints(); + + wxIndividualLayoutConstraint left; + + wxIndividualLayoutConstraint top; + + wxIndividualLayoutConstraint right; + + wxIndividualLayoutConstraint bottom; + + wxIndividualLayoutConstraint width; + + wxIndividualLayoutConstraint height; + + wxIndividualLayoutConstraint centreX; + + wxIndividualLayoutConstraint centreY; + + bool SatisfyConstraints( + wxWindow * win, + int * noChanges + ); + + bool AreSatisfied(); + +}; // end of class wxLayoutConstraints + + +enum wxEdge +{ + wxLeft, + wxTop, + wxRight, + wxBottom, + wxWidth, + wxHeight, + wxCentre, + wxCenter, + wxCentreX, + wxCentreY +}; + +enum wxRelationship +{ + wxUnconstrained, + wxAsIs, + wxPercentOf, + wxAbove, + wxBelow, + wxLeftOf, + wxRightOf, + wxSameAs, + wxAbsolute +}; + +const int wxLAYOUT_DEFAULT_MARGIN; + + +//--------------------------------------------------------------------------- + diff --git a/sip/gen/mousestate.sip b/sip/gen/mousestate.sip index f7b230b4..cc761487 100644 --- a/sip/gen/mousestate.sip +++ b/sip/gen/mousestate.sip @@ -8,7 +8,6 @@ // //--------------------------------------------------------------------------- - //--------------------------------------------------------------------------- class wxMouseState : wxKeyboardState diff --git a/sip/gen/object.sip b/sip/gen/object.sip index fe26388b..0c5e605c 100644 --- a/sip/gen/object.sip +++ b/sip/gen/object.sip @@ -8,7 +8,6 @@ // //--------------------------------------------------------------------------- - //--------------------------------------------------------------------------- class wxRefCounter @@ -70,14 +69,26 @@ public: void UnShare(); + %TypeCode + const wxChar* _wxObject_GetClassName(wxObject* self, int& _isErr) + { + return self->GetClassInfo()->GetClassName(); + } + %End const wxChar* GetClassName(); %MethodCode - sipRes = sipCpp->GetClassInfo()->GetClassName(); + sipRes = _wxObject_GetClassName(sipCpp, sipIsErr); %End + %TypeCode + void _wxObject_Destroy(wxObject* self, int& _isErr) + { + delete self; + } + %End void Destroy() /TranserThis/; %MethodCode - delete sipCpp; + _wxObject_Destroy(sipCpp, sipIsErr); %End }; // end of class wxObject diff --git a/sip/gen/platinfo.sip b/sip/gen/platinfo.sip index 1c477f63..0fecba20 100644 --- a/sip/gen/platinfo.sip +++ b/sip/gen/platinfo.sip @@ -8,7 +8,6 @@ // //--------------------------------------------------------------------------- - //--------------------------------------------------------------------------- class wxPlatformInfo diff --git a/sip/gen/region.sip b/sip/gen/region.sip new file mode 100644 index 00000000..524e78b2 --- /dev/null +++ b/sip/gen/region.sip @@ -0,0 +1,256 @@ +//--------------------------------------------------------------------------- +// This file is generated by wxPython's SIP generator. Do not edit by hand. +// +// Copyright: (c) 2010 by Total Control Software +// License: wxWindows License +// +// This file will be included by _core.sip +// +//--------------------------------------------------------------------------- + +//--------------------------------------------------------------------------- + +class wxRegionIterator : wxObject +{ + %TypeHeaderCode + #include + %End + + +public: + wxRegionIterator(); + + wxRegionIterator( + const wxRegion & region + ); + + wxCoord GetH(); + + wxCoord GetHeight(); + + wxRect GetRect(); + + wxCoord GetW(); + + wxCoord GetWidth(); + + wxCoord GetX(); + + wxCoord GetY(); + + bool HaveRects(); + + void Reset(); + + void Reset( + const wxRegion & region + ); + + operator bool(); + + %TypeCode + void _wxRegionIterator_Next(wxRegionIterator* self, int& _isErr) + { + self->operator++(); + } + %End + void Next(); + %MethodCode + _wxRegionIterator_Next(sipCpp, sipIsErr); + %End + + %TypeCode + int _wxRegionIterator___nonzero__(wxRegionIterator* self, int& _isErr) + { + return (int)self->operator bool(); + } + %End + int __nonzero__(); + %MethodCode + sipRes = _wxRegionIterator___nonzero__(sipCpp, sipIsErr); + %End + + %Property(name=H, get=GetH) + + %Property(name=Height, get=GetHeight) + + %Property(name=Rect, get=GetRect) + + %Property(name=W, get=GetW) + + %Property(name=Width, get=GetWidth) + + %Property(name=X, get=GetX) + + %Property(name=Y, get=GetY) + +}; // end of class wxRegionIterator + + +class wxRegion : wxGDIObject +{ + %TypeHeaderCode + #include + %End + + +public: + wxRegion(); + + wxRegion( + wxCoord x, + wxCoord y, + wxCoord width, + wxCoord height + ); + + wxRegion( + const wxPoint & topLeft, + const wxPoint & bottomRight + ); + + wxRegion( + const wxRect & rect + ); + + wxRegion( + const wxRegion & region + ); + + wxRegion( + size_t n, + const wxPoint * points, + wxPolygonFillMode fillStyle = wxODDEVEN_RULE + ); + + wxRegion( + const wxBitmap & bmp + ); + + wxRegion( + const wxBitmap & bmp, + const wxColour & transColour, + int tolerance = 0 + ); + + ~wxRegion(); + + wxRect GetBox(); + + bool Offset( + wxCoord x, + wxCoord y + ); + + bool Offset( + const wxPoint & pt + ); + + void Clear(); + + wxRegionContain Contains( + wxCoord x, + wxCoord y + ); + + wxRegionContain Contains( + const wxPoint & pt + ); + + wxRegionContain Contains( + wxCoord x, + wxCoord y, + wxCoord width, + wxCoord height + ); + + wxRegionContain Contains( + const wxRect & rect + ); + + wxBitmap ConvertToBitmap(); + + bool Intersect( + wxCoord x, + wxCoord y, + wxCoord width, + wxCoord height + ); + + bool Intersect( + const wxRect & rect + ); + + bool Intersect( + const wxRegion & region + ); + + bool IsEmpty(); + + bool IsEqual( + const wxRegion & region + ); + + bool Subtract( + const wxRect & rect + ); + + bool Subtract( + const wxRegion & region + ); + + bool Union( + wxCoord x, + wxCoord y, + wxCoord width, + wxCoord height + ); + + bool Union( + const wxRect & rect + ); + + bool Union( + const wxRegion & region + ); + + bool Union( + const wxBitmap & bmp + ); + + bool Union( + const wxBitmap & bmp, + const wxColour & transColour, + int tolerance = 0 + ); + + bool Xor( + wxCoord x, + wxCoord y, + wxCoord width, + wxCoord height + ); + + bool Xor( + const wxRect & rect + ); + + bool Xor( + const wxRegion & region + ); + + %Property(name=Box, get=GetBox) + +}; // end of class wxRegion + + +enum wxRegionContain +{ + wxOutRegion, + wxPartRegion, + wxInRegion +}; + + +//--------------------------------------------------------------------------- + diff --git a/sip/gen/tooltip.sip b/sip/gen/tooltip.sip new file mode 100644 index 00000000..cb437938 --- /dev/null +++ b/sip/gen/tooltip.sip @@ -0,0 +1,62 @@ +//--------------------------------------------------------------------------- +// This file is generated by wxPython's SIP generator. Do not edit by hand. +// +// Copyright: (c) 2010 by Total Control Software +// License: wxWindows License +// +// This file will be included by _core.sip +// +//--------------------------------------------------------------------------- + +//--------------------------------------------------------------------------- + +class wxToolTip : wxObject +{ + %TypeHeaderCode + #include + %End + + +public: + wxToolTip( + const wxString & tip + ); + + wxString GetTip(); + + wxWindow * GetWindow(); + + void SetTip( + const wxString & tip + ); + + static + void Enable( + bool flag + ); + + static + void SetAutoPop( + long msecs + ); + + static + void SetDelay( + long msecs + ); + + static + void SetReshow( + long msecs + ); + + %Property(name=Tip, get=GetTip, set=SetTip) + + %Property(name=Window, get=GetWindow) + +}; // end of class wxToolTip + + + +//--------------------------------------------------------------------------- + diff --git a/sip/gen/toplevel.sip b/sip/gen/toplevel.sip new file mode 100644 index 00000000..005c1cfe --- /dev/null +++ b/sip/gen/toplevel.sip @@ -0,0 +1,269 @@ +//--------------------------------------------------------------------------- +// This file is generated by wxPython's SIP generator. Do not edit by hand. +// +// Copyright: (c) 2010 by Total Control Software +// License: wxWindows License +// +// This file will be included by _core.sip +// +//--------------------------------------------------------------------------- + +//--------------------------------------------------------------------------- + +class wxTopLevelWindow : wxWindow +{ + %TypeHeaderCode + #include + %End + + +public: + wxTopLevelWindow(); + + wxTopLevelWindow( + wxWindow * parent /TranserThis/, + wxWindowID id = wxID_ANY, + const wxString & title = wxEmptyString, + const wxPoint & pos = wxDefaultPosition, + const wxSize & size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString & name = wxFrameNameStr + ); + + virtual + ~wxTopLevelWindow(); + + bool Create( + wxWindow * parent /TranserThis/, + wxWindowID id = wxID_ANY, + const wxString & title = wxEmptyString, + const wxPoint & pos = wxDefaultPosition, + const wxSize & size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString & name = wxFrameNameStr + ); + + virtual + bool CanSetTransparent(); + + void CenterOnScreen( + int direction + ); + + void CentreOnScreen( + int direction = wxBOTH + ); + + virtual + bool EnableCloseButton( + bool enable = true + ); + + wxWindow * GetDefaultItem(); + + wxIcon GetIcon(); + + const wxIconBundle & GetIcons(); + + virtual + wxString GetTitle(); + + virtual + void Iconize( + bool iconize = true + ); + + virtual + bool IsActive(); + + virtual + bool IsAlwaysMaximized(); + + virtual + bool IsFullScreen(); + + virtual + bool IsIconized(); + + virtual + bool IsMaximized(); + + virtual + bool Layout(); + + virtual + void Maximize( + bool maximize = true + ); + + virtual + void RequestUserAttention( + int flags = wxUSER_ATTENTION_INFO + ); + + wxWindow * SetDefaultItem( + wxWindow * win + ); + + wxWindow * SetTmpDefaultItem( + wxWindow * win + ); + + wxWindow * GetTmpDefaultItem(); + + void SetIcon( + const wxIcon & icon + ); + + virtual + void SetIcons( + const wxIconBundle & icons + ); + + virtual + void SetMaxSize( + const wxSize & size + ); + + virtual + void SetMinSize( + const wxSize & size + ); + + virtual + bool SetShape( + const wxRegion & region + ); + + virtual + void SetSizeHints( + int minW, + int minH, + int maxW = -1, + int maxH = -1, + int incW = -1, + int incH = -1 + ); + + virtual + void SetSizeHints( + const wxSize & minSize, + const wxSize & maxSize = wxDefaultSize, + const wxSize & incSize = wxDefaultSize + ); + + virtual + void SetTitle( + const wxString & title + ); + + virtual + bool SetTransparent( + wxByte alpha + ); + + virtual + bool ShouldPreventAppExit(); + + virtual + void OSXSetModified( + bool modified + ); + + virtual + bool OSXIsModified(); + + virtual + bool ShowFullScreen( + bool show, + long style = wxFULLSCREEN_ALL + ); + + static + wxSize GetDefaultSize(); + + %TypeCode + void _wxTopLevelWindow_MacSetMetalAppearance(wxTopLevelWindow* self, int& _isErr, bool on) + { + int style = self->GetExtraStyle(); + if ( on ) + style |= wxFRAME_EX_METAL; + else + style &= ~wxFRAME_EX_METAL; + self->SetExtraStyle(style); + } + %End + void MacSetMetalAppearance(bool on); + %MethodCode + _wxTopLevelWindow_MacSetMetalAppearance(sipCpp, sipIsErr, on); + %End + + %TypeCode + bool _wxTopLevelWindow_MacGetMetalAppearance(wxTopLevelWindow* self, int& _isErr) + { + return self->GetExtraStyle() & wxFRAME_EX_METAL; + } + %End + bool MacGetMetalAppearance(); + %MethodCode + sipRes = _wxTopLevelWindow_MacGetMetalAppearance(sipCpp, sipIsErr); + %End + + %TypeCode + bool _wxTopLevelWindow_MacGetUnifiedAppearance(wxTopLevelWindow* self, int& _isErr) + { + return true; + } + %End + bool MacGetUnifiedAppearance(); + %MethodCode + sipRes = _wxTopLevelWindow_MacGetUnifiedAppearance(sipCpp, sipIsErr); + %End + + %TypeCode + void* _wxTopLevelWindow_MacGetTopLevelWindowRef(wxTopLevelWindow* self, int& _isErr) + { + #ifdef __WXMAC__ + return (void*)(self->MacGetTopLevelWindowRef()); + #else + return 0; + #endif + } + %End + void* MacGetTopLevelWindowRef(); + %MethodCode + sipRes = _wxTopLevelWindow_MacGetTopLevelWindowRef(sipCpp, sipIsErr); + %End + + %Property(name=DefaultItem, get=GetDefaultItem, set=SetDefaultItem) + + %Property(name=Icon, get=GetIcon, set=SetIcon) + + %Property(name=Title, get=GetTitle, set=SetTitle) + + %Property(name=TmpDefaultItem, get=GetTmpDefaultItem, set=SetTmpDefaultItem) + + %Property(name=OSXModified, get=OSXIsModified, set=OSXSetModified) + +}; // end of class wxTopLevelWindow + + +enum +{ + wxUSER_ATTENTION_INFO, + wxUSER_ATTENTION_ERROR +}; + +enum +{ + wxFULLSCREEN_NOMENUBAR, + wxFULLSCREEN_NOTOOLBAR, + wxFULLSCREEN_NOSTATUSBAR, + wxFULLSCREEN_NOBORDER, + wxFULLSCREEN_NOCAPTION, + wxFULLSCREEN_ALL +}; + + +//--------------------------------------------------------------------------- + diff --git a/sip/gen/tracker.sip b/sip/gen/tracker.sip index 9a98727a..8e98675b 100644 --- a/sip/gen/tracker.sip +++ b/sip/gen/tracker.sip @@ -8,7 +8,6 @@ // //--------------------------------------------------------------------------- - //--------------------------------------------------------------------------- class wxTrackable /Abstract/ diff --git a/sip/gen/validate.sip b/sip/gen/validate.sip new file mode 100644 index 00000000..f5d4ee93 --- /dev/null +++ b/sip/gen/validate.sip @@ -0,0 +1,58 @@ +//--------------------------------------------------------------------------- +// This file is generated by wxPython's SIP generator. Do not edit by hand. +// +// Copyright: (c) 2010 by Total Control Software +// License: wxWindows License +// +// This file will be included by _core.sip +// +//--------------------------------------------------------------------------- + +//--------------------------------------------------------------------------- + +class wxValidator : wxEvtHandler +{ + %TypeHeaderCode + #include + %End + + +public: + wxValidator(); + + virtual + ~wxValidator(); + + virtual + wxObject * Clone(); + + wxWindow * GetWindow(); + + void SetWindow( + wxWindow * window + ); + + virtual + bool TransferFromWindow(); + + virtual + bool TransferToWindow(); + + virtual + bool Validate( + wxWindow * parent + ); + + static + void SuppressBellOnError( + bool suppress = true + ); + +}; // end of class wxValidator + + +const wxValidator wxDefaultValidator; + + +//--------------------------------------------------------------------------- + diff --git a/sip/gen/vidmode.sip b/sip/gen/vidmode.sip index 043a301c..29cfac33 100644 --- a/sip/gen/vidmode.sip +++ b/sip/gen/vidmode.sip @@ -8,7 +8,6 @@ // //--------------------------------------------------------------------------- - //--------------------------------------------------------------------------- struct wxVideoMode diff --git a/sip/gen/window.sip b/sip/gen/window.sip new file mode 100644 index 00000000..3b60706a --- /dev/null +++ b/sip/gen/window.sip @@ -0,0 +1,1273 @@ +//--------------------------------------------------------------------------- +// This file is generated by wxPython's SIP generator. Do not edit by hand. +// +// Copyright: (c) 2010 by Total Control Software +// License: wxWindows License +// +// This file will be included by _core.sip +// +//--------------------------------------------------------------------------- + +//--------------------------------------------------------------------------- + +struct wxVisualAttributes +{ + %TypeHeaderCode + #include + %End + + wxFont font; + + wxColour colFg; + + wxColour colBg; + +}; // end of class wxVisualAttributes + + +class wxWindow : wxEvtHandler +{ + %TypeHeaderCode + #include + %End + + %TypeCode + + #ifdef __WXMSW__ + #include + #endif + + #ifdef __WXGTK__ + #include + #include + #define GetXWindow(wxwin) (wxwin)->m_wxwindow ? \ + GDK_WINDOW_XWINDOW((wxwin)->m_wxwindow->window) : \ + GDK_WINDOW_XWINDOW((wxwin)->m_widget->window) + #endif + + + + + + void* wxPyGetWinHandle(wxWindow* win) + { + #ifdef __WXMSW__ + return (void*)win->GetHandle(); + #endif + #if defined(__WXGTK__) || defined(__WXX11__) + return (void*)GetXWindow(win); + #endif + #ifdef __WXMAC__ + return (void*)win->GetHandle(); + #endif + return 0; + } + %End + +public: + wxWindow(); + + wxWindow( + wxWindow * parent /TranserThis/, + wxWindowID id = wxID_ANY, + const wxPoint & pos = wxDefaultPosition, + const wxSize & size = wxDefaultSize, + long style = 0, + const wxString & name = wxPanelNameStr + ); + + virtual + ~wxWindow(); + + virtual + bool AcceptsFocus(); + + virtual + bool AcceptsFocusFromKeyboard(); + + virtual + bool AcceptsFocusRecursively(); + + virtual + bool HasFocus(); + + virtual + void SetCanFocus( + bool canFocus + ); + + virtual + void SetFocus(); + + virtual + void SetFocusFromKbd(); + + virtual + void AddChild( + wxWindow * child + ); + + bool DestroyChildren(); + + wxWindow * FindWindow( + long id + ); + + wxWindow * FindWindow( + const wxString & name + ); + + wxWindowList & GetChildren(); + + virtual + void RemoveChild( + wxWindow * child + ); + + wxWindow * GetGrandParent(); + + wxWindow * GetNextSibling(); + + wxWindow * GetParent(); + + wxWindow * GetPrevSibling(); + + virtual + bool Reparent( + wxWindow * newParent + ); + + virtual + void AlwaysShowScrollbars( + bool hflag = true, + bool vflag = true + ); + + virtual + int GetScrollPos( + int orientation + ); + + virtual + int GetScrollRange( + int orientation + ); + + virtual + int GetScrollThumb( + int orientation + ); + + bool CanScroll( + int orient + ); + + bool HasScrollbar( + int orient + ); + + virtual + bool IsScrollbarAlwaysShown( + int orient + ); + + virtual + bool ScrollLines( + int lines + ); + + virtual + bool ScrollPages( + int pages + ); + + virtual + void ScrollWindow( + int dx, + int dy, + const wxRect * rect = NULL + ); + + bool LineUp(); + + bool LineDown(); + + bool PageUp(); + + bool PageDown(); + + virtual + void SetScrollPos( + int orientation, + int pos, + bool refresh = true + ); + + virtual + void SetScrollbar( + int orientation, + int position, + int thumbSize, + int range, + bool refresh = true + ); + + void CacheBestSize( + const wxSize & size + ); + + virtual + wxSize ClientToWindowSize( + const wxSize & size + ); + + virtual + wxSize WindowToClientSize( + const wxSize & size + ); + + virtual + void Fit(); + + virtual + void FitInside(); + + wxSize GetBestSize(); + + wxSize GetClientSize(); + + virtual + wxSize GetEffectiveMinSize(); + + virtual + wxSize GetMaxClientSize(); + + virtual + wxSize GetMaxSize(); + + virtual + wxSize GetMinClientSize(); + + virtual + wxSize GetMinSize(); + + int GetMinWidth(); + + int GetMinHeight(); + + int GetMaxWidth(); + + int GetMaxHeight(); + + wxSize GetSize(); + + wxSize GetVirtualSize(); + + virtual + wxSize GetBestVirtualSize(); + + virtual + wxSize GetWindowBorderSize(); + + virtual + bool InformFirstDirection( + int direction, + int size, + int availableOtherDir + ); + + void InvalidateBestSize(); + + void PostSizeEvent(); + + void PostSizeEventToParent(); + + virtual + void SendSizeEvent( + int flags = 0 + ); + + void SendSizeEventToParent( + int flags = 0 + ); + + void SetClientSize( + int width, + int height + ); + + void SetClientSize( + const wxSize & size + ); + + void SetClientSize( + const wxRect & rect + ) /PyName=SetClientRect/; + + void SetContainingSizer( + wxSizer * sizer + ); + + void SetInitialSize( + const wxSize & size = wxDefaultSize + ); + + virtual + void SetMaxClientSize( + const wxSize & size + ); + + virtual + void SetMaxSize( + const wxSize & size + ); + + virtual + void SetMinClientSize( + const wxSize & size + ); + + virtual + void SetMinSize( + const wxSize & size + ); + + void SetSize( + int x, + int y, + int width, + int height, + int sizeFlags = wxSIZE_AUTO + ); + + void SetSize( + const wxRect & rect + ) /PyName=SetRect/; + + void SetSize( + const wxSize & size + ); + + void SetSize( + int width, + int height + ); + + virtual + void SetSizeHints( + const wxSize & minSize, + const wxSize & maxSize = wxDefaultSize, + const wxSize & incSize = wxDefaultSize + ); + + virtual + void SetSizeHints( + int minW, + int minH, + int maxW = -1, + int maxH = -1, + int incW = -1, + int incH = -1 + ); + + void SetVirtualSize( + int width, + int height + ); + + void SetVirtualSize( + const wxSize & size + ); + + void Center( + int dir = wxBOTH + ); + + void CenterOnParent( + int dir = wxBOTH + ); + + void Centre( + int direction = wxBOTH + ); + + void CentreOnParent( + int direction = wxBOTH + ); + + wxPoint GetPosition(); + + wxRect GetRect(); + + wxPoint GetScreenPosition(); + + wxRect GetScreenRect(); + + virtual + wxPoint GetClientAreaOrigin(); + + wxRect GetClientRect(); + + void Move( + int x, + int y, + int flags = wxSIZE_USE_EXISTING + ); + + void Move( + const wxPoint & pt, + int flags = wxSIZE_USE_EXISTING + ); + + void SetPosition( + const wxPoint & pt + ); + + wxPoint ClientToScreen( + const wxPoint & pt + ); + + wxPoint ConvertDialogToPixels( + const wxPoint & pt + ); + + wxSize ConvertDialogToPixels( + const wxSize & sz + ); + + wxPoint ConvertPixelsToDialog( + const wxPoint & pt + ); + + wxSize ConvertPixelsToDialog( + const wxSize & sz + ); + + wxPoint ScreenToClient( + const wxPoint & pt + ); + + virtual + void ClearBackground(); + + void Freeze(); + + void Thaw(); + + bool IsFrozen(); + + wxColour GetBackgroundColour(); + + virtual + wxBackgroundStyle GetBackgroundStyle(); + + virtual + int GetCharHeight(); + + virtual + int GetCharWidth(); + + virtual + wxVisualAttributes GetDefaultAttributes(); + + wxFont GetFont(); + + wxColour GetForegroundColour(); + + void GetTextExtent( + const wxString & string, + int * w /Out/, + int * h /Out/, + int * descent /Out/ = NULL, + int * externalLeading /Out/ = NULL, + const wxFont * font = NULL + ) /PyName=GetFullTextExtent/; + + wxSize GetTextExtent( + const wxString & string + ); + + const wxRegion & GetUpdateRegion(); + + wxRect GetUpdateClientRect(); + + virtual + bool HasTransparentBackground(); + + virtual + void Refresh( + bool eraseBackground = true, + const wxRect * rect = NULL + ); + + void RefreshRect( + const wxRect & rect, + bool eraseBackground = true + ); + + virtual + void Update(); + + virtual + bool SetBackgroundColour( + const wxColour & colour + ); + + virtual + bool SetBackgroundStyle( + wxBackgroundStyle style + ); + + virtual + bool SetFont( + const wxFont & font + ); + + virtual + bool SetForegroundColour( + const wxColour & colour + ); + + void SetOwnBackgroundColour( + const wxColour & colour + ); + + void SetOwnFont( + const wxFont & font + ); + + void SetOwnForegroundColour( + const wxColour & colour + ); + + void SetPalette( + const wxPalette & pal + ); + + virtual + bool ShouldInheritColours(); + + virtual + void SetThemeEnabled( + bool enable + ); + + virtual + bool GetThemeEnabled(); + + virtual + bool CanSetTransparent(); + + virtual + bool SetTransparent( + wxByte alpha + ); + + wxEvtHandler * GetEventHandler(); + + bool HandleAsNavigationKey( + const wxKeyEvent & event + ); + + bool HandleWindowEvent( + wxEvent & event + ); + + bool ProcessWindowEvent( + wxEvent & event + ); + + bool ProcessWindowEventLocally( + wxEvent & event + ); + + wxEvtHandler * PopEventHandler( + bool deleteHandler = false + ); + + void PushEventHandler( + wxEvtHandler * handler + ); + + bool RemoveEventHandler( + wxEvtHandler * handler + ); + + void SetEventHandler( + wxEvtHandler * handler + ); + + virtual + void SetNextHandler( + wxEvtHandler * handler + ); + + virtual + void SetPreviousHandler( + wxEvtHandler * handler + ); + + long GetExtraStyle(); + + virtual + long GetWindowStyleFlag(); + + long GetWindowStyle(); + + bool HasExtraStyle( + int exFlag + ); + + bool HasFlag( + int flag + ); + + virtual + void SetExtraStyle( + long exStyle + ); + + virtual + void SetWindowStyleFlag( + long style + ); + + void SetWindowStyle( + long style + ); + + bool ToggleWindowStyle( + int flag + ); + + void MoveAfterInTabOrder( + wxWindow * win + ); + + void MoveBeforeInTabOrder( + wxWindow * win + ); + + bool Navigate( + int flags = wxNavigationKeyEvent::IsForward + ); + + bool NavigateIn( + int flags = wxNavigationKeyEvent::IsForward + ); + + virtual + void Lower(); + + virtual + void Raise(); + + bool Hide(); + + virtual + bool HideWithEffect( + wxShowEffect effect, + unsigned int timeout = 0 + ); + + bool IsEnabled(); + + bool IsExposed( + int x, + int y + ); + + bool IsExposed( + wxPoint & pt + ); + + bool IsExposed( + int x, + int y, + int w, + int h + ); + + bool IsExposed( + wxRect & rect + ); + + virtual + bool IsShown(); + + virtual + bool IsShownOnScreen(); + + bool Disable(); + + virtual + bool Enable( + bool enable = true + ); + + virtual + bool Show( + bool show = true + ); + + virtual + bool ShowWithEffect( + wxShowEffect effect, + unsigned int timeout = 0 + ); + + wxString GetHelpText(); + + void SetHelpText( + const wxString & helpText + ); + + virtual + wxString GetHelpTextAtPoint( + const wxPoint & point, + wxHelpEvent::Origin origin + ); + + wxToolTip * GetToolTip(); + + wxString GetToolTipText(); + + void SetToolTip( + const wxString & tip /Transfer/ + ); + + void SetToolTip( + wxToolTip * tip + ); + + void UnsetToolTip(); + + int GetPopupMenuSelectionFromUser( + wxMenu & menu, + const wxPoint & pos = wxDefaultPosition + ); + + int GetPopupMenuSelectionFromUser( + wxMenu & menu, + int x, + int y + ); + + bool PopupMenu( + wxMenu * menu, + const wxPoint & pos = wxDefaultPosition + ); + + bool PopupMenu( + wxMenu * menu, + int x, + int y + ); + + virtual + wxValidator * GetValidator(); + + virtual + void SetValidator( + const wxValidator & validator + ); + + virtual + bool TransferDataFromWindow(); + + virtual + bool TransferDataToWindow(); + + virtual + bool Validate(); + + wxWindowID GetId(); + + virtual + wxString GetLabel(); + + virtual + wxLayoutDirection GetLayoutDirection(); + + virtual + wxString GetName(); + + wxWindowVariant GetWindowVariant(); + + void SetId( + wxWindowID winid + ); + + virtual + void SetLabel( + const wxString & label + ); + + virtual + void SetLayoutDirection( + wxLayoutDirection dir + ); + + virtual + void SetName( + const wxString & name + ); + + void SetWindowVariant( + wxWindowVariant variant + ); + + wxAcceleratorTable * GetAcceleratorTable(); + + virtual + void SetAcceleratorTable( + const wxAcceleratorTable & accel + ); + + bool Close( + bool force = false + ); + + virtual + bool Destroy(); + + bool IsBeingDeleted(); + + virtual + wxDropTarget * GetDropTarget(); + + virtual + void SetDropTarget( + wxDropTarget * target /Transfer/ + ); + + virtual + void DragAcceptFiles( + bool accept + ); + + wxSizer * GetContainingSizer(); + + wxSizer * GetSizer(); + + void SetSizer( + wxSizer * sizer /Transfer/, + bool deleteOld = true + ); + + void SetSizerAndFit( + wxSizer * sizer /Transfer/, + bool deleteOld = true + ); + + wxLayoutConstraints * GetConstraints(); + + void SetConstraints( + wxLayoutConstraints * constraints /Transfer/ + ); + + virtual + bool Layout(); + + void SetAutoLayout( + bool autoLayout + ); + + bool GetAutoLayout(); + + void CaptureMouse(); + + wxCaret * GetCaret(); + + const wxCursor & GetCursor(); + + virtual + bool HasCapture(); + + void ReleaseMouse(); + + void SetCaret( + wxCaret * caret /Transfer/ + ); + + virtual + bool SetCursor( + const wxCursor & cursor + ); + + virtual + void WarpPointer( + int x, + int y + ); + + wxHitTest HitTest( + wxCoord x, + wxCoord y + ); + + wxHitTest HitTest( + const wxPoint & pt + ); + + wxBorder GetBorder( + long flags + ); + + wxBorder GetBorder(); + + virtual + void DoUpdateWindowUI( + wxUpdateUIEvent & event + ); + + virtual + void* GetHandle(); + %MethodCode + sipRes = wxPyGetWinHandle(sipCpp); + %End + + virtual + bool HasMultiplePages(); + + virtual + void InheritAttributes(); + + virtual + void InitDialog(); + + virtual + bool IsDoubleBuffered(); + + void SetDoubleBuffered( + bool on + ); + %MethodCode + #if defined(__WXGTK20__) || defined(__WXMSW__) + sipCpp->SetDoubleBuffered(on); + #endif + %End + + virtual + bool IsRetained(); + + bool IsThisEnabled(); + + virtual + bool IsTopLevel(); + + virtual + void MakeModal( + bool modal = true + ); + + virtual + void OnInternalIdle(); + + bool RegisterHotKey( + int hotkeyId, + int modifiers, + int virtualKeyCode + ); + %MethodCode + #ifdef __WXMSW__ + sipRes = sipCpp->RegisterHotKey(hotkeyId, modifiers, virtualKeyCode); + #else + sipRes = false; + #endif + %End + + bool UnregisterHotKey( + int hotkeyId + ); + %MethodCode + #ifdef __WXMSW__ + sipRes = sipCpp->UnregisterHotKey(hotkeyId); + #else + sipRes = false; + #endif + %End + + virtual + void UpdateWindowUI( + long flags = wxUPDATE_UI_NONE + ); + + static + wxVisualAttributes GetClassDefaultAttributes( + wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL + ); + + static + wxWindow * FindFocus(); + + static + wxWindow * FindWindowById( + long id, + const wxWindow * parent = 0 + ); + + static + wxWindow * FindWindowByLabel( + const wxString & label, + const wxWindow * parent = 0 + ); + + static + wxWindow * FindWindowByName( + const wxString & name, + const wxWindow * parent = 0 + ); + + static + wxWindow * GetCapture(); + + static + wxWindowID NewControlId( + int count = 1 + ); + + static + void UnreserveControlId( + wxWindowID id, + int count = 1 + ); + + bool Create( + wxWindow * parent /TranserThis/, + wxWindowID id = wxID_ANY, + const wxPoint & pos = wxDefaultPosition, + const wxSize & size = wxDefaultSize, + long style = 0, + const wxString & name = wxPanelNameStr + ); + + %TypeCode + void* _wxWindow_GetGtkWidget(wxWindow* self, int& _isErr) + { + #ifdef __WXGTK__ + return (void*)self->GetHandle(); + #else + return NULL; + #endif + } + %End + void* GetGtkWidget(); + %MethodCode + sipRes = _wxWindow_GetGtkWidget(sipCpp, sipIsErr); + %End + + %TypeCode + wxWindow* _wxWindow_GetTopLevelParent(wxWindow* self, int& _isErr) + { + return wxGetTopLevelParent(self); + } + %End + wxWindow* GetTopLevelParent(); + %MethodCode + sipRes = _wxWindow_GetTopLevelParent(sipCpp, sipIsErr); + %End + + %TypeCode + bool _wxWindow_MacIsWindowScrollbar(wxWindow* self, int& _isErr, const wxWindow* sb) + { + #ifdef __WXMAC__ + return self->MacIsWindowScrollbar(sb); + #else + return false; + #endif + } + %End + bool MacIsWindowScrollbar(const wxWindow* sb); + %MethodCode + sipRes = _wxWindow_MacIsWindowScrollbar(sipCpp, sipIsErr, sb); + %End + + %Property(name=AcceleratorTable, get=GetAcceleratorTable, set=SetAcceleratorTable) + + %Property(name=AutoLayout, get=GetAutoLayout, set=SetAutoLayout) + + %Property(name=BackgroundColour, get=GetBackgroundColour, set=SetBackgroundColour) + + %Property(name=BackgroundStyle, get=GetBackgroundStyle, set=SetBackgroundStyle) + + %Property(name=EffectiveMinSize, get=GetEffectiveMinSize) + + %Property(name=BestSize, get=GetBestSize) + + %Property(name=BestVirtualSize, get=GetBestVirtualSize) + + %Property(name=Border, get=GetBorder) + + %Property(name=Caret, get=GetCaret, set=SetCaret) + + %Property(name=CharHeight, get=GetCharHeight) + + %Property(name=CharWidth, get=GetCharWidth) + + %Property(name=Children, get=GetChildren) + + %Property(name=ClientAreaOrigin, get=GetClientAreaOrigin) + + %Property(name=ClientRect, get=GetClientRect, set=SetClientRect) + + %Property(name=ClientSize, get=GetClientSize, set=SetClientSize) + + %Property(name=Constraints, get=GetConstraints, set=SetConstraints) + + %Property(name=ContainingSizer, get=GetContainingSizer, set=SetContainingSizer) + + %Property(name=Cursor, get=GetCursor, set=SetCursor) + + %Property(name=DefaultAttributes, get=GetDefaultAttributes) + + %Property(name=DropTarget, get=GetDropTarget, set=SetDropTarget) + + %Property(name=EventHandler, get=GetEventHandler, set=SetEventHandler) + + %Property(name=ExtraStyle, get=GetExtraStyle, set=SetExtraStyle) + + %Property(name=Font, get=GetFont, set=SetFont) + + %Property(name=ForegroundColour, get=GetForegroundColour, set=SetForegroundColour) + + %Property(name=GrandParent, get=GetGrandParent) + + %Property(name=TopLevelParent, get=GetTopLevelParent) + + %Property(name=Handle, get=GetHandle) + + %Property(name=HelpText, get=GetHelpText, set=SetHelpText) + + %Property(name=Id, get=GetId, set=SetId) + + %Property(name=Label, get=GetLabel, set=SetLabel) + + %Property(name=LayoutDirection, get=GetLayoutDirection, set=SetLayoutDirection) + + %Property(name=MaxHeight, get=GetMaxHeight) + + %Property(name=MaxSize, get=GetMaxSize, set=SetMaxSize) + + %Property(name=MaxWidth, get=GetMaxWidth) + + %Property(name=MinHeight, get=GetMinHeight) + + %Property(name=MinSize, get=GetMinSize, set=SetMinSize) + + %Property(name=MinWidth, get=GetMinWidth) + + %Property(name=Name, get=GetName, set=SetName) + + %Property(name=Parent, get=GetParent) + + %Property(name=Position, get=GetPosition, set=SetPosition) + + %Property(name=Rect, get=GetRect, set=SetRect) + + %Property(name=ScreenPosition, get=GetScreenPosition) + + %Property(name=ScreenRect, get=GetScreenRect) + + %Property(name=Size, get=GetSize, set=SetSize) + + %Property(name=Sizer, get=GetSizer, set=SetSizer) + + %Property(name=ThemeEnabled, get=GetThemeEnabled, set=SetThemeEnabled) + + %Property(name=ToolTip, get=GetToolTip, set=SetToolTip) + + %Property(name=UpdateClientRect, get=GetUpdateClientRect) + + %Property(name=UpdateRegion, get=GetUpdateRegion) + + %Property(name=Validator, get=GetValidator, set=SetValidator) + + %Property(name=VirtualSize, get=GetVirtualSize, set=SetVirtualSize) + + %Property(name=WindowStyle, get=GetWindowStyle, set=SetWindowStyle) + + %Property(name=WindowStyleFlag, get=GetWindowStyleFlag, set=SetWindowStyleFlag) + + %Property(name=WindowVariant, get=GetWindowVariant, set=SetWindowVariant) + + %Property(name=Shown, get=IsShown, set=Show) + + %Property(name=Enabled, get=IsEnabled, set=Enable) + + %Property(name=TopLevel, get=IsTopLevel) + + %Property(name=MinClientSize, get=GetMinClientSize, set=SetMinClientSize) + + %Property(name=MaxClientSize, get=GetMaxClientSize, set=SetMaxClientSize) + + +protected: + virtual + void DoCentre( + int direction + ); + + virtual + wxSize DoGetBestSize(); + + virtual + void SetInitialBestSize( + const wxSize & size + ); + + void SendDestroyEvent(); + + virtual + bool ProcessEvent( + wxEvent & event + ); + +}; // end of class wxWindow + + +%Extract(id=pycode) +def _Window_PostCreate(): + pass +Window.PostCreate = _Window_PostCreate +del _Window_PostCreate + +%End + +enum wxShowEffect +{ + wxSHOW_EFFECT_NONE, + wxSHOW_EFFECT_ROLL_TO_LEFT, + wxSHOW_EFFECT_ROLL_TO_RIGHT, + wxSHOW_EFFECT_ROLL_TO_TOP, + wxSHOW_EFFECT_ROLL_TO_BOTTOM, + wxSHOW_EFFECT_SLIDE_TO_LEFT, + wxSHOW_EFFECT_SLIDE_TO_RIGHT, + wxSHOW_EFFECT_SLIDE_TO_TOP, + wxSHOW_EFFECT_SLIDE_TO_BOTTOM, + wxSHOW_EFFECT_BLEND, + wxSHOW_EFFECT_EXPAND +}; + +enum wxWindowVariant +{ + wxWINDOW_VARIANT_NORMAL, + wxWINDOW_VARIANT_SMALL, + wxWINDOW_VARIANT_MINI, + wxWINDOW_VARIANT_LARGE, + wxWINDOW_VARIANT_MAX +}; + +wxWindow * wxFindWindowAtPointer( + wxPoint & pt +); + +wxWindow * wxGetActiveWindow(); + +wxWindow * wxGetTopLevelParent( + wxWindow * window +); + + +//--------------------------------------------------------------------------- + diff --git a/sip/gen/windowid.sip b/sip/gen/windowid.sip index c6124602..900c1db8 100644 --- a/sip/gen/windowid.sip +++ b/sip/gen/windowid.sip @@ -8,7 +8,6 @@ // //--------------------------------------------------------------------------- - //--------------------------------------------------------------------------- class wxIdManager