X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1c067fe3c1e752658c63b4d556eb6a5468213860..b3e5d05894c018ea50d92de6249aa09d211e2ef7:/include/wx/toplevel.h diff --git a/include/wx/toplevel.h b/include/wx/toplevel.h index ecb99fd9cb..69c5a76ac1 100644 --- a/include/wx/toplevel.h +++ b/include/wx/toplevel.h @@ -137,6 +137,10 @@ public: // return true if the frame is maximized virtual bool IsMaximized() const = 0; + // return true if the frame is always maximized + // due to native guidelines or current policy + virtual bool IsAlwaysMaximized() const; + // return true if the frame is iconized virtual bool IsIconized() const = 0; @@ -173,8 +177,15 @@ public: virtual void RequestUserAttention(int flags = wxUSER_ATTENTION_INFO); // Is this the active frame (highlighted in the taskbar)? - virtual bool IsActive() - { return (wxGetTopLevelParent(FindFocus()) == this); } + virtual bool IsActive() { return wxGetTopLevelParent(FindFocus()) == this; } + + // this function may be overridden to return false to allow closing the + // application even when this top level window is still open + // + // notice that the window is still closed prior to the application exit and + // so it can still veto it even if it returns false from here + virtual bool ShouldPreventAppExit() const { return true; } + #if defined(__SMARTPHONE__) virtual void SetLeftMenu(int id = wxID_ANY, const wxString& label = wxEmptyString, wxMenu *subMenu = NULL) = 0; @@ -229,8 +240,7 @@ protected: virtual bool IsOneOfBars(const wxWindow *WXUNUSED(win)) const { return false; } - // check if we should exit the program after deleting this top level - // window (this is used in common dtor and wxMSW code) + // check if we should exit the program after deleting this window bool IsLastBeforeExit() const; // send the iconize event, return true if processed