]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ButtonPolicies.h
The reference dialog now disconnects from the inset on Apply. Its behaviour
[lyx.git] / src / frontends / controllers / ButtonPolicies.h
index 8f386ca4222a79a75b7248ce3d8a360f3858d44f..654f78049fae10f77b7917cf6f8c54adf9ba02ed 100644 (file)
@@ -1,8 +1,11 @@
 // -*- C++ -*-
-/* ButtonPolicies.h
+/*
+ * \file ButtonPolicies.h
+ * \author Allan Rae, rae@lyx.org
+ *
  * Provides a state machine implementation of the various button policies
  * used by the dialogs.
- * Author: Allan Rae <rae@lyx.org>
+ *
  * This file is part of
  * ======================================================
  *
@@ -66,7 +69,7 @@
 
     The IgnorantPolicy is a special case that allows anything.
  */
-class ButtonPolicy : public boost::noncopyable {
+class ButtonPolicy : boost::noncopyable {
 public:
        ///
        virtual ~ButtonPolicy() {}
@@ -107,11 +110,11 @@ public:
                ///
                CANCEL   = 4,
                ///
-               UNDO_ALL = 8
+               RESTORE = 8
        };
        ///
        static const Button ALL_BUTTONS =
-               Button(OKAY | APPLY | CANCEL | UNDO_ALL);
+               Button(OKAY | APPLY | CANCEL | RESTORE);
   
        /** State machine inputs.
            All the policies so far have both CANCEL and HIDE always going to
@@ -122,28 +125,28 @@ public:
            HIDE are treated differently.
         */
        enum SMInput {
-               ///
+               /// the dialog contents are now valid
                SMI_VALID = 0,
-               ///
+               /// the dialog contents are now invalid
                SMI_INVALID,
-               ///
+               /// an apply-and-hide action has happened
                SMI_OKAY,
-               ///
+               /// an apply action has happened 
                SMI_APPLY,
-               ///
+               /// a cancel action has happened
                SMI_CANCEL,
-               ///
-               SMI_UNDO_ALL,
-               ///
+               /// a restore action has happened
+               SMI_RESTORE,
+               /// the dialog has been hidden
                SMI_HIDE,
-               ///
+               /// the dialog contents are read-only
                SMI_READ_ONLY,
-               ///
+               /// the dialog contents can be modified
                SMI_READ_WRITE,
-               ///
+               /// the state of the dialog contents has not changed 
                SMI_NOOP,
-               ///
-               SMI_TOTAL       // not a real input
+               /// for internal use
+               SMI_TOTAL
        };
 
        /// Trigger a transition with this input.