-// -*- 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-2001 The LyX Team.
- *
- * This file Copyright 2000
- * Allan Rae
- * ======================================================
+ * Full author contact details are available in file CREDITS
*/
#include <config.h>
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 {
//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
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) {
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) {
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) {
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) {
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) {
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) {