X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/705b61cce0e6c2167d7457c7c2b633688e9c67b6..6028be3f39babc4530472a4139576fe318c6aa90:/wxPython/src/_toplvl.i?ds=sidebyside diff --git a/wxPython/src/_toplvl.i b/wxPython/src/_toplvl.i index 261d41c041..6e288c279c 100644 --- a/wxPython/src/_toplvl.i +++ b/wxPython/src/_toplvl.i @@ -69,18 +69,12 @@ enum wxTOPLEVEL_EX_DIALOG, }; - - -%typemap(in) (int widths, int* widths_field) { - $1 = PyList_Size($input); - $2 = int_LIST_helper($input); - if ($2 == NULL) SWIG_fail; -} - -%typemap(freearg) (int widths, int* widths_field) { - if ($2) delete [] $2; -} - +// Styles for RequestUserAttention +enum +{ + wxUSER_ATTENTION_INFO = 1, + wxUSER_ATTENTION_ERROR = 2 +}; //--------------------------------------------------------------------------- @@ -91,13 +85,13 @@ public: // No constructor as it can not be used directly from Python // maximize = True => maximize, otherwise - restore - virtual void Maximize(bool maximize = True); + virtual void Maximize(bool maximize = true); // undo Maximize() or Iconize() virtual void Restore(); // iconize = True => iconize, otherwise - restore - virtual void Iconize(bool iconize = True); + virtual void Iconize(bool iconize = true); // return True if the frame is maximized virtual bool IsMaximized() const; @@ -128,6 +122,12 @@ public: // is successful.) virtual bool SetShape(const wxRegion& region); + + // Attracts the users attention to this window if the application is + // inactive (should be called when a background event occurs) + virtual void RequestUserAttention(int flags = wxUSER_ATTENTION_INFO); + + #ifdef __WXMAC__ void MacSetMetalAppearance( bool on ) ; bool MacGetMetalAppearance() const ; @@ -151,6 +151,7 @@ class wxFrame : public wxTopLevelWindow { public: %pythonAppend wxFrame "self._setOORInfo(self)" %pythonAppend wxFrame() "" + %typemap(out) wxFrame*; // turn off this typemap wxFrame(wxWindow* parent, const wxWindowID id=-1, const wxString& title = wxPyEmptyString, @@ -160,6 +161,10 @@ public: const wxString& name = wxPyFrameNameStr); %name(PreFrame)wxFrame(); + // Turn it back on again + %typemap(out) wxFrame* { $result = wxPyMake_wxObject($1, $owner); } + + bool Create(wxWindow* parent, const wxWindowID id=-1, const wxString& title = wxPyEmptyString, const wxPoint& pos = wxDefaultPosition, @@ -265,6 +270,7 @@ class wxDialog : public wxTopLevelWindow { public: %pythonAppend wxDialog "self._setOORInfo(self)" %pythonAppend wxDialog() "" + %typemap(out) wxDialog*; // turn off this typemap wxDialog(wxWindow* parent, const wxWindowID id=-1, @@ -275,6 +281,9 @@ public: const wxString& name = wxPyDialogNameStr); %name(PreDialog)wxDialog(); + // Turn it back on again + %typemap(out) wxDialog* { $result = wxPyMake_wxObject($1, $owner); } + bool Create(wxWindow* parent, const wxWindowID id=-1, const wxString& title = wxPyEmptyString,