]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ButtonPolicies.C
Move the external dialog to the new scheme.
[lyx.git] / src / frontends / controllers / ButtonPolicies.C
index bb1ffe631cf3c7a87277ecb9ee9f597808d9b2e3..393606b4401edad0c99b1ddf1e965bb25abc8fd3 100644 (file)
@@ -1,19 +1,11 @@
-// -*- C++ -*-
-/* ButtonPolicies.C
- * 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
- * ======================================================
+/**
+ * \file ButtonPolicies.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- *           LyX, The Document Processor
+ * \author Allan Rae
  *
- *           Copyright 1995 Matthias Ettrich
- *           Copyright 1995-2000 The LyX Team.
- *
- *           This file Copyright 2000
- *           Allan Rae
- * ======================================================
+ * Full author contact details are available in file CREDITS
  */
 
 #include <config.h>
@@ -35,6 +27,11 @@ void nextState(ButtonPolicy::State & state,
        if (ButtonPolicy::SMI_NOOP == in) return;
 
        ButtonPolicy::State tmp = s_m[state][in];
+
+       lyxerr[Debug::GUI] << "Transition from state "
+               << state << " to state " << tmp << " after input "
+               << in << std::endl;
+
        if (ButtonPolicy::BOGUS != tmp) {
                state = tmp;
        } else {
@@ -108,7 +105,7 @@ void PreferencesPolicy::input(SMInput input)
        //lyxerr << "PreferencesPolicy::input" << endl;
        // CANCEL and HIDE always take us to INITIAL for all cases.
        // Note that I didn't put that special case in the helper function
-       // because it doesn't belong there.  Some other 
+       // because it doesn't belong there.  Some other
        // This is probably optimising for the wrong case since it occurs as the
        // dialog will be hidden.  It would have saved a little memory in the
        // state machine if I could have gotten map working. ARRae 20000813
@@ -168,7 +165,7 @@ OkCancelPolicy::OkCancelPolicy()
 void OkCancelPolicy::input(SMInput input)
 {
        //lyxerr << "OkCancelPolicy::input" << endl;
-       
+
        // CANCEL and HIDE always take us to INITIAL for all cases
        if (SMI_CANCEL == input
            || SMI_HIDE == input) {
@@ -242,7 +239,7 @@ OkCancelReadOnlyPolicy::OkCancelReadOnlyPolicy()
 void OkCancelReadOnlyPolicy::input(SMInput input)
 {
        //lyxerr << "OkCancelReadOnlyPolicy::input" << endl;
-       
+
        // CANCEL and HIDE always take us to INITIAL for all cases
        if (SMI_CANCEL == input
            || SMI_HIDE == input) {
@@ -320,7 +317,7 @@ NoRepeatedApplyReadOnlyPolicy::NoRepeatedApplyReadOnlyPolicy()
 void NoRepeatedApplyReadOnlyPolicy::input(SMInput input)
 {
        //lyxerr << "NoReapeatedApplyReadOnlyPolicy::input" << endl;
-       
+
        // CANCEL and HIDE always take us to INITIAL for all cases
        if (SMI_CANCEL == input
            || SMI_HIDE == input) {
@@ -412,7 +409,7 @@ OkApplyCancelReadOnlyPolicy::OkApplyCancelReadOnlyPolicy()
 void OkApplyCancelReadOnlyPolicy::input(SMInput input)
 {
        //lyxerr << "OkApplyCancelReadOnlyPolicy::input" << endl;
-       
+
        // CANCEL and HIDE always take us to INITIAL for all cases
        if (SMI_CANCEL == input
            || SMI_HIDE == input) {
@@ -478,7 +475,7 @@ OkApplyCancelPolicy::OkApplyCancelPolicy()
 void OkApplyCancelPolicy::input(SMInput input)
 {
        //lyxerr << "OkApplyCancelPolicy::input" << endl;
-       
+
        // CANCEL and HIDE always take us to INITIAL for all cases
        if (SMI_CANCEL == input
            || SMI_HIDE == input) {
@@ -536,7 +533,7 @@ NoRepeatedApplyPolicy::NoRepeatedApplyPolicy()
 void NoRepeatedApplyPolicy::input(SMInput input)
 {
        //lyxerr << "NoRepeatedApplyPolicy::input" << endl;
-       
+
        // CANCEL and HIDE always take us to INITIAL for all cases
        if (SMI_CANCEL == input
            || SMI_HIDE == input) {