made ShouldPreventAppExit() public
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38681 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -105,11 +105,11 @@ public:
|
|||||||
// Override to add custom buttons to the toolbar
|
// Override to add custom buttons to the toolbar
|
||||||
virtual void AddToolbarButtons(wxToolBar* WXUNUSED(toolBar), int WXUNUSED(style)) {};
|
virtual void AddToolbarButtons(wxToolBar* WXUNUSED(toolBar), int WXUNUSED(style)) {};
|
||||||
|
|
||||||
protected:
|
|
||||||
// we don't want to prevent the app from closing just because a help window
|
// we don't want to prevent the app from closing just because a help window
|
||||||
// remains opened
|
// remains opened
|
||||||
virtual bool ShouldPreventAppExit() const { return false; }
|
virtual bool ShouldPreventAppExit() const { return false; }
|
||||||
|
|
||||||
|
protected:
|
||||||
void Init(wxHtmlHelpData* data = NULL);
|
void Init(wxHtmlHelpData* data = NULL);
|
||||||
|
|
||||||
void OnCloseWindow(wxCloseEvent& event);
|
void OnCloseWindow(wxCloseEvent& event);
|
||||||
|
@@ -173,8 +173,15 @@ public:
|
|||||||
virtual void RequestUserAttention(int flags = wxUSER_ATTENTION_INFO);
|
virtual void RequestUserAttention(int flags = wxUSER_ATTENTION_INFO);
|
||||||
|
|
||||||
// Is this the active frame (highlighted in the taskbar)?
|
// Is this the active frame (highlighted in the taskbar)?
|
||||||
virtual bool IsActive()
|
virtual bool IsActive() { return wxGetTopLevelParent(FindFocus()) == this; }
|
||||||
{ 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__)
|
#if defined(__SMARTPHONE__)
|
||||||
virtual void SetLeftMenu(int id = wxID_ANY, const wxString& label = wxEmptyString, wxMenu *subMenu = NULL) = 0;
|
virtual void SetLeftMenu(int id = wxID_ANY, const wxString& label = wxEmptyString, wxMenu *subMenu = NULL) = 0;
|
||||||
@@ -229,13 +236,6 @@ protected:
|
|||||||
virtual bool IsOneOfBars(const wxWindow *WXUNUSED(win)) const
|
virtual bool IsOneOfBars(const wxWindow *WXUNUSED(win)) const
|
||||||
{ return false; }
|
{ return false; }
|
||||||
|
|
||||||
// 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; }
|
|
||||||
|
|
||||||
// check if we should exit the program after deleting this window
|
// check if we should exit the program after deleting this window
|
||||||
bool IsLastBeforeExit() const;
|
bool IsLastBeforeExit() const;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user