Update of /cvsroot/mahogany/M/include
In directory usw-pr-cvs1:/tmp/cvs-serv4124/include

Modified Files:
        MApplication.h 
Log Message:
modified the program exiting logic to behave in the same way whether it
exits because of a menu command or because the main frame was closed


Index: MApplication.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/MApplication.h,v
retrieving revision 1.93
retrieving revision 1.94
diff -b -u -2 -r1.93 -r1.94
--- MApplication.h      13 Apr 2002 23:34:31 -0000      1.93
+++ MApplication.h      15 Apr 2002 23:45:13 -0000      1.94
@@ -93,4 +93,9 @@
 
    /**
+     @name Exiting the application
+    */
+   //@{
+
+   /**
       Checks whether it is alright to exit the application now.
       Asks all the opened frames whether it's ok for them to close: returns
@@ -105,10 +110,6 @@
    virtual bool CanClose(void) const;
 
-   /// Returns the main frame.
-   virtual class MainFrameBase *GetMainFrame(void)
-      { return (MainFrameBase *)m_topLevelFrame; }
-
-
-   /** add a frame to the list of frames which were already asked whether it
+   /**
+     Add a frame to the list of frames which were already asked whether it
        was ok to close them and returned true - this prevents them from being
        asked the second time
@@ -116,12 +117,29 @@
    void AddToFramesOkToClose(const wxMFrame *frame);
 
-   /** has this frame already been asked (and replied "yes")?
+   /**
+     Reset the list of frames which have been already asked about closing.
+   */
+   void ResetFramesOkToClose();
+
+   /**
+     Has this frame already been asked if it's ok to close it (and replied
+     "yes")?
      */
    bool IsOkToClose(const wxMFrame *frame) const;
 
-   /** ends the application (unless ask == TRUE and the user cancels shutdown)
+   /**
+     Terminates the application (unless ask == TRUE and the user cancels
+     shutdown)
      */
    void Exit(bool ask = TRUE);
 
+   /**
+     Called just before the application terminates, it is impossible to prevent
+     it from happening any more by now.
+    */
+   virtual void OnClose();
+
+   //@}
+
    /** Gets help for a specific topic.
        @param id help id from MHelp.h
@@ -130,4 +148,8 @@
    virtual void Help(int id, wxWindow *parent = NULL) = 0;
 
+   /// Returns the main frame.
+   virtual class MainFrameBase *GetMainFrame(void)
+      { return (MainFrameBase *)m_topLevelFrame; }
+
    /** gets toplevel frame
        @return the toplevel window of the application
@@ -408,7 +430,4 @@
    /// Send all messages from the outbox "name"
    void SendOutbox(const String &name, bool checkOnline) const;
-
-   /// really (and unconditionally) terminate the app
-   virtual void DoExit() = 0;
 
    /**


_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to