]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ControlButtons.h
The reference dialog now disconnects from the inset on Apply. Its behaviour
[lyx.git] / src / frontends / controllers / ControlButtons.h
index 223304e48b237d5b972f2d5657b97f72918a9e2f..98ee9fc092269ac05d6605fe1497fca8c0b5ad77 100644 (file)
@@ -1,3 +1,4 @@
+// -*- C++ -*-
 /* This file is part of
  * ====================================================== 
  *
@@ -41,11 +42,11 @@ class ButtonControllerBase;
  */
 class ControlButtons : public DialogBase
 {
-public: // methods
+public:
        ///
-       ControlButtons() {}
+       ControlButtons();
        ///
-       virtual ~ControlButtons() {};
+       virtual ~ControlButtons() {}
 
        /// These functions are called when the controlling buttons are pressed.
        ///
@@ -56,6 +57,8 @@ public: // methods
        void CancelButton();
        ///
        void RestoreButton();
+       ///
+       bool IconifyWithMain() const;
 
        /** Allow the view to access the ButtonController. This method must be
            instantiated in a daughter class that creates the actual instance
@@ -63,6 +66,10 @@ public: // methods
        virtual ButtonControllerBase & bc() = 0;
 
 protected:
+       /** When Applying it's useful to know whether the dialog is about
+           to close or not (no point refreshing the display for example). */
+       bool isClosing() const { return is_closing_; }
+
        /// Get changed parameters and Dispatch them to the kernel.
        virtual void apply() = 0;
        /// Disconnect signals and hide View.
@@ -74,6 +81,11 @@ protected:
            instantiated in a daughter class that creates the actual instance
            of the View. */
        virtual ViewBase & view() = 0;
+
+private:
+       ///
+       bool is_closing_;
+       
 };
 
 #endif // CONTROLBUTTONS_H