X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d14a1e28567de23c586bc80017073d0c39f8d18f..5020e71e3def44f53aed389b5a09d4ec3cd1155d:/wxPython/src/_misc.i diff --git a/wxPython/src/_misc.i b/wxPython/src/_misc.i index d2f040c223..a1f6e305f1 100644 --- a/wxPython/src/_misc.i +++ b/wxPython/src/_misc.i @@ -18,6 +18,7 @@ %newgroup +#ifndef __WXX11__ class wxToolTip : public wxObject { public: wxToolTip(const wxString &tip); @@ -30,6 +31,7 @@ public: static void Enable(bool flag); static void SetDelay(long milliseconds); }; +#endif //--------------------------------------------------------------------------- @@ -40,19 +42,29 @@ public: bool IsOk(); bool IsVisible(); - %name(GetPositionTuple)void GetPosition(int *OUTPUT, int *OUTPUT); + wxPoint GetPosition(); - %name(GetSizeTuple)void GetSize(int *OUTPUT, int *OUTPUT); + DocDeclAName( + void, GetPosition(int *OUTPUT, int *OUTPUT), + "GetPositionTuple() -> (x,y)", + GetPositionTuple); + wxSize GetSize(); + DocDeclAName( + void, GetSize( int *OUTPUT, int *OUTPUT ), + "GetSizeTuple() -> (width, height)", + GetSizeTuple); + + wxWindow *GetWindow(); %name(MoveXY)void Move(int x, int y); void Move(const wxPoint& pt); %name(SetSizeWH) void SetSize(int width, int height); void SetSize(const wxSize& size); - void Show(int show = TRUE); + void Show(int show = True); void Hide(); - %pragma(python) addtoclass = "def __nonzero__(self): return self.IsOk()" + %pythoncode { def __nonzero__(self): return self.IsOk() } }; %inline %{ @@ -142,7 +154,7 @@ public: wxString GetHistoryFile(int i) const; int GetCount() const; - %pragma(python) addtoclass = "GetNoHistoryFiles = GetCount" + %pythoncode { GetNoHistoryFiles = GetCount } }; @@ -173,7 +185,7 @@ public: // path is optional and is ignored under Win32 and used as the directory to // create the lock file in under Unix (default is wxGetHomeDir()) // - // returns FALSE if initialization failed, it doesn't mean that another + // returns False if initialization failed, it doesn't mean that another // instance is running - use IsAnotherRunning() to check it bool Create(const wxString& name, const wxString& path = wxPyEmptyString); @@ -241,12 +253,12 @@ void wxDrawWindowOnDC(wxWindow* window, const wxDC& dc, int method) // WM_PRINT. For most native widgets nothing is drawn to the dc // at all, with or without Themes. typedef BOOL (WINAPI *PrintWindow_t)(HWND, HDC, UINT); - static bool s_triedToLoad = false; + static bool s_triedToLoad = False; static PrintWindow_t pfnPrintWindow = NULL; if ( !s_triedToLoad ) { - s_triedToLoad = true; + s_triedToLoad = True; wxDynamicLibrary dllUser32(_T("user32.dll")); if ( dllUser32.IsLoaded() ) {