]> git.lyx.org Git - features.git/commitdiff
Merging BRANCH_MVC back into HEAD.
authorAngus Leeming <leeming@lyx.org>
Thu, 15 Mar 2001 13:37:04 +0000 (13:37 +0000)
committerAngus Leeming <leeming@lyx.org>
Thu, 15 Mar 2001 13:37:04 +0000 (13:37 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1770 a592a061-630c-0410-9148-cb99ea01b6c8

179 files changed:
ChangeLog
configure.in
src/ChangeLog
src/Makefile.am
src/frontends/ChangeLog
src/frontends/DialogBase.h
src/frontends/Dialogs.h
src/frontends/Makefile.am
src/frontends/controllers/.cvsignore [new file with mode: 0644]
src/frontends/controllers/ButtonController.C [new file with mode: 0644]
src/frontends/controllers/ButtonController.h [new file with mode: 0644]
src/frontends/controllers/ButtonPolicies.C [new file with mode: 0644]
src/frontends/controllers/ButtonPolicies.h [new file with mode: 0644]
src/frontends/controllers/ChangeLog [new file with mode: 0644]
src/frontends/controllers/ControlBase.C [new file with mode: 0644]
src/frontends/controllers/ControlBase.h [new file with mode: 0644]
src/frontends/controllers/ControlBibitem.C [new file with mode: 0644]
src/frontends/controllers/ControlBibitem.h [new file with mode: 0644]
src/frontends/controllers/ControlCitation.C [new file with mode: 0644]
src/frontends/controllers/ControlCitation.h [new file with mode: 0644]
src/frontends/controllers/ControlCommand.C [new file with mode: 0644]
src/frontends/controllers/ControlCommand.h [new file with mode: 0644]
src/frontends/controllers/ControlConnections.C [new file with mode: 0644]
src/frontends/controllers/ControlConnections.h [new file with mode: 0644]
src/frontends/controllers/Makefile.am [new file with mode: 0644]
src/frontends/controllers/README [new file with mode: 0644]
src/frontends/controllers/ViewBase.h [new file with mode: 0644]
src/frontends/kde/ChangeLog
src/frontends/kde/Dialogs.C
src/frontends/kde/FormCitation.C
src/frontends/kde/FormCitation.h
src/frontends/kde/Makefile.am
src/frontends/kde/citationdlg.C
src/frontends/kde/citationdlg.h
src/frontends/kde/docdlg.C
src/frontends/kde/kdeBC.C [new file with mode: 0644]
src/frontends/kde/kdeBC.h [new file with mode: 0644]
src/frontends/kde/moc/Makefile.am
src/frontends/xforms/ButtonController.C [deleted file]
src/frontends/xforms/ButtonController.h [deleted file]
src/frontends/xforms/ChangeLog
src/frontends/xforms/Color.C
src/frontends/xforms/Dialogs.C
src/frontends/xforms/FormBase.C
src/frontends/xforms/FormBase.h
src/frontends/xforms/FormBaseDeprecated.C [new file with mode: 0644]
src/frontends/xforms/FormBaseDeprecated.h [new file with mode: 0644]
src/frontends/xforms/FormBibitem.C
src/frontends/xforms/FormBibitem.h
src/frontends/xforms/FormBibtex.C
src/frontends/xforms/FormBibtex.h
src/frontends/xforms/FormBrowser.C
src/frontends/xforms/FormBrowser.h
src/frontends/xforms/FormCharacter.C
src/frontends/xforms/FormCharacter.h
src/frontends/xforms/FormCitation.C
src/frontends/xforms/FormCitation.h
src/frontends/xforms/FormCopyright.C
src/frontends/xforms/FormCopyright.h
src/frontends/xforms/FormCredits.C
src/frontends/xforms/FormCredits.h
src/frontends/xforms/FormDocument.C
src/frontends/xforms/FormDocument.h
src/frontends/xforms/FormError.C
src/frontends/xforms/FormError.h
src/frontends/xforms/FormExternal.C
src/frontends/xforms/FormExternal.h
src/frontends/xforms/FormFiledialog.h
src/frontends/xforms/FormGraphics.C
src/frontends/xforms/FormGraphics.h
src/frontends/xforms/FormInclude.C
src/frontends/xforms/FormInclude.h
src/frontends/xforms/FormIndex.C
src/frontends/xforms/FormIndex.h
src/frontends/xforms/FormInset.C
src/frontends/xforms/FormInset.h
src/frontends/xforms/FormLog.C
src/frontends/xforms/FormLog.h
src/frontends/xforms/FormParagraph.C
src/frontends/xforms/FormParagraph.h
src/frontends/xforms/FormPreamble.C
src/frontends/xforms/FormPreamble.h
src/frontends/xforms/FormPreferences.C
src/frontends/xforms/FormPreferences.h
src/frontends/xforms/FormPrint.C
src/frontends/xforms/FormPrint.h
src/frontends/xforms/FormRef.C
src/frontends/xforms/FormRef.h
src/frontends/xforms/FormSearch.C
src/frontends/xforms/FormSearch.h
src/frontends/xforms/FormSplash.C
src/frontends/xforms/FormSplash.h
src/frontends/xforms/FormTabular.C
src/frontends/xforms/FormTabular.h
src/frontends/xforms/FormTabularCreate.C
src/frontends/xforms/FormTabularCreate.h
src/frontends/xforms/FormToc.C
src/frontends/xforms/FormToc.h
src/frontends/xforms/FormUrl.C
src/frontends/xforms/FormUrl.h
src/frontends/xforms/FormVCLog.C
src/frontends/xforms/FormVCLog.h
src/frontends/xforms/GUIRunTime.C
src/frontends/xforms/Makefile.am
src/frontends/xforms/Menubar_pimpl.C
src/frontends/xforms/Menubar_pimpl.h
src/frontends/xforms/RadioButtonGroup.C
src/frontends/xforms/RadioButtonGroup.h
src/frontends/xforms/Timeout_pimpl.C
src/frontends/xforms/Timeout_pimpl.h
src/frontends/xforms/Toolbar_pimpl.h
src/frontends/xforms/form_bibtex.C
src/frontends/xforms/form_bibtex.h
src/frontends/xforms/form_browser.C
src/frontends/xforms/form_browser.h
src/frontends/xforms/form_character.C
src/frontends/xforms/form_character.h
src/frontends/xforms/form_citation.C
src/frontends/xforms/form_citation.h
src/frontends/xforms/form_copyright.C
src/frontends/xforms/form_copyright.h
src/frontends/xforms/form_credits.C
src/frontends/xforms/form_credits.h
src/frontends/xforms/form_document.C
src/frontends/xforms/form_document.h
src/frontends/xforms/form_error.C
src/frontends/xforms/form_error.h
src/frontends/xforms/form_graphics.C
src/frontends/xforms/form_graphics.h
src/frontends/xforms/form_include.C
src/frontends/xforms/form_include.h
src/frontends/xforms/form_index.C
src/frontends/xforms/form_index.h
src/frontends/xforms/form_paragraph.C
src/frontends/xforms/form_paragraph.h
src/frontends/xforms/form_preamble.C
src/frontends/xforms/form_preamble.h
src/frontends/xforms/form_preferences.C
src/frontends/xforms/form_preferences.h
src/frontends/xforms/form_print.C
src/frontends/xforms/form_print.h
src/frontends/xforms/form_ref.C
src/frontends/xforms/form_ref.h
src/frontends/xforms/form_search.C
src/frontends/xforms/form_search.h
src/frontends/xforms/form_tabular.C
src/frontends/xforms/form_tabular.h
src/frontends/xforms/form_tabular_create.C
src/frontends/xforms/form_tabular_create.h
src/frontends/xforms/form_toc.C
src/frontends/xforms/form_toc.h
src/frontends/xforms/form_url.C
src/frontends/xforms/form_url.h
src/frontends/xforms/forms/form_bibtex.fd
src/frontends/xforms/forms/form_browser.fd
src/frontends/xforms/forms/form_character.fd
src/frontends/xforms/forms/form_citation.fd
src/frontends/xforms/forms/form_copyright.fd
src/frontends/xforms/forms/form_credits.fd
src/frontends/xforms/forms/form_document.C.patch
src/frontends/xforms/forms/form_document.fd
src/frontends/xforms/forms/form_error.fd
src/frontends/xforms/forms/form_graphics.fd
src/frontends/xforms/forms/form_include.fd
src/frontends/xforms/forms/form_index.fd
src/frontends/xforms/forms/form_paragraph.fd
src/frontends/xforms/forms/form_preamble.fd
src/frontends/xforms/forms/form_preferences.fd
src/frontends/xforms/forms/form_print.fd
src/frontends/xforms/forms/form_ref.fd
src/frontends/xforms/forms/form_search.fd
src/frontends/xforms/forms/form_tabular.fd
src/frontends/xforms/forms/form_tabular_create.fd
src/frontends/xforms/forms/form_toc.fd
src/frontends/xforms/forms/form_url.fd
src/frontends/xforms/input_validators.C
src/frontends/xforms/xformsBC.C [new file with mode: 0644]
src/frontends/xforms/xformsBC.h [new file with mode: 0644]
src/frontends/xforms/xforms_helpers.h

index 40968d173e949940fe7ecdebd574ff9a841917ff..b95ed7dd10dd8cfd49d0a9a47023564245c64744 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-03-14  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * Merging changes from BRANCH_MVC back into HEAD.
+
+       * configure.in: added controllers directory to frontends.
+
 2001-03-08  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
 
        * INSTALL: remove mention of problem with gettext.
index 8817f0aef8c9dab1c2b214bc0eef557cb0157986..1511aaf7ee07777cad867e1e976120770b7c3a42 100644 (file)
@@ -304,6 +304,7 @@ AC_OUTPUT([Makefile \
        src/support/Makefile \
        src/frontends/Makefile \
        src/frontends/support/Makefile \
+       src/frontends/controllers/Makefile \
        src/frontends/xforms/Makefile \
        src/frontends/qt2/Makefile \
        src/frontends/kde/Makefile \
index 09449fa300330e6967a0a588be9f41d68a084010..5aa46f5da91e118b92886eb3f3e49af04f1bdfe1 100644 (file)
@@ -1,3 +1,9 @@
+2001-03-14  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * Merging changes from BRANCH_MVC back into HEAD.
+
+       * Makefile.am: added controllers/libcontrollers.la to lyx_DEPENDENCIES
+
 2001-03-14  Angus Leeming  <a.leeming@ic.ac.uk>
 
        * lyxfunc.C (Dispatch): removed redundant break statement.
index e7bc09e807f151d73e5eb33b920a51ecf39569a9..3d7b84911d618986b7e6e2096933a36b5067d3a5 100644 (file)
@@ -11,6 +11,7 @@ lyx_DEPENDENCIES = mathed/libmathed.la insets/libinsets.la \
        graphics/libgraphics.la \
        frontends/libfrontends.la @FRONTEND_GUILIB@ \
        frontends/libfrontends.la \
+       frontends/controllers/libcontrollers.la \
        frontends/support/libfrontendsupport.la support/libsupport.la \
        @INCLUDED_SIGC@
 lyx_LDADD = $(lyx_DEPENDENCIES) @INTLLIBS@ $(LYX_LIBS) $(SIGC_LIBS) \
index 80fcdadf5ce7322bf0c372707808eb5098f84a9d..438eebe66603abb1648fb28c085c62de354f431f 100644 (file)
@@ -1,3 +1,21 @@
+2001-03-14  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * Merging changes from BRANCH_MVC back into HEAD.
+
+       * Makefile.am: added controllers to SUBDIRS.
+       removed ButtonPolicies.[Ch]. Now in controllers.
+
+       * DialogBase.h: commented out abstract method show().
+
+       * Dialogs.h: The dialogs are now stored as a 
+       std::vector<boost::shared_ptr<DialogBase> >.
+       Removed using directives.
+       (d-tor) removed.
+       (add): new helper method. Makes code in c-tor a little tidier.
+       (destroySplash): Moved out of xforms implementation.
+
+       * ButtonPolicies.[Ch]: moved to controllers/ButtonPolicies.[Ch]
+
 2001-03-09  John Levon  <moz@compsoc.man.ac.uk>
 
        * Dialogs.h: add showExternal signal
index dec7d884f14afede484dc41c3d8366c026d508bb..c30da3a0c3fb5dbaadc9b75fe51b3ad725236c76 100644 (file)
@@ -40,14 +40,14 @@ class DialogBase : public Object, public noncopyable
 public:
        /**@name Constructors and Deconstructors */
        //@{
-       ///
+       /// Virtual base destructor
        virtual ~DialogBase() {}
        //@}
 
        /**@name Signal Targets */
        //@{
        ///
-       virtual void show() = 0;
+       //virtual void show() = 0;
        ///
        virtual void hide() = 0;
        ///
index 4b26d52e6a60eef9ed5f1202bdc8eac72eb40a86..3007748b638bddeffb87983bd038733935f888d6 100644 (file)
 
 #include "LString.h"
 #include <boost/utility.hpp>
+#include <boost/smart_ptr.hpp>
 
-class DialogBase;
+#ifdef __GNUG__
+#pragma interface
+#endif
+
+#include "DialogBase.h"
+#include "support/LAssert.h"
 
 // Maybe this should be a UIFunc modelled on LyXFunc
 class LyXView;
 
-class FormSplash;
-
 class InsetGraphics;
 class InsetBibKey;
 class InsetBibtex;
@@ -41,11 +45,6 @@ class InsetInfo;
 class InsetTabular;
 class InsetCommand;
 
-#ifdef SIGC_CXX_NAMESPACES
-using SigC::Signal0;
-using SigC::Signal1;
-#endif
-
 /** Container of all dialogs and signals a LyXView needs or uses to access them
     The list of dialog signals isn't comprehensive but should be a good guide
     for any future additions.  Remember don't go overboard -- think minimal.
@@ -53,116 +52,129 @@ using SigC::Signal1;
 class Dialogs : public noncopyable
 {
 public:
-       /**@name Constructors and Deconstructors */
+       ///
+       typedef boost::shared_ptr<DialogBase> db_ptr;
+       /**@name Constructor */
        //@{
        ///
        Dialogs(LyXView *);
-       ///
-       ~Dialogs();
        //@}
-       
+
        /** Redraw all visible popups because, for example, the GUI colours
            have been re-mapped. */
-       static Signal0<void> redrawGUI;
+       static SigC::Signal0<void> redrawGUI;
 
        /**@name Global Hide and Update Signals */
        //@{
        /// Hide all visible popups
-       Signal0<void> hideAll;
+       SigC::Signal0<void> hideAll;
        
        /// Hide any dialogs that require a buffer for them to operate
-       Signal0<void> hideBufferDependent;
+       SigC::Signal0<void> hideBufferDependent;
        
        /** Update visible, buffer-dependent dialogs
            If the bool is true then a buffer change has occurred
            else its still the same buffer.
         */
-       Signal1<void, bool> updateBufferDependent;
+       SigC::Signal1<void, bool> updateBufferDependent;
        //@}
 
        /**@name Dialog Access Signals.
           Put into some sort of alphabetical order */
        //@{
        /// Do we really have to push this?
-       Signal1<void, std::vector<string> const &> SetDocumentClassChoice;
+       SigC::Signal1<void, std::vector<string> const &> SetDocumentClassChoice;
        /// show the key and label of a bibliography entry
-       Signal1<void, InsetCommand *> showBibitem;
+       SigC::Signal1<void, InsetCommand *> showBibitem;
        /// show the bibtex dialog
-       Signal1<void, InsetCommand *> showBibtex;
+       SigC::Signal1<void, InsetCommand *> showBibtex;
        ///
-       Signal0<void> showCharacter;
+       SigC::Signal0<void> showCharacter;
        ///
-       Signal1<void, InsetCommand *> showCitation;
+       SigC::Signal1<void, InsetCommand *> showCitation;
        ///
-       Signal1<void, string const &> createCitation;
+       SigC::Signal1<void, string const &> createCitation;
        ///
-       Signal0<void> showCopyright;
+       SigC::Signal0<void> showCopyright;
        ///
-       Signal0<void> showCredits;
+       SigC::Signal0<void> showCredits;
        ///
-       Signal1<void, InsetError *> showError;
+       SigC::Signal1<void, InsetError *> showError;
        /// show the external inset dialog
-       Signal1<void, InsetExternal *> showExternal; 
+       SigC::Signal1<void, InsetExternal *> showExternal; 
        ///
-       Signal1<void, InsetGraphics *> showGraphics;
+       SigC::Signal1<void, InsetGraphics *> showGraphics;
        /// show the details of a LyX file include inset
-       Signal1<void, InsetInclude *> showInclude;
+       SigC::Signal1<void, InsetInclude *> showInclude;
        ///
-       Signal1<void, InsetCommand *> showIndex;
+       SigC::Signal1<void, InsetCommand *> showIndex;
        ///
-       Signal1<void, string const &> createIndex;
+       SigC::Signal1<void, string const &> createIndex;
        ///
-       Signal1<void, InsetInfo *> showInfo;
+       SigC::Signal1<void, InsetInfo *> showInfo;
        ///
-       Signal0<void> showLayoutDocument;
+       SigC::Signal0<void> showLayoutDocument;
        ///
-       Signal0<void> showLayoutParagraph;
+       SigC::Signal0<void> showLayoutParagraph;
        ///
-       Signal0<void> showLayoutCharacter;
+       SigC::Signal0<void> showLayoutCharacter;
        ///
-       Signal0<void> setUserFreeFont;
+       SigC::Signal0<void> setUserFreeFont;
        /// show the version control log
-       Signal0<void> showVCLogFile;
+       SigC::Signal0<void> showVCLogFile;
        /// show the LaTeX log or build file
-       Signal0<void> showLogFile;
+       SigC::Signal0<void> showLogFile;
        ///
-       Signal0<void> showPreamble;
+       SigC::Signal0<void> showPreamble;
        ///
-       Signal0<void> showPreferences;
+       SigC::Signal0<void> showPreferences;
        ///
-       Signal0<void> showPrint;
+       SigC::Signal0<void> showPrint;
        ///
-       Signal1<void, InsetCommand *> showRef;
+       SigC::Signal1<void, InsetCommand *> showRef;
        ///
-       Signal1<void, string const &> createRef;
+       SigC::Signal1<void, string const &> createRef;
        ///
-       Signal0<void> showSearch;
+       SigC::Signal0<void> showSearch;
        /// pop up the splash
-       Signal0<void> showSplash;
+       SigC::Signal0<void> showSplash;
        /// destroy the splash dialog
        void destroySplash();
        ///
-       Signal1<void, InsetTabular *> showTabular;
+       SigC::Signal1<void, InsetTabular *> showTabular;
        ///
-       Signal1<void, InsetTabular *> updateTabular;
+       SigC::Signal1<void, InsetTabular *> updateTabular;
        ///
-       Signal0<void> showTabularCreate;
+       SigC::Signal0<void> showTabularCreate;
        ///
-       Signal1<void, InsetCommand *> showTOC;
+       SigC::Signal1<void, InsetCommand *> showTOC;
        ///
-       Signal1<void, string const &> createTOC;
+       SigC::Signal1<void, string const &> createTOC;
        ///
-       Signal1<void, InsetCommand *> showUrl;
+       SigC::Signal1<void, InsetCommand *> showUrl;
        ///
-       Signal1<void, string const &> createUrl;
+       SigC::Signal1<void, string const &> createUrl;
        ///
-       Signal0<void> updateCharacter;  // allow update as cursor moves
+       SigC::Signal0<void> updateCharacter;  // allow update as cursor moves
        //@}
 private:
+       /// Add a dialog to the vector of dialogs.
+       void add(DialogBase *);
        /// the dialogs being managed
-       std::vector<DialogBase *> dialogs_;
+       std::vector<db_ptr> dialogs_;
        /// the splash dialog
-       FormSplash * splash_;
+       boost::scoped_ptr<DialogBase> splash_;
 };
 
+inline void Dialogs::add(DialogBase * ptr)
+{
+       Assert(ptr);
+       dialogs_.push_back(db_ptr(ptr));
+}
+
+inline void Dialogs::destroySplash()
+{
+       splash_.reset();
+}
+
 #endif
index 7dc63a1892dae2e72187056be599b1e6bc253d96..99bcd621d9693891ee0d6e2339e042181180de1d 100644 (file)
@@ -4,15 +4,13 @@ MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
 # xforms has to be fixed here as we still need object files in this directory
 # for the compilation of other frontends, so until that we have to let this
 # here.
-SUBDIRS = support xforms @FRONTEND@
+SUBDIRS = support xforms controllers @FRONTEND@
 ETAGS_ARGS = --lang=c++
 BOOST_INCLUDES = -I$(top_srcdir)/boost
 INCLUDES = ${FRONTEND_INCLUDES} -I${srcdir}/.. -I${srcdir}/xforms ${SIGC_CFLAGS} $(BOOST_INCLUDES)
 LIBS =
 noinst_LTLIBRARIES = libfrontends.la
 libfrontends_la_SOURCES=\
-       ButtonPolicies.C \
-       ButtonPolicies.h \
        Dialogs.h \
        DialogBase.h \
        FileDialog.h \
diff --git a/src/frontends/controllers/.cvsignore b/src/frontends/controllers/.cvsignore
new file mode 100644 (file)
index 0000000..2bf9eaa
--- /dev/null
@@ -0,0 +1,6 @@
+Makefile.in
+Makefile
+*.deps
+*.lo
+.libs
+libcontrollers.la
diff --git a/src/frontends/controllers/ButtonController.C b/src/frontends/controllers/ButtonController.C
new file mode 100644 (file)
index 0000000..762255c
--- /dev/null
@@ -0,0 +1,98 @@
+// -*- C++ -*-
+/* This file is part of
+ * ====================================================== 
+ *
+ *           LyX, The Document Processor
+ *
+ *           Copyright 2000 The LyX Team.
+ *
+ * ======================================================
+ *
+ * \file ButtonController.C
+ * \author Allan Rae
+ */
+
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
+#include <config.h>
+#include "ButtonController.h"
+#include "support/LAssert.h"
+
+
+ButtonControllerBase::ButtonControllerBase(string const & cancel,
+                                          string const & close)
+       : cancel_label(cancel), close_label(close)
+{}
+
+
+void ButtonControllerBase::ok()
+{
+       input(ButtonPolicy::SMI_OKAY);
+}
+
+
+void ButtonControllerBase::input(ButtonPolicy::SMInput in)
+{
+       if (ButtonPolicy::SMI_NOOP == in) return;
+       bp().input(in);
+       refresh();
+}
+
+
+void ButtonControllerBase::apply()
+{
+       input(ButtonPolicy::SMI_APPLY);
+}
+
+
+void ButtonControllerBase::cancel()
+{
+       input(ButtonPolicy::SMI_CANCEL);
+}
+
+
+void ButtonControllerBase::undoAll()
+{
+       input(ButtonPolicy::SMI_UNDO_ALL);
+}
+
+
+void ButtonControllerBase::hide()
+{
+       input(ButtonPolicy::SMI_HIDE);
+}
+
+
+void ButtonControllerBase::valid(bool v)
+{
+       if (v) {
+               input(ButtonPolicy::SMI_VALID);
+       } else {
+               input(ButtonPolicy::SMI_INVALID);
+       }
+}
+
+
+void ButtonControllerBase::invalid()
+{
+       input(ButtonPolicy::SMI_INVALID);
+}
+
+
+bool ButtonControllerBase::readOnly(bool ro)
+{
+       if (ro) {
+               input(ButtonPolicy::SMI_READ_ONLY);
+       } else {
+               input(ButtonPolicy::SMI_READ_WRITE);
+       }
+       return ro;
+}
+
+
+void ButtonControllerBase::readWrite()
+{
+       readOnly(false);
+}
diff --git a/src/frontends/controllers/ButtonController.h b/src/frontends/controllers/ButtonController.h
new file mode 100644 (file)
index 0000000..73dae9f
--- /dev/null
@@ -0,0 +1,105 @@
+// -*- C++ -*-
+/* This file is part of
+ * ====================================================== 
+ *
+ *           LyX, The Document Processor
+ *
+ *           Copyright 2000 The LyX Team.
+ *
+ * ======================================================
+ *
+ * \file ButtonController.h
+ * \author Allan Rae
+ */
+
+#ifndef BUTTONCONTROLLER_H
+#define BUTTONCONTROLLER_H
+
+#ifdef __GNUG__
+#pragma interface
+#endif
+
+#include "ButtonPolicies.h"
+#include "LString.h"
+#include "gettext.h"
+
+/** Abstract base class for a ButtonController
+
+ * Controls the activation of the OK, Apply and Cancel buttons.
+ * Actually supports 4 buttons in all and it's up to the user to decide on
+ * the activation policy and which buttons correspond to which output of the
+ * state machine.
+ * Author: Allan Rae <rae@lyx.org>.
+ * This abstract base class stripped of xforms-specific code by
+ * Angus Leeming <a.leeming@ic.ac.uk>
+ */
+class ButtonControllerBase : public noncopyable
+{
+public:
+       /** Constructor.
+           The cancel/close label entries are _not_ managed within the class
+           thereby allowing you to reassign at will and to use static labels.
+           It also means if you really don't want to have the Cancel button
+           label be different when there is nothing changed in the dialog then
+           you can just assign "Cancel" to both labels.  Or even reuse this
+           class for something completely different.
+        */
+       ButtonControllerBase(string const & cancel, string const & close);
+       ///
+       virtual ~ButtonControllerBase() {}
+       ///
+       virtual void refresh() = 0;
+       ///
+       virtual ButtonPolicy & bp() = 0;
+       ///
+       virtual void input(ButtonPolicy::SMInput);
+       ///
+       void ok();
+       ///
+       void apply();
+       ///
+       void cancel();
+       ///
+       void undoAll();
+       ///
+       void hide();
+       /// Passthrough function -- returns its input value
+       bool readOnly(bool = true);
+       ///
+       void readWrite();
+       ///
+       void valid(bool = true);
+       ///
+       void invalid();
+
+protected:
+       ///
+       string cancel_label;
+       ///
+       string close_label;     
+};
+
+
+template <class BP, class GUIBC>
+class ButtonController: public GUIBC
+{
+public:
+       ///
+       ButtonController(string const & = _("Cancel"),
+                        string const & = _("Close"));
+       ///
+       virtual ButtonPolicy & bp() { return bp_; }
+
+protected:
+       ///
+       BP bp_;
+};
+
+
+template <class BP, class GUIBC>
+ButtonController<BP, GUIBC>::ButtonController(string const & cancel,
+                                             string const & close)
+       : GUIBC(cancel, close)
+{}
+
+#endif // BUTTONCONTROLLER_H
diff --git a/src/frontends/controllers/ButtonPolicies.C b/src/frontends/controllers/ButtonPolicies.C
new file mode 100644 (file)
index 0000000..52dfa83
--- /dev/null
@@ -0,0 +1,546 @@
+// -*- 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
+ * ======================================================
+ *
+ *           LyX, The Document Processor
+ *
+ *           Copyright 1995 Matthias Ettrich
+ *           Copyright 1995-2000 The LyX Team.
+ *
+ *           This file Copyright 2000
+ *           Allan Rae
+ * ======================================================
+ */
+
+#include <config.h>
+
+#include "ButtonPolicies.h"
+#include "debug.h"
+
+using std::endl;
+
+/// Helper function
+static inline
+void nextState(ButtonPolicy::State & state,
+              ButtonPolicy::SMInput in,
+              ButtonPolicy::StateMachine const & s_m,
+              char const * function_name = "nextState")
+{
+       if (ButtonPolicy::SMI_NOOP == in) return;
+
+       ButtonPolicy::State tmp = s_m[state][in];
+       if (ButtonPolicy::BOGUS != tmp) {
+               state = tmp;
+       } else {
+               lyxerr << function_name
+                      << ": No transition for input "
+                      << in
+                      << " from state "
+                      << state
+                      << endl;
+       }
+}
+
+
+/*-----------------------------PreferencesPolicy-----------------------------*/
+
+
+PreferencesPolicy::PreferencesPolicy()
+       : state_(INITIAL),
+         outputs_(APPLIED + 1, ButtonPolicy::ALL_BUTTONS),
+         state_machine_(APPLIED + 1,
+                        StateArray(int(SMI_TOTAL), ButtonPolicy::BOGUS))
+{
+       // Build the state output map
+       outputs_[INITIAL] = CLOSE;
+       outputs_[VALID] = UNDO_ALL | OKAY | APPLY | CANCEL;
+       outputs_[INVALID] = UNDO_ALL | CANCEL;
+       outputs_[APPLIED] = OKAY | CLOSE;
+
+       // Build the state machine one state at a time
+       // NOTE:  Since CANCEL and HIDE always go to INITIAL they are
+       //        left out of the state machine and handled explicitly
+       //        in input().  This won't necessarily be true for all
+       //        policies though so I'll leave those two as distinct
+       //        inputs rather than merge them.  For example, a dialog
+       //        that doesn't update it's input fields when reshown
+       //        after being hidden needs a policy where CANCEL and
+       //        HIDE are treated differently.
+       //
+       // State::INITIAL
+       state_machine_[INITIAL][SMI_READ_ONLY] = INITIAL;
+       state_machine_[INITIAL][SMI_READ_WRITE] = INITIAL;
+       state_machine_[INITIAL][SMI_VALID] = VALID;
+       state_machine_[INITIAL][SMI_INVALID] = INVALID;
+       // State::VALID
+       state_machine_[VALID][SMI_VALID] = VALID;
+       state_machine_[VALID][SMI_READ_ONLY] = VALID;
+       state_machine_[VALID][SMI_READ_WRITE] = VALID;
+       state_machine_[VALID][SMI_INVALID] = INVALID;
+       state_machine_[VALID][SMI_APPLY] = APPLIED;
+       state_machine_[VALID][SMI_OKAY] = INITIAL;
+       state_machine_[VALID][SMI_UNDO_ALL] = INITIAL;
+       // State::INVALID
+       state_machine_[INVALID][SMI_VALID] = VALID;
+       state_machine_[INVALID][SMI_INVALID] = INVALID;
+       state_machine_[INVALID][SMI_READ_ONLY] = INVALID;
+       state_machine_[INVALID][SMI_READ_WRITE] = INVALID;
+       state_machine_[INVALID][SMI_UNDO_ALL] = INITIAL;
+       // State::APPLIED
+       state_machine_[APPLIED][SMI_VALID] = VALID;
+       state_machine_[APPLIED][SMI_INVALID] = INVALID;
+       state_machine_[APPLIED][SMI_OKAY] = INITIAL;
+       state_machine_[APPLIED][SMI_READ_ONLY] = APPLIED;
+       state_machine_[APPLIED][SMI_READ_WRITE] = APPLIED;
+}
+
+
+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 
+       // 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
+       if (SMI_CANCEL == input
+           || SMI_HIDE == input) {
+               state_ = INITIAL;
+       } else {
+               nextState(state_,
+                         input,
+                         state_machine_,
+                         "PreferencesPolicy");
+       }
+}
+
+
+/*-------------------------------OkCancelPolicy------------------------------*/
+
+
+OkCancelPolicy::OkCancelPolicy()
+       : state_(INITIAL),
+         outputs_(INVALID + 1, ButtonPolicy::ALL_BUTTONS),
+         state_machine_(INVALID + 1,
+                        StateArray(int(SMI_TOTAL), ButtonPolicy::BOGUS))
+{
+       // Build the state output map
+       outputs_[INITIAL] = CLOSE;
+       outputs_[VALID] = UNDO_ALL | OKAY | CANCEL;
+       outputs_[INVALID] = UNDO_ALL | CANCEL;
+
+       // Build the state machine one state at a time
+       // NOTE:  Since CANCEL and HIDE always go to INITIAL they are
+       //        left out of the state machine and handled explicitly
+       //        in input()
+       //
+       // State::INITIAL
+       state_machine_[INITIAL][SMI_READ_ONLY] = INITIAL;
+       state_machine_[INITIAL][SMI_READ_WRITE] = INITIAL;
+       state_machine_[INITIAL][SMI_VALID] = VALID;
+       state_machine_[INITIAL][SMI_INVALID] = INVALID;
+       // State::VALID
+       state_machine_[VALID][SMI_VALID] = VALID;
+       state_machine_[VALID][SMI_READ_ONLY] = VALID;
+       state_machine_[VALID][SMI_READ_WRITE] = VALID;
+       state_machine_[VALID][SMI_INVALID] = INVALID;
+       state_machine_[VALID][SMI_OKAY] = INITIAL;
+       state_machine_[VALID][SMI_UNDO_ALL] = INITIAL;
+       // State::INVALID
+       state_machine_[INVALID][SMI_VALID] = VALID;
+       state_machine_[INVALID][SMI_INVALID] = INVALID;
+       state_machine_[INVALID][SMI_READ_ONLY] = INVALID;
+       state_machine_[INVALID][SMI_READ_WRITE] = INVALID;
+       state_machine_[INVALID][SMI_UNDO_ALL] = INITIAL;
+}
+
+
+
+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) {
+               state_ = INITIAL;
+       } else {
+               nextState(state_, input, state_machine_, "OkCancelPolicy");
+       }
+}
+
+
+/*---------------------------OkCancelReadOnlyPolicy-------------------------*/
+
+
+OkCancelReadOnlyPolicy::OkCancelReadOnlyPolicy()
+       : state_(INITIAL),
+         outputs_(RO_INVALID + 1, ButtonPolicy::ALL_BUTTONS),
+         state_machine_(RO_INVALID + 1,
+                        StateArray(int(SMI_TOTAL), ButtonPolicy::BOGUS))
+{
+       // Build the state output map
+       outputs_[INITIAL] = CLOSE;
+       outputs_[VALID] = UNDO_ALL | OKAY | CANCEL;
+       outputs_[INVALID] = UNDO_ALL | CANCEL;
+       outputs_[RO_INITIAL] = CLOSE;
+       outputs_[RO_VALID] = UNDO_ALL | CANCEL;
+       outputs_[RO_INVALID] = UNDO_ALL | CANCEL;
+
+       // Build the state machine one state at a time
+       // NOTE:  Since CANCEL and HIDE always go to INITIAL they are
+       //        left out of the state machine and handled explicitly
+       //        in input()
+       //
+       // State::INITIAL
+       state_machine_[INITIAL][SMI_READ_WRITE] = INITIAL;
+       state_machine_[INITIAL][SMI_VALID] = VALID;
+       state_machine_[INITIAL][SMI_INVALID] = INVALID;
+       state_machine_[INITIAL][SMI_READ_ONLY] = RO_INITIAL;
+       // State::VALID
+       state_machine_[VALID][SMI_VALID] = VALID;
+       state_machine_[VALID][SMI_READ_WRITE] = VALID;
+       state_machine_[VALID][SMI_INVALID] = INVALID;
+       state_machine_[VALID][SMI_OKAY] = INITIAL;
+       state_machine_[VALID][SMI_UNDO_ALL] = INITIAL;
+       state_machine_[VALID][SMI_READ_ONLY] = RO_VALID;
+       // State::INVALID
+       state_machine_[INVALID][SMI_INVALID] = INVALID;
+       state_machine_[INVALID][SMI_READ_WRITE] = INVALID;
+       state_machine_[INVALID][SMI_VALID] = VALID;
+       state_machine_[INVALID][SMI_UNDO_ALL] = INITIAL;
+       state_machine_[INVALID][SMI_READ_ONLY] = RO_INVALID;
+       // State::RO_INITIAL
+       state_machine_[RO_INITIAL][SMI_READ_ONLY] = RO_INITIAL;
+       state_machine_[RO_INITIAL][SMI_VALID] = RO_VALID;
+       state_machine_[RO_INITIAL][SMI_INVALID] = RO_INVALID;
+       state_machine_[RO_INITIAL][SMI_READ_WRITE] = INITIAL;
+       // State::RO_VALID
+       state_machine_[RO_VALID][SMI_VALID] = RO_VALID;
+       state_machine_[RO_VALID][SMI_READ_ONLY] = RO_VALID;
+       state_machine_[RO_VALID][SMI_INVALID] = RO_INVALID;
+       state_machine_[RO_VALID][SMI_READ_WRITE] = VALID;
+       state_machine_[RO_VALID][SMI_UNDO_ALL] = RO_INITIAL;
+       // State::RO_INVALID
+       state_machine_[RO_INVALID][SMI_READ_ONLY] = RO_INVALID;
+       state_machine_[RO_INVALID][SMI_INVALID] = RO_INVALID;
+       state_machine_[RO_INVALID][SMI_VALID] = RO_VALID;
+       state_machine_[RO_INVALID][SMI_READ_WRITE] = INVALID;
+       state_machine_[RO_INVALID][SMI_UNDO_ALL] = RO_INITIAL;
+}
+
+
+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) {
+               state_ = INITIAL;
+       } else {
+               nextState(state_,
+                         input,
+                         state_machine_,
+                         "OkCancelReadOnlyPolicy");
+       }
+}
+
+
+/*--------------------------NoRepeatedApplyReadOnlyPolicy----------------------*/
+
+
+NoRepeatedApplyReadOnlyPolicy::NoRepeatedApplyReadOnlyPolicy()
+       : state_(INITIAL),
+         outputs_(RO_INVALID + 1, ButtonPolicy::ALL_BUTTONS),
+         state_machine_(RO_INVALID + 1,
+                        StateArray(int(SMI_TOTAL), ButtonPolicy::BOGUS))
+{
+       // Build the state output map
+       outputs_[INITIAL] = CLOSE;
+       outputs_[VALID] = UNDO_ALL | OKAY | APPLY | CANCEL;
+       outputs_[INVALID] = UNDO_ALL | CANCEL;
+       outputs_[RO_INITIAL] = CLOSE;
+       outputs_[RO_VALID] = UNDO_ALL | CANCEL;
+       outputs_[RO_INVALID] = UNDO_ALL | CANCEL;
+
+       // Build the state machine one state at a time
+       // NOTE:  Since CANCEL and HIDE always go to INITIAL they are
+       //        left out of the state machine and handled explicitly
+       //        in input()
+       //
+       // State::INITIAL
+       state_machine_[INITIAL][SMI_READ_WRITE] = INITIAL;
+       state_machine_[INITIAL][SMI_VALID] = VALID;
+       state_machine_[INITIAL][SMI_INVALID] = INVALID;
+       state_machine_[INITIAL][SMI_READ_ONLY] = RO_INITIAL;
+       // State::VALID
+       state_machine_[VALID][SMI_VALID] = VALID;
+       state_machine_[VALID][SMI_READ_WRITE] = VALID;
+       state_machine_[VALID][SMI_INVALID] = INVALID;
+       state_machine_[VALID][SMI_OKAY] = INITIAL;
+       state_machine_[VALID][SMI_APPLY] = INITIAL;
+       state_machine_[VALID][SMI_UNDO_ALL] = INITIAL;
+       state_machine_[VALID][SMI_READ_ONLY] = RO_VALID;
+       // State::INVALID
+       state_machine_[INVALID][SMI_INVALID] = INVALID;
+       state_machine_[INVALID][SMI_READ_WRITE] = INVALID;
+       state_machine_[INVALID][SMI_VALID] = VALID;
+       state_machine_[INVALID][SMI_UNDO_ALL] = INITIAL;
+       state_machine_[INVALID][SMI_READ_ONLY] = RO_INVALID;
+       // State::RO_INITIAL
+       state_machine_[RO_INITIAL][SMI_READ_ONLY] = RO_INITIAL;
+       state_machine_[RO_INITIAL][SMI_VALID] = RO_VALID;
+       state_machine_[RO_INITIAL][SMI_INVALID] = RO_INVALID;
+       state_machine_[RO_INITIAL][SMI_READ_WRITE] = INITIAL;
+       // State::RO_VALID
+       state_machine_[RO_VALID][SMI_VALID] = RO_VALID;
+       state_machine_[RO_VALID][SMI_READ_ONLY] = RO_VALID;
+       state_machine_[RO_VALID][SMI_INVALID] = RO_INVALID;
+       state_machine_[RO_VALID][SMI_READ_WRITE] = VALID;
+       state_machine_[RO_VALID][SMI_UNDO_ALL] = RO_INITIAL;
+       // State::RO_INVALID
+       state_machine_[RO_INVALID][SMI_INVALID] = RO_INVALID;
+       state_machine_[RO_INVALID][SMI_READ_ONLY] = RO_INVALID;
+       state_machine_[RO_INVALID][SMI_VALID] = RO_VALID;
+       state_machine_[RO_INVALID][SMI_READ_WRITE] = INVALID;
+       state_machine_[RO_INVALID][SMI_UNDO_ALL] = RO_INITIAL;
+}
+
+
+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) {
+               state_ = INITIAL;
+       } else {
+               nextState(state_,
+                         input,
+                         state_machine_,
+                         "NoRepeatedApplyReadOnlyPolicy");
+       }
+}
+
+
+/*--------------------------OkApplyCancelReadOnlyPolicy----------------------*/
+
+
+OkApplyCancelReadOnlyPolicy::OkApplyCancelReadOnlyPolicy()
+       : state_(INITIAL),
+         outputs_(RO_APPLIED + 1, ButtonPolicy::ALL_BUTTONS),
+         state_machine_(RO_APPLIED + 1,
+                        StateArray(int(SMI_TOTAL), ButtonPolicy::BOGUS))
+{
+       // Build the state output map
+       outputs_[INITIAL] = CLOSE;
+       outputs_[VALID] = UNDO_ALL | OKAY | APPLY | CANCEL;
+       outputs_[INVALID] = UNDO_ALL | CANCEL;
+       outputs_[APPLIED] = OKAY | APPLY | CLOSE;
+       outputs_[RO_INITIAL] = CLOSE;
+       outputs_[RO_VALID] = UNDO_ALL | CANCEL;
+       outputs_[RO_INVALID] = UNDO_ALL | CANCEL;
+       outputs_[RO_APPLIED] = CLOSE;
+
+       // Build the state machine one state at a time
+       // NOTE:  Since CANCEL and HIDE always go to INITIAL they are
+       //        left out of the state machine and handled explicitly
+       //        in input()
+       //
+       // State::INITIAL
+       state_machine_[INITIAL][SMI_READ_WRITE] = INITIAL;
+       state_machine_[INITIAL][SMI_VALID] = VALID;
+       state_machine_[INITIAL][SMI_INVALID] = INVALID;
+       state_machine_[INITIAL][SMI_READ_ONLY] = RO_INITIAL;
+       // State::VALID
+       state_machine_[VALID][SMI_VALID] = VALID;
+       state_machine_[VALID][SMI_READ_WRITE] = VALID;
+       state_machine_[VALID][SMI_INVALID] = INVALID;
+       state_machine_[VALID][SMI_OKAY] = INITIAL;
+       state_machine_[VALID][SMI_UNDO_ALL] = INITIAL;
+       state_machine_[VALID][SMI_APPLY] = APPLIED;
+       state_machine_[VALID][SMI_READ_ONLY] = RO_VALID;
+       // State::INVALID
+       state_machine_[INVALID][SMI_INVALID] = INVALID;
+       state_machine_[INVALID][SMI_READ_WRITE] = INVALID;
+       state_machine_[INVALID][SMI_VALID] = VALID;
+       state_machine_[INVALID][SMI_UNDO_ALL] = INITIAL;
+       state_machine_[INVALID][SMI_READ_ONLY] = RO_INVALID;
+       // State::APPLIED
+       state_machine_[APPLIED][SMI_APPLY] = APPLIED;
+       state_machine_[APPLIED][SMI_READ_WRITE] = APPLIED;
+       state_machine_[APPLIED][SMI_VALID] = VALID;
+       state_machine_[APPLIED][SMI_INVALID] = INVALID;
+       state_machine_[APPLIED][SMI_OKAY] = INITIAL;
+       state_machine_[APPLIED][SMI_READ_ONLY] = RO_APPLIED;
+       // State::RO_INITIAL
+       state_machine_[RO_INITIAL][SMI_READ_ONLY] = RO_INITIAL;
+       state_machine_[RO_INITIAL][SMI_VALID] = RO_VALID;
+       state_machine_[RO_INITIAL][SMI_INVALID] = RO_INVALID;
+       state_machine_[RO_INITIAL][SMI_READ_WRITE] = INITIAL;
+       // State::RO_VALID
+       state_machine_[RO_VALID][SMI_VALID] = RO_VALID;
+       state_machine_[RO_VALID][SMI_READ_ONLY] = RO_VALID;
+       state_machine_[RO_VALID][SMI_INVALID] = RO_INVALID;
+       state_machine_[RO_VALID][SMI_READ_WRITE] = VALID;
+       state_machine_[RO_VALID][SMI_UNDO_ALL] = RO_INITIAL;
+       // State::RO_INVALID
+       state_machine_[RO_INVALID][SMI_INVALID] = RO_INVALID;
+       state_machine_[RO_INVALID][SMI_READ_ONLY] = RO_INVALID;
+       state_machine_[RO_INVALID][SMI_VALID] = RO_VALID;
+       state_machine_[RO_INVALID][SMI_READ_WRITE] = INVALID;
+       state_machine_[RO_INVALID][SMI_UNDO_ALL] = RO_INITIAL;
+       // State::RO_APPLIED
+       state_machine_[RO_APPLIED][SMI_READ_ONLY] = RO_APPLIED;
+       state_machine_[RO_APPLIED][SMI_INVALID] = RO_INVALID;
+       state_machine_[RO_APPLIED][SMI_VALID] = RO_VALID;
+       state_machine_[RO_APPLIED][SMI_READ_WRITE] = APPLIED;
+}
+
+
+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) {
+               state_ = INITIAL;
+       } else {
+               nextState(state_,
+                         input,
+                         state_machine_,
+                         "OkApplyCancelReadOnlyPolicy");
+       }
+}
+
+
+/*--------------------------OkApplyCancelPolicy----------------------*/
+
+
+OkApplyCancelPolicy::OkApplyCancelPolicy()
+       : state_(INITIAL),
+         outputs_(APPLIED + 1, ButtonPolicy::ALL_BUTTONS),
+         state_machine_(APPLIED + 1,
+                        StateArray(int(SMI_TOTAL), ButtonPolicy::BOGUS))
+{
+       // Build the state output map
+       outputs_[INITIAL] = CLOSE;
+       outputs_[VALID] = UNDO_ALL | OKAY | APPLY | CANCEL;
+       outputs_[INVALID] = UNDO_ALL | CANCEL;
+       outputs_[APPLIED] = OKAY | APPLY | CLOSE;
+
+       // Build the state machine one state at a time
+       // NOTE:  Since CANCEL and HIDE always go to INITIAL they are
+       //        left out of the state machine and handled explicitly
+       //        in input()
+       //
+       // State::INITIAL
+       state_machine_[INITIAL][SMI_READ_ONLY] = INITIAL;
+       state_machine_[INITIAL][SMI_READ_WRITE] = INITIAL;
+       state_machine_[INITIAL][SMI_VALID] = VALID;
+       state_machine_[INITIAL][SMI_INVALID] = INVALID;
+       // State::VALID
+       state_machine_[VALID][SMI_VALID] = VALID;
+       state_machine_[VALID][SMI_READ_ONLY] = VALID;
+       state_machine_[VALID][SMI_READ_WRITE] = VALID;
+       state_machine_[VALID][SMI_INVALID] = INVALID;
+       state_machine_[VALID][SMI_OKAY] = INITIAL;
+       state_machine_[VALID][SMI_UNDO_ALL] = INITIAL;
+       state_machine_[VALID][SMI_APPLY] = APPLIED;
+       // State::INVALID
+       state_machine_[INVALID][SMI_INVALID] = INVALID;
+       state_machine_[INVALID][SMI_READ_ONLY] = INVALID;
+       state_machine_[INVALID][SMI_READ_WRITE] = INVALID;
+       state_machine_[INVALID][SMI_VALID] = VALID;
+       state_machine_[INVALID][SMI_UNDO_ALL] = INITIAL;
+       // State::APPLIED
+       state_machine_[APPLIED][SMI_APPLY] = APPLIED;
+       state_machine_[APPLIED][SMI_READ_ONLY] = APPLIED;
+       state_machine_[APPLIED][SMI_READ_WRITE] = APPLIED;
+       state_machine_[APPLIED][SMI_VALID] = VALID;
+       state_machine_[APPLIED][SMI_INVALID] = INVALID;
+       state_machine_[APPLIED][SMI_OKAY] = INITIAL;
+}
+
+
+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) {
+               state_ = INITIAL;
+       } else {
+               nextState(state_,
+                         input,
+                         state_machine_,
+                         "OkApplyCancelPolicy");
+       }
+}
+
+
+/*--------------------------NoRepeatedApplyPolicy----------------------*/
+
+
+NoRepeatedApplyPolicy::NoRepeatedApplyPolicy()
+       : state_(INITIAL),
+         outputs_(INVALID + 1, ButtonPolicy::ALL_BUTTONS),
+         state_machine_(INVALID + 1,
+                        StateArray(int(SMI_TOTAL), ButtonPolicy::BOGUS))
+{
+       // Build the state output map
+       outputs_[INITIAL] = CLOSE;
+       outputs_[VALID] = UNDO_ALL | OKAY | APPLY | CANCEL;
+       outputs_[INVALID] = UNDO_ALL | CANCEL;
+
+       // Build the state machine one state at a time
+       // NOTE:  Since CANCEL and HIDE always go to INITIAL they are
+       //        left out of the state machine and handled explicitly
+       //        in input()
+       //
+       // State::INITIAL
+       state_machine_[INITIAL][SMI_READ_ONLY] = INITIAL;
+       state_machine_[INITIAL][SMI_READ_WRITE] = INITIAL;
+       state_machine_[INITIAL][SMI_VALID] = VALID;
+       state_machine_[INITIAL][SMI_INVALID] = INVALID;
+       // State::VALID
+       state_machine_[VALID][SMI_VALID] = VALID;
+       state_machine_[VALID][SMI_READ_ONLY] = VALID;
+       state_machine_[VALID][SMI_READ_WRITE] = VALID;
+       state_machine_[VALID][SMI_INVALID] = INVALID;
+       state_machine_[VALID][SMI_OKAY] = INITIAL;
+       state_machine_[VALID][SMI_APPLY] = INITIAL;
+       state_machine_[VALID][SMI_UNDO_ALL] = INITIAL;
+       // State::INVALID
+       state_machine_[INVALID][SMI_INVALID] = INVALID;
+       state_machine_[INVALID][SMI_READ_ONLY] = INVALID;
+       state_machine_[INVALID][SMI_READ_WRITE] = INVALID;
+       state_machine_[INVALID][SMI_VALID] = VALID;
+       state_machine_[INVALID][SMI_UNDO_ALL] = INITIAL;
+}
+
+
+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) {
+               state_ = INITIAL;
+       } else {
+               nextState(state_,
+                         input,
+                         state_machine_,
+                         "NoRepeatedApplyPolicy");
+       }
+}
diff --git a/src/frontends/controllers/ButtonPolicies.h b/src/frontends/controllers/ButtonPolicies.h
new file mode 100644 (file)
index 0000000..e8bf22b
--- /dev/null
@@ -0,0 +1,473 @@
+// -*- C++ -*-
+/* ButtonPolicies.h
+ * 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
+ * ======================================================
+ *
+ *           LyX, The Document Processor
+ *
+ *           Copyright 1995 Matthias Ettrich
+ *           Copyright 1995-2000 The LyX Team.
+ *
+ *           This file Copyright 2000
+ *           Allan Rae
+ * ======================================================
+ */
+
+#ifndef BUTTONPOLICIES_H
+#define BUTTONPOLICIES_H
+
+
+#include <vector>
+#include <boost/utility.hpp>
+
+#include "support/LOstream.h"
+
+/** An abstract base class for button policies.
+    A state machine implementation of the various button policies used by the
+    dialogs. Only the policy is implemented here.  Separate ButtonController
+    classes are needed for each GUI implementation.
+
+               Policy          | ReadOnly | Apply Button | Repeated Apply
+    ========================================================================
+    OkCancel                   |       N  |    N         |     -
+    OkCancelReadOnly           |       Y  |    N         |     -
+    OkApplyCancel              |       N  |    Y         |     Y
+    OkApplyCancelReadOnly      |       Y  |    Y         |     Y
+    NoRepeatedApply            |       N  |    Y         |     N
+    NoRepeatedApplyReadOnly    |       Y  |    Y         |     N
+    Preferences                        |       N  |    Y         | No (Ok-Close)
+    Ignorant                   |      N/A |    N/A       |    N/A
+    ========================================================================
+
+    Policy
+       The name of the policy
+    ReadOnly
+       Does the policy treat read-only docs differently to read-write docs?
+       This usually means that when an SMI_READ_ONLY input arrives then
+       all the buttons are disabled except Cancel/Close.  The state
+       machine tracks the inputs (valid/invalid) and has states for all
+       combinations. When an SMI_READ_WRITE input arrives the appropriate
+       machine state is entered (just as if the document had always been
+       read-write).
+       NOTE: If a dialog doesn't care about the read-only status of a document
+       (and uses an appropriate policy) it can never get into a read-only state
+       so isReadOnly() can only ever return false even though the document may
+       be read-only.
+    Repeated Apply
+       Simply means that it is alright to use the Apply button multiple times
+       without requiring a change of the dialog contents.  If no repeating is
+       allowed the Ok+Apply buttons are deactivated.  The Preferences dialog
+       has its own special version of repeated apply handling because its Ok
+       button is actually a Save button -- its always reasonable to Save the
+       preferences if the dialog has changed since the last save.
+
+    The IgnorantPolicy is a special case that allows anything.
+ */
+class ButtonPolicy : public noncopyable {
+public:
+       ///
+       virtual ~ButtonPolicy() {}
+
+       /** The various possible state names.
+           Not all state-machines have this many states.  However, we need
+           to define them all here so we can share the code.
+       */
+       enum State {
+               ///
+               INITIAL = 0,
+               ///
+               VALID,
+               ///
+               INVALID,
+               ///
+               APPLIED,
+               ///
+               RO_INITIAL,
+               ///
+               RO_VALID,
+               ///
+               RO_INVALID,
+               ///
+               RO_APPLIED,
+               ///
+               BOGUS = 55
+       };
+       
+       /// The various button types.
+       enum Button {
+               ///
+               CLOSE    = 0,  // Not a real button, but effectively !CANCEL
+               ///
+               OKAY     = 1,
+               ///
+               APPLY    = 2,
+               ///
+               CANCEL   = 4,
+               ///
+               UNDO_ALL = 8
+       };
+       ///
+       static const Button ALL_BUTTONS =
+               Button(OKAY | APPLY | CANCEL | UNDO_ALL);
+  
+       /** State machine inputs.
+           All the policies so far have both CANCEL and HIDE always going to
+           INITIAL. This won't necessarily be true for all [future] policies
+           though so I'll leave those two as distinct inputs rather than merge
+           them.  For example, a dialog that doesn't update it's input fields
+           when reshown after being hidden needs a policy where CANCEL and
+           HIDE are treated differently.
+        */
+       enum SMInput {
+               ///
+               SMI_VALID = 0,
+               ///
+               SMI_INVALID,
+               ///
+               SMI_OKAY,
+               ///
+               SMI_APPLY,
+               ///
+               SMI_CANCEL,
+               ///
+               SMI_UNDO_ALL,
+               ///
+               SMI_HIDE,
+               ///
+               SMI_READ_ONLY,
+               ///
+               SMI_READ_WRITE,
+               ///
+               SMI_NOOP,
+               ///
+               SMI_TOTAL       // not a real input
+       };
+
+       /// Trigger a transition with this input.
+       virtual void input(SMInput) = 0;
+       /// Activation status of a button
+       virtual bool buttonStatus(Button) const = 0;
+       /// Are we in a read-only state?
+       virtual bool isReadOnly() const = 0;
+
+       /// Transition map of the state machine.
+       typedef std::vector<State> StateArray;
+       ///
+       typedef std::vector<StateArray> StateMachine;
+       /// The state outputs are the status of the buttons.
+       typedef std::vector<int> StateOutputs;
+};
+
+
+inline
+std::ostream & operator<<(std::ostream & os, ButtonPolicy::State st)
+{
+       os << int(st);
+       return os;
+}
+
+
+inline
+std::ostream & operator<<(std::ostream & os, ButtonPolicy::SMInput smi)
+{
+       os << int(smi);
+       return os;
+}
+
+
+//--------------------- Actual Policy Classes -----------------------------
+
+/** Ok and Cancel buttons for dialogs with read-only operation.
+    Note: This scheme supports the relabelling of Cancel to Close and
+    vice versa.
+    This is based on the value of the bool state of the Button::CANCEL.
+    true == Cancel, false == Close
+ */
+class OkCancelPolicy : public ButtonPolicy {
+public:
+       ///
+       OkCancelPolicy();
+       ///
+       //virtual ~OkCancelPolicy() {}
+       
+       /// Trigger a transition with this input.
+       virtual void input(SMInput);
+       /** Activation status of a button.
+           We assume that we haven't gotten into an undefined state.
+           This is reasonable since we can only reach states defined
+           in the state machine and they should all have been defined in
+           the outputs_ variable.  Perhaps we can do something at compile
+           time to check that all the states have corresponding outputs.
+        */
+       virtual bool buttonStatus(Button button) const {
+               return button & outputs_[state_];
+       }
+       /// Are we in a read-only state?
+       virtual bool isReadOnly() const {
+               return false;
+       }
+private:
+       /// Current state.
+       State state_;
+       /// Which buttons are active for a given state.
+       StateOutputs outputs_;
+       ///
+       StateMachine state_machine_;
+};
+
+/** Ok and Cancel buttons for dialogs where read-only operation is blocked.
+    The state machine design for this policy allows changes to occur within
+    the dialog while a file is read-only -- the okay button is disabled until
+    a read-write input is given.  When the file is made read-write the dialog
+    will then be in the correct state (as if the file had always been
+    read-write).
+    Note: This scheme supports the relabelling of Cancel to Close
+    and vice versa.
+    This is based on the value of the bool state of the Button::CANCEL.
+    true == Cancel, false == Close
+ */
+class OkCancelReadOnlyPolicy : public ButtonPolicy {
+public:
+       ///
+       OkCancelReadOnlyPolicy();
+       ///
+       //virtual ~OkCancelReadOnlyPolicy() {}
+       
+       /// Trigger a transition with this input.
+       virtual void input(SMInput);
+       /// Activation status of a button.
+       virtual bool buttonStatus(Button button) const {
+               return button & outputs_[state_];
+       }
+       /// Are we in a read-only state?
+       virtual bool isReadOnly() const {
+               return RO_INITIAL == state_
+                       || RO_VALID == state_
+                       || RO_INVALID == state_
+                       || RO_APPLIED == state_;
+       }
+private:
+       /// Current state.
+       State state_;
+       /// Which buttons are active for a given state.
+       StateOutputs outputs_;
+       ///
+       StateMachine state_machine_;
+};
+
+
+/** Ok, Apply and Cancel buttons for dialogs where read-only operation
+    is blocked.
+    Repeated Apply are not allowed.  Likewise,  Ok cannot follow Apply without
+    some valid input. That is, the dialog contents must change between
+    each Apply or Apply and Ok.
+    The state machine design for this policy allows changes to occur within
+    the dialog while a file is read-only -- the Ok+Apply buttons are disabled
+    until a read-write input is given.  When the file is made read-write the
+    dialog will then be in the correct state (as if the file had always been
+    read-write).
+    Note: This scheme supports the relabelling of Cancel to Close
+    and vice versa.
+    This is based on the value of the bool state of the Button::CANCEL.
+    true == Cancel, false == Close
+ */
+class NoRepeatedApplyReadOnlyPolicy : public ButtonPolicy
+{
+public:
+       ///
+       NoRepeatedApplyReadOnlyPolicy();
+       ///
+       //virtual ~NoRepeatedApplyReadOnlyPolicy() {}
+       
+       /// Trigger a transition with this input.
+       virtual void input(SMInput);
+       /// Activation status of a button.
+       virtual bool buttonStatus(Button button) const {
+               return button & outputs_[state_];
+       }
+       /// Are we in a read-only state?
+       virtual bool isReadOnly() const {
+               return RO_INITIAL == state_
+                       || RO_VALID == state_
+                       || RO_INVALID == state_
+                       || RO_APPLIED == state_;
+       }
+private:
+       /// Current state.
+       State state_;
+       /// Which buttons are active for a given state.
+       StateOutputs outputs_;
+       ///
+       StateMachine state_machine_;
+};
+
+
+/** Ok, Apply and Cancel buttons for dialogs where read-only
+    operation is blocked.
+    Repeated Apply is allowed.  Likewise,  Ok can follow Apply.
+    The state machine design for this policy allows changes to occur within
+    the dialog while a file is read-only -- the Ok+Apply buttons are disabled
+    until a read-write input is given.  When the file is made read-write the
+    dialog will then be in the correct state (as if the file had always been
+    read-write).
+    Note: This scheme supports the relabelling of Cancel to Close
+    and vice versa.
+    This is based on the value of the bool state of the Button::CANCEL.
+    true == Cancel, false == Close
+ */
+class OkApplyCancelReadOnlyPolicy : public ButtonPolicy {
+public:
+       ///
+       OkApplyCancelReadOnlyPolicy();
+       ///
+       //virtual ~OkApplyCancelReadOnlyPolicy() {}
+       
+       /// Trigger a transition with this input.
+       virtual void input(SMInput);
+       /// Activation status of a button.
+       virtual bool buttonStatus(Button button) const {
+               return button & outputs_[state_];
+       }
+       /// Are we in a read-only state?
+       virtual bool isReadOnly() const {
+               return RO_INITIAL == state_
+                       || RO_VALID == state_
+                       || RO_INVALID == state_
+                       || RO_APPLIED == state_;
+       }
+private:
+       /// Current state.
+       State state_;
+       /// Which buttons are active for a given state.
+       StateOutputs outputs_;
+       ///
+       StateMachine state_machine_;
+};
+
+
+/** Ok, Apply and Cancel buttons for dialogs where repeated Apply is allowed.
+    Note: This scheme supports the relabelling of Cancel to Close
+    and vice versa.
+    This is based on the value of the bool state of the Button::CANCEL.
+    true == Cancel, false == Close
+ */
+class OkApplyCancelPolicy : public ButtonPolicy {
+public:
+       ///
+       OkApplyCancelPolicy();
+       ///
+       //virtual ~OkApplyCancelPolicy() {}
+       
+       /// Trigger a transition with this input.
+       virtual void input(SMInput);
+       /// Activation status of a button.
+       virtual bool buttonStatus(Button button) const {
+               return button & outputs_[state_];
+       }
+       /// Are we in a read-only state?
+       virtual bool isReadOnly() const {
+               return false;
+       }
+private:
+       /// Current state.
+       State state_;
+       /// Which buttons are active for a given state.
+       StateOutputs outputs_;
+       ///
+       StateMachine state_machine_;
+};
+
+
+/** Ok, Apply and Cancel buttons for dialogs with no repeated Apply.
+    Note: This scheme supports the relabelling of Cancel to Close
+    and vice versa.
+    This is based on the value of the bool state of the Button::CANCEL.
+    true == Cancel, false == Close
+ */
+class NoRepeatedApplyPolicy : public ButtonPolicy {
+public:
+       ///
+       NoRepeatedApplyPolicy();
+       ///
+       //virtual ~NoRepeatedApplyPolicy() {}
+       
+       /// Trigger a transition with this input.
+       virtual void input(SMInput);
+       /// Activation status of a button.
+       virtual bool buttonStatus(Button button) const {
+               return button & outputs_[state_];
+       }
+       /// Are we in a read-only state?
+       virtual bool isReadOnly() const {
+               return false;
+       }
+private:
+       /// Current state.
+       State state_;
+       /// Which buttons are active for a given state.
+       StateOutputs outputs_;
+       ///
+       StateMachine state_machine_;
+};
+
+
+/** Defines the policy used by the Preferences dialog.
+    Four buttons: Ok (Save), Apply, Cancel/Close, Restore.
+    Note: This scheme supports the relabelling of Cancel to Close
+    and vice versa.
+    This is based on the value of the bool state of the Button::CANCEL.
+    true == Cancel, false == Close
+ */
+class PreferencesPolicy : public ButtonPolicy {
+public:
+       ///
+       PreferencesPolicy();
+       ///
+       //virtual ~PreferencesPolicy() {}
+       
+       /// Trigger a transition with this input.
+       virtual void input(SMInput);
+       /// Activation status of a button.
+       virtual bool buttonStatus(Button button) const {
+               return button & outputs_[state_];
+       }
+       /// Are we in a read-only state?
+       virtual bool isReadOnly() const {
+               return false;
+       }
+private:
+       /// Current state.
+       State state_;
+       /// Which buttons are active for a given state.
+       StateOutputs outputs_;
+       ///
+       StateMachine state_machine_;
+};
+
+
+/** Defines the policy used by dialogs that are forced to support a button
+    controller when they either don't have a use for one or are not ready to
+    use one.  This may be useful when testing a new button policy but wishing
+    to minimise problems to users by supplying an anything-goes policy via a
+    preprocessor directive.
+ */
+class IgnorantPolicy : public ButtonPolicy {
+public:
+       //virtual ~IgnorantPolicy() {}
+       
+       /// Trigger a transition with this input.
+       virtual void input(SMInput) {}
+       /// Activation status of a button.
+       virtual bool buttonStatus(Button) const {
+               return true;
+       }
+       /// Are we in a read-only state?
+       virtual bool isReadOnly() const {
+               return false;
+       }
+};
+
+#endif
diff --git a/src/frontends/controllers/ChangeLog b/src/frontends/controllers/ChangeLog
new file mode 100644 (file)
index 0000000..cbce26a
--- /dev/null
@@ -0,0 +1,112 @@
+2001-03-14  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * Merging changes from BRANCH_MVC back into HEAD.
+
+2001-03-12  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * Makefile.am: add ControlBibitem.[Ch].
+
+       * ControlBibitem.[Ch]: new files that together define the Controller
+       for a Bibitem popup.
+
+       * ControlCommand.h (c-tor): give  kb_action a default value of
+       LFUN_NOACTION.
+       
+       * ControlCommand.C (apply): do nothing if kb_action is LFUN_NOACTION.
+       
+       * ControlCitation.[Ch]: moved search functions out of class.
+       (bibkeysInfo): new method. Returns const reference to private data.
+       (searchKeys): added case-sensitive switch. Used only by simpleSearch
+       for now.
+
+2001-03-09  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * ControlCitation.[Ch]: added Search functions to the class,
+       (shamelessly lifted from Marco's gnome code). I think that these would
+       be better as helper functions outside the class, but this is a first
+       stab at it.
+
+2001-03-07  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * ControlCitation.[Ch]: (getBibkeyList): removed from class
+       ControlCitation.
+       (getBibkeys, getBibkeyInfo): added to class ControlCitation.
+       (getStringFromVector, getVectorFromString, parseBibTeX): new helper
+       funcs. parseBibTeX() is lifted staraight out of Marco's gnome
+       implementation of FormCitation.
+
+2001-03-05  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * ButtonPolicies.h: add SMI_NOOP to enum.
+
+       * ButtonPolicies.C (nextState): add if-statement for SMI_NOOP.
+
+       * ButtonController.C (input): add "optimising" if-statement. Actually,
+       things don't work correctly without it...
+
+2001-03-02  John Levon  <moz@compsoc.man.ac.uk>
+
+       * ViewBase.h: remove #pragma directive
+
+       * ControlConnection.[Ch] (ControlConnectBI c-tor): add explicit c-tor
+       to make g++ happy.
+
+2001-03-02  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * ButtonPolicies.[Ch]: moved from ../ButtonPolicies.[Ch]
+
+       * Makefile.am: added ButtonPolicies.[Ch]
+
+       * ButtonController.[Ch]: ButtonController is split into
+       ButtonControllerBase and a template ButtonController class. The base
+       class no longer stores a pointer to a ButtonPolicy, but instead
+       accesses the actual instantiation of the policy through a pure virtual
+       method bp(). This method and the ButtonPolicy itself are instantiated
+       in the templatised ButtonController class. This class is derived from
+       the GUI-specific GUIBC class, meaning that the frontends know
+       nothing about the actual policy decided upon by the controllers.
+
+       * ControlBase.[Ch]: No longer store the View or the ButtonController.
+       Instead the actual instantiations are accessed through pure virtual
+       methods view() and bc(). The daughter classes are responsible for the
+       actual View and ButtonController.
+
+       * ControlCitation.h: the templatised class GUICitation instantiates
+       the methods view() and bc(). It also stores the instances of the
+       View and ButtonController.
+       
+2001-02-23  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * ButtonControllerBase.[Ch]: renamed as ButtonController.[Ch]. Class
+       also changed to ButtonController.
+
+       * ControlBase.[Ch]:
+       * ControlConnections.[Ch]:
+       * ControlCommand.[Ch]:
+       * ControlCitation.[Ch]:
+       * ViewBase.h: Changes associated with this.
+
+2001-01-15  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * ButtonControllerBase.[Ch]: new files. Split Allan's original
+       xforms/ButtonController class into a GUI-I class (here) and an
+       xforms-specific derived class, to be found in xforms/xformsBC.[Ch].
+
+       * ControlBase.[Ch]: new files. ControlBase is an abstract base class
+       from which all Dialog Controllers should be derived. the Controllers
+       are GUI-independent, but are designed to control the behaviour of
+       GUI-specific implementaions of each dialog.
+
+       * ControlConnections.[Ch]: new files. Classes controlling the
+       connections of buffer-independent, buffer-dependent and Inset dialogs
+       with the LyX kernel.
+
+       * ControlCommand.[Ch]: new files. A controller for all dialogs for the
+       InsetCommand subset of insets.
+
+       * ControlCitation.[Ch]: new files. The test specialisation! A
+       controller for the Citation dialog.
+
+       * ViewBase.h: new file. ViewBase is an abstract base class from which
+       GUI-specific dialogs should be derived. The functionality that the GUIs
+       must now implement is much reduced.
diff --git a/src/frontends/controllers/ControlBase.C b/src/frontends/controllers/ControlBase.C
new file mode 100644 (file)
index 0000000..6b18056
--- /dev/null
@@ -0,0 +1,59 @@
+// -*- C++ -*-
+/* This file is part of
+ * ====================================================== 
+ *
+ *           LyX, The Document Processor
+ *
+ *           Copyright 2000 The LyX Team.
+ *
+ * ======================================================
+ *
+ * \file ControlBase.C
+ * \author Angus Leeming <a.leeming@ic.ac.uk>
+ */
+
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
+#include <config.h>
+
+#include "buffer.h"
+#include "ButtonController.h"
+#include "ControlBase.h"
+#include "LyXView.h"
+#include "support/LAssert.h"
+
+void ControlBase::ApplyButton()
+{
+       apply();
+       bc().apply();
+}
+
+
+void ControlBase::OKButton()
+{
+       apply();
+       hide();
+       bc().ok();
+}
+
+
+void ControlBase::CancelButton()
+{
+       hide();
+       bc().cancel();
+}
+
+
+void ControlBase::RestoreButton()
+{
+       update();
+       bc().undoAll();
+}
+
+
+bool ControlBase::isReadonly() const
+{
+       return lv_.buffer()->isReadonly();
+}
diff --git a/src/frontends/controllers/ControlBase.h b/src/frontends/controllers/ControlBase.h
new file mode 100644 (file)
index 0000000..7593ec3
--- /dev/null
@@ -0,0 +1,83 @@
+// -*- C++ -*-
+/* This file is part of
+ * ====================================================== 
+ *
+ *           LyX, The Document Processor
+ *
+ *           Copyright 2000 The LyX Team.
+ *
+ * ======================================================
+ *
+ * \file ControlBase.h
+ * \author Angus Leeming <a.leeming@ic.ac.uk>
+ *
+ * The Controller connects the GUI-dependent popup to any appropriate
+ * signals and dispatches any changes to the kernel.
+ * It has no knowledge of the actual instantiation of the
+ * GUI-dependent View and ButtonController, which should therefore
+ * be created elsewhere.
+ * Once created, the Controller will take care of their initialisation,
+ * management and, ultimately, destruction.
+ */
+
+#ifndef CONTROLBASE_H
+#define CONTROLBASE_H
+
+#ifdef __GNUG__
+#pragma interface
+#endif
+
+#include "DialogBase.h" // This can go eventually
+
+class ButtonControllerBase;
+class Dialogs;
+class LyXView;
+class ViewBase;
+
+/** Abstract base class for Controllers with a ButtonController.
+ */
+class ControlBase : public DialogBase
+{
+public: // methods
+       ///
+       ControlBase(LyXView & lv) : lv_(lv) {}
+       ///
+       virtual ~ControlBase() {};
+
+       /// These functions are called when the controlling buttons are pressed.
+       ///
+       void ApplyButton();
+       ///
+       void OKButton();
+       ///
+       void CancelButton();
+       ///
+       void RestoreButton();
+
+       /// The View may need to know if the buffer is read-only.
+       bool isReadonly() const;
+
+       /** Allow the view to access the ButtonController. This method must be
+           instantiated in a daughter class that creates the actual instance
+           of the ButtonController. */
+       virtual ButtonControllerBase & bc() = 0;
+
+protected:
+       /// Get changed parameters and Dispatch them to the kernel.
+       virtual void apply() = 0;
+       /// Disconnect signals and hide View.
+       virtual void hide() = 0;
+       /// Update dialog before showing it.
+       virtual void update() = 0;
+
+       /** Allow the Controller to access the View. This method must be
+           instantiated in a daughter class that creates the actual instance
+           of the View. */
+       virtual ViewBase & view() = 0;
+       
+       /// Get at the kernel Dispatch methods we need to apply() parameters.
+       LyXView & lv_;
+};
+
+
+#endif // CONTROLBASE_H
diff --git a/src/frontends/controllers/ControlBibitem.C b/src/frontends/controllers/ControlBibitem.C
new file mode 100644 (file)
index 0000000..e92661d
--- /dev/null
@@ -0,0 +1,53 @@
+// -*- C++ -*-
+/* This file is part of
+ * ====================================================== 
+ *
+ *           LyX, The Document Processor
+ *
+ *           Copyright 2000 The LyX Team.
+ *
+ * ======================================================
+ *
+ * \file ControlBibitem.C
+ * \author Angus Leeming <a.leeming@ic.ac.uk>
+ */
+
+#include <algorithm>
+
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
+#include <config.h>
+#include "ControlBibitem.h"
+#include "Dialogs.h"
+#include "LyXView.h"
+#include "BufferView.h"
+
+ControlBibitem::ControlBibitem(LyXView & lv, Dialogs & d)
+       : ControlCommand(lv, d)
+{
+       d_.showBibitem.connect(slot(this, &ControlBibitem::showInset));
+}
+
+void ControlBibitem::apply()
+{
+       view().apply();
+
+       if (inset_ && params() != inset_->params()) {
+               // FIXME:
+               // confirm, is this only necessary for FormBibTeX ???
+               if (params().getContents() != inset_->params().getContents())
+                       lv_.view()->ChangeCitationsIfUnique(
+                               inset_->params().getContents(),
+                               params().getContents());
+
+               inset_->setParams(params());
+               lv_.view()->updateInset(inset_, true);
+
+               // We need to do a redraw because the maximum
+               // InsetBibKey width could have changed
+               lv_.view()->redraw();
+               lv_.view()->fitCursor(lv_.view()->getLyXText());
+       }
+}
diff --git a/src/frontends/controllers/ControlBibitem.h b/src/frontends/controllers/ControlBibitem.h
new file mode 100644 (file)
index 0000000..98b7bb5
--- /dev/null
@@ -0,0 +1,65 @@
+// -*- C++ -*-
+/* This file is part of
+ * ====================================================== 
+ *
+ *           LyX, The Document Processor
+ *
+ *           Copyright 2000 The LyX Team.
+ *
+ * ======================================================
+ *
+ * \file ControlBibitem.h
+ * \author Angus Leeming <a.leeming@ic.ac.uk>
+ */
+
+#ifndef CONTROLBIBITEM_H
+#define CONTROLBIBITEM_H
+
+#ifdef __GNUG__
+#pragma interface
+#endif
+
+#include "ControlCommand.h"
+#include "ButtonController.h"
+#include "ViewBase.h"
+
+/** A controller for Bibitem dialogs.
+ */
+class ControlBibitem : public ControlCommand
+{
+public:
+       ///
+       ControlBibitem(LyXView &, Dialogs &);
+
+protected:
+       /// Get changed parameters and Dispatch them to the kernel.
+       virtual void apply();
+};
+
+/** This class instantiates and makes available the GUI-specific
+    ButtonController and View.
+ */
+template <class GUIview, class GUIbc>
+class GUIBibitem : public ControlBibitem {
+public:
+       ///
+       GUIBibitem(LyXView &, Dialogs &);
+       ///
+       virtual ButtonControllerBase & bc() { return bc_; }
+       ///
+       virtual ViewBase & view() { return view_; }
+
+private:
+       ///
+       ButtonController<OkCancelReadOnlyPolicy, GUIbc> bc_;
+       ///
+       GUIview view_;
+};
+
+template <class GUIview, class GUIbc>
+GUIBibitem<GUIview, GUIbc>::GUIBibitem(LyXView & lv, Dialogs & d)
+       : ControlBibitem(lv, d),
+         view_(*this)
+{}
+
+#endif // CONTROLBIBITEM_H
diff --git a/src/frontends/controllers/ControlCitation.C b/src/frontends/controllers/ControlCitation.C
new file mode 100644 (file)
index 0000000..55b6ba2
--- /dev/null
@@ -0,0 +1,362 @@
+// -*- C++ -*-
+/* This file is part of
+ * ====================================================== 
+ *
+ *           LyX, The Document Processor
+ *
+ *           Copyright 2000 The LyX Team.
+ *
+ * ======================================================
+ *
+ * \file ControlCitation.C
+ * \author Angus Leeming <a.leeming@ic.ac.uk>
+ */
+
+#include <algorithm>
+
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
+#include <config.h>
+
+#include "ControlCitation.h"
+#include "buffer.h"
+#include "ButtonController.h"
+#include "Dialogs.h"
+#include "LyXView.h"
+#include "ViewBase.h"
+#include "support/lstrings.h"
+#include "support/LRegex.h"
+
+using std::find;
+using std::min;
+using std::pair;
+using std::vector;
+using std::sort;
+       
+ControlCitation::ControlCitation(LyXView & lv, Dialogs & d)
+       : ControlCommand(lv, d, LFUN_CITATION_INSERT)
+{
+       // These are permanent connections so we won't bother
+       // storing a copy because we won't be disconnecting.
+       d_.showCitation.connect(slot(this, &ControlCitation::showInset));
+       d_.createCitation.connect(slot(this, &ControlCitation::createInset));
+}
+
+
+void ControlCitation::hide()
+{
+       bibkeysInfo_.clear();
+       ControlCommand::hide(); 
+}
+
+
+// A functor for use with std::sort, leading to case insensitive sorting
+struct compareNoCase: public std::binary_function<string, string, bool> 
+{
+       bool operator()(string const & s1, string const & s2) const {
+               return compare_no_case(s1, s2) < 0;
+       }
+};
+
+
+vector<string> const ControlCitation::getBibkeys()
+{
+       vector<string> bibkeys;
+       bibkeysInfo_.clear();
+
+       vector<pair<string,string> > blist = lv_.buffer()->getBibkeyList();
+
+       for (vector<pair<string,string> >::size_type i=0; i<blist.size(); ++i) {
+               bibkeys.push_back(blist[i].first);
+               bibkeysInfo_.insert(InfoMapValue(blist[i].first,
+                                                blist[i].second));
+       }
+
+       sort(bibkeys.begin(), bibkeys.end(), compareNoCase());
+       return bibkeys;
+}
+
+
+string const ControlCitation::getBibkeyInfo(string const & key)
+{
+       string result;
+
+       if (bibkeysInfo_.empty()) getBibkeys();
+
+               InfoMap::const_iterator it = bibkeysInfo_.find(key);
+       if (it != bibkeysInfo_.end()) {
+               // Search for all possible "required" keys
+               string author = parseBibTeX((*it).second, "author");
+               if (author.empty())
+                       author = parseBibTeX((*it).second, "editor");
+
+               string year       = parseBibTeX((*it).second, "year");
+               string title      = parseBibTeX((*it).second, "title");
+               string booktitle  = parseBibTeX((*it).second, "booktitle");
+               string chapter    = parseBibTeX((*it).second, "chapter");
+               string pages      = parseBibTeX((*it).second, "pages");
+
+               string media      = parseBibTeX((*it).second, "journal");
+               if (media.empty())
+                       media = parseBibTeX((*it).second, "publisher");
+               if (media.empty())
+                       media = parseBibTeX((*it).second, "school");
+               if (media.empty())
+                       media = parseBibTeX((*it).second, "institution");
+
+               result = author;
+               if (!year.empty())
+                       result += ", " + year;
+               if (!title.empty())
+                       result += ", " + title;
+               if (!booktitle.empty())
+                       result += ", in " + booktitle;
+               if (!chapter.empty())
+                       result += ", Ch. " + chapter;
+               if (!media.empty())
+                       result += ", " + media;
+               if (!pages.empty())
+                       result += ", pp. " + pages;
+       }
+
+       return result;
+}
+
+
+vector<string>::const_iterator
+searchKeys(ControlCitation const & controller,
+          vector<string> const & keys,
+          string const & expr,
+          vector<string>::const_iterator start,
+          ControlCitation::Search type,
+          ControlCitation::Direction dir,
+          bool caseSensitive)
+{
+       // Preliminary checks
+       if(start < keys.begin() || start >= keys.end())
+               return keys.end();
+       
+       string search_expr = frontStrip(strip(expr));
+       if (search_expr.empty())
+               return start;
+
+       if (type == ControlCitation::SIMPLE)
+               return simpleSearch(controller, keys, search_expr, start, dir,
+                                   caseSensitive);
+
+       return regexSearch(controller, keys, search_expr, start, dir);
+}
+
+
+vector<string>::const_iterator
+simpleSearch(ControlCitation const & controller,
+            vector<string> const & keys,
+            string const & expr,
+            vector<string>::const_iterator start,
+            ControlCitation::Direction dir,
+            bool caseSensitive)
+{
+       vector<string> searchwords = getVectorFromString(expr, ' ');
+
+       // Loop over all keys from start...
+       for (vector<string>::const_iterator it = start;
+            // End condition is direction-dependent.
+            (dir == ControlCitation::FORWARD) ?
+                    (it<keys.end()) : (it>=keys.begin());
+            // increment is direction-dependent.
+            (dir == ControlCitation::FORWARD) ?
+                    (++it) : (--it)) {
+
+               string data = (*it);
+               ControlCitation::InfoMap::const_iterator info =
+                       controller.bibkeysInfo().find(*it);
+               if (info != controller.bibkeysInfo().end())
+                       data += " " + info->second;
+               if (!caseSensitive)
+                       data = lowercase(data);
+
+               bool found = true;
+
+               // Loop over all search words...
+               if (caseSensitive) {
+                       for (vector<string>::const_iterator sit=
+                                    searchwords.begin();
+                            sit<searchwords.end(); ++sit) {
+                               if (data.find(*sit) == string::npos) {
+                                       found = false;
+                                       break;
+                               }
+                       }
+               } else {
+                       for (vector<string>::const_iterator sit=
+                                    searchwords.begin();
+                            sit<searchwords.end(); ++sit) {
+                               if (data.find(lowercase(*sit)) ==
+                                   string::npos) {
+                                       found = false;
+                                       break;
+                               }
+                       }
+               }
+               
+               if (found) return it;
+       }
+
+       return keys.end();
+}
+
+
+vector<string>::const_iterator
+regexSearch(ControlCitation const & controller,
+           vector<string> const & keys,
+           string const & expr,
+           vector<string>::const_iterator start,
+           ControlCitation::Direction dir)
+{
+       LRegex reg(expr);
+
+       for (vector<string>::const_iterator it = start;
+            // End condition is direction-dependent.
+            (dir == ControlCitation::FORWARD) ?
+                    (it<keys.end()) : (it>=keys.begin());
+            // increment is direction-dependent.
+            (dir == ControlCitation::FORWARD) ?
+                    (++it) : (--it)) {
+
+               string data = (*it);
+               ControlCitation::InfoMap::const_iterator info =
+                       controller.bibkeysInfo().find(*it);
+               if (info != controller.bibkeysInfo().end())
+                       data += " " + info->second;
+
+               if (reg.exec(data).size() > 0)
+                       return it;
+       }
+
+       return keys.end();
+}
+
+string const getStringFromVector(vector<string> const & vec, char delim)
+{
+       string str;
+       for (vector<string>::size_type i=0; i<vec.size(); ++i) {
+               if (i > 0) str += tostr(delim) + " ";
+               str += vec[i];
+       }
+       return str;
+}
+
+vector<string> const getVectorFromString(string const & str, char delim)
+{
+       vector<string> vec;
+       string keys(str);
+       string tmp;
+       keys = frontStrip(split(keys, tmp, delim));
+       while (!tmp.empty()) {
+               vec.push_back(tmp);
+               keys = frontStrip(split(keys, tmp, delim));
+       }
+       return vec;
+}
+
+string const parseBibTeX(string data, string const & findkey)
+{
+       string keyvalue;
+       
+       for (string::iterator it=data.begin(); it<data.end(); ++it) {
+               if ((*it) == '\n' || (*it) == '\t')
+                       (*it)= ' ';
+       }
+       
+       data = frontStrip(data);
+       while (!data.empty() && data[0] != '=' && 
+              (data.find(' ') != string::npos || data.find('=') != string::npos)) {
+
+               string::size_type keypos = min(data.find(' '), data.find('='));
+               string key = lowercase(data.substr(0, keypos));
+      
+               data = data.substr(keypos, data.length()-1);
+               data = frontStrip(strip(data));
+               if (data.length() > 1 && data[0]=='=') {
+                       data = frontStrip(data.substr(1, data.length()-1));
+                       if (!data.empty()) {
+                               keypos = 1;
+                               string value;
+                               char enclosing;
+
+                               if (data[0]=='{') {
+                                       enclosing = '}';
+                               } else if (data[0]=='"') {
+                                       enclosing = '"';
+                               } else {
+                                       keypos=0;
+                                       enclosing=' ';
+                               }
+
+                               if (keypos &&
+                                   data.find(enclosing)!=string::npos &&
+                                   data.length()>1) {
+                                       string tmp = data.substr(keypos,
+                                                                data.length()-1);
+                                       while (tmp.find('{') != string::npos &&
+                                              tmp.find('}') != string::npos &&
+                                              tmp.find('{') < tmp.find('}') &&
+                                              tmp.find('{') < tmp.find(enclosing)) {
+
+                                               keypos += tmp.find('{')+1;
+                                               tmp = data.substr(keypos,
+                                                                 data.length()-1);
+                                               keypos += tmp.find('}')+1;
+                                               tmp = data.substr(keypos,
+                                                                 data.length()-1);
+                                       }
+
+                                       if (tmp.find(enclosing)==string::npos)
+                                               return keyvalue;
+                                       else {
+                                               keypos += tmp.find(enclosing);
+                                               tmp = data.substr(keypos,
+                                                                 data.length()-1);
+                                       }
+
+                                       value = data.substr(1, keypos-1);
+
+                                       if (keypos+1<data.length()-1)
+                                               data = frontStrip(data.substr(keypos+1, data.length()-1));
+                                       else
+                                               data = "";
+
+                               } else if (!keypos &&
+                                          (data.find(' ') ||
+                                           data.find(','))) {
+                                       keypos = data.length()-1;
+                                       if (data.find(' ') != string::npos)
+                                               keypos = data.find(' ');
+                                       if (data.find(',') != string::npos &&
+                                           keypos > data.find(','))
+                                               keypos = data.find(',');
+
+                                       value = data.substr(0, keypos);
+                 
+                                       if (keypos+1<data.length()-1)
+                                               data = frontStrip(data.substr(keypos+1, data.length()-1));
+                                       else
+                                               data = "";
+                               }
+                               else
+                                       return keyvalue;
+
+                               if (findkey == key) {
+                                       keyvalue = value;
+                                       return keyvalue;
+                               } 
+
+                               data = frontStrip(frontStrip(data,','));
+                       }
+               }
+               else return keyvalue;
+       }
+       return keyvalue;
+}
diff --git a/src/frontends/controllers/ControlCitation.h b/src/frontends/controllers/ControlCitation.h
new file mode 100644 (file)
index 0000000..173004d
--- /dev/null
@@ -0,0 +1,146 @@
+// -*- C++ -*-
+/* This file is part of
+ * ====================================================== 
+ *
+ *           LyX, The Document Processor
+ *
+ *           Copyright 2000 The LyX Team.
+ *
+ * ======================================================
+ *
+ * \file ControlCitation.h
+ * \author Angus Leeming <a.leeming@ic.ac.uk>
+ */
+
+#ifndef CONTROLCITATION_H
+#define CONTROLCITATION_H
+
+#ifdef __GNUG__
+#pragma interface
+#endif
+
+#include "ControlCommand.h"
+#include "ButtonController.h"
+#include "ViewBase.h"
+
+/** A controller for Citation dialogs. All citation-specific functionality
+    should go in here.
+ */
+class ControlCitation : public ControlCommand
+{
+public:
+       ///
+       typedef std::map<string, string> InfoMap;
+       ///
+       typedef std::map<string, string>::value_type InfoMapValue;
+       ///
+       enum Search {
+               ///
+               SIMPLE,
+               ///
+               REGEX
+       };
+       ///
+       enum Direction {
+               ///
+               FORWARD,
+               ///
+               BACKWARD
+       };
+       ///
+       ControlCitation(LyXView &, Dialogs &);
+       /// A vector of bibliography keys
+       std::vector<string> const getBibkeys();
+       /// Returns a reference to the map of stored keys
+       InfoMap const & bibkeysInfo() const { return bibkeysInfo_; }
+       /** Returns the BibTeX data associated with a given key.
+           Empty if no info exists. */
+       string const getBibkeyInfo(string const &);
+private:
+       /// Clean up, then hide dialog.
+       virtual void hide();
+       /// The info associated with each key
+       InfoMap bibkeysInfo_;
+};
+
+
+/** This class instantiates and makes available the GUI-specific
+    ButtonController and View.
+ */
+template <class GUIview, class GUIbc>
+class GUICitation : public ControlCitation {
+public:
+       ///
+       GUICitation(LyXView &, Dialogs &);
+       ///
+       virtual ButtonControllerBase & bc() { return bc_; }
+       ///
+       virtual ViewBase & view() { return view_; }
+
+private:
+       ///
+       ButtonController<NoRepeatedApplyReadOnlyPolicy, GUIbc> bc_;
+       ///
+       GUIview view_;
+};
+
+template <class GUIview, class GUIbc>
+GUICitation<GUIview, GUIbc>::GUICitation(LyXView & lv, Dialogs & d)
+       : ControlCitation(lv, d),
+         view_(*this)
+{}
+
+/** Helper functions, of possible use to all frontends
+ */
+
+/** Multiple citation keys are stored in InsetCommandParams::contents as a
+    comma-separated string. These two functions convert to/from a vector. */
+string const getStringFromVector(std::vector<string> const &, char delim=',');
+///
+std::vector<string> const getVectorFromString(string const &, char delim=',');
+
+/** Search a BibTeX info field for the given key and return the
+    associated field. */
+string const parseBibTeX(string data, string const & findkey);
+
+/** Returns an iterator to the first key that meets the search criterion,
+    or end() if unsuccessful.
+
+    User supplies :
+    the controller with the map of bibkeys info,
+    the vector of keys to be searched,
+    the search criterion,
+    an iterator defining the starting point of the search,
+    an enum defining a Simple or Regex search,
+    an enum defining the search direction.
+*/
+
+std::vector<string>::const_iterator
+searchKeys(ControlCitation const & controller,
+          std::vector<string> const & keys_to_search,
+          string const & search_expression,
+          std::vector<string>::const_iterator start,
+          ControlCitation::Search,
+          ControlCitation::Direction,
+          bool caseSensitive=false);
+
+/// Do the dirty work for the search. Should use through the function above
+std::vector<string>::const_iterator
+simpleSearch(ControlCitation const & controller,
+            std::vector<string> const & keys_to_search,
+            string const & search_expression,
+            std::vector<string>::const_iterator start,
+            ControlCitation::Direction,
+            bool caseSensitive=false);
+
+/// Should use through the function above
+std::vector<string>::const_iterator
+regexSearch(ControlCitation const & controller,
+           std::vector<string> const & keys_to_search,
+           string const & search_expression,
+           std::vector<string>::const_iterator start,
+           ControlCitation::Direction);
+#endif // CONTROLCITATION_H
+
+
+
diff --git a/src/frontends/controllers/ControlCommand.C b/src/frontends/controllers/ControlCommand.C
new file mode 100644 (file)
index 0000000..b19c7c7
--- /dev/null
@@ -0,0 +1,113 @@
+// -*- C++ -*-
+/* This file is part of
+ * ====================================================== 
+ *
+ *           LyX, The Document Processor
+ *
+ *           Copyright 2000 The LyX Team.
+ *
+ * ======================================================
+ *
+ * \file ControlCommand.C
+ * \author Angus Leeming <a.leeming@ic.ac.uk>
+ */
+
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
+#include <config.h>
+
+#include "ControlCommand.h"
+#include "BufferView.h"
+#include "ButtonController.h"
+#include "Dialogs.h"
+#include "lyxfunc.h"
+#include "LyXView.h"
+#include "support/LAssert.h"
+#include "ViewBase.h"
+
+ControlCommand::ControlCommand(LyXView & lv, Dialogs & d, kb_action ac)
+       : ControlConnectInset<InsetCommand>(lv, d),
+         params_(0), action_(ac)
+{}
+
+
+void ControlCommand::showInset(InsetCommand * inset)
+{
+       if (inset == 0) return;  // maybe we should Assert this?
+
+       connectInset(inset);
+       show(inset->params());
+}
+
+
+void ControlCommand::createInset(string const & arg)
+{
+       connectInset();
+
+       if ( !arg.empty() )
+               bc().valid(); // so that the user can press Ok
+
+       InsetCommandParams params;
+       params.setFromString(arg);
+       show(params);
+}
+
+
+void ControlCommand::update()
+{
+       if (params_) delete params_;
+
+       if (inset_)
+               params_ = new InsetCommandParams(inset_->params());
+       else
+               params_ = new InsetCommandParams;
+
+       bc().readOnly(isReadonly());
+       view().update();
+}
+
+
+void ControlCommand::show(InsetCommandParams const & params)
+{
+       if (params_) delete params_;
+       params_ = new InsetCommandParams(params);
+
+       bc().readOnly(isReadonly());
+       view().show();
+}
+
+
+void ControlCommand::hide()
+{
+       if (params_) {
+               delete params_;
+               params_ = 0;
+       }
+
+       disconnect();
+       view().hide();
+}
+
+InsetCommandParams & ControlCommand::params() const
+{
+       Assert(params_);
+       return *params_;
+}
+
+
+void ControlCommand::apply()
+{
+       view().apply();
+
+       if (inset_) {
+               // Only update if contents have changed
+               if (params() != inset_->params()) {
+                       inset_->setParams(params());
+                       lv_.view()->updateInset(inset_, true);
+               }
+       } else if (action_ != LFUN_NOACTION){
+               lv_.getLyXFunc()->Dispatch(action_, params().getAsString());
+       }
+}
diff --git a/src/frontends/controllers/ControlCommand.h b/src/frontends/controllers/ControlCommand.h
new file mode 100644 (file)
index 0000000..802c422
--- /dev/null
@@ -0,0 +1,74 @@
+// -*- C++ -*-
+/* This file is part of
+ * ====================================================== 
+ *
+ *           LyX, The Document Processor
+ *
+ *           Copyright 2000 The LyX Team.
+ *
+ * ======================================================
+ *
+ * \file ControlCommand.h
+ * \author Angus Leeming <a.leeming@ic.ac.uk>
+ *
+ * Defines a Controller class for dialogs that create or modify
+ * an inset derived from InsetCommand.
+ * Also defines the abstract base class from which the GUI-dependent Views
+ * of this dialog should be derived.
+ */
+
+#ifndef CONTROLCOMMAND_H
+#define CONTROLCOMMAND_H
+
+#ifdef __GNUG__
+#pragma interface
+#endif
+
+#include "ControlConnections.h"
+#include "insets/insetcommand.h"
+#include "commandtags.h" // kb_action
+
+class Dialogs;
+class LyXView;
+
+/** The Inset dialog controller. Connects/disconnects signals, launches 
+    GUI-dependent View and returns the output from this View to the kernel.
+ */
+class ControlCommand : public ControlConnectInset<InsetCommand>
+{
+public:
+       ///
+       ControlCommand(LyXView &, Dialogs &, kb_action=LFUN_NOACTION);
+
+       /// Allow the View access to the local copy.
+       InsetCommandParams & params() const;
+
+protected:
+       /// Slots connected in the daughter classes c-tor.
+       /// Slot launching dialog to (possibly) create a new inset.
+       void createInset(string const &);
+       /// Slot launching dialog to an existing inset.
+       void showInset(InsetCommand *);
+
+       /// Connect signals and launch View.
+       void show(InsetCommandParams const &);
+
+       /// Instantiation of private ControlBase virtual methods.
+       /// Get changed parameters and Dispatch them to the kernel.
+       virtual void apply();
+       /// Disconnect signals and hide View.
+       virtual void hide();
+       /// Update dialog before showing it.
+       virtual void update();
+
+private:
+       /** A local copy of the inset's params.
+           Memory is allocated only whilst the dialog is visible.
+       */
+       InsetCommandParams * params_;
+       /// Controls what is done in LyXFunc::Dispatch()
+       kb_action const action_;
+};
+
+
+#endif // CONTROLCOMMAND_H
diff --git a/src/frontends/controllers/ControlConnections.C b/src/frontends/controllers/ControlConnections.C
new file mode 100644 (file)
index 0000000..b9511cd
--- /dev/null
@@ -0,0 +1,86 @@
+// -*- C++ -*-
+/* This file is part of
+ * ====================================================== 
+ *
+ *           LyX, The Document Processor
+ *
+ *           Copyright 2000 The LyX Team.
+ *
+ * ======================================================
+ *
+ * \file ControlConnections.C
+ * \author Angus Leeming <a.leeming@ic.ac.uk>
+ */
+
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
+#include <config.h>
+
+#include "ControlConnections.h"
+#include "Dialogs.h"
+#include "ViewBase.h"
+#include "insets/lyxinset.h"
+
+#ifdef SIGC_CXX_NAMESPACES
+using SigC::slot;
+#endif
+
+ControlConnectBase::ControlConnectBase(LyXView & lv, Dialogs & d)
+       : ControlBase(lv),
+         d_(d), h_(0), r_(0)
+{}
+
+
+void ControlConnectBase::connect()
+{
+       r_ = Dialogs::redrawGUI.
+               connect(slot(this, &ControlConnectBase::redraw));
+}
+
+void ControlConnectBase::disconnect()
+{
+       h_.disconnect();
+       r_.disconnect();
+}
+
+
+void ControlConnectBase::redraw()
+{
+       view().redraw();
+}
+
+
+ControlConnectBI::ControlConnectBI(LyXView & lv, Dialogs & d)
+        : ControlConnectBase(lv, d)
+{}
+
+
+void ControlConnectBI::connect()
+{
+       h_ = d_.hideAll.connect(slot(this, &ControlConnectBI::hide));
+       ControlConnectBase::connect();
+}
+
+ControlConnectBD::ControlConnectBD(LyXView & lv, Dialogs & d)
+       : ControlConnectBase(lv, d),
+         u_(0)
+{}
+
+
+void ControlConnectBD::connect()
+{
+       u_ = d_.updateBufferDependent.
+               connect(slot(this, &ControlConnectBD::updateSlot));
+       h_ = d_.hideBufferDependent.
+               connect(slot(this, &ControlConnectBD::hide));
+       ControlConnectBase::connect();
+}
+
+void ControlConnectBD::disconnect()
+{
+       u_.disconnect();
+       ControlConnectBase::disconnect();
+}
+
diff --git a/src/frontends/controllers/ControlConnections.h b/src/frontends/controllers/ControlConnections.h
new file mode 100644 (file)
index 0000000..ad68dc1
--- /dev/null
@@ -0,0 +1,180 @@
+// -*- C++ -*-
+/* This file is part of
+ * ====================================================== 
+ *
+ *           LyX, The Document Processor
+ *
+ *           Copyright 2000 The LyX Team.
+ *
+ * ======================================================
+ *
+ * \file ControlConnections.h
+ * \author Angus Leeming <a.leeming@ic.ac.uk>
+ */
+
+#ifndef CONTROLCONNECTIONS_H
+#define CONTROLCONNECTIONS_H
+
+#ifdef __GNUG__
+#pragma interface
+#endif
+
+#include "ControlBase.h"
+
+/** Base class to control connection/disconnection of signals with the LyX
+    kernel. It is meant to be used solely as the parent class to
+    ControlConnectBI and ControlConnectBD.
+*/
+class ControlConnectBase : public ControlBase
+{
+public:
+       ///
+       ControlConnectBase(LyXView &, Dialogs &);
+
+protected:
+       /// Connect signals
+       virtual void connect();
+       /// Disconnect signals
+       virtual void disconnect();
+
+       /** Redraw the dialog (on receipt of a Signal indicating, for example,
+           its colors have been re-mapped).
+       */
+       void redraw();
+
+       /// Contains the signals we have to connect to.
+       Dialogs & d_;
+       /// Hide connection.
+       Connection h_;
+       /// Redraw connection.
+       Connection r_;
+};
+
+
+/** Base class to control connection/disconnection of signals with the LyX
+    kernel for Buffer Independent dialogs.
+    Such dialogs do not require an update Connection although they may use
+    an update() function which is also supported by the Restore button.
+ */
+
+class ControlConnectBI : public ControlConnectBase
+{
+public:
+        ///
+        ControlConnectBI(LyXView &, Dialogs &);
+
+protected:
+       /// Connect signals
+       virtual void connect();
+};
+
+
+/** Base class to control connection/disconnection of signals with the LyX
+    kernel for Buffer Dependent dialogs.
+ */
+class ControlConnectBD : public ControlConnectBase
+{
+public:
+       ///
+       ControlConnectBD(LyXView &, Dialogs &);
+
+protected:
+       /** Slot connected to update signal.
+           Bool indicates if a buffer switch took place.
+           Default behaviour is to ignore this and simply update().
+       */
+       virtual void updateSlot(bool) { update(); }
+       /// Connect signals
+       virtual void connect();
+       /// Disconnect signals
+       virtual void disconnect();
+
+private:
+       /// Update connection.
+       Connection u_;
+};
+
+/** Base class to control connection/disconnection of signals with the LyX
+    kernel for Inset dialogs.
+ */
+class Inset;
+
+template <class Inset>
+class ControlConnectInset : public ControlConnectBD
+{
+public:
+       ///
+       ControlConnectInset(LyXView &, Dialogs &);
+
+protected:
+       /// Slot connected to update signal.
+       virtual void updateSlot(bool);
+       /// Connect signals
+       void connectInset(Inset * = 0);
+       /// Disconnect signals
+       virtual void disconnect();
+       ///
+       void disconnectInset();
+
+protected:
+       /// pointer to the inset passed through connectInset
+       Inset * inset_;
+
+private:
+       /// inset::hide connection.
+       Connection ih_;
+};
+
+
+template <class Inset>
+ControlConnectInset<Inset>::ControlConnectInset(LyXView & lv, Dialogs & d)
+       : ControlConnectBD(lv, d),
+         ih_(0), inset_(0)
+{}
+
+
+template <class Inset>
+void ControlConnectInset<Inset>::updateSlot(bool switched)
+{
+       if (switched)
+               hide();
+       else
+               update();
+}
+
+
+template <class Inset>
+void ControlConnectInset<Inset>::disconnect()
+{
+       inset_ = 0;
+       ih_.disconnect();
+       ControlConnectBD::disconnect();
+}
+
+
+template <class Inset>
+void ControlConnectInset<Inset>::connectInset(Inset * inset)
+{
+       // If connected to another inset, disconnect from it.
+       if (inset_) {
+               ih_.disconnect();
+               inset_ = 0;
+       }
+
+       if (inset) {
+               inset_ = inset;
+               ih_ = inset->hideDialog.connect(
+                       slot(this, &ControlConnectInset::hide));
+       }
+       connect();
+}
+
+
+template <class Inset>
+void ControlConnectInset<Inset>::disconnectInset()
+{
+       ih_.disconnect();
+}
+
+
+#endif // CONTROLCONNECTIONS_H
diff --git a/src/frontends/controllers/Makefile.am b/src/frontends/controllers/Makefile.am
new file mode 100644 (file)
index 0000000..50d0e81
--- /dev/null
@@ -0,0 +1,41 @@
+AUTOMAKE_OPTIONS = foreign 1.4
+DISTCLEANFILES= *.orig *.rej *~ *.bak core
+MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
+noinst_LTLIBRARIES = libcontrollers.la
+BOOST_INCLUDES = -I$(top_srcdir)/boost
+INCLUDES = -I${top_srcdir}/src/ \
+       -I${top_srcdir}/src/frontends/ \
+       ${SIGC_CFLAGS} $(BOOST_INCLUDES)
+LIBS =
+SUBDIRS = 
+ETAGS_ARGS = --lang=c++
+libcontrollers_la_SOURCES=\
+       ButtonController.C \
+       ButtonController.h \
+       ButtonPolicies.C \
+       ButtonPolicies.h \
+       ControlBase.C \
+       ControlBase.h \
+       ControlBibitem.C \
+       ControlBibitem.h \
+       ControlCitation.C \
+       ControlCitation.h \
+       ControlCommand.C \
+       ControlCommand.h \
+       ControlConnections.C \
+       ControlConnections.h \
+       ViewBase.h
+
+# just copied from old lyx repository
+dist-hook:
+       for subdir in $(LYXDATADIRS) ; do \
+       test -d $(distdir)/$$subdir \
+       || mkdir $(distdir)/$$subdir \
+       || exit 1; \
+       chmod 777 $(distdir)/$$subdir; \
+       list=`(cd $(srcdir)/$$subdir && ls -1 | grep -v CVS)`; \
+       echo $$list ; \
+       for fil in $$list ; do \
+       cp -p $(srcdir)/$$subdir/$$fil $(distdir)/$$subdir ; \
+       done ; \
+       done
diff --git a/src/frontends/controllers/README b/src/frontends/controllers/README
new file mode 100644 (file)
index 0000000..06f2c05
--- /dev/null
@@ -0,0 +1,17 @@
+This directory provides the controllers that act as an interface between the
+LyX kernel and the GUI-specific implementations of each popup. It also
+provides abstract base classes from which GUI-specific implemetations of the
+ButtonController and each separate popup should be derived (see
+ButtonControlBase.[Ch] and ViewBase.h respectively).
+
+The Controller connects the GUI-specific popup to any appropriate signals and
+dispatches any changes in the data to the kernel. It has no knowledge of the
+actual instantiation of the GUI-dependent View and ButtonController, which
+should therefore be created elsewhere. Once created, the Controller will take
+care of their initialisation, management and, ultimately, destruction.
+
+This leaves the GUI-specific popup (and its author!) to worry only about the
+data that it has been created to input/modify.
+
+This concept has been instatiated for the Citation dialog only at the moment.
+See xforms-new/FormCitation.[Ch] for an xforms-specific View of the dialog.
diff --git a/src/frontends/controllers/ViewBase.h b/src/frontends/controllers/ViewBase.h
new file mode 100644 (file)
index 0000000..bbd6a52
--- /dev/null
@@ -0,0 +1,71 @@
+// -*- C++ -*-
+/* This file is part of
+ * ====================================================== 
+ *
+ *           LyX, The Document Processor
+ *
+ *           Copyright 2000 The LyX Team.
+ *
+ * ======================================================
+ *
+ * Author: Angus Leeming <a.leeming@ic.ac.uk>
+ */
+
+#ifndef VIEWBASE_H
+#define VIEWBASE_H
+
+#include <boost/utility.hpp>
+#include "ControlBase.h"
+
+class ViewBase {
+public:
+       /// 
+       ViewBase(ControlBase & c) : controller_(c) {}
+       /// 
+       virtual ~ViewBase() {}
+
+       /// Apply changes to LyX data from dialog.
+       virtual void apply() = 0;
+       /// Hide the dialog.
+       virtual void hide() = 0;
+       /// Redraw the dialog (e.g. if the colors have been remapped).
+       virtual void redraw() {}
+       /// Create the dialog if necessary, update it and display it.
+       virtual void show() = 0;
+       /// Update dialog before/whilst showing it.
+       virtual void update() = 0;
+
+       /** These shortcuts allow (e.g. xform's) global callback functions
+           access to the buttons without making the whole controller_ public.
+       */
+        ///
+        void ApplyButton() { controller_.ApplyButton(); }
+        ///
+        void OKButton() { controller_.OKButton(); }
+        ///
+        void CancelButton() { controller_.CancelButton(); }
+        ///
+        void RestoreButton() { controller_.RestoreButton(); }
+
+protected:
+       /// The view is, after all, controlled!
+       ControlBase & controller_;
+};
+
+
+/** A generic class to cast the ButtonController controller_.bc_ to it's
+    daughter class. */
+template <class GUIbc>
+class ViewBC : public ViewBase {
+public:
+       ///
+       ViewBC(ControlBase & c) : ViewBase(c) {}
+       ///
+       GUIbc & bc() const
+       {
+               return static_cast<GUIbc &>(controller_.bc());
+               // return dynamic_cast<GUIbc &>(controller_.bc());
+       }
+};
+
+#endif // VIEWBASE_H
index 600d865075f8c5e37e3681cd7c7576412f4ec3be..84b887bd93940dfd44f2692da52bdd5797db23a4 100644 (file)
@@ -1,3 +1,48 @@
+2001-03-14  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * Merging changes from BRANCH_MVC back into HEAD.
+
+2001-03-12  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * Dialogs.C (c-tor): Changes associated with storing a vector of
+       boost::shared_ptrs.
+
+2001-03-08  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * Makefile.am: added ../xforms/FormCredits.lo and
+       ../xforms/form_credits.lo
+       
+       * Dialogs.C: added FormCredits and removed ShowCredits.
+       
+2001-03-07  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * FormCitation.[Ch]: cull large chunks of code, making more use of
+       ControlCitation and associated helper funcs. Also use boost::scoped_ptr
+       for dialog_.
+       
+2001-03-05  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * FormCitation.[Ch]: use ButtonController::input() rather than
+       ButtonController::valid() to check state of input. The buttons are
+       now controlled correctly.
+
+2001-03-02  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * kdeBC.[Ch]: Changes associated with the changes to
+       controllers/ButtonController.[Ch]. Ie, the class is now derived from
+       ButtonControllerBase and the ButtonPolicy is accessed through a method
+       bp() rather than the instance bp_.
+
+2001-02-23  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * kdeBC.[Ch]: new files. A ButtonController for KDE.
+
+       * FormCitation.[Ch]:
+       * citationdlg.[Ch]: A KDE-specific implementation of the
+       Citation dialog, controlled by the GUI-I ControlCitation.
+
+       * Dialogs.C: Use the controlled Citation dialog.
+
 2001-03-15  Angus Leeming  <a.leeming@ic.ac.uk>
 
        * FormParagraph.C: changes associated with Lars' creation of a
index 90c6d83dd7fcd9472753118dc4c5d889a1193475..606720a2181aee61a4dc8326ae975eefc73d1488 100644 (file)
 #include FORMS_H_LOCATION
 
 #include "Dialogs.h"
+
+#include "ControlBibitem.h"
+#include "ControlCitation.h"
+#include "kdeBC.h"
+
 #include "FormBibitem.h"
 #include "FormBibtex.h"
 #include "FormCitation.h"
+#include "citationdlg.h"
 #include "FormCopyright.h"
+#include "FormCredits.h"
 #include "FormDocument.h"
 #include "FormError.h"
 #include "FormGraphics.h"
@@ -22,6 +29,7 @@
 #include "FormIndex.h"
 #include "FormLog.h"
 #include "FormParagraph.h"
+#include "FormPreamble.h"
 #include "FormPreferences.h"
 #include "FormPrint.h"
 #include "FormRef.h"
@@ -36,9 +44,6 @@
 #pragma implementation
 #endif
 
-// temporary till ported
-extern void ShowCredits();
-
 /* We don't implement this, but it's needed whilst we
  * still rely on xforms
  */
@@ -46,42 +51,34 @@ Signal0<void> Dialogs::redrawGUI;
 
 Dialogs::Dialogs(LyXView * lv)
 {
-/*
-       dialogs_.push_back(new FormBibitem(lv, this));
-       dialogs_.push_back(new FormBibtex(lv, this));
-       dialogs_.push_back(new FormCitation(lv, this));
-       dialogs_.push_back(new FormCopyright(lv, this));
-       dialogs_.push_back(new FormDocument(lv, this));
-       dialogs_.push_back(new FormError(lv, this));
-       dialogs_.push_back(new FormGraphics(lv, this));
-       dialogs_.push_back(new FormInclude(lv, this));
-       dialogs_.push_back(new FormIndex(lv, this));
-       dialogs_.push_back(new FormLog(lv, this));
-       dialogs_.push_back(new FormParagraph(lv, this));
-       dialogs_.push_back(new FormPreferences(lv, this));
-       dialogs_.push_back(new FormPrint(lv, this));
-       dialogs_.push_back(new FormRef(lv, this));
-       dialogs_.push_back(new FormSplash(lv, this));
-       dialogs_.push_back(new FormTabular(lv, this));
-       dialogs_.push_back(new FormTabularCreate(lv, this));
-       dialogs_.push_back(new FormToc(lv, this));
-       dialogs_.push_back(new FormUrl(lv, this));
-       dialogs_.push_back(new FormVCLog(lv, this));
+       splash_.reset(new FormSplash(lv, this));
+
+       add(new GUIBibitem<FormBibitem, xformsBC>(*lv, *this));
+       add(new GUICitation<FormCitation, xformsBC>(*lv, *this));
 
-       showCredits.connect(slot(ShowCredits));
+       add(new FormBibtex(lv, this));
+       add(new FormCharacter(lv, this));
+       add(new FormCopyright(lv, this));
+       add(new FormCredits(lv, this));
+       add(new FormDocument(lv, this));
+       add(new FormError(lv, this));
+       add(new FormGraphics(lv, this));
+       add(new FormInclude(lv, this));
+       add(new FormIndex(lv, this));
+       add(new FormLog(lv, this));
+       add(new FormParagraph(lv, this));
+       add(new FormPreamble(lv, this));
+       add(new FormPreferences(lv, this));
+       add(new FormPrint(lv, this));
+       add(new FormRef(lv, this));
+       add(new FormSearch(lv, this));
+       add(new FormTabular(lv, this));
+       add(new FormTabularCreate(lv, this));
+       add(new FormToc(lv, this));
+       add(new FormUrl(lv, this));
+       add(new FormVCLog(lv, this));
 
        // reduce the number of connections needed in
        // dialogs by a simple connection here.
        hideAll.connect(hideBufferDependent.slot());
-*/
-}
-
-
-Dialogs::~Dialogs()
-{
-       for (vector<DialogBase *>::iterator iter = dialogs_.begin();
-            iter != dialogs_.end();
-            ++iter) {
-               delete *iter;
-       }
 }
index 98e7a1c70ff056e882b935e18fb1317e6460617f..02d14f2b1b39b859f4587409de327225c2d04439 100644 (file)
 
 #include <algorithm>
 
-#include "Dialogs.h"
+#include "ControlCitation.h"
 #include "FormCitation.h"
-#include "gettext.h"
-#include "buffer.h"
-#include "LyXView.h"
-#include "lyxfunc.h"
 #include "citationdlg.h"
+#include "gettext.h"
+#include "kdeBC.h"
+#include "support/lstrings.h"
 
 using std::vector;
 using std::pair;
 using std::find;
 
-FormCitation::FormCitation(LyXView *v, Dialogs *d)
-       : dialog_(0), lv_(v), d_(d), inset_(0), h_(0), u_(0), ih_(0),
-       keys(0), chosenkeys(0)
-{
-       d->showCitation.connect(slot(this, &FormCitation::showCitation));
-       d->createCitation.connect(slot(this, &FormCitation::createCitation));
-}
+FormCitation::FormCitation(ControlCitation & c)
+       : ViewBC<kdeBC>(c), 
+         keys(0), chosenkeys(0)
+{}
 
  
-FormCitation::~FormCitation()
+ControlCitation & FormCitation::controller() const
 {
-       delete dialog_;
+       return static_cast<ControlCitation &>(controller_);
+       //return dynamic_cast<ControlCitation &>(controller_);
 }
 
-void FormCitation::showCitation(InsetCommand * const inset)
-{
-       // FIXME: when could inset be 0 here ?
-       if (inset==0)
-               return;
 
-       inset_ = inset;
-       readonly = lv_->buffer()->isReadonly();
-       ih_ = inset_->hideDialog.connect(slot(this,&FormCitation::hide));
-       params = inset->params();
-       
-       show();
-}
-
-
-void FormCitation::createCitation(string const & arg)
+void FormCitation::show()
 {
-       // we could already be showing stuff, clear it out
-       if (inset_)
-               close();
+       if (!dialog_.get())
+               build();
 
-       readonly = lv_->buffer()->isReadonly();
-       params.setFromString(arg);
-       show();
+       update();
+
+       dialog_->raise();
+       dialog_->setActiveWindow();
+       dialog_->show();
 }
 
 
-void FormCitation::updateButtons()
+void FormCitation::apply()
 {
-       if (readonly) {
-               dialog_->add->setEnabled(false);
-               dialog_->remove->setEnabled(false);
-               dialog_->up->setEnabled(false);
-               dialog_->down->setEnabled(false);
-               return;
-       }
-
-       bool ischosenkey = !selectedChosenKey.empty();
-
-       vector<string>::const_iterator iter =
-               find(chosenkeys.begin(), chosenkeys.end(), selectedKey);
-
-       dialog_->add->setEnabled(!selectedKey.empty() && iter == chosenkeys.end());
-       dialog_->remove->setEnabled(ischosenkey);
-       dialog_->up->setEnabled(ischosenkey);
-       dialog_->down->setEnabled(ischosenkey);
+       controller().params().setCmdName("cite");
+       controller().params().setContents(getStringFromVector(chosenkeys));
+       controller().params().setOptions(dialog_->after->text());
 }
 
 
-void FormCitation::updateChosenList()
+void FormCitation::hide()
 {
-       dialog_->chosen->setAutoUpdate(false);
-       dialog_->chosen->clear();
+       chosenkeys.clear();
+       selectedKey.erase();
+       selectedChosenKey.erase();
 
-       for (vector< string >::const_iterator iter = chosenkeys.begin();
-               iter != chosenkeys.end(); ++iter) {
-               dialog_->chosen->insertItem(iter->c_str());
-       }
-       dialog_->chosen->setAutoUpdate(true);
-       dialog_->chosen->update();
+       if (dialog_.get() && dialog_->isVisible())
+               dialog_->hide();
 }
 
 
-void FormCitation::updateAvailableList()
+void FormCitation::build()
 {
-       dialog_->keys->setAutoUpdate(false);
-       dialog_->keys->clear();
-
-       for (vector< pair<string,string> >::const_iterator iter = keys.begin();
-               iter != keys.end(); ++iter) {
-               dialog_->keys->insertItem(iter->first.c_str());
-       }
-       dialog_->keys->setAutoUpdate(true);
-       dialog_->keys->update();
+       dialog_.reset(new CitationDialog(this, 0, "Citation", false));
+
+        // Manage the ok, apply, restore and cancel/close buttons
+       bc().setOK(dialog_->buttonOk);
+       //bc().setApply(dialog_->buttonApply);
+       bc().setCancel(dialog_->buttonCancel);
+       //bc().setUndoAll(dialog_->buttonRestore);
+       bc().refresh();
+
+       bc().addReadOnly(dialog_->add);
+       bc().addReadOnly(dialog_->remove);
+       bc().addReadOnly(dialog_->up);
+       bc().addReadOnly(dialog_->down);
+       //bc().addReadOnly(dialog_->style);
+       //bc().addReadOnly(dialog_->labelbefore);
+       bc().addReadOnly(dialog_->labelafter);
 }
 
 
-// we can safely ignore the parameter because we can always update
-void FormCitation::update(bool)
+void FormCitation::update()
 {
-       keys.clear();
-
-       vector < pair<string,string> > const ckeys = lv_->buffer()->getBibkeyList();
-
-       for (vector< pair<string,string> >::const_iterator iter = ckeys.begin();
-               iter != ckeys.end(); ++iter) {
-               keys.push_back(*iter);
-       }
-
+       keys = controller().getBibkeys();
        updateAvailableList();
        selectedKey.erase();
 
-       chosenkeys.clear();
-
-       string tmp, paramkeys(params.getContents());
-       paramkeys = frontStrip(split(paramkeys, tmp, ','));
-
-       while (!tmp.empty()) {
-               chosenkeys.push_back(tmp);
-               paramkeys = frontStrip(split(paramkeys, tmp, ','));
-       }
-
+       chosenkeys = getVectorFromString(controller().params().getContents());
        updateChosenList();
        selectedChosenKey.erase();
 
        dialog_->entry->setText("");
-
-       dialog_->after->setText(params.getOptions().c_str());
+       dialog_->after->setText(controller().params().getOptions().c_str());
 
        updateButtons();
 
-       if (readonly) {
+       if (controller().isReadonly()) {
                dialog_->keys->setFocusPolicy(QWidget::NoFocus);
                dialog_->chosen->setFocusPolicy(QWidget::NoFocus);
                dialog_->after->setFocusPolicy(QWidget::NoFocus);
-               dialog_->buttonOk->setEnabled(false);
-               dialog_->buttonCancel->setText(_("&Close"));
        } else {
                dialog_->keys->setFocusPolicy(QWidget::StrongFocus);
                dialog_->chosen->setFocusPolicy(QWidget::StrongFocus);
                dialog_->after->setFocusPolicy(QWidget::StrongFocus);
-               dialog_->buttonOk->setEnabled(true);
-               dialog_->buttonCancel->setText(_("&Cancel"));
        }
 }
 
-void FormCitation::apply()
+
+void FormCitation::updateButtons()
 {
-       if (readonly)
+       // Can go once ButtonController is working?
+       if (controller().isReadonly()) {
+               dialog_->add->setEnabled(false);
+               dialog_->remove->setEnabled(false);
+               dialog_->up->setEnabled(false);
+               dialog_->down->setEnabled(false);
                return;
-
-       string contents;
-
-       for (vector< string >::const_iterator iter = chosenkeys.begin();
-               iter != chosenkeys.end(); ++iter) {
-               if (iter != chosenkeys.begin())
-                       contents += ", ";
-               contents += *iter;
        }
-               
-       params.setContents(contents);
-       params.setOptions(dialog_->after->text());
-       
-       if (inset_ != 0) {
-               if (params != inset_->params()) {
-                       inset_->setParams(params);
-                       lv_->view()->updateInset(inset_, true);
-               }
-       } else
-               lv_->getLyXFunc()->Dispatch(LFUN_CITATION_INSERT, params.getAsString().c_str());
-}
 
-void FormCitation::show()
-{
-       if (!dialog_)
-               dialog_ = new CitationDialog(this, 0, _("LyX: Citation Reference"), false);
+       bool ischosenkey = !selectedChosenKey.empty();
 
-       if (!dialog_->isVisible()) {
-               h_ = d_->hideBufferDependent.connect(slot(this, &FormCitation::hide));
-               u_ = d_->updateBufferDependent.connect(slot(this, &FormCitation::update));
-       }
+       vector<string>::const_iterator iter =
+               find(chosenkeys.begin(), chosenkeys.end(), selectedKey);
 
-       dialog_->raise();
-       dialog_->setActiveWindow();
+       dialog_->add->setEnabled(!selectedKey.empty() && iter == chosenkeys.end());
+       dialog_->remove->setEnabled(ischosenkey);
+       dialog_->up->setEnabled(ischosenkey);
+       dialog_->down->setEnabled(ischosenkey);
+}
 
-       update();
-       dialog_->show();
+
+void FormCitation::updateChosenList()
+{
+       updateList(dialog_->chosen, chosenkeys);
 }
 
-void FormCitation::close()
+
+void FormCitation::updateAvailableList()
 {
-       h_.disconnect();
-       u_.disconnect();
-       ih_.disconnect();
-       inset_ = 0;
+       updateList(dialog_->keys, keys);
 }
 
-void FormCitation::hide()
+
+void FormCitation::updateList(QListBox * lb, vector<string> const & keys)
 {
-       dialog_->hide();
-       close();
+       lb->setAutoUpdate(false);
+       lb->clear();
+
+       for (vector<string>::const_iterator iter = keys.begin();
+               iter != keys.end(); ++iter) {
+               lb->insertItem(iter->c_str());
+       }
+       lb->setAutoUpdate(true);
+       lb->update();
 }
 
+
 void FormCitation::selectChosen()
 {
        for (unsigned int i=0; i < dialog_->chosen->count(); ++i) {
@@ -231,15 +174,15 @@ void FormCitation::selectChosen()
        }
 }
 
-void FormCitation::add()
+ButtonPolicy::SMInput FormCitation::add()
 {
        if (selectedKey.empty())
-               return;
+               return ButtonPolicy::SMI_NOOP;
 
-       for (vector< pair<string,string> >::const_iterator iter = keys.begin();
+       for (vector<string>::const_iterator iter = keys.begin();
                iter != keys.end(); ++iter) {
-               if (iter->first == selectedKey) {
-                       chosenkeys.push_back(iter->first);
+               if (*iter == selectedKey) {
+                       chosenkeys.push_back(*iter);
                        break;
                }
        }
@@ -247,12 +190,13 @@ void FormCitation::add()
        selectedChosenKey.erase();
        updateChosenList();
        updateButtons();
+       return ButtonPolicy::SMI_VALID;
 }
 
-void FormCitation::remove()
+ButtonPolicy::SMInput FormCitation::remove()
 {
        if (selectedChosenKey.empty())
-               return;
+               return ButtonPolicy::SMI_NOOP;
 
        for (vector< string >::iterator iter = chosenkeys.begin();
                iter != chosenkeys.end(); ++iter) {
@@ -264,12 +208,13 @@ void FormCitation::remove()
        selectedChosenKey.erase();
        updateChosenList();
        updateButtons();
+       return ButtonPolicy::SMI_VALID;
 }
 
-void FormCitation::up()
+ButtonPolicy::SMInput FormCitation::up()
 {
        if (selectedChosenKey.empty())
-               return;
+               return ButtonPolicy::SMI_NOOP;
 
        // Qt will select the first one on redo, so we need this
        string tmp = selectedChosenKey;
@@ -285,18 +230,19 @@ void FormCitation::up()
                }
        }
        if (iter==chosenkeys.end())
-               return;
+               return ButtonPolicy::SMI_NOOP;
 
        updateChosenList();
        selectedChosenKey=tmp;
        selectChosen();
+       return ButtonPolicy::SMI_VALID;
 }
 
  
-void FormCitation::down()
+ButtonPolicy::SMInput FormCitation::down()
 {
        if (selectedChosenKey.empty())
-               return;
+               return ButtonPolicy::SMI_NOOP;
 
        // Qt will select the first one on redo, so we need this
        string tmp = selectedChosenKey;
@@ -312,74 +258,67 @@ void FormCitation::down()
                }
        }
        if (iter == chosenkeys.end())
-               return;
+               return ButtonPolicy::SMI_NOOP;
 
        updateChosenList();
        selectedChosenKey=tmp;
        selectChosen();
+       return ButtonPolicy::SMI_VALID; 
 }
 
  
-void FormCitation::select_key(char const * key)
+ButtonPolicy::SMInput FormCitation::select_key(char const * key)
 {
-       if (readonly)
-               return;
+       if (controller().isReadonly())
+               return ButtonPolicy::SMI_INVALID;
 
        vector<string>::const_iterator iter =
                find(chosenkeys.begin(), chosenkeys.end(), key);
 
        if (iter != chosenkeys.end())
-               return;
+               return ButtonPolicy::SMI_NOOP;
 
        selectedKey.erase();
        selectedKey = key;
 
        add();
+       return ButtonPolicy::SMI_VALID; 
 }
 
  
 void FormCitation::highlight_key(char const * key)
 {
-       if (readonly)
-               return;
-
-       selectedKey.erase();
-       selectedKey = key;
-
-       for (unsigned int i=0; i < keys.size(); i++) {
-               if (keys[i].first == key) {
-                       dialog_->entry->setText(keys[i].second.c_str());
-                       dialog_->chosen->clearFocus();
-                       dialog_->chosen->clearSelection();
-                       selectedChosenKey.erase();
-                       break;
-               }
-       }
-
-       updateButtons();
+       highlight(key, dialog_->chosen, selectedKey, selectedChosenKey);
 }
 
  
 void FormCitation::highlight_chosen(char const * key)
 {
-       selectedChosenKey.erase();
-       selectedChosenKey = key;
+       highlight(key, dialog_->keys, selectedChosenKey, selectedKey);
+}
+
+
+void FormCitation::highlight(char const * key, QListBox * lb,
+                            string & selected1, string & selected2)
+{
+       selected1.erase();
+       selected1 = key;
 
        unsigned int i;
 
-       for (i=0; i < keys.size(); i++) {
-               if (keys[i].first == key) {
-                       if (keys[i].second.compare(dialog_->entry->text()))
-                               dialog_->entry->setText(keys[i].second.c_str());
-                       dialog_->keys->clearFocus();
-                       dialog_->keys->clearSelection();
-                       selectedKey.erase();
+       for (i=0; i < keys.size(); ++i) {
+               if (keys[i] == key) {
+                       string const tmp = controller().getBibkeyInfo(key);
+                       dialog_->entry->setText(tmp.c_str());
+                       lb->clearFocus();
+                       lb->clearSelection();
+                       selected2.erase();
                        break;
                }
        }
 
        if (i == keys.size())
-               dialog_->entry->setText(_("Key not found in references."));
+               dialog_->entry->setText(_("Key not found."));
 
        updateButtons();
 }
index 8c8c11c07112a58b79ee83b09ffb5c3b06527243..99aff1c506549ff59314c6eac3b7381db1fcff5b 100644 (file)
@@ -9,55 +9,56 @@
 #ifndef FORMCITATION_H
 #define FORMCITATION_H
 
-#include "DialogBase.h"
-#include "support/lstrings.h"
-#include "boost/utility.hpp"
-#include "insets/insetcommand.h"
-
 #include <vector>
+#include <boost/smart_ptr.hpp>
+
+#ifdef __GNUG__
+#pragma interface
+#endif
 
-class Dialogs;
-class LyXView;
+#include "ViewBase.h"
+#include "ButtonPolicies.h"
+
+class kdeBC;
+class QListBox;
+class ControlCitation;
 class CitationDialog;
 
-class FormCitation : public DialogBase {
+class FormCitation : public ViewBC<kdeBC> {
 public:
-       FormCitation(LyXView *, Dialogs *);
+       FormCitation(ControlCitation &);
+
+       /// Functions accessible to the Controller.
 
-       ~FormCitation();
+       /// Set the Params variable for the Controller.
+       virtual void apply();
+       /// Set the Params variable for the Controller.
+       virtual void build();
+       /// Hide the dialog.
+       virtual void hide();
+       /// Update dialog before/whilst showing it.
+       virtual void update();
+       /// Create the dialog if necessary, update it and display it.
+       void show();
 
-       /// Apply changes
-       void apply();
-       /// close the connections
-       void close();
        /// add a key
-       void add();
+       ButtonPolicy::SMInput add();
        /// remove a key
-       void remove();
+       ButtonPolicy::SMInput remove();
        /// move a key up
-       void up();
+       ButtonPolicy::SMInput up();
        /// move a key down
-       void down();
+       ButtonPolicy::SMInput down();
        /// a key has been highlighted
        void highlight_key(char const * key);
        /// a chosen key has been highlighted
        void highlight_chosen(char const * key);
        /// a key has been double-clicked
-       void select_key(char const * key);
+       ButtonPolicy::SMInput select_key(char const * key);
 
 private:
-       /// Create the dialog if necessary, update it and display it.
-       void show();
-       /// Hide the dialog.
-       void hide();
-       /// Update the dialog.
-       void update(bool switched = false);
-
-       /// create a Citation inset
-       void createCitation(string const &);
-       /// edit a Citation inset
-       void showCitation(InsetCommand * const);
-
+       /// The parent controller
+       ControlCitation & controller() const;
        /// update add,remove,up,down
        void updateButtons();
        /// update the available keys list
@@ -66,33 +67,16 @@ private:
        void updateChosenList();
        /// select the currently chosen key
        void selectChosen();
+       /// does the dirty work for highlight_key(), highlight_chosen()
+       void highlight(char const *, QListBox *, string &, string &);
+       /// does the dirty work for updateAvailableList(), updateChosenList()
+       void updateList(QListBox *, std::vector<string> const &);
 
        /// Real GUI implementation.
-       CitationDialog * dialog_;
-
-       /// the LyXView we belong to
-       LyXView * lv_;
-
-       /** Which Dialogs do we belong to?
-           Used so we can get at the signals we have to connect to.
-       */
-       Dialogs * d_;
-       /// pointer to the inset if any
-       InsetCommand * inset_;
-       /// insets params
-       InsetCommandParams params;
-       /// is the inset we are reading from a readonly buffer ?
-       bool readonly;
-       
-       /// Hide connection.
-       Connection h_;
-       /// Update connection.
-       Connection u_;
-       /// Inset hide connection.
-       Connection ih_;
+       boost::scoped_ptr<CitationDialog> dialog_;
 
        /// available citation keys
-       std::vector<std::pair<string, string> > keys;
+       std::vector<string> keys;
        /// chosen citation keys
        std::vector<string> chosenkeys;
 
index 804c6222aa599fcffa07054f23b83daa87849dca..28f1bfc30df4e3d0b4a7582f6778658399300133 100644 (file)
@@ -3,7 +3,9 @@ MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
 noinst_LTLIBRARIES = libkde.la
 BOOST_INCLUDES = -I$(top_srcdir)/boost
 SUBDIRS = dlg moc
-INCLUDES = -I${top_srcdir}/src/ -I${top_srcdir}/src/frontends/ \
+INCLUDES = -I${top_srcdir}/src/ \
+       -I${top_srcdir}/src/frontends/ \
+       -I${top_srcdir}/src/frontends/controllers \
        ${SIGC_CFLAGS} ${FRONTEND_INCLUDES} $(BOOST_INCLUDES) \
        -I${top_srcdir}/src/frontends/xforms
 
@@ -15,11 +17,13 @@ libkde_la_OBJADD = \
        moc/libkdemoc.la \
        dlg/libkdedlg.la \
        dlg/moc/libkdedlgmoc.la \
-        ../xforms/FormBase.lo \
+        ../xforms/FormBaseDeprecated.lo \
        ../xforms/FormBibitem.lo \
        ../xforms/form_bibitem.lo \
        ../xforms/FormBibtex.lo \
        ../xforms/form_bibtex.lo \
+        ../xforms/FormCredits.lo \
+        ../xforms/form_credits.lo \
         ../xforms/FormError.lo \
         ../xforms/form_error.lo \
         ../xforms/FormGraphics.lo \
@@ -35,9 +39,9 @@ libkde_la_OBJADD = \
        ../xforms/form_splash.lo \
         ../xforms/FormTabular.lo \
         ../xforms/form_tabular.lo \
-       ../xforms/ButtonController.lo \
+       ../xforms/xformsBC.lo \
        ../xforms/Color.lo \
-       ../xforms/xform_helpers.lo \
+       ../xforms/xforms_helpers.lo \
         ../xforms/input_validators.lo \
         ../xforms/RadioButtonGroup.lo \
         ../xforms/Toolbar_pimpl.lo \
@@ -55,6 +59,8 @@ libkde_la_SOURCES = \
        QtLyXView.h \
        Timeout_pimpl.C \
        Timeout_pimpl.h \
+       kdeBC.C \
+       kdeBC.h \
        FormCitation.C \
        FormCitation.h \
        FormCopyright.C \
index 69716446ab0698a7e7af65d4cc911ebcbc25b0fe..bd24363d62222df5a5323fb072165d2558f9989c 100644 (file)
@@ -171,6 +171,6 @@ CitationDialog::~CitationDialog()
 
 void CitationDialog::closeEvent(QCloseEvent * e)
 {
-       form_->close();
+       form_->CancelButton();
        e->accept();
 }
index e076b4c8b62a3a368807cbd70a093737422e8e74..8c4cf2a3a6b77aeb7f70f2e6adf10684ecc70c7e 100644 (file)
@@ -14,6 +14,7 @@
 
 // to connect apply() and hide()
 #include "FormCitation.h"
+#include "kdeBC.h"
 
 #include <qdialog.h> 
 #include <qlistbox.h>
@@ -68,34 +69,31 @@ private:
 
 private slots:
        void apply_adaptor(void) {
-               form_->apply();
-               form_->close();
-               hide();
+               form_->OKButton();
        }
 
        void close_adaptor(void) {
-               form_->close();
-               hide();
+               form_->CancelButton();
        }
 
        void add_adaptor(void) {
-               form_->add();
+               form_->bc().valid(form_->add());
        }
 
        void up_adaptor(void) {
-               form_->up();
+               form_->bc().valid(form_->up());
        }
 
        void down_adaptor(void) {
-               form_->down();
+               form_->bc().valid(form_->down());
        }
 
        void remove_adaptor(void) {
-               form_->remove();
+               form_->bc().valid(form_->remove());
        }
 
        void select_key_adaptor(const char * key) {
-               form_->select_key(key);
+               form_->bc().valid(form_->select_key(key));
        }
 
        void highlight_key_adaptor(const char * key) {
index db47b2a4cc7eac8edfdc88f5f8844e9ca0975e04..21e7169b8ac8908434bed2aba0328234ca49ea85 100644 (file)
@@ -442,7 +442,7 @@ bool DocDialog::updateParams(BufferParams & params)
                        tmpskip = VSpace(length);
                        break;
        }
-       
+
        if (!(tmpskip == params.getDefSkip())) {
                redo = true;
                params.setDefSkip(tmpskip);
diff --git a/src/frontends/kde/kdeBC.C b/src/frontends/kde/kdeBC.C
new file mode 100644 (file)
index 0000000..87ec207
--- /dev/null
@@ -0,0 +1,55 @@
+#include <config.h>
+
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
+#include "kdeBC.h"
+#include <qpushbutton.h>
+
+kdeBC::kdeBC(string const & cancel, string const & close)
+       : ButtonControllerBase(cancel, close),
+         okay_(0), apply_(0), cancel_(0), undo_all_(0), read_only_()
+{}
+
+
+void kdeBC::refresh()
+{
+       if (okay_) {
+               if (bp().buttonStatus(ButtonPolicy::OKAY)) {
+                       okay_->setEnabled(true);
+               } else {
+                       okay_->setEnabled(false);
+               }
+       }
+       if (apply_) {
+               if (bp().buttonStatus(ButtonPolicy::APPLY)) {
+                       apply_->setEnabled(true);
+               } else {
+                       apply_->setEnabled(false);
+               }
+       }
+       if (undo_all_) {
+               if (bp().buttonStatus(ButtonPolicy::UNDO_ALL)) {
+                       undo_all_->setEnabled(true);
+               } else {
+                       undo_all_->setEnabled(false);
+               }
+       }
+       if (cancel_) {
+               if (bp().buttonStatus(ButtonPolicy::CANCEL)) {
+                       cancel_->setText(cancel_label.c_str());
+               } else {
+                       cancel_->setText(close_label.c_str());
+               }
+       }
+       if (!read_only_.empty()) {
+               bool enable = true;
+               if (bp().isReadOnly()) enable = false;
+                       
+               for (std::list<QWidget *>::iterator iter = read_only_.begin();
+                    iter != read_only_.end(); ++iter) {
+                       (*iter)->setEnabled(enable);
+               }
+       }
+}
diff --git a/src/frontends/kde/kdeBC.h b/src/frontends/kde/kdeBC.h
new file mode 100644 (file)
index 0000000..03d1631
--- /dev/null
@@ -0,0 +1,77 @@
+// -*- C++ -*-
+/* This file is part of
+ * ======================================================
+ *
+ *           LyX, The Document Processor
+ *
+ *           Copyright 1995 Matthias Ettrich
+ *           Copyright 1995-2000 The LyX Team.
+ *
+ * ======================================================
+ *
+ * Author: Angus Leeming <a.leeming@ic.ac.uk>
+ */
+
+#ifndef KDEBC_H
+#define KDEBC_H
+
+#include "ButtonController.h"
+#include <list>
+
+#ifdef __GNUG__
+#pragma interface
+#endif
+
+class QWidget;
+class QPushButton;
+
+class kdeBC : public ButtonControllerBase
+{
+public:
+       ///
+       kdeBC(string const & cancel, string const & close);
+
+       /* Initialise Button Functions */
+       /// Call refresh() when finished setting the buttons.
+       void setOK(QPushButton * obj) {
+               okay_ = obj;
+       }
+       ///
+       void setApply(QPushButton * obj) {
+               apply_ = obj;
+       }
+       ///
+       void setCancel(QPushButton * obj) {
+               cancel_ = obj;
+       }
+       ///
+       void setUndoAll(QPushButton * obj) {
+               undo_all_ = obj;
+       }
+       ///
+       void addReadOnly(QWidget * obj) {
+               read_only_.push_front(obj);
+       }
+       ///
+       void eraseReadOnly() {
+               read_only_.erase(read_only_.begin(), read_only_.end());
+       }
+
+       /* Action Functions */
+       /// force a refresh of the buttons
+       virtual void refresh();
+
+private:
+       ///
+       QPushButton * okay_;
+       ///
+       QPushButton * apply_;
+       ///
+       QPushButton * cancel_;
+       ///
+       QPushButton * undo_all_;
+       /// List of items to be deactivated when in one of the read-only states
+       std::list<QWidget *> read_only_;
+};
+
+#endif // KDEBC_H
index 57b76e12e2e43e28a0b90198fb830b0659388173..2ab36ad063a4ea34c70fa94029e4d970a581187a 100644 (file)
@@ -2,8 +2,12 @@ AUTOMAKE_OPTIONS = foreign 1.4
 MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
 noinst_LTLIBRARIES = libkdemoc.la
 BOOST_INCLUDES = -I$(top_srcdir)/boost
-INCLUDES = -I${top_srcdir}/src/ -I${top_srcdir}/src/frontends/ \
-       ${SIGC_CFLAGS} ${FRONTEND_INCLUDES} ${BOOST_INCLUDES}
+INCLUDES = -I${top_srcdir}/src/ \
+       -I${top_srcdir}/src/frontends/ \
+       -I${top_srcdir}/src/frontends/controllers \
+       ${SIGC_CFLAGS} \
+       ${FRONTEND_INCLUDES} \
+       $(BOOST_INCLUDES)
 
 libkdemoc_la_SOURCES = FileDialog_private_moc.C \
                citationdlg_moc.C \
diff --git a/src/frontends/xforms/ButtonController.C b/src/frontends/xforms/ButtonController.C
deleted file mode 100644 (file)
index 9e49799..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-#include <config.h>
-
-#include <algorithm>
-
-#include FORMS_H_LOCATION
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "ButtonController.h"
-#include "support/LAssert.h"
-#include "gettext.h" // _()
-//#include "debug.h"
-
-using std::find;
-using std::vector;
-
-ButtonController::ButtonController(ButtonPolicy * bp,
-                                  char const * cancel, char const * close)
-       : bp_(bp), okay_(0), apply_(0), cancel_(0), undo_all_(0),
-         read_only_(), dont_trigger_change_(),
-         cancel_label(cancel), close_label(close)
-{
-       Assert(bp);
-}
-
-
-void ButtonController::refresh()
-{
-       if (okay_) {
-               if (bp_->buttonStatus(ButtonPolicy::OKAY)) {
-                       fl_activate_object(okay_);
-                       fl_set_object_lcol(okay_, FL_BLACK);
-               } else {
-                       fl_deactivate_object(okay_);
-                       fl_set_object_lcol(okay_, FL_INACTIVE);
-               }
-       }
-       if (apply_) {
-               if (bp_->buttonStatus(ButtonPolicy::APPLY)) {
-                       fl_activate_object(apply_);
-                       fl_set_object_lcol(apply_, FL_BLACK);
-               } else {
-                       fl_deactivate_object(apply_);
-                       fl_set_object_lcol(apply_, FL_INACTIVE);
-               }
-       }
-       if (undo_all_) {
-               if (bp_->buttonStatus(ButtonPolicy::UNDO_ALL)) {
-                       fl_activate_object(undo_all_);
-                       fl_set_object_lcol(undo_all_, FL_BLACK);
-               } else {
-                       fl_deactivate_object(undo_all_);
-                       fl_set_object_lcol(undo_all_,
-                                          FL_INACTIVE);
-               }
-       }
-       if (cancel_) {
-               if (bp_->buttonStatus(ButtonPolicy::CANCEL)) {
-                       fl_set_object_label(cancel_,
-                                           _(cancel_label));
-               } else {
-                       fl_set_object_label(cancel_,
-                                           _(close_label));
-               }
-       }
-       if (!read_only_.empty()) {
-               if (bp_->isReadOnly()) {
-                       std::list<FL_OBJECT *>::iterator
-                               end = read_only_.end();
-                       for (std::list<FL_OBJECT *>::iterator
-                                    iter = read_only_.begin();
-                            iter != end;
-                            ++iter) {
-                               fl_deactivate_object(*iter);
-                               fl_set_object_lcol(*iter,
-                                                  FL_INACTIVE);
-                       }
-               } else {
-                       std::list<FL_OBJECT *>::iterator
-                               end = read_only_.end();
-                       for (std::list<FL_OBJECT *>::iterator
-                                    iter = read_only_.begin();
-                            iter != end;
-                            ++iter) {
-                               fl_activate_object(*iter);
-                               fl_set_object_lcol(*iter,
-                                                  FL_BLACK);
-                       }
-               }
-       }
-}
-
-
-void ButtonController::input(ButtonPolicy::SMInput in)
-{
-       //lyxerr << "ButtonController::input: bp_[" << bp_ << "]" << endl;
-       bp_->input(in);
-       refresh();
-}
-
-
-void ButtonController::ok()
-{
-       input(ButtonPolicy::SMI_OKAY);
-}
-
-
-void ButtonController::apply()
-{
-       input(ButtonPolicy::SMI_APPLY);
-}
-
-
-void ButtonController::cancel()
-{
-       input(ButtonPolicy::SMI_CANCEL);
-}
-
-
-void ButtonController::undoAll()
-{
-       input(ButtonPolicy::SMI_UNDO_ALL);
-}
-
-
-void ButtonController::hide()
-{
-       input(ButtonPolicy::SMI_HIDE);
-}
-
-
-bool ButtonController::readOnly(bool ro)
-{
-       if (ro) {
-               input(ButtonPolicy::SMI_READ_ONLY);
-       } else {
-               input(ButtonPolicy::SMI_READ_WRITE);
-       }
-       return ro;
-}
-
-
-void ButtonController::readWrite()
-{
-       readOnly(false);
-}
-
-
-bool ButtonController::valid(bool v, FL_OBJECT * obj)
-{ 
-       if (obj && !dont_trigger_change_.empty()) {
-               vector<FL_OBJECT *>::const_iterator cit =
-                       find(dont_trigger_change_.begin(),
-                            dont_trigger_change_.end(),
-                            obj);
-
-               // Only trigger a change if the obj is not in the list
-               if (cit == dont_trigger_change_.end()) {
-                       if (v) {
-                               input(ButtonPolicy::SMI_VALID);
-                       } else {
-                               input(ButtonPolicy::SMI_INVALID);
-                       }
-               }
-       } else {
-               if (v) {
-                       input(ButtonPolicy::SMI_VALID);
-               } else {
-                       input(ButtonPolicy::SMI_INVALID);
-               }
-       }
-       
-       return v;
-}
-
-
-void ButtonController::invalid()
-{
-       valid(false);
-}
diff --git a/src/frontends/xforms/ButtonController.h b/src/frontends/xforms/ButtonController.h
deleted file mode 100644 (file)
index 3b22b69..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-// -*- C++ -*-
-/* ButtonController.h
- * Controls the activation of the OK, Apply and Cancel buttons.
- * Actually supports 4 buttons in all and it's up to the user to decide on
- * the activation policy and which buttons correspond to which output of the
- * state machine.
- * Author: Allan Rae <rae@lyx.org>
- * This file is part of
- * ======================================================
- *
- *           LyX, The Document Processor
- *
- *           Copyright 1995 Matthias Ettrich
- *           Copyright 1995-2000 The LyX Team.
- *
- *           This file Copyright 2000
- *           Allan Rae
- * ======================================================
- */
-
-#ifndef BUTTONCONTROLLER_H
-#define BUTTONCONTROLLER_H
-
-#include "ButtonPolicies.h"
-#include <list>
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-/** General purpose button controller for up to four buttons.
-    Controls the activation of the OK, Apply and Cancel buttons.
-    Actually supports 4 buttons in all and it's up to the user to decide on
-    the activation policy and which buttons correspond to which output of the
-    state machine.
-    @author Allan Rae <rae@lyx.org>
-    20001001 Switch from template implementation to taking Policy parameter.
-             Allows FormBase to provide a ButtonController for any dialog.
-*/
-class ButtonController : public noncopyable
-{
-public:
-       /** Constructor.
-           The cancel/close label entries are _not_ managed within the class
-           thereby allowing you to reassign at will and to use static labels.
-           It also means if you really don't want to have the Cancel button
-           label be different when there is nothing changed in the dialog then
-           you can just assign "Cancel" to both labels.  Or even reuse this
-           class for something completely different.
-        */
-       ButtonController(ButtonPolicy * bp,
-                        char const * cancel, char const * close);
-
-       // Somebody else owns the FL_OBJECTs we just manipulate them.
-       // so? (Lgb)
-       //~ButtonController() {}
-
-       /* Initialise Button Functions */
-       /// Call refresh() when finished setting the buttons.
-       void setOK(FL_OBJECT * obj) {
-               okay_ = obj;
-       }
-       ///
-       void setApply(FL_OBJECT * obj) {
-               apply_ = obj;
-       }
-       ///
-       void setCancel(FL_OBJECT * obj) {
-               cancel_ = obj;
-       }
-       ///
-       void setUndoAll(FL_OBJECT * obj) {
-               undo_all_ = obj;
-       }
-       ///
-       void setCancelTrueLabel(char const * c) {
-               cancel_label = c;
-       }
-       ///
-       void setCancelFalseLabel(char const * c) {
-               close_label = c;
-       }
-       ///
-       void addReadOnly(FL_OBJECT * obj) {
-               read_only_.push_front(obj);
-       }
-       ///
-       void eraseReadOnly() {
-               read_only_.erase(read_only_.begin(), read_only_.end());
-       }
-
-       ///
-       void addDontTriggerChange(FL_OBJECT * obj) {
-               dont_trigger_change_.push_back(obj);
-       }
-       ///
-       void eraseDontTriggerChange() {
-               dont_trigger_change_.clear();
-       }
-
-       /* Action Functions */
-       /// force a refresh of the buttons
-       void refresh();
-
-       ///
-       void input(ButtonPolicy::SMInput in);
-       ///
-       void ok();
-       ///
-       void apply();
-       ///
-       void cancel();
-       ///
-       void undoAll();
-       ///
-       void hide();
-       /// Passthrough function -- returns its input value
-       bool readOnly(bool ro = true);
-       ///
-       void readWrite();
-       /// Passthrough function -- returns its input value
-       bool valid(bool v = true, FL_OBJECT * obj = 0);
-       ///
-       void invalid();
-private:
-       ///
-       ButtonPolicy * bp_;
-       ///
-       FL_OBJECT * okay_;
-       ///
-       FL_OBJECT * apply_;
-       ///
-       FL_OBJECT * cancel_;
-       ///
-       FL_OBJECT * undo_all_;
-       /// List of items to be deactivated when in one of the read-only states
-       std::list<FL_OBJECT *> read_only_;
-       /// container of items that do not trigger a change in activation status
-       std::vector<FL_OBJECT *> dont_trigger_change_;
-       ///
-       char const * cancel_label;
-       ///
-       char const * close_label;       
-};
-
-#endif
index 99b4ea4e42a986b53212be726209d09c47f04d5b..eb7a1b504c7d8f6c35697c83b10906aa9874bf60 100644 (file)
+2001-03-14  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * Merging changes from BRANCH_MVC back into HEAD.
+
+2001-03-12  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * Dialogs.C (c-tor): Changes associated with storing a vector of
+       boost::shared_ptrs.
+       Use MVC Bibitem popup.
+
+       * FormBase.h: add a new template class FormBase2, derived from FormBase
+       to make life creating MVC popups even easier ;-)
+
+       * FormBibitem.[Ch]:
+       * forms/form_bibitem.fd: moved over to the MVC way of doing things.
+       Proof that a simple popup should be easy to implement!
+
+       * FormCitation.[Ch]: now derived from FormBase2.
+
+       * FormToc.C: added using std::vector directive.
+
+2001-03-09  Dekel Tsur  <dekelts@tau.ac.il>
+
+       * FormSearch.C: Add missing #pragma
+
+2001-03-09  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * FormCitation.C:
+       * forms/form_citation.fd: added the ability to Search, both Simply and
+       for Regular Expressions. Use the Search code in the controller() to do
+       the actual searching.
+
+2001-03-08  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * Makefile.am: added FormCredits.[Ch] and form_credits.[Ch]
+       * forms/makefile: added form_credits.fd
+       
+       * Dialogs.C: added FormCredits and removed ShowCredits.
+       
+       * FormCredits.[Ch]:
+       * forms/form_credits.fd:
+       * forms/form_search.fd: ported to the MVC way.
+       
+2001-03-07  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * xforms_helpers.h (formatted): now has default arguments for size and
+       style.
+
+       * FormCitation.[Ch]: moved code out of this class and into
+       ControlCitation and associated helper funcs.
+       
+2001-03-05  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * FormBase.[Ch]: (InputCB): use ButtonController::input() rather than
+       ButtonController::valid() to check state of input. The buttons are
+       now controlled correctly.
+
+       * Form*.[Ch]: use boost::scoped_ptr for the remaining few classes.
+
+2001-03-05  Lars Gullik Bjønnes  <larsbj@lyx.org>
+
+       * Form*.[Ch]: use boost::scoped_ptr for dialog_ et al.
+
+       * FormBase.[Ch]: rename title as title_.
+
+2001-03-02  John Levon  <moz@compsoc.man.ac.uk>
+
+       * FormBase.C (c-tor): initialise variables in correct order.
+
+       * FormCitation.C: add #include <algorithm>
+
+2001-03-02  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * xformsBC.[Ch]: Changes associated with the changes to
+       controllers/ButtonController.[Ch]. Ie, the class is now derived from
+       ButtonControllerBase and the ButtonPolicy is accessed through a method
+       bp() rather than the instance bp_.
+
+       * FormBaseDeprecated.[Ch]: no longer store a ButtonController, but
+       rather use a pure virtual method bc() to access the controller
+       instantiated by the daughter classes.
+
+       * F*.[Ch]: changes associated with the above.
+
+2001-02-27  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * FormBase.[Ch]: renamed as FormBaseDeprecated.[Ch]
+
+       * ViewXforms.[Ch]: renamed as FormBase.[Ch]
+
+2001-02-23  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * ButtonController.[Ch]: deleted. The class is split into two
+       (with identical functionality), the code being found in
+       ../controllers/ButtonController.[Ch] and xformsBC.[Ch]
+
+       * xformsBC.[Ch]: new files. Xforms specific part of Allan's original
+       ButtonController class.
+
+       * FormBase.[Ch]: changes associated with the above split.
+
+       * ViewXforms.[Ch]: Base class for xforms dialogs derived from ViewBase
+       (../controllers/ViewBase.h). Ie, for Dialogs with GUI-I controllers
+       controlling all interaction to/from the LyX kernel.
+
+       * FormCitation.[Ch]:
+       * forms/form_citation.fd: An xforms-specific implementation of the
+       Citation dialog, controlled by the GUI-I ControlCitation.
+
+       * Dialogs.C: Use the controlled Citation dialog.
+
 2001-03-09  Angus Leeming  <a.leeming@ic.ac.uk>
 
        * forms/fdfix.sh:
        * forms/form_filedialog.C.patch: I hate having to make these patches,
        but on reflection I think it's probably better than hacking fdfix.sh.
 
-22001-03-13  John Levon  <moz@compsoc.man.ac.uk>
+2001-03-13  John Levon  <moz@compsoc.man.ac.uk>
 
        * FormGraphics.C: remove unnecessary hack
 
index ec269bb95f225f496a62cb00ee843270d64c97f8..05806d7b24f7cc0f287a129d3f1ed1cf3ca4b24a 100644 (file)
  *======================================================*/
 
 #include <config.h>
+
+#include <algorithm> // max
+#include <cmath> // floor
+
 #include FORMS_H_LOCATION
 
 #ifdef __GNUG_
 #pragma implementation
 #endif
 
-#include <algorithm> // max
-#include <cmath> // floor
 #include "Color.h"
 
 using std::max;
index 604c032129e3e0a174e00d9b788e1a2dbd7fcb5a..4e218d7792b106ad5a4899f54cae3c114ad6681d 100644 (file)
  */
 
 #include <config.h>
+#include FORMS_H_LOCATION
+
+#ifdef __GNUG__
+#pragma implementation
+#endif
 
 #include "Dialogs.h"
+
+#include "ControlBibitem.h"
+#include "ControlCitation.h"
+#include "xformsBC.h"
+
 #include "FormBibitem.h"
 #include "FormBibtex.h"
 #include "FormCitation.h"
 #include "FormUrl.h"
 #include "FormVCLog.h"
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-using std::endl;
-
 // Signal enabling all visible popups to be redrawn if so desired.
 // E.g., when the GUI colours have been remapped.
 Signal0<void> Dialogs::redrawGUI;
 
-
 Dialogs::Dialogs(LyXView * lv)
 {
-       splash_ = new FormSplash(lv, this);
-       dialogs_.push_back(new FormBibitem(lv, this));
-       dialogs_.push_back(new FormBibtex(lv, this));
-       dialogs_.push_back(new FormCharacter(lv, this));
-       dialogs_.push_back(new FormCitation(lv, this));
-       dialogs_.push_back(new FormCopyright(lv, this));
-       dialogs_.push_back(new FormCredits(lv, this));
-       dialogs_.push_back(new FormDocument(lv, this));
-       dialogs_.push_back(new FormError(lv, this));
-       dialogs_.push_back(new FormExternal(lv, this)); 
-       dialogs_.push_back(new FormGraphics(lv, this));
-       dialogs_.push_back(new FormInclude(lv, this));
-       dialogs_.push_back(new FormIndex(lv, this));
-       dialogs_.push_back(new FormLog(lv, this));
-       dialogs_.push_back(new FormParagraph(lv, this));
-       dialogs_.push_back(new FormPreamble(lv, this));
-       dialogs_.push_back(new FormPreferences(lv, this));
-       dialogs_.push_back(new FormPrint(lv, this));
-       dialogs_.push_back(new FormRef(lv, this));
-       dialogs_.push_back(new FormSearch(lv, this));
-       dialogs_.push_back(new FormTabular(lv, this));
-       dialogs_.push_back(new FormTabularCreate(lv, this));
-       dialogs_.push_back(new FormToc(lv, this));
-       dialogs_.push_back(new FormUrl(lv, this));
-       dialogs_.push_back(new FormVCLog(lv, this));
-
+       splash_.reset(new FormSplash(lv, this));
+
+       add(new GUICitation<FormCitation, xformsBC>(*lv, *this));
+       add(new GUIBibitem<FormBibitem, xformsBC>(*lv, *this));
+
+       add(new FormBibtex(lv, this));
+       add(new FormCharacter(lv, this));
+       add(new FormCopyright(lv, this));
+       add(new FormCredits(lv, this));
+       add(new FormDocument(lv, this));
+       add(new FormError(lv, this));
+       add(new FormExternal(lv, this));
+       add(new FormGraphics(lv, this));
+       add(new FormInclude(lv, this));
+       add(new FormIndex(lv, this));
+       add(new FormLog(lv, this));
+       add(new FormParagraph(lv, this));
+       add(new FormPreamble(lv, this));
+       add(new FormPreferences(lv, this));
+       add(new FormPrint(lv, this));
+       add(new FormRef(lv, this));
+       add(new FormSearch(lv, this));
+       add(new FormSplash(lv, this));
+       add(new FormTabular(lv, this));
+       add(new FormTabularCreate(lv, this));
+       add(new FormToc(lv, this));
+       add(new FormUrl(lv, this));
+       add(new FormVCLog(lv, this));
+       
        // reduce the number of connections needed in
        // dialogs by a simple connection here.
        hideAll.connect(hideBufferDependent.slot());
 }
 
-
-Dialogs::~Dialogs()
-{
-       for (vector<DialogBase *>::iterator iter = dialogs_.begin();
-            iter != dialogs_.end();
-            ++iter) {
-               delete *iter;
-       }
-       delete splash_;
-}
-
-
-void Dialogs::destroySplash()
-{
-       delete splash_;
-       splash_ = 0;
-}
 /*****************************************************************************
 
 Q.  WHY does Dialogs::Dialogs pass `this' to dialog constructors?
index 37a9c5db0825513f48f9cd615d38723da363a336..228e6fb955bfbddb2e44938ade5cc88bdde29dd8 100644 (file)
 
 #include <config.h>
 
-#include FORMS_H_LOCATION
-
 #ifdef __GNUG__
 #pragma implementation
 #endif
 
 #include "Dialogs.h"
 #include "FormBase.h"
-#include "LyXView.h"
+#include "xformsBC.h"
 #include "support/LAssert.h"
-//#include "debug.h"
 
-extern "C" int C_FormBaseWMHideCB(FL_FORM * ob, void * d)
-{
-       return FormBase::WMHideCB(ob, d);
-}
-extern "C" void C_FormBaseApplyCB(FL_OBJECT * ob, long d)
-{
-       FormBase::ApplyCB(ob, d);
-}
-extern "C" void C_FormBaseOKCB(FL_OBJECT * ob, long d)
-{
-       FormBase::OKCB(ob, d);
-}
-extern "C" void C_FormBaseCancelCB(FL_OBJECT * ob, long d)
-{
-       FormBase::CancelCB(ob, d);
-}
-extern "C" void C_FormBaseInputCB(FL_OBJECT * ob, long d)
-{
-       FormBase::InputCB(ob, d);
-}
-extern "C" void C_FormBaseRestoreCB(FL_OBJECT * ob, long d)
-{
-       FormBase::RestoreCB(ob, d);
-}
-
-
-FormBase::FormBase(LyXView * lv, Dialogs * d, string const & t,
-                  ButtonPolicy * bp, char const * close, char const * cancel)
-       : lv_(lv), bc_(bp, cancel, close), d_(d), h_(0), r_(0), title(t),
-         bp_(bp), minw_(0), minh_(0)
-{
-       Assert(lv && d && bp);
-}
+extern "C" int C_FormBaseWMHideCB(FL_FORM * form, void *);
 
 
-FormBase::~FormBase()
-{
-       delete bp_;
-}
+FormBase::FormBase(ControlBase & c, string const & t)
+       : ViewBC<xformsBC>(c), minw_(0), minh_(0), title_(t)
+{}
 
 
 void FormBase::redraw()
@@ -71,20 +35,6 @@ void FormBase::redraw()
 }
 
 
-void FormBase::connect()
-{
-       fl_set_form_minsize(form(), minw_, minh_);
-       r_ = Dialogs::redrawGUI.connect(slot(this, &FormBase::redraw));
-}
-
-
-void FormBase::disconnect()
-{
-       h_.disconnect();
-       r_.disconnect();
-}
-
-
 void FormBase::show()
 {
        if (!form()) {
@@ -110,122 +60,72 @@ void FormBase::show()
                XMapWindow(fl_get_display(), form()->window);
        } else {
                // calls to fl_set_form_minsize/maxsize apply only to the next
-               // fl_show_form(), so connect() comes first.
-               connect();
+               // fl_show_form(), so this comes first.
+               fl_set_form_minsize(form(), minw_, minh_);
                fl_show_form(form(),
                             FL_PLACE_MOUSE | FL_FREE_SIZE, 0,
-                            title.c_str());
+                            title_.c_str());
        }
 }
 
 
 void FormBase::hide()
 {
-       if (form() && form()->visible) {
-               // some dialogs might do things to the form first
-               // such as the nested tabfolder problem in Preferences
-               disconnect();
+       if (form() && form()->visible)
                fl_hide_form(form());
-       }
 }
 
 
-int FormBase::WMHideCB(FL_FORM * form, void *)
-{
-       Assert(form);
-       // Ensure that the signals (u and h) are disconnected even if the
-       // window manager is used to close the dialog.
-       FormBase * pre = static_cast<FormBase*>(form->u_vdata);
-       Assert(pre);
-       pre->hide();
-       pre->bc_.hide();
-       return FL_CANCEL;
-}
-
-
-void FormBase::ApplyCB(FL_OBJECT * ob, long)
+void FormBase::InputCB(FL_OBJECT * ob, long data)
 {
-       Assert(ob && ob->form);
-       FormBase * pre = static_cast<FormBase*>(ob->form->u_vdata);
-       Assert(pre);
-       pre->apply();
-       pre->bc_.apply();
+       bc().input(input(ob, data));
 }
 
 
-void FormBase::OKCB(FL_OBJECT * ob, long)
+static FormBase * GetForm(FL_OBJECT * ob)
 {
-       Assert(ob && ob->form);
-       FormBase * pre = static_cast<FormBase*>(ob->form->u_vdata);
-       Assert(pre);
-       pre->ok();
-       pre->bc_.ok();
+       Assert(ob && ob->form && ob->form->u_vdata);
+       FormBase * pre = static_cast<FormBase *>(ob->form->u_vdata);
+       return pre;
 }
 
 
-void FormBase::CancelCB(FL_OBJECT * ob, long)
+extern "C" int C_FormBaseWMHideCB(FL_FORM * form, void *)
 {
-       Assert(ob && ob->form);
-       FormBase * pre = static_cast<FormBase*>(ob->form->u_vdata);
-       Assert(pre);
-       pre->cancel();
-       pre->bc_.cancel();
+       // Close the dialog cleanly, even if the WM is used to do so.
+       Assert(form && form->u_vdata);
+       FormBase * pre = static_cast<FormBase *>(form->u_vdata);
+       pre->CancelButton();
+       return FL_CANCEL;
 }
 
 
-void FormBase::InputCB(FL_OBJECT * ob, long data)
+extern "C" void C_FormBaseApplyCB(FL_OBJECT * ob, long)
 {
-       Assert(ob && ob->form);
-       FormBase * pre = static_cast<FormBase*>(ob->form->u_vdata);
-       Assert(ob);
-       pre->bc_.valid(pre->input(ob, data), ob);
+       GetForm(ob)->ApplyButton();
 }
 
 
-void FormBase::RestoreCB(FL_OBJECT * ob, long)
+extern "C" void C_FormBaseOKCB(FL_OBJECT * ob, long)
 {
-       Assert(ob && ob->form);
-       FormBase * pre = static_cast<FormBase*>(ob->form->u_vdata);
-       Assert(ob);
-       pre->bc_.undoAll();
-       pre->restore();
+       GetForm(ob)->OKButton();
 }
 
 
-FormBaseBI::FormBaseBI(LyXView * lv, Dialogs * d, string const & t,
-                      ButtonPolicy * bp,
-                      char const * close, char const * cancel)
-       : FormBase(lv, d, t, bp, close, cancel)
-{}
-
-
-void FormBaseBI::connect()
+extern "C" void C_FormBaseCancelCB(FL_OBJECT * ob, long)
 {
-       h_ = d_->hideAll.connect(slot(this, &FormBaseBI::hide));
-       FormBase::connect();
+       FormBase * form = GetForm(ob);
+       form->CancelButton();
 }
 
 
-FormBaseBD::FormBaseBD(LyXView * lv, Dialogs * d, string const & t,
-                      ButtonPolicy * bp,
-                      char const * close, char const * cancel)
-       : FormBase(lv, d, t, bp, close, cancel),
-         u_(0)
-{}
-
-
-void FormBaseBD::connect()
+extern "C" void C_FormBaseRestoreCB(FL_OBJECT * ob, long)
 {
-       u_ = d_->updateBufferDependent.
-                connect(slot(this, &FormBaseBD::updateSlot));
-       h_ = d_->hideBufferDependent.
-                connect(slot(this, &FormBaseBD::hide));
-       FormBase::connect();
+       GetForm(ob)->RestoreButton();
 }
 
 
-void FormBaseBD::disconnect()
+extern "C" void C_FormBaseInputCB(FL_OBJECT * ob, long d)
 {
-       u_.disconnect();
-       FormBase::disconnect();
+       GetForm(ob)->InputCB(ob, d);
 }
index a9dff0d80d532187295a6a0e452130d7dadbc95d..6138f4a586c7fe2fce6ad03a7165ac6e63d881fa 100644 (file)
  *           Copyright 2000 The LyX Team.
  *
  * ======================================================
+ *
+ * Author: Angus Leeming <a.leeming@ic.ac.uk>
  */
 
 #ifndef FORMBASE_H
 #define FORMBASE_H
 
-#include "DialogBase.h"
-#include "LString.h"
-#include FORMS_H_LOCATION
-#include "ButtonController.h"
-#include "gettext.h"
-#include <sigc++/signal_system.h>
-
-class Buffer;
-class Dialogs;
-class LyXView;
+#include <boost/smart_ptr.hpp>
 
 #ifdef __GNUG__
 #pragma interface
 #endif
 
+#include FORMS_H_LOCATION // Can't forward-declare FL_FORM
+#include "ViewBase.h"
+#include "LString.h"
+#include "ButtonPolicies.h"
+
+class xformsBC;
+
 /** This class is an XForms GUI base class.
-    It is meant to be used solely as the parent class to FormBaseBI
-    and FormBaseBD.
-    @author Angus Leeming
  */
-
-class FormBase : public DialogBase {
+class FormBase : public ViewBC<xformsBC>
+{
 public:
-       /// Callback functions
-       static  int WMHideCB(FL_FORM *, void *);
-       ///
-       static void ApplyCB(FL_OBJECT *, long);
-       ///
-       static void OKCB(FL_OBJECT *, long);
        ///
-       static void CancelCB(FL_OBJECT *, long);
+       FormBase(ControlBase &, string const &);
        ///
-       static void InputCB(FL_OBJECT *, long);
-       ///
-       static void RestoreCB(FL_OBJECT *, long);
+       virtual ~FormBase() {}
 
-protected: // methods
-       ///
-       FormBase(LyXView *, Dialogs *, string const &,
-                ButtonPolicy *, char const *, char const *);
-       ///
-       virtual ~FormBase();
+       /// input callback function
+       void InputCB(FL_OBJECT *, long);
 
-       /** Redraw the form (on receipt of a Signal indicating, for example,
-           that the xforms colors have been re-mapped).
-           Must be virtual because dialogs with tabbed folders will need to
-           redraw the form for each tab.
-       */
-       virtual void redraw();
-
-       /// Create the dialog if necessary, update it and display it.
-       virtual void show();
-       /// Hide the dialog.
-       virtual void hide();
-       /// Update the dialog.
-       virtual void update() {}
-       /// Connect signals. Also perform any necessary initialisation.
-       virtual void connect();
-       /// Disconnect signals. Also perform any necessary housekeeping.
-       virtual void disconnect();
+protected:
        /// Build the dialog
        virtual void build() = 0;
-       /** Filter the inputs on callback from xforms
-           Return true if inputs are valid.
-        */
-       virtual bool input( FL_OBJECT *, long) {
-               return true;
-       }
-       /// Apply from dialog (modify or create inset)
-       virtual void apply() {}
-       /// OK from dialog
-       virtual void ok() {
-               apply();
-               hide();
-       }
-       /// Cancel from dialog
-       virtual void cancel() {
-               hide();
-       }
-       /// Restore from dialog
-       virtual void restore() {
-               update();
-       }
-       /// Pointer to the actual instantiation of the xforms form
-       virtual FL_FORM * form() const = 0;
+       /// Hide the dialog.
+       void hide();
+       /// Create the dialog if necessary, update it and display it.
+       void show();
 
-       /** Which LyXFunc do we use?
-           We could modify Dialogs to have a visible LyXFunc* instead and
-           save a couple of bytes per dialog.
-       */
-       LyXView * lv_;
-       /// Useable even in derived-class's const functions.
-       mutable ButtonController bc_;
-       /// Used so we can get at the signals we have to connect to.
-       Dialogs * d_;
-       /// Hide connection.
-       Connection h_;
-       /// Redraw connection.
-       Connection r_;
-       /// dialog title, displayed by WM.
-       string title;
 private:
-       ///
-       ButtonPolicy * bp_;
-public:
+       /// Pointer to the actual instantiation of xform's form
+       virtual FL_FORM * form() const = 0;
+       /** Filter the inputs on callback from xforms
+           Return true if inputs are valid. */
+       virtual ButtonPolicy::SMInput input(FL_OBJECT *, long) = 0;
+
+       /** Redraw the form (on receipt of a Signal indicating, for example,
+           that the xform colors have been re-mapped). */
+       virtual void redraw();
+
+protected:
        /// Overcome a dumb xforms sizing bug
        mutable int minw_;
        ///
        mutable int minh_;
+
+private:
+       /// dialog title, displayed by WM.
+       string title_;
 };
 
 
-/** This class is an XForms GUI base class for Buffer Independent dialogs.
-    Such dialogs do not require an update Connection although they may use
-    an update() function which is also supported by restore().
- */
-class FormBaseBI : public FormBase {
+template <class Controller, class Dialog>
+class FormBase2: public FormBase
+{
 protected:
-       /// Constructor
-       FormBaseBI(LyXView *, Dialogs *, string const &,
-                  ButtonPolicy * bp,
-                  char const * close = N_("Close"),
-                  char const * cancel = N_("Cancel"));
-
-       /// Connect signals
-       virtual void connect();
+       ///
+       FormBase2(ControlBase &, string const &);
+       /// The parent controller
+       Controller & controller() const;
+       /// Pointer to the actual instantiation of xform's form
+       virtual FL_FORM * form() const;
+       /// Real GUI implementation.
+       boost::scoped_ptr<Dialog> dialog_;
 };
 
 
-/** This class is an XForms GUI base class for Buffer Dependent dialogs
- */
-class FormBaseBD : public FormBase {
-protected:
-       /// Constructor
-       FormBaseBD(LyXView *, Dialogs *, string const &,
-                  ButtonPolicy * bp,
-                  char const * close = N_("Close"),
-                  char const * cancel = N_("Cancel"));
-
-       /// Connect signals
-       virtual void connect();
-       /// Disconnect signals
-       virtual void disconnect();
-       /// bool indicates if a buffer switch took place
-       virtual void updateSlot(bool) { update(); }
-
-       /// Update connection.
-       Connection u_;
-};
+template <class Controller, class Dialog>
+FormBase2<Controller, Dialog>::FormBase2(ControlBase & c, string const & t)
+       : FormBase(c, t)
+{}
 
 
-#endif
+template <class Controller, class Dialog>
+Controller & FormBase2<Controller, Dialog>::controller() const
+{
+       return static_cast<Controller &>(controller_);
+       //return dynamic_cast<Controller &>(controller_);
+}
+
+
+template <class Controller, class Dialog>
+FL_FORM * FormBase2<Controller, Dialog>::form() const
+{
+       if (dialog_.get()) return dialog_->form;
+       return 0;
+}
+
+
+#endif // FORMBASE_H
diff --git a/src/frontends/xforms/FormBaseDeprecated.C b/src/frontends/xforms/FormBaseDeprecated.C
new file mode 100644 (file)
index 0000000..7e7653e
--- /dev/null
@@ -0,0 +1,219 @@
+// -*- C++ -*-
+/* This file is part of
+ * ====================================================== 
+ *
+ *           LyX, The Document Processor
+ *
+ *           Copyright 2000 The LyX Team.
+ *
+ * ======================================================
+ */
+
+#include <config.h>
+
+#include FORMS_H_LOCATION
+
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
+#include "Dialogs.h"
+#include "FormBaseDeprecated.h"
+#include "LyXView.h"
+#include "support/LAssert.h"
+#include "xformsBC.h"
+//#include "debug.h"
+
+extern "C" int C_FormBaseDeprecatedWMHideCB(FL_FORM * ob, void * d)
+{
+       return FormBaseDeprecated::WMHideCB(ob, d);
+}
+extern "C" void C_FormBaseDeprecatedApplyCB(FL_OBJECT * ob, long d)
+{
+       FormBaseDeprecated::ApplyCB(ob, d);
+}
+extern "C" void C_FormBaseDeprecatedOKCB(FL_OBJECT * ob, long d)
+{
+       FormBaseDeprecated::OKCB(ob, d);
+}
+extern "C" void C_FormBaseDeprecatedCancelCB(FL_OBJECT * ob, long d)
+{
+       FormBaseDeprecated::CancelCB(ob, d);
+}
+extern "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT * ob, long d)
+{
+       FormBaseDeprecated::InputCB(ob, d);
+}
+extern "C" void C_FormBaseDeprecatedRestoreCB(FL_OBJECT * ob, long d)
+{
+       FormBaseDeprecated::RestoreCB(ob, d);
+}
+
+
+FormBaseDeprecated::FormBaseDeprecated(LyXView * lv, Dialogs * d,
+                                      string const & t)
+       : lv_(lv), d_(d), h_(0), r_(0), title(t), minw_(0), minh_(0)
+{
+       Assert(lv && d);
+}
+
+
+void FormBaseDeprecated::redraw()
+{
+       if (form() && form()->visible)
+               fl_redraw_form(form());
+}
+
+
+void FormBaseDeprecated::connect()
+{
+       fl_set_form_minsize(form(), minw_, minh_);
+       r_ = Dialogs::redrawGUI.connect(slot(this,&FormBaseDeprecated::redraw));
+}
+
+
+void FormBaseDeprecated::disconnect()
+{
+       h_.disconnect();
+       r_.disconnect();
+}
+
+
+void FormBaseDeprecated::show()
+{
+       if (!form()) {
+               build();
+               fl_set_form_atclose(form(),
+                                   C_FormBaseDeprecatedWMHideCB, 0);
+       }
+
+       fl_freeze_form(form());
+       update();  // make sure its up-to-date
+       fl_unfreeze_form(form());
+
+       if (form()->visible) {
+               fl_raise_form(form());
+       } else {
+               // calls to fl_set_form_minsize/maxsize apply only to the next
+               // fl_show_form(), so connect() comes first.
+               connect();
+               fl_show_form(form(),
+                            FL_PLACE_MOUSE | FL_FREE_SIZE,
+                            FL_TRANSIENT,
+                            title.c_str());
+       }
+}
+
+
+void FormBaseDeprecated::hide()
+{
+       if (form() && form()->visible) {
+               // some dialogs might do things to the form first
+               // such as the nested tabfolder problem in Preferences
+               disconnect();
+               fl_hide_form(form());
+       }
+}
+
+
+int FormBaseDeprecated::WMHideCB(FL_FORM * form, void *)
+{
+       Assert(form);
+       // Ensure that the signals (u and h) are disconnected even if the
+       // window manager is used to close the dialog.
+       FormBaseDeprecated * pre =
+               static_cast<FormBaseDeprecated*>(form->u_vdata);
+       Assert(pre);
+       pre->hide();
+       pre->bc().hide();
+       return FL_CANCEL;
+}
+
+
+void FormBaseDeprecated::ApplyCB(FL_OBJECT * ob, long)
+{
+       Assert(ob && ob->form);
+       FormBaseDeprecated * pre =
+               static_cast<FormBaseDeprecated*>(ob->form->u_vdata);
+       Assert(pre);
+       pre->apply();
+       pre->bc().apply();
+}
+
+
+void FormBaseDeprecated::OKCB(FL_OBJECT * ob, long)
+{
+       Assert(ob && ob->form);
+       FormBaseDeprecated * pre =
+               static_cast<FormBaseDeprecated*>(ob->form->u_vdata);
+       Assert(pre);
+       pre->ok();
+       pre->bc().ok();
+}
+
+
+void FormBaseDeprecated::CancelCB(FL_OBJECT * ob, long)
+{
+       Assert(ob && ob->form);
+       FormBaseDeprecated * pre =
+               static_cast<FormBaseDeprecated*>(ob->form->u_vdata);
+       Assert(pre);
+       pre->cancel();
+       pre->bc().cancel();
+}
+
+
+void FormBaseDeprecated::InputCB(FL_OBJECT * ob, long data)
+{
+       Assert(ob && ob->form);
+       FormBaseDeprecated * pre =
+               static_cast<FormBaseDeprecated*>(ob->form->u_vdata);
+       Assert(ob);
+       pre->bc().valid(pre->input(ob, data));
+}
+
+
+void FormBaseDeprecated::RestoreCB(FL_OBJECT * ob, long)
+{
+       Assert(ob && ob->form);
+       FormBaseDeprecated * pre =
+               static_cast<FormBaseDeprecated*>(ob->form->u_vdata);
+       Assert(ob);
+       pre->bc().undoAll();
+       pre->restore();
+}
+
+
+FormBaseBI::FormBaseBI(LyXView * lv, Dialogs * d, string const & t)
+       : FormBaseDeprecated(lv, d, t)
+{}
+
+
+void FormBaseBI::connect()
+{
+       h_ = d_->hideAll.connect(slot(this, &FormBaseBI::hide));
+       FormBaseDeprecated::connect();
+}
+
+
+FormBaseBD::FormBaseBD(LyXView * lv, Dialogs * d, string const & t)
+       : FormBaseDeprecated(lv, d, t),
+         u_(0)
+{}
+
+
+void FormBaseBD::connect()
+{
+       u_ = d_->updateBufferDependent.
+                connect(slot(this, &FormBaseBD::updateSlot));
+       h_ = d_->hideBufferDependent.
+                connect(slot(this, &FormBaseBD::hide));
+       FormBaseDeprecated::connect();
+}
+
+
+void FormBaseBD::disconnect()
+{
+       u_.disconnect();
+       FormBaseDeprecated::disconnect();
+}
diff --git a/src/frontends/xforms/FormBaseDeprecated.h b/src/frontends/xforms/FormBaseDeprecated.h
new file mode 100644 (file)
index 0000000..6372a76
--- /dev/null
@@ -0,0 +1,158 @@
+// -*- C++ -*-
+/* This file is part of
+ * ====================================================== 
+ *
+ *           LyX, The Document Processor
+ *
+ *           Copyright 2000 The LyX Team.
+ *
+ * ======================================================
+ */
+
+#ifndef FORMBASEDEPRECATED_H
+#define FORMBASEDEPRECATED_H
+
+#include "DialogBase.h"
+#include "LString.h"
+#include FORMS_H_LOCATION
+#include <sigc++/signal_system.h>
+
+class Buffer;
+class Dialogs;
+class LyXView;
+class xformsBC;
+
+#ifdef __GNUG__
+#pragma interface
+#endif
+
+/** This class is an XForms GUI base class.
+    It is meant to be used solely as the parent class to FormBaseBI
+    and FormBaseBD.
+    It has now been superceeded by the Controller/View split.
+    See FormBase.[Ch] for the way to go!
+    @author Angus Leeming
+ */
+
+class FormBaseDeprecated : public DialogBase {
+public:
+       /// Callback functions
+       static  int WMHideCB(FL_FORM *, void *);
+       ///
+       static void ApplyCB(FL_OBJECT *, long);
+       ///
+       static void OKCB(FL_OBJECT *, long);
+       ///
+       static void CancelCB(FL_OBJECT *, long);
+       ///
+       static void InputCB(FL_OBJECT *, long);
+       ///
+       static void RestoreCB(FL_OBJECT *, long);
+
+protected: // methods
+       ///
+       FormBaseDeprecated(LyXView *, Dialogs *, string const &);
+       ///
+       virtual ~FormBaseDeprecated() {}
+
+       /// Pointer to the actual instantiation of the ButtonController.
+       virtual xformsBC & bc() = 0;
+
+       /** Redraw the form (on receipt of a Signal indicating, for example,
+           that the xform colors have been re-mapped).
+           Must be virtual because dialogs with tabbed folders will need to
+           redraw the form for each tab.
+       */
+       virtual void redraw();
+
+       /// Create the dialog if necessary, update it and display it.
+       virtual void show();
+       /// Hide the dialog.
+       virtual void hide();
+       /// Update the dialog.
+       virtual void update() {}
+       /// Connect signals. Also perform any necessary initialisation.
+       virtual void connect();
+       /// Disconnect signals. Also perform any necessary housekeeping.
+       virtual void disconnect();
+       /// Build the dialog
+       virtual void build() = 0;
+       /** Filter the inputs on callback from xforms
+           Return true if inputs are valid.
+        */
+       virtual bool input( FL_OBJECT *, long) {
+               return true;
+       }
+       /// Apply from dialog (modify or create inset)
+       virtual void apply() {}
+       /// OK from dialog
+       virtual void ok() {
+               apply();
+               hide();
+       }
+       /// Cancel from dialog
+       virtual void cancel() {
+               hide();
+       }
+       /// Restore from dialog
+       virtual void restore() {
+               update();
+       }
+       /// Pointer to the actual instantiation of xform's form
+       virtual FL_FORM * form() const = 0;
+
+       /** Which LyXFunc do we use?
+           We could modify Dialogs to have a visible LyXFunc* instead and
+           save a couple of bytes per dialog.
+       */
+       LyXView * lv_;
+       /// Used so we can get at the signals we have to connect to.
+       Dialogs * d_;
+       /// Hide connection.
+       Connection h_;
+       /// Redraw connection.
+       Connection r_;
+       /// dialog title, displayed by WM.
+       string title;
+public:
+       /// Overcome a dumb xforms sizing bug
+       mutable int minw_;
+       ///
+       mutable int minh_;
+};
+
+
+/** This class is an XForms GUI base class for Buffer Independent dialogs.
+    Such dialogs do not require an update Connection although they may use
+    an update() function which is also supported by restore().
+ */
+class FormBaseBI : public FormBaseDeprecated {
+protected:
+       /// Constructor
+       FormBaseBI(LyXView *, Dialogs *, string const &);
+
+       /// Connect signals
+       virtual void connect();
+};
+
+
+/** This class is an XForms GUI base class for Buffer Dependent dialogs
+ */
+class FormBaseBD : public FormBaseDeprecated {
+protected:
+       /// Constructor
+       FormBaseBD(LyXView *, Dialogs *, string const &);
+
+       /// Connect signals
+       virtual void connect();
+       /// Disconnect signals
+       virtual void disconnect();
+       /// bool indicates if a buffer switch took place
+       virtual void updateSlot(bool) { update(); }
+
+       /// Update connection.
+       Connection u_;
+};
+
+
+#endif // FORMBASEDEPRECATED_H
index 887c28f7a6ed7044ed145148ea1a7c145a6084fc..dd01a436097c6c509d53b45d18c6598f80ae31da 100644 (file)
  * \author John Levon
  */
 
-#include <config.h>
-
-#include FORMS_H_LOCATION
-
 #ifdef __GNUG__
 #pragma implementation
 #endif
 
-
-#include "Dialogs.h"
+#include <config.h>
+#include "ControlBibitem.h"
 #include "FormBibitem.h"
-#include "LyXView.h"
-#include "buffer.h"
 #include "form_bibitem.h"
-#include "lyxfunc.h"
-#include "debug.h"
+#include "gettext.h"
+#include "xformsBC.h"
+#include "support/lstrings.h" // compare
 
-using std::endl;
+FormBibitem::FormBibitem(ControlBibitem & c)
+       : FormBase2<ControlBibitem, FD_form_bibitem>(c, _("Bibliography Entry"))
+{}
 
-FormBibitem::FormBibitem(LyXView * lv, Dialogs * d)
-       : FormCommand(lv, d, _("Bibliography Entry"), new OkCancelReadOnlyPolicy),
-         dialog_(0)
-{
-       d->showBibitem.connect(slot(this, &FormBibitem::showInset));
-}
-
-
-FormBibitem::~FormBibitem()
-{
-       delete dialog_;
-}
-
-
-FL_FORM * FormBibitem::form() const
-{
-       if (dialog_)
-               return dialog_->form;
-       return 0;
-}
-
-
-void FormBibitem::connect()
-{
-       fl_set_form_maxsize(form(), 2 * minw_, minh_);
-       FormCommand::connect();
-}
-       
 
 void FormBibitem::build()
 {
-       dialog_ = build_bibitem();
+       dialog_.reset(build_bibitem());
 
        // Workaround dumb xforms sizing bug
        minw_ = form()->w;
        minh_ = form()->h;
 
-       fl_set_input_return(dialog_->key, FL_RETURN_CHANGED);
+       fl_set_input_return(dialog_->key,   FL_RETURN_CHANGED);
        fl_set_input_return(dialog_->label, FL_RETURN_CHANGED);
 
         // Manage the ok, apply, restore and cancel/close buttons
-       bc_.setOK(dialog_->button_ok);
-       bc_.setCancel(dialog_->button_cancel);
-       bc_.refresh();
+       bc().setOK(dialog_->button_ok);
+       bc().setCancel(dialog_->button_cancel);
+       bc().refresh();
 
-       bc_.addReadOnly(dialog_->key);
-       bc_.addReadOnly(dialog_->label);
+       bc().addReadOnly(dialog_->key);
+       bc().addReadOnly(dialog_->label);
 }
 
 
-bool FormBibitem::input(FL_OBJECT *, long)
+ButtonPolicy::SMInput FormBibitem::input(FL_OBJECT *, long)
 {
        // minimal validation 
        if (!compare(fl_get_input(dialog_->key), ""))
-               return false;
+               return ButtonPolicy::SMI_NOOP;
 
-       return true;
+       return ButtonPolicy::SMI_VALID;
 }
 
 
 void FormBibitem::update()
 {
-       fl_set_input(dialog_->key, params.getContents().c_str());
-       fl_set_input(dialog_->label, params.getOptions().c_str());
-       // Surely, this should reset the buttons to their original state?
-       // It doesn't. Instead "Restore" becomes a "Close"
-       //bc_.refresh();
-       bc_.readOnly(lv_->buffer()->isReadonly());
+       fl_set_input(dialog_->key,
+                    controller().params().getContents().c_str());
+       fl_set_input(dialog_->label,
+                    controller().params().getOptions().c_str());
 }
 
 
 void FormBibitem::apply()
 {
-       if (lv_->buffer()->isReadonly())
-               return;
-
-       params.setContents(fl_get_input(dialog_->key));
-       params.setOptions(fl_get_input(dialog_->label));
-
-       if (inset_ != 0) {
-               // Only update if contents have changed
-               if (params != inset_->params()) {
-                       // FIXME: confirm, is this only necessary for FormBibTeX ???
-                       if (params.getContents() != inset_->params().getContents())
-                               lv_->view()->ChangeCitationsIfUnique(
-                                       inset_->params().getContents(), params.getContents());
-
-               inset_->setParams(params);
-               lv_->view()->updateInset(inset_, true);
-
-               // We need to do a redraw because the maximum
-               // InsetBibKey width could have changed
-               lv_->view()->redraw();
-               lv_->view()->fitCursor(lv_->view()->getLyXText());
-               }
-       } else
-               lyxerr[Debug::GUI] << "Editing non-existent bibitem !" << endl;
+       controller().params().setContents(fl_get_input(dialog_->key));
+       controller().params().setOptions(fl_get_input(dialog_->label));
 }
index 2627beeeb9c9758e22581553ba3521a898344b9c..75be7c5464528967886844f2d4e2965bfbc5e267 100644 (file)
@@ -1,3 +1,4 @@
+// -*- C++ -*-
 /**
  * \file FormBibitem.h
  * Copyright 2001 the LyX Team
 #pragma interface
 #endif
 
-#include "FormInset.h"
-struct FD_form_bibitem;
+#include "FormBase.h"
 
 /**
  * For bibliography entry editing
  */
-class FormBibitem : public FormCommand {
+
+#include "form_bibitem.h"
+class ControlBibitem;
+
+class FormBibitem : public FormBase2<ControlBibitem, FD_form_bibitem> {
 public:
        ///
-       FormBibitem(LyXView *, Dialogs *);
-       ///
-       ~FormBibitem();
-private:
-       /// Connect signals etc. Set form's max size.
-       virtual void connect();
-       /// Build the dialog
+       FormBibitem(ControlBibitem &);
+
+       // Functions accessible to the Controller.
+
+       /// Set the Params variable for the Controller.
+       virtual void apply();
+       /// Build the dialog.
        virtual void build();
-       /// Update dialog before showing it
+       /// Update dialog before/whilst showing it.
        virtual void update();
-       /// input handler
-       virtual bool input(FL_OBJECT *,long);
-       /// Apply from dialog (modify or create inset)
-       virtual void apply();
-       /// Pointer to the actual instantiation of the xforms form
-       virtual FL_FORM * form() const;
-       ///
+
+private:
+       /// Filter the inputs on callback from xforms
+       virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
+
+       /// Type definition from the fdesign produced header file.
        FD_form_bibitem * build_bibitem();
-       /// Real GUI implementation.
-       FD_form_bibitem * dialog_;
 };
 
 #endif // FORMBIBITEM_H
index 3beba5bb7eeaa63dd02b63fbd0c1c0346b1ab429..d877eddf4c6bbd88118671d32eda80dbe55effc9 100644 (file)
 using std::endl;
 
 FormBibtex::FormBibtex(LyXView * lv, Dialogs * d)
-       : FormCommand(lv, d, _("BibTeX Database"), new OkCancelReadOnlyPolicy),
-         dialog_(0)
+       : FormCommand(lv, d, _("BibTeX Database"))
 {
        d->showBibtex.connect(slot(this, &FormBibtex::showInset));
 }
 
 
-FormBibtex::~FormBibtex()
-{
-       delete dialog_;
-}
-
-
 FL_FORM * FormBibtex::form() const
 {
-       if (dialog_)
+       if (dialog_.get())
                return dialog_->form;
        return 0;
 }
@@ -57,7 +50,7 @@ void FormBibtex::connect()
 
 void FormBibtex::build()
 {
-       dialog_ = build_bibtex();
+       dialog_.reset(build_bibtex());
 
        // Workaround dumb xforms sizing bug
        minw_ = form()->w;
@@ -67,12 +60,12 @@ void FormBibtex::build()
        fl_set_input_return(dialog_->style, FL_RETURN_CHANGED);
 
         // Manage the ok, apply, restore and cancel/close buttons
-       bc_.setOK(dialog_->button_ok);
-       bc_.setCancel(dialog_->button_cancel);
-       bc_.refresh();
+       bc().setOK(dialog_->button_ok);
+       bc().setCancel(dialog_->button_cancel);
+       bc().refresh();
 
-       bc_.addReadOnly(dialog_->database);
-       bc_.addReadOnly(dialog_->style);
+       bc().addReadOnly(dialog_->database);
+       bc().addReadOnly(dialog_->style);
 }
 
 
@@ -92,8 +85,8 @@ void FormBibtex::update()
        fl_set_input(dialog_->style, params.getOptions().c_str());
        // Surely, this should reset the buttons to their original state?
        // It doesn't. Instead "Restore" becomes a "Close"
-       //bc_.refresh();
-       bc_.readOnly(lv_->buffer()->isReadonly());
+       //bc().refresh();
+       bc().readOnly(lv_->buffer()->isReadonly());
 }
 
 
index c3402992f5bcf227a6683a298fc257373546cada..7ba90f284e0ce78c332a51172ae7d54bce6e7846 100644 (file)
@@ -1,3 +1,4 @@
+// -*- C++ -*-
 /**
  * \file FormBibtex.h
  * Copyright 2001 the LyX Team
 #ifndef FORMBIBTEX_H
 #define FORMBIBTEX_H
 
+#include <boost/smart_ptr.hpp>
+
+#include "FormInset.h"
+#include "xformsBC.h"
+
 #ifdef __GNUG__
 #pragma interface
 #endif
 
-#include "FormInset.h"
 struct FD_form_bibtex;
 
 /**
@@ -24,9 +29,9 @@ class FormBibtex : public FormCommand {
 public:
        ///
        FormBibtex(LyXView *, Dialogs *);
-       ///
-       ~FormBibtex();
 private:
+       /// Pointer to the actual instantiation of the ButtonController.
+       virtual xformsBC & bc();
        /// Connect signals etc. Set form's max size.
        virtual void connect();
        /// Build the dialog
@@ -42,7 +47,15 @@ private:
        ///
        FD_form_bibtex * build_bibtex();
        /// Real GUI implementation.
-       FD_form_bibtex * dialog_;
+       boost::scoped_ptr<FD_form_bibtex> dialog_;
+       /// The ButtonController
+       ButtonController<OkCancelReadOnlyPolicy, xformsBC> bc_;
 };
 
+
+inline
+xformsBC & FormBibtex::bc()
+{
+  return bc_;
+}
 #endif // FORMBIBTEX_H
index c5d87b3bc83ebab3e8902629ed8a5a1bb3e3f6b2..693c53f1be756c2cc35a53589ec6977b130e9339 100644 (file)
@@ -24,39 +24,34 @@ using SigC::slot;
 #endif
 
 FormBrowser::FormBrowser(LyXView * lv, Dialogs * d, const string & name)
-       : FormBaseBD(lv, d, name, new OkCancelPolicy),
-         dialog_(0)
-{
-}
+       : FormBaseBD(lv, d, name)
+{}
 
-FormBrowser::~FormBrowser()
-{
-       delete dialog_;
-}
 
 void FormBrowser::build()
 {
-       dialog_ = build_browser();
+       dialog_.reset(build_browser());
 
        // Workaround dumb xforms sizing bug
        minw_ = form()->w;
        minh_ = form()->h;
 
        // Manage the close button
-       bc_.setCancel(dialog_->button_close);
-       bc_.refresh();
+       bc().setCancel(dialog_->button_close);
+       bc().refresh();
 }
 
+
 FL_FORM * FormBrowser::form() const
 {
-       if (dialog_)
+       if (dialog_.get())
                return dialog_->form;
        return 0;
 }
 
 void FormBrowser::update()
-{
-}
+{}
+
 
 bool FormBrowser::input(FL_OBJECT *, long)
 {
index 7749ce822d6d54661ad4b2001b510539376f8434..556fc5edfbb3b29b8abc8b4afdb1e066776ade73 100644 (file)
@@ -9,7 +9,10 @@
 #ifndef FORMBROWSER_H
 #define FORMBROWSER_H
 
-#include "FormBase.h"
+#include <boost/smart_ptr.hpp>
+
+#include "FormBaseDeprecated.h"
+#include "xformsBC.h"
 
 #ifdef __GNUG__
 #pragma interface
@@ -25,16 +28,16 @@ struct FD_form_browser;
  */
 class FormBrowser : public FormBaseBD {
 public:
+       ///
        FormBrowser(LyXView *, Dialogs *, const string &);
-       ~FormBrowser();
-
 protected:
        /// Update the dialog.
        virtual void update();
 
        /// Real GUI implementation.
-       FD_form_browser * dialog_;
-
+       boost::scoped_ptr<FD_form_browser> dialog_;
+       /// Pointer to the actual instantiation of the ButtonController.
+       virtual xformsBC & bc();
 private:
        /// Pointer to the actual instantiation of the xforms form
        virtual FL_FORM * form() const;
@@ -45,6 +48,14 @@ private:
 
        /// generated build function
        FD_form_browser * build_browser();
+       /// The ButtonController
+       ButtonController<OkCancelPolicy, xformsBC> bc_;
 };
 
+
+inline
+xformsBC & FormBrowser::bc()
+{
+       return bc_;
+}
 #endif
index 11ac59c9d16cf56865bb8bb059855b3b47d9f798..234ed12f11cc36516878784fbeef8eb77748d5e7 100644 (file)
@@ -8,12 +8,12 @@
 
 #include <config.h>
 
+#include FORMS_H_LOCATION
+
 #ifdef __GNUG_
 #pragma implementation
 #endif
 
-#include FORMS_H_LOCATION
-
 #include "FormCharacter.h"
 #include "form_character.h"
 #include "bufferview_funcs.h"
@@ -31,9 +31,7 @@ using Liason::setMinibuffer;
 
 
 FormCharacter::FormCharacter(LyXView * lv, Dialogs * d)
-       : FormBaseBD(lv, d, _("Character Layout"),
-                    new NoRepeatedApplyReadOnlyPolicy),
-       dialog_(0), combo_language2_(0)
+       : FormBaseBD(lv, d, _("Character Layout"))
 {
    // let the popup be shown
    // This is a permanent connection so we won't bother
@@ -44,17 +42,9 @@ FormCharacter::FormCharacter(LyXView * lv, Dialogs * d)
 }
 
 
-FormCharacter::~FormCharacter()
-{
-       // This must be done before the deletion of the dialog.
-       delete combo_language2_;
-       delete dialog_;
-}
-
-
 FL_FORM * FormCharacter::form() const
 {
-   if (dialog_) 
+   if (dialog_.get()
      return dialog_->form;
    return 0;
 }
@@ -62,15 +52,15 @@ FL_FORM * FormCharacter::form() const
 
 void FormCharacter::build()
 {
-   dialog_ = build_character();
+   dialog_.reset(build_character());
    // Workaround dumb xforms sizing bug
    minw_ = form()->w;
    minh_ = form()->h;
    // Manage the ok, apply and cancel/close buttons
-   bc_.setApply(dialog_->button_apply);
-   bc_.setCancel(dialog_->button_close);
-   bc_.refresh();
-   bc_.addReadOnly (dialog_->check_toggle_all);
+   bc().setApply(dialog_->button_apply);
+   bc().setCancel(dialog_->button_close);
+   bc().refresh();
+   bc().addReadOnly (dialog_->check_toggle_all);
    
    fl_addto_choice(dialog_->choice_family,
                   _(" No change %l| Roman | Sans Serif | Typewriter %l| Reset "));
@@ -94,7 +84,7 @@ void FormCharacter::build()
    // insert default language box manually
    fl_addto_form(dialog_->form);
    FL_OBJECT * ob = dialog_->choice_language;
-   combo_language2_ = new Combox(FL_COMBOX_DROPLIST);
+   combo_language2_.reset(new Combox(FL_COMBOX_DROPLIST));
    combo_language2_->add(ob->x, ob->y, ob->w, ob->h, 250);
    combo_language2_->shortcut("#L", 1);
    fl_end_form();
@@ -111,7 +101,7 @@ void FormCharacter::build()
 
 void FormCharacter::apply()
 {
-   if (!lv_->view()->available() || !dialog_)
+   if (!lv_->view()->available() || !dialog_.get())
      return;
    
    LyXFont font(LyXFont::ALL_IGNORE);
@@ -213,8 +203,8 @@ void FormCharacter::apply()
 
 void FormCharacter::update()
 {
-    if (!dialog_)
+    if (!dialog_.get())
         return;
    
-    bc_.readOnly(lv_->buffer()->isReadonly());
+    bc().readOnly(lv_->buffer()->isReadonly());
 }
index 17ee3ad3aa2fa3582a353fba90b689a23b90826e..f19aa77c1fa4c8eabcef3fb8fc7dc5ca8c4a8520 100644 (file)
 #ifndef FORM_CHARACTER_H
 #define FORM_CHARACTER_H
 
-#include "FormBase.h"
+#include <boost/smart_ptr.hpp>
+
+#include "FormBaseDeprecated.h"
+#include "xformsBC.h"
 
 #ifdef __GNUG_
 #pragma interface
 #endif
 
-
 class LyXView;
 class Dialogs;
 class Combox;
@@ -29,31 +31,42 @@ struct FD_form_character;
  */
 class FormCharacter : public FormBaseBD {
 public:
-   ///
-   FormCharacter(LyXView *, Dialogs *);
-   ///
-   ~FormCharacter();
-
+       ///
+       FormCharacter(LyXView *, Dialogs *);
 private:
        
-   /// Build the popup
-   virtual void build();
+       /// Pointer to the actual instantiation of the ButtonController.
+       virtual xformsBC & bc();
+
+       /// Build the popup
+       virtual void build();
    
-   /// Apply from popup
-   virtual void apply();
+       /// Apply from popup
+       virtual void apply();
    
-   /// Update the popup.
-   virtual void update();
+       /// Update the popup.
+       virtual void update();
    
-   /// Pointer to the actual instantiation of the xforms form
-   virtual FL_FORM * form() const;
+       /// Pointer to the actual instantiation of the xform's form
+       virtual FL_FORM * form() const;
 
-   FD_form_character * build_character();
+       ///
+       FD_form_character * build_character();
        
-   /// Real GUI implementation.
-   FD_form_character * dialog_;
-   
-   Combox * combo_language2_;
+       /// Real GUI implementation.
+       boost::scoped_ptr<FD_form_character> dialog_;
+
+       ///
+       boost::scoped_ptr<Combox> combo_language2_;
+
+       /// The ButtonController
+       ButtonController<NoRepeatedApplyReadOnlyPolicy, xformsBC> bc_;
 };
 
+
+inline
+xformsBC & FormCharacter::bc()
+{
+       return bc_;
+}
 #endif
index bb01bd7a198aff50ff331fb75e62cea8ae571678..3b91a86033fbab8ceaa159f0f2b2de364ce9e288 100644 (file)
@@ -9,22 +9,20 @@
  * ======================================================
  */
 
-#include <config.h>
 #include <algorithm>
 
 #ifdef __GNUG__
 #pragma implementation
 #endif
 
-
-#include "Dialogs.h"
+#include <config.h>
+#include "ControlCitation.h"
 #include "FormCitation.h"
-#include "LyXView.h"
-#include "buffer.h"
 #include "form_citation.h"
-#include "lyxfunc.h"
-#include "support/filetools.h"
+#include "gettext.h"
+#include "support/lstrings.h"
 #include "xforms_helpers.h"
+#include "xformsBC.h"
 
 using std::find;
 using std::max;
@@ -33,52 +31,33 @@ using std::pair;
 using std::sort;
 using std::vector;
 
-
-FormCitation::FormCitation(LyXView * lv, Dialogs * d)
-       : FormCommand(lv, d, _("Citation"), new NoRepeatedApplyReadOnlyPolicy),
-         dialog_(0)
-{
-       // let the dialog be shown
-       // These are permanent connections so we won't bother
-       // storing a copy because we won't be disconnecting.
-       d->showCitation.connect(slot(this, &FormCitation::showInset));
-       d->createCitation.connect(slot(this, &FormCitation::createInset));
-}
+FormCitation::FormCitation(ControlCitation & c)
+       : FormBase2<ControlCitation, FD_form_citation>(c, _("Citation"))
+{}
 
 
-FormCitation::~FormCitation()
-{
-       delete dialog_;
-}
-
-
-FL_FORM * FormCitation::form() const
+void FormCitation::apply()
 {
-       if (dialog_) return dialog_->form;
-       return 0;
-}
+       controller().params().setCmdName("cite");
+       controller().params().setContents(getStringFromVector(citekeys));
 
-
-void FormCitation::connect()
-{
-       //fl_set_form_maxsize(dialog_->form, 3*minw_, minh_);
-       FormCommand::connect();
+       string const after  = fl_get_input(dialog_->input_after);
+       controller().params().setOptions(after);
 }
 
 
-void FormCitation::disconnect()
+void FormCitation::hide()
 {
        citekeys.clear();
        bibkeys.clear();
-       bibkeysInfo.clear();
 
-       FormCommand::disconnect();
+       FormBase::hide();
 }
 
 
 void FormCitation::build()
 {
-       dialog_ = build_citation();
+       dialog_.reset(build_citation());
 
        // Workaround dumb xforms sizing bug
        minw_ = form()->w;
@@ -87,51 +66,229 @@ void FormCitation::build()
        fl_set_input_return(dialog_->input_after,  FL_RETURN_CHANGED);
        fl_set_input_return(dialog_->input_before, FL_RETURN_CHANGED);
 
+       fl_set_button(dialog_->button_search_type, 0);
+       fl_set_object_label(dialog_->button_search_type, _("Simple"));
+
         // Manage the ok, apply, restore and cancel/close buttons
-       bc_.setOK(dialog_->button_ok);
-       bc_.setApply(dialog_->button_apply);
-       bc_.setCancel(dialog_->button_cancel);
-       bc_.setUndoAll(dialog_->button_restore);
-       bc_.refresh();
-
-       bc_.addReadOnly(dialog_->button_add);
-       bc_.addReadOnly(dialog_->button_del);
-       bc_.addReadOnly(dialog_->button_up);
-       bc_.addReadOnly(dialog_->button_down);
-       bc_.addReadOnly(dialog_->input_before);
-       bc_.addReadOnly(dialog_->input_after);
-
-       bc_.addDontTriggerChange(dialog_->browser_cite);
-       bc_.addDontTriggerChange(dialog_->browser_bib);
+       bc().setOK(dialog_->button_ok);
+       bc().setApply(dialog_->button_apply);
+       bc().setCancel(dialog_->button_cancel);
+       bc().setUndoAll(dialog_->button_restore);
+       bc().refresh();
+
+       bc().addReadOnly(dialog_->button_add);
+       bc().addReadOnly(dialog_->button_del);
+       bc().addReadOnly(dialog_->button_up);
+       bc().addReadOnly(dialog_->button_down);
+       bc().addReadOnly(dialog_->choice_style);
+       bc().addReadOnly(dialog_->input_before);
+       bc().addReadOnly(dialog_->input_after);
 }
 
 
-void FormCitation::update()
+ButtonPolicy::SMInput FormCitation::input(FL_OBJECT * ob, long)
 {
-       bc_.readOnly(lv_->buffer()->isReadonly());
+       ButtonPolicy::SMInput activate = ButtonPolicy::SMI_NOOP;
 
-       bibkeys.clear();
-       bibkeysInfo.clear();
+       if (ob == dialog_->browser_bib) {
+               fl_deselect_browser(dialog_->browser_cite);
+
+               unsigned int const sel = fl_get_browser(dialog_->browser_bib);
+               if (sel < 1 || sel > bibkeys.size())
+                       return ButtonPolicy::SMI_NOOP;
+
+               // Put into browser_info the additional info associated with
+               // the selected browser_bib key
+               fl_clear_browser(dialog_->browser_info);
+               string const tmp = formatted( controller().
+                                             getBibkeyInfo(bibkeys[sel-1]),
+                                             dialog_->browser_info->w-10 );
+               fl_add_browser_line(dialog_->browser_info, tmp.c_str());
+
+               // Highlight the selected browser_bib key in browser_cite if
+               // present
+               vector<string>::const_iterator cit =
+                       find(citekeys.begin(), citekeys.end(), bibkeys[sel-1]);
+
+               if (cit != citekeys.end()) {
+                       int const n = int(cit - citekeys.begin());
+                       fl_select_browser_line(dialog_->browser_cite, n+1);
+                       fl_set_browser_topline(dialog_->browser_cite, n+1);
+               }
+
+               if (!controller().isReadonly()) {
+                       if (cit != citekeys.end()) {
+                               setBibButtons(OFF);
+                               setCiteButtons(ON);
+                       } else {
+                               setBibButtons(ON);
+                               setCiteButtons(OFF);
+                       }
+               }
+
+       } else if (ob == dialog_->browser_cite) {
+               unsigned int const sel = fl_get_browser(dialog_->browser_cite);
+               if (sel < 1 || sel > citekeys.size())
+                       return ButtonPolicy::SMI_NOOP;
+
+               if (!controller().isReadonly()) {
+                       setBibButtons(OFF);
+                       setCiteButtons(ON);
+               }
+
+               // Highlight the selected browser_cite key in browser_bib
+               vector<string>::const_iterator cit =
+                       find(bibkeys.begin(), bibkeys.end(), citekeys[sel-1]);
+
+               if (cit != bibkeys.end()) {
+                       int const n = int(cit - bibkeys.begin());
+                       fl_select_browser_line(dialog_->browser_bib, n+1);
+                       fl_set_browser_topline(dialog_->browser_bib, n+1);
+
+                       // Put into browser_info the additional info associated
+                       // with the selected browser_cite key
+                       fl_clear_browser(dialog_->browser_info);
+                       string const tmp =
+                               formatted( controller(). 
+                                          getBibkeyInfo(bibkeys[n]),
+                                          dialog_->browser_info->w-10 );
+                       fl_add_browser_line(dialog_->browser_info, tmp.c_str());
+               }
+
+       } else if (ob == dialog_->button_add) {
+               unsigned int const sel = fl_get_browser(dialog_->browser_bib);
+               if (sel < 1 || sel > bibkeys.size())
+                       return ButtonPolicy::SMI_NOOP;
+
+               // Add the selected browser_bib key to browser_cite
+               fl_addto_browser(dialog_->browser_cite,
+                                 bibkeys[sel-1].c_str());
+               citekeys.push_back(bibkeys[sel-1]);
+
+               int const n = int(citekeys.size());
+               fl_select_browser_line(dialog_->browser_cite, n);
+
+               setBibButtons(OFF);
+               setCiteButtons(ON);
+               activate = ButtonPolicy::SMI_VALID;
+
+       } else if (ob == dialog_->button_del) {
+               unsigned int const sel = fl_get_browser(dialog_->browser_cite);
+               if (sel < 1 || sel > citekeys.size())
+                       return ButtonPolicy::SMI_NOOP;
+
+               // Remove the selected key from browser_cite
+               fl_delete_browser_line(dialog_->browser_cite, sel) ;
+               citekeys.erase(citekeys.begin() + sel-1);
+
+               setBibButtons(ON);
+               setCiteButtons(OFF);
+               activate = ButtonPolicy::SMI_VALID;
+
+       } else if (ob == dialog_->button_up) {
+               unsigned int const sel = fl_get_browser(dialog_->browser_cite);
+               if (sel < 2 || sel > citekeys.size())
+                       return ButtonPolicy::SMI_NOOP;
+
+               // Move the selected key up one line
+               vector<string>::iterator it = citekeys.begin() + sel-1;
+               string const tmp = *it;
+
+               fl_delete_browser_line(dialog_->browser_cite, sel);
+               citekeys.erase(it);
+
+               fl_insert_browser_line(dialog_->browser_cite, sel-1, tmp.c_str());
+               fl_select_browser_line(dialog_->browser_cite, sel-1);
+               citekeys.insert(it-1, tmp);
+               setCiteButtons(ON);
+               activate = ButtonPolicy::SMI_VALID;
+
+       } else if (ob == dialog_->button_down) {
+               unsigned int const sel = fl_get_browser(dialog_->browser_cite);
+               if (sel < 1 || sel > citekeys.size()-1)
+                       return ButtonPolicy::SMI_NOOP;
+
+               // Move the selected key down one line
+               vector<string>::iterator it = citekeys.begin() + sel-1;
+               string const tmp = *it;
+
+               fl_delete_browser_line(dialog_->browser_cite, sel);
+               citekeys.erase(it);
+
+               fl_insert_browser_line(dialog_->browser_cite, sel+1, tmp.c_str());
+               fl_select_browser_line(dialog_->browser_cite, sel+1);
+               citekeys.insert(it+1, tmp);
+               setCiteButtons(ON);
+               activate = ButtonPolicy::SMI_VALID;
+
+       } else if (ob == dialog_->button_search_type) {
+               if (fl_get_button(dialog_->button_search_type))
+                       fl_set_object_label(dialog_->button_search_type,
+                                           _("Regex"));
+               else
+                       fl_set_object_label(dialog_->button_search_type,
+                                           _("Simple"));
+               return ButtonPolicy::SMI_NOOP;
+               
+       } else if (ob == dialog_->button_previous ||
+                  ob == dialog_->button_next) {
+
+               string const str = fl_get_input(dialog_->input_search);
+
+               ControlCitation::Direction const dir =
+                       (ob == dialog_->button_previous) ?
+                       ControlCitation::BACKWARD : ControlCitation::FORWARD;
 
-       vector<pair<string,string> > blist =
-               lv_->buffer()->getBibkeyList();
-       sort(blist.begin(), blist.end());
+               ControlCitation::Search const type =
+                       fl_get_button(dialog_->button_search_type) ?
+                       ControlCitation::REGEX : ControlCitation::SIMPLE;
 
-       for (unsigned int i = 0; i < blist.size(); ++i) {
-               bibkeys.push_back(blist[i].first);
-               bibkeysInfo.push_back(blist[i].second);
+               vector<string>::const_iterator start = bibkeys.begin();
+               unsigned int const sel = fl_get_browser(dialog_->browser_bib);
+               if (sel >= 1 && sel <= bibkeys.size())
+                       start += sel-1;
+
+               // Find the NEXT instance...
+               if (dir == ControlCitation::FORWARD)
+                       start += 1;
+               else
+                       start -= 1;
+
+               vector<string>::const_iterator const cit =
+                       searchKeys(controller(), bibkeys, str, start,
+                                  type, dir);
+
+               if (cit == bibkeys.end())
+                       return ButtonPolicy::SMI_NOOP;
+
+               int const found = int(cit - bibkeys.begin()) + 1;
+               if (found == sel)
+                       return ButtonPolicy::SMI_NOOP;
+
+               // Update the display
+               int const top = max(found-5, 1);
+               fl_set_browser_topline(dialog_->browser_bib, top);
+               fl_select_browser_line(dialog_->browser_bib, found);
+               input(dialog_->browser_bib, 0);
+
+       } else if (ob == dialog_->choice_style ||
+                  ob == dialog_->input_before ||
+                  ob == dialog_->input_after) {
+               activate = ButtonPolicy::SMI_VALID;
        }
-       blist.clear();
+
+       return activate;
+}
+
+
+void FormCitation::update()
+{
+       // Make the list of all available bibliography keys
+       bibkeys = controller().getBibkeys();
        updateBrowser(dialog_->browser_bib, bibkeys);
 
        // Ditto for the keys cited in this inset
-       citekeys.clear();
-       string tmp, keys(params.getContents());
-       keys = frontStrip(split(keys, tmp, ','));
-       while (!tmp.empty()) {
-               citekeys.push_back(tmp);
-               keys = frontStrip(split(keys, tmp, ','));
-       }
+       citekeys = getVectorFromString(controller().params().getContents());
        updateBrowser(dialog_->browser_cite, citekeys);
 
        // No keys have been selected yet, so...
@@ -139,26 +296,27 @@ void FormCitation::update()
        setBibButtons(OFF);
        setCiteButtons(OFF);
 
-       int noKeys = static_cast<int>(max(bibkeys.size(), citekeys.size()));
+       int noKeys = int(max(bibkeys.size(), citekeys.size()));
 
        // Place bounds, so that 4 <= noKeys <= 10
        noKeys = max(4, min(10, noKeys));
 
        // Re-size the form to accommodate the new browser size
-       int size = 20 * noKeys;
-       bool bibPresent = (bibkeys.size() > 0);
+       int const size = 20 * noKeys;
+       bool const bibPresent = (bibkeys.size() > 0);
        setSize(size, bibPresent);
 
-       fl_set_input(dialog_->input_after, params.getOptions().c_str());
+       fl_set_input(dialog_->input_after,
+                    controller().params().getOptions().c_str());
 }
 
 
 void FormCitation::updateBrowser(FL_OBJECT * browser,
-                                 vector<string> const & keys) const
+                                vector<string> const & keys) const
 {
        fl_clear_browser(browser);
 
-       for (unsigned int i = 0; i < keys.size(); ++i)
+       for (vector<string>::size_type i = 0; i < keys.size(); ++i)
                fl_add_browser_line(browser, keys[i].c_str());
 }
 
@@ -173,7 +331,6 @@ void FormCitation::setCiteButtons(State status) const
 {
        int const sel     = fl_get_browser(dialog_->browser_cite);
        int const maxline = fl_get_browser_maxline(dialog_->browser_cite);
-
        bool const activate      = (status == ON);
        bool const activate_up   = (activate && sel != 1);
        bool const activate_down = (activate && sel != maxline);
@@ -194,7 +351,8 @@ void FormCitation::setSize(int hbrsr, bool bibPresent) const
        // so they are not changed by dynamic resizing
        static int const dh1 = 30; // top of form to top of cite/bib brsrs;
                                   // bottom of cite/bib brsrs to top of info;
-                                  // bottom of info to top next element;
+                                  // bottom of info to top search frame;
+                                  // bottom of search frame to top next elemnt;
                                   // bottom of style to top input_before;
                                   // bottom of text to top ok/cancel buttons.
        static int const dh2 = 10; // bottom of input_before to top input_after;
@@ -203,11 +361,12 @@ void FormCitation::setSize(int hbrsr, bool bibPresent) const
 
        int const wbrsr  = dialog_->browser_cite->w;
        static int const hinfo  = dialog_->browser_info->h;
+       static int const hframe = dialog_->frame_search->h;
        static int const hstyle = dialog_->choice_style->h;
        static int const htext  = dialog_->input_after->h;
        static int const hok    = dialog_->button_ok->h;
 
-       int hform = dh1 + hbrsr + dh1;
+       int hform = dh1 + hbrsr + dh1 + hframe + dh1;
        if (bibPresent) hform += hinfo + dh1;
        if (natbib) hform += hstyle + dh1 + htext + dh2;
        hform += htext + dh1 + hok + dh2;
@@ -247,6 +406,30 @@ void FormCitation::setSize(int hbrsr, bool bibPresent) const
        } else
                fl_hide_object(dialog_->browser_info);
 
+       x = dialog_->frame_search->x;
+       // ??? The frame height seems to be reduced. Use geometry to enforce it.
+       fl_set_object_geometry(dialog_->frame_search, x, y,
+                              dialog_->frame_search->w, hframe);
+       //fl_set_object_position(dialog_->frame_search, x, y);
+
+       x = dialog_->input_search->x;
+       y += 15;
+       fl_set_object_position(dialog_->input_search, x, y);
+
+       x = dialog_->button_previous->x;
+       y += dialog_->input_search->h + 5;
+       fl_set_object_position(dialog_->button_previous, x, y);
+
+       x = dialog_->button_next->x;
+       y += dialog_->button_previous->h + 5;
+       fl_set_object_position(dialog_->button_next, x, y);
+
+       x = dialog_->button_search_type->x;
+       y = dialog_->button_previous->y;
+       fl_set_object_position(dialog_->button_search_type, x, y);
+
+       y = dialog_->frame_search->y + hframe + dh1;
+       
        if (natbib) {
                x = dialog_->choice_style->x;
                fl_set_object_position(dialog_->choice_style, x, y);
@@ -266,168 +449,11 @@ void FormCitation::setSize(int hbrsr, bool bibPresent) const
 
        y += htext + dh1;
        x = dialog_->button_restore->x;
-       fl_set_object_position(dialog_->button_restore,     x, y);
+       fl_set_object_position(dialog_->button_restore, x, y);
        x = dialog_->button_ok->x;
-       fl_set_object_position(dialog_->button_ok,     x, y);
+       fl_set_object_position(dialog_->button_ok, x, y);
        x = dialog_->button_apply->x;
-       fl_set_object_position(dialog_->button_apply,  x, y);
+       fl_set_object_position(dialog_->button_apply, x, y);
        x = dialog_->button_cancel->x;
        fl_set_object_position(dialog_->button_cancel, x, y);
 }
-
-
-bool FormCitation::input(FL_OBJECT * ob, long)
-{
-       bool activate = false;
-
-       if (ob == dialog_->browser_bib) {
-               fl_deselect_browser(dialog_->browser_cite);
-               
-               unsigned int sel = fl_get_browser(dialog_->browser_bib);
-               if (sel < 1 || sel > bibkeys.size()) return false;
-
-               // Put into browser_info the additional info associated with
-               // the selected browser_bib key
-               fl_clear_browser(dialog_->browser_info);
-               fl_add_browser_line(dialog_->browser_info,
-                                    bibkeysInfo[sel - 1].c_str());
-
-               // Highlight the selected browser_bib key in browser_cite if present
-               vector<string>::iterator it =
-                       find(citekeys.begin(), citekeys.end(), bibkeys[sel-1]);
-
-               if (it != citekeys.end()) {
-                       int n = static_cast<int>(it - citekeys.begin());
-                       fl_select_browser_line(dialog_->browser_cite, n+1);
-                       fl_set_browser_topline(dialog_->browser_cite, n+1);
-               }
-
-               if (!lv_->buffer()->isReadonly()) {
-                       if (it != citekeys.end()) {
-                               setBibButtons(OFF);
-                               setCiteButtons(ON);
-                       } else {
-                               setBibButtons(ON);
-                               setCiteButtons(OFF);
-                       }
-               }
-
-       } else if (ob == dialog_->browser_cite) {
-               unsigned int sel = fl_get_browser(dialog_->browser_cite);
-               if (sel < 1 || sel > citekeys.size()) return false;
-
-               if (!lv_->buffer()->isReadonly()) {
-                       setBibButtons(OFF);
-                       setCiteButtons(ON);
-               }
-
-               // Highlight the selected browser_cite key in browser_bib
-               vector<string>::iterator it =
-                       find(bibkeys.begin(), bibkeys.end(), citekeys[sel-1]);
-
-               if (it != bibkeys.end()) {
-                       int n = static_cast<int>(it - bibkeys.begin());
-                       fl_select_browser_line(dialog_->browser_bib, n+1);
-                       fl_set_browser_topline(dialog_->browser_bib, n+1);
-
-                       // Put into browser_info the additional info associated with
-                       // the selected browser_cite key
-                       fl_clear_browser(dialog_->browser_info);
-                       fl_add_browser_line(dialog_->browser_info,
-                                            bibkeysInfo[n].c_str());
-               }
-
-       } else if (ob == dialog_->button_add) {
-               unsigned int sel = fl_get_browser(dialog_->browser_bib);
-               if (sel < 1 || sel > bibkeys.size()) return false;
-
-               // Add the selected browser_bib key to browser_cite
-               fl_addto_browser(dialog_->browser_cite,
-                                 bibkeys[sel-1].c_str());
-               citekeys.push_back(bibkeys[sel-1]);
-
-               int n = static_cast<int>(citekeys.size());
-               fl_select_browser_line(dialog_->browser_cite, n);
-
-               setBibButtons(OFF);
-               setCiteButtons(ON);
-               activate = true;
-
-       } else if (ob == dialog_->button_del) {
-               unsigned int sel = fl_get_browser(dialog_->browser_cite);
-               if (sel < 1 || sel > citekeys.size()) return false;
-
-               // Remove the selected key from browser_cite
-               fl_delete_browser_line(dialog_->browser_cite, sel) ;
-               citekeys.erase(citekeys.begin() + sel-1);
-
-               setBibButtons(ON);
-               setCiteButtons(OFF);
-               activate = true;
-
-       } else if (ob == dialog_->button_up) {
-               unsigned int sel = fl_get_browser(dialog_->browser_cite);
-               if (sel < 2 || sel > citekeys.size()) return false;
-
-               // Move the selected key up one line
-               vector<string>::iterator it = citekeys.begin() + sel-1;
-               string tmp = *it;
-
-               fl_delete_browser_line(dialog_->browser_cite, sel);
-               citekeys.erase(it);
-
-               fl_insert_browser_line(dialog_->browser_cite, sel-1, tmp.c_str());
-               fl_select_browser_line(dialog_->browser_cite, sel-1);
-               citekeys.insert(it-1, tmp);
-               setCiteButtons(ON);
-               activate = true;
-
-       } else if (ob == dialog_->button_down) {
-               unsigned int sel = fl_get_browser(dialog_->browser_cite);
-               if (sel < 1 || sel > citekeys.size()-1) return false;
-
-               // Move the selected key down one line
-               vector<string>::iterator it = citekeys.begin() + sel-1;
-               string tmp = *it;
-
-               fl_delete_browser_line(dialog_->browser_cite, sel);
-               citekeys.erase(it);
-
-               fl_insert_browser_line(dialog_->browser_cite, sel+1, tmp.c_str());
-               fl_select_browser_line(dialog_->browser_cite, sel+1);
-               citekeys.insert(it+1, tmp);
-               setCiteButtons(ON);
-               activate = true;
-       } else if (ob == dialog_->choice_style ||
-                  ob == dialog_->input_before ||
-                  ob == dialog_->input_after) {
-               activate = true;
-       }
-       return activate;
-}
-
-
-void FormCitation::apply()
-{
-       if (lv_->buffer()->isReadonly()) return;
-
-       string contents;
-       for (unsigned int i = 0; i < citekeys.size(); ++i) {
-               if (i > 0) contents += ",";
-               contents += citekeys[i];
-       }
-
-       params.setContents(contents);
-       params.setOptions(fl_get_input(dialog_->input_after));
-
-       if (inset_ != 0) {
-               // Only update if contents have changed
-               if (params != inset_->params()) {
-                       inset_->setParams(params);
-                       lv_->view()->updateInset(inset_, true);
-               }
-       } else {
-               lv_->getLyXFunc()->Dispatch(LFUN_CITATION_INSERT,
-                                           params.getAsString());
-       }
-}
index 48e176eca00a632b9521feffb05edf4d6b5fa7d7..59d2e6918644b914879a2a22eb5d9906a1f6b13d 100644 (file)
@@ -7,6 +7,8 @@
  *           Copyright 2000 The LyX Team.
  *
  * ======================================================
+ *
+ * Author: Angus Leeming <a.leeming@ic.ac.uk>
  */
 
 #ifndef FORMCITATION_H
 #pragma interface
 #endif
 
-#include "FormInset.h"
-struct FD_form_citation;
+#include "FormBase.h"
 
-/** This class provides an XForms implementation of the FormCitation Dialog.
+/** This class provides an XForms implementation of the Citation Dialog.
  */
-class FormCitation : public FormCommand {
+#include "form_citation.h"
+class ControlCitation;
+
+class FormCitation : public FormBase2<ControlCitation, FD_form_citation> {
 public:
        ///
-       FormCitation(LyXView *, Dialogs *);
-       ///
-       ~FormCitation();
+       FormCitation(ControlCitation &);
+
+       // Functions accessible to the Controller.
+
+       /// Set the Params variable for the Controller.
+       virtual void apply();
+       /// Build the dialog.
+       virtual void build();
+       /// Hide the dialog.
+       virtual void hide();
+       /// Update dialog before/whilst showing it.
+       virtual void update();
+
 private:
        ///
        enum State {
+               ///
                ON,
                ///
                OFF
        };
-       /// Connect signals etc. Set form's max size.
-       virtual void connect();
-       /// Disconnect signals. Also perform any necessary housekeeping.
-       virtual void disconnect();
 
-       /// Build the dialog
-       virtual void build();
-       /// Filter the inputs
-       virtual bool input(FL_OBJECT *, long);
-       /// Update dialog before showing it
-       virtual void update();
-       /// Apply from dialog (modify or create inset)
-       virtual void apply();
-       /// Pointer to the actual instantiation of the xforms form
-       virtual FL_FORM * form() const;
+       /// Filter the inputs on callback from xforms
+       virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
+
+       /// Type definition from the fdesign produced header file.
+       FD_form_citation * build_citation();
 
        ///
        void updateBrowser(FL_OBJECT *, std::vector<string> const &) const;
@@ -58,17 +64,11 @@ private:
        void setCiteButtons(State) const;
        ///
        void setSize(int, bool) const;
-       /// Type definition from the fdesign produced header file.
-       FD_form_citation * build_citation();
 
-       /// Real GUI implementation.
-       FD_form_citation * dialog_;
        ///
        std::vector<string> citekeys;
        ///
        std::vector<string> bibkeys;
-       ///
-       std::vector<string> bibkeysInfo;
 };
 
-#endif
+#endif // FORMCITATION_H
index 1018c9a80d97dd71ef2c4159c1d078909d192623..071cca1eec1cf787b16be63522ff9e51c6d36fc0 100644 (file)
@@ -17,8 +17,7 @@
 #include "xforms_helpers.h"
 
 FormCopyright::FormCopyright( LyXView * lv, Dialogs * d        )
-       : FormBaseBI(lv, d, _("Copyright and Warranty"), new OkCancelPolicy),
-         dialog_(0)
+       : FormBaseBI(lv, d, _("Copyright and Warranty"))
 {
        // let the dialog be shown
        // This is a permanent connection so we won't bother
@@ -27,22 +26,16 @@ FormCopyright::FormCopyright( LyXView * lv, Dialogs * d     )
 }
 
 
-FormCopyright::~FormCopyright()
-{
-       delete dialog_;
-}
-
-
 FL_FORM * FormCopyright::form() const
 {
-       if (dialog_ ) return dialog_->form;
+       if (dialog_.get()) return dialog_->form;
        return 0;
 }
 
 
 void FormCopyright::build()
 {
-       dialog_ = build_copyright();
+       dialog_.reset(build_copyright());
 
        // Workaround dumb xforms sizing bug
        minw_ = form()->w;
@@ -64,6 +57,6 @@ void FormCopyright::build()
        fl_set_object_label(dialog_->text_disclaimer, str.c_str());
        
         // Manage the cancel/close button
-       bc_.setCancel(dialog_->button_cancel);
-       bc_.refresh();
+       bc().setCancel(dialog_->button_cancel);
+       bc().refresh();
 }
index 652e7798d2dbc599b642089c8788bea4f25d0903..9236bc8f828b9469ef48ad622c0e43c8520db804 100644 (file)
 #ifndef FORMCOPYRIGHT_H
 #define FORMCOPYRIGHT_H
 
-#include "FormBase.h"
+#include <boost/smart_ptr.hpp>
 
 #ifdef __GNUG__
 #pragma interface
 #endif
 
+#include "FormBaseDeprecated.h"
+#include "xformsBC.h"
+
 struct FD_form_copyright;
 
 /** This class provides an XForms implementation of the FormCopyright Dialog.
@@ -31,10 +34,9 @@ class FormCopyright : public FormBaseBI {
 public:
        /// #FormCopyright x(LyXFunc ..., Dialogs ...);#
        FormCopyright(LyXView *, Dialogs *);
-       ///
-       ~FormCopyright();
-
 private:
+       /// Pointer to the actual instantiation of the ButtonController.
+       virtual xformsBC & bc();
        /// Build the dialog
        virtual void build();
        /// Pointer to the actual instantiation of the xforms form
@@ -43,8 +45,16 @@ private:
        FD_form_copyright * build_copyright();
 
        /// Real GUI implementation.
-       FD_form_copyright * dialog_;
+       boost::scoped_ptr<FD_form_copyright> dialog_;
+       /// The ButtonController
+       ButtonController<OkCancelPolicy, xformsBC> bc_;
 };
 
+
+inline
+xformsBC & FormCopyright::bc()
+{
+       return bc_;
+}
 #endif
 
index d4ab71d7d8671ff2e23bae7f6a57c1104ef37399..cd1201861f512a650420a386751ea51cfaab38be 100644 (file)
@@ -22,7 +22,7 @@
 #include "support/filetools.h"
 
 FormCredits::FormCredits( LyXView * lv, Dialogs * d )
-  : FormBaseBI(lv, d, _("Credits"), new OkCancelPolicy), dialog_(0)
+  : FormBaseBI(lv, d, _("Credits"))
 {
    // let the dialog be shown
    // This is a permanent connection so we won't bother
@@ -31,16 +31,10 @@ FormCredits::FormCredits( LyXView * lv, Dialogs * d )
 }
 
 
-FormCredits::~FormCredits()
-{
-   delete dialog_;
-}
-
-
 FL_FORM * FormCredits::form() const
 {
-   if (dialog_ 
-     return dialog_->form;
+   if (dialog_.get()
+          return dialog_->form;
    return 0;
 }
 
@@ -49,7 +43,7 @@ extern string system_lyxdir;
 
 void FormCredits::build()
 {
-   dialog_ = build_credits();
+   dialog_.reset(build_credits());
 
    // Workaround dumb xforms sizing bug
    minw_ = form()->w;
index feced9e3185a61bcc383f8412e61a1b07f94d6ef..a497d064d431d6387e248614dc61251b3be797d8 100644 (file)
@@ -9,12 +9,15 @@
 #ifndef FORMCREDITS_H
 #define FORMCREDITS_H
 
-#include "FormBase.h"
+#include <boost/smart_ptr.hpp>
 
 #ifdef __GNUG__
 #pragma interface
 #endif
 
+#include "FormBaseDeprecated.h"
+#include "xformsBC.h"
+
 struct FD_form_credits;
 
 /** This class provides an XForms implementation of the FormCredits Dialog.
@@ -23,10 +26,10 @@ class FormCredits : public FormBaseBI {
 public:
        /// #FormCopyright x(LyXFunc ..., Dialogs ...);#
        FormCredits(LyXView *, Dialogs *);
-       ///
-       ~FormCredits();
 
 private:
+       /// Pointer to the actual instantiation of the ButtonController.
+       virtual xformsBC & bc();
        /// Build the dialog
        virtual void build();
        /// Pointer to the actual instantiation of the xforms form
@@ -35,8 +38,16 @@ private:
        FD_form_credits * build_credits();
 
        /// Real GUI implementation.
-       FD_form_credits * dialog_;
+       boost::scoped_ptr<FD_form_credits> dialog_;
+       /// The ButtonController
+       ButtonController<OkCancelPolicy, xformsBC> bc_;
 };
 
+
+inline
+xformsBC & FormCredits::bc()
+{
+       return bc_;
+}
 #endif
 
index 7461145e69227025243a7973e784757a0d6aa4bf..b0eab6e6bd6bf7a8e0886b71c4cb55fec88fd29f 100644 (file)
 
 #include <config.h>
 
+#include FORMS_H_LOCATION
+#include XPM_H_LOCATION
+
 #ifdef __GNUG_
 #pragma implementation
 #endif
 
 #include "lyx_gui_misc.h"
-#include FORMS_H_LOCATION
-#include XPM_H_LOCATION
 
 #include "FormDocument.h"
 #include "form_document.h"
@@ -46,11 +47,7 @@ using Liason::setMinibuffer;
 #define USE_CLASS_COMBO 1
 
 FormDocument::FormDocument(LyXView * lv, Dialogs * d)
-       : FormBaseBD(lv, d, _("Document Layout"),
-                    new NoRepeatedApplyReadOnlyPolicy),
-         dialog_(0), paper_(0), class_(0), language_(0), options_(0),
-         bullets_(0), current_bullet_panel(0), current_bullet_depth(0),
-         fbullet(0), combo_language(0), combo_doc_class(0)
+       : FormBaseBD(lv, d, _("Document Layout")), fbullet(0)
 {
     // let the popup be shown
     // This is a permanent connection so we won't bother
@@ -59,21 +56,6 @@ FormDocument::FormDocument(LyXView * lv, Dialogs * d)
 }
 
 
-FormDocument::~FormDocument()
-{
-#ifdef USE_CLASS_COMBO
-    delete combo_doc_class;
-#endif
-    delete class_;
-    delete paper_;
-    delete combo_language;
-    delete language_;
-    delete options_;
-    delete bullets_;
-    delete dialog_;
-}
-
-
 void FormDocument::redraw()
 {
        if( form() && form()->visible )
@@ -89,7 +71,7 @@ void FormDocument::redraw()
 
 FL_FORM * FormDocument::form() const
 {
-    if (dialog_) return dialog_->form;
+    if (dialog_.get()) return dialog_->form;
     return 0;
 }
 
@@ -99,21 +81,21 @@ void FormDocument::build()
     int n;
 
     // the tabbed folder
-    dialog_ = build_tabbed_document();
+    dialog_.reset(build_tabbed_document());
 
     // Manage the restore, ok, apply, restore and cancel/close buttons
-    bc_.setOK(dialog_->button_ok);
-    bc_.setApply(dialog_->button_apply);
-    bc_.setCancel(dialog_->button_cancel);
-    bc_.setUndoAll(dialog_->button_restore);
-    bc_.refresh();
+    bc().setOK(dialog_->button_ok);
+    bc().setApply(dialog_->button_apply);
+    bc().setCancel(dialog_->button_cancel);
+    bc().setUndoAll(dialog_->button_restore);
+    bc().refresh();
 
     // Workaround dumb xforms sizing bug
     minw_ = form()->w;
     minh_ = form()->h;
 
     // the document paper form
-    paper_ = build_doc_paper();
+    paper_.reset(build_doc_paper());
     fl_addto_choice(paper_->choice_papersize2,
                    _(" Default | Custom | USletter | USlegal "
                      "| USexecutive | A3 | A4 | A5 | B3 | B4 | B5 "));
@@ -132,24 +114,24 @@ void FormDocument::build()
     fl_set_input_return(paper_->input_head_sep, FL_RETURN_CHANGED);
     fl_set_input_return(paper_->input_foot_skip, FL_RETURN_CHANGED);
 
-    bc_.addReadOnly (paper_->choice_paperpackage);
-    bc_.addReadOnly (paper_->greoup_radio_orientation);
-    bc_.addReadOnly (paper_->radio_portrait);
-    bc_.addReadOnly (paper_->radio_landscape);
-    bc_.addReadOnly (paper_->choice_papersize2);
-    bc_.addReadOnly (paper_->push_use_geometry);
-    bc_.addReadOnly (paper_->input_custom_width);
-    bc_.addReadOnly (paper_->input_custom_height);
-    bc_.addReadOnly (paper_->input_top_margin);
-    bc_.addReadOnly (paper_->input_bottom_margin);
-    bc_.addReadOnly (paper_->input_left_margin);
-    bc_.addReadOnly (paper_->input_right_margin);
-    bc_.addReadOnly (paper_->input_head_height);
-    bc_.addReadOnly (paper_->input_head_sep);
-    bc_.addReadOnly (paper_->input_foot_skip);
+    bc().addReadOnly (paper_->choice_paperpackage);
+    bc().addReadOnly (paper_->greoup_radio_orientation);
+    bc().addReadOnly (paper_->radio_portrait);
+    bc().addReadOnly (paper_->radio_landscape);
+    bc().addReadOnly (paper_->choice_papersize2);
+    bc().addReadOnly (paper_->push_use_geometry);
+    bc().addReadOnly (paper_->input_custom_width);
+    bc().addReadOnly (paper_->input_custom_height);
+    bc().addReadOnly (paper_->input_top_margin);
+    bc().addReadOnly (paper_->input_bottom_margin);
+    bc().addReadOnly (paper_->input_left_margin);
+    bc().addReadOnly (paper_->input_right_margin);
+    bc().addReadOnly (paper_->input_head_height);
+    bc().addReadOnly (paper_->input_head_sep);
+    bc().addReadOnly (paper_->input_foot_skip);
 
     // the document class form
-    class_ = build_doc_class();
+    class_.reset(build_doc_class());
 
     FL_OBJECT * obj;
 #ifdef USE_CLASS_COMBO
@@ -157,7 +139,7 @@ void FormDocument::build()
     obj = class_->choice_doc_class;
     fl_deactivate_object(obj);
     fl_addto_form(class_->form);
-    combo_doc_class = new Combox(FL_COMBOX_DROPLIST);
+    combo_doc_class.reset(new Combox(FL_COMBOX_DROPLIST));
     combo_doc_class->add(obj->x, obj->y, obj->w, obj->h, 400,
                         dialog_->tabbed_folder);
     combo_doc_class->shortcut("#C",1);
@@ -190,26 +172,26 @@ void FormDocument::build()
     fl_set_input_return(class_->input_doc_skip, FL_RETURN_CHANGED);
     fl_set_input_return(class_->input_doc_spacing, FL_RETURN_CHANGED);
 
-    bc_.addReadOnly (class_->radio_doc_indent);
-    bc_.addReadOnly (class_->radio_doc_skip);
+    bc().addReadOnly (class_->radio_doc_indent);
+    bc().addReadOnly (class_->radio_doc_skip);
 #ifndef USE_CLASS_COMBO
-    bc_.addReadOnly (class_->choice_doc_class);
+    bc().addReadOnly (class_->choice_doc_class);
 #endif
-    bc_.addReadOnly (class_->choice_doc_pagestyle);
-    bc_.addReadOnly (class_->choice_doc_fonts);
-    bc_.addReadOnly (class_->choice_doc_fontsize);
-    bc_.addReadOnly (class_->radio_doc_sides_one);
-    bc_.addReadOnly (class_->radio_doc_sides_two);
-    bc_.addReadOnly (class_->radio_doc_columns_one);
-    bc_.addReadOnly (class_->radio_doc_columns_two);
-    bc_.addReadOnly (class_->input_doc_extra);
-    bc_.addReadOnly (class_->input_doc_skip);
-    bc_.addReadOnly (class_->choice_doc_skip);
-    bc_.addReadOnly (class_->choice_doc_spacing);
-    bc_.addReadOnly (class_->input_doc_spacing);
+    bc().addReadOnly (class_->choice_doc_pagestyle);
+    bc().addReadOnly (class_->choice_doc_fonts);
+    bc().addReadOnly (class_->choice_doc_fontsize);
+    bc().addReadOnly (class_->radio_doc_sides_one);
+    bc().addReadOnly (class_->radio_doc_sides_two);
+    bc().addReadOnly (class_->radio_doc_columns_one);
+    bc().addReadOnly (class_->radio_doc_columns_two);
+    bc().addReadOnly (class_->input_doc_extra);
+    bc().addReadOnly (class_->input_doc_skip);
+    bc().addReadOnly (class_->choice_doc_skip);
+    bc().addReadOnly (class_->choice_doc_spacing);
+    bc().addReadOnly (class_->input_doc_spacing);
 
     // the document language form
-    language_ = build_doc_language();
+    language_.reset(build_doc_language());
     fl_addto_choice(language_->choice_inputenc,
                    "default|auto|latin1|latin2|latin5"
                    "|koi8-r|koi8-u|cp866|cp1251|iso88595");
@@ -218,7 +200,7 @@ void FormDocument::build()
     obj = language_->choice_language;
     fl_deactivate_object(obj);
     fl_addto_form(language_->form);
-    combo_language = new Combox(FL_COMBOX_DROPLIST);
+    combo_language.reset(new Combox(FL_COMBOX_DROPLIST));
     combo_language->add(obj->x, obj->y, obj->w, obj->h, 400,
                        dialog_->tabbed_folder);
     combo_language->shortcut("#L",1);
@@ -234,10 +216,10 @@ void FormDocument::build()
                    _(" ``text'' | ''text'' | ,,text`` | ,,text'' |"
                      " Â«text» | Â»text« "));
 
-    bc_.addReadOnly (language_->choice_inputenc);
+    bc().addReadOnly (language_->choice_inputenc);
 
     // the document options form
-    options_ = build_doc_options();
+    options_.reset(build_doc_options());
     fl_set_input_return(options_->input_float_placement, FL_RETURN_CHANGED);
     fl_set_counter_bounds(options_->slider_secnumdepth,-2,5);
     fl_set_counter_bounds(options_->slider_tocdepth,-1,5);
@@ -249,14 +231,14 @@ void FormDocument::build()
        fl_addto_choice(options_->choice_postscript_driver, tex_graphics[n]);
     }
 
-    bc_.addReadOnly (options_->slider_secnumdepth);
-    bc_.addReadOnly (options_->slider_tocdepth);
-    bc_.addReadOnly (options_->check_use_amsmath);
-    bc_.addReadOnly (options_->input_float_placement);
-    bc_.addReadOnly (options_->choice_postscript_driver);
+    bc().addReadOnly (options_->slider_secnumdepth);
+    bc().addReadOnly (options_->slider_tocdepth);
+    bc().addReadOnly (options_->check_use_amsmath);
+    bc().addReadOnly (options_->input_float_placement);
+    bc().addReadOnly (options_->choice_postscript_driver);
 
     // the document bullets form
-    bullets_ = build_doc_bullet();
+    bullets_.reset(build_doc_bullet());
     fl_addto_choice(bullets_->choice_bullet_size,
                    _(" default | tiny | script | footnote | small |"
                      " normal | large | Large | LARGE | huge | Huge"));
@@ -264,9 +246,9 @@ void FormDocument::build()
     fl_set_input_return(bullets_->input_bullet_latex, FL_RETURN_CHANGED);
     fl_set_input_maxchars(bullets_->input_bullet_latex, 80);
 
-    bc_.addReadOnly (bullets_->bmtable_bullet_panel);
-    bc_.addReadOnly (bullets_->choice_bullet_size);
-    bc_.addReadOnly (bullets_->input_bullet_latex);
+    bc().addReadOnly (bullets_->bmtable_bullet_panel);
+    bc().addReadOnly (bullets_->choice_bullet_size);
+    bc().addReadOnly (bullets_->input_bullet_latex);
 
     fl_addto_tabfolder(dialog_->tabbed_folder,_("Document"),
                       class_->form);
@@ -290,7 +272,7 @@ void FormDocument::build()
 
 void FormDocument::apply()
 {
-    if (!lv_->view()->available() || !dialog_)
+    if (!lv_->view()->available() || !dialog_.get())
        return;
 
     bool redo = class_apply();
@@ -321,7 +303,7 @@ void FormDocument::cancel()
 
 void FormDocument::update()
 {
-    if (!dialog_)
+    if (!dialog_.get())
         return;
 
     checkReadOnly();
@@ -389,9 +371,9 @@ bool FormDocument::input( FL_OBJECT * ob, long data )
 void FormDocument::ComboInputCB(int, void * v, Combox * combox)
 {
     FormDocument * pre = static_cast<FormDocument*>(v);
-    if (combox == pre->combo_doc_class)
+    if (combox == pre->combo_doc_class.get())
        pre->CheckChoiceClass(0, 0);
-    pre->bc_.valid(pre->CheckDocumentInput(0,0));
+    pre->bc().valid(pre->CheckDocumentInput(0,0));
 }
 
 
@@ -637,7 +619,7 @@ void FormDocument::bullets_apply()
 
 void FormDocument::class_update(BufferParams const & params)
 {
-    if (!class_)
+    if (!class_.get())
         return;
 
     LyXTextClass const & tclass = textclasslist.TextClass(params.textclass);
@@ -732,7 +714,7 @@ void FormDocument::class_update(BufferParams const & params)
 
 void FormDocument::language_update(BufferParams const & params)
 {
-    if (!language_)
+    if (!language_.get())
         return;
 
     combo_language->select_text(params.language->lang());
@@ -749,7 +731,7 @@ void FormDocument::language_update(BufferParams const & params)
 
 void FormDocument::options_update(BufferParams const & params)
 {
-    if (!options_)
+    if (!options_.get())
         return;
 
     fl_set_choice_text(options_->choice_postscript_driver,
@@ -767,7 +749,7 @@ void FormDocument::options_update(BufferParams const & params)
 
 void FormDocument::paper_update(BufferParams const & params)
 {
-    if (!paper_)
+    if (!paper_.get())
         return;
 
     fl_set_choice(paper_->choice_papersize2, params.papersize2 + 1);
@@ -794,7 +776,7 @@ void FormDocument::paper_update(BufferParams const & params)
 
 void FormDocument::bullets_update(BufferParams const & params)
 {
-    if (!bullets_ || ((XpmVersion<4) || (XpmVersion==4 && XpmRevision<7)))
+    if (!bullets_.get() || ((XpmVersion<4) || (XpmVersion==4 && XpmRevision<7)))
         return;
 
     bool const isLinuxDoc = lv_->buffer()->isLinuxDoc();
@@ -812,7 +794,7 @@ void FormDocument::bullets_update(BufferParams const & params)
 
 void FormDocument::checkReadOnly()
 {
-    if (bc_.readOnly(lv_->buffer()->isReadonly())) {
+    if (bc().readOnly(lv_->buffer()->isReadonly())) {
        combo_doc_class->deactivate();
        combo_language->deactivate();
        fl_set_object_label(dialog_->text_warning,
@@ -1114,7 +1096,7 @@ void FormDocument::CheckChoiceClass(FL_OBJECT * ob, long)
 
 void FormDocument::UpdateLayoutDocument(BufferParams const & params)
 {
-    if (!dialog_)
+    if (!dialog_.get())
         return;
 
     checkReadOnly();
index 2ac54e80dac006070de4b924a803ca582d864a32..20e5e43fdda0bfb09311ef49de003ae66a1b5c9b 100644 (file)
 #ifndef FORM_DOCUMENT_H
 #define FORM_DOCUMENT_H
 
-#include "FormBase.h"
 #include <vector>
+#include <boost/smart_ptr.hpp>
+#include "FormBaseDeprecated.h"
+#include "xformsBC.h"
 
 #ifdef __GNUG_
 #pragma interface
@@ -41,10 +43,7 @@ public:
        /// #FormDocument x(Communicator ..., Popups ...);#
        FormDocument(LyXView *, Dialogs *);
        ///
-       ~FormDocument();
-       ///
        static void ComboInputCB(int, void *, Combox *);
-
 private:
        ///
        enum State {
@@ -79,6 +78,8 @@ private:
                ///
                BULLETBMTABLE
        };
+       /// Pointer to the actual instantiation of the ButtonController.
+       virtual xformsBC & bc();
        /** Redraw the form (on receipt of a Signal indicating, for example,
            that the xforms colours have been re-mapped). */
        virtual void redraw();
@@ -153,17 +154,17 @@ private:
        FD_form_doc_bullet * build_doc_bullet();
 
        /// Real GUI implementation.
-       FD_form_tabbed_document * dialog_;
+       boost::scoped_ptr<FD_form_tabbed_document> dialog_;
        ///
-       FD_form_doc_paper       * paper_;
+       boost::scoped_ptr<FD_form_doc_paper>       paper_;
        ///
-       FD_form_doc_class       * class_;
+       boost::scoped_ptr<FD_form_doc_class>       class_;
        ///
-       FD_form_doc_language    * language_;
+       boost::scoped_ptr<FD_form_doc_language>    language_;
        ///
-       FD_form_doc_options     * options_;
+       boost::scoped_ptr<FD_form_doc_options>     options_;
        ///
-       FD_form_doc_bullet      * bullets_;
+       boost::scoped_ptr<FD_form_doc_bullet>      bullets_;
        ///
        int ActCell;
        ///
@@ -175,9 +176,18 @@ private:
        ///
        FL_OBJECT * fbullet;
        ///
-       Combox * combo_language;
+       boost::scoped_ptr<Combox> combo_language;
        ///
-       Combox * combo_doc_class;
+       boost::scoped_ptr<Combox> combo_doc_class;
+       /// The ButtonController
+       ButtonController<NoRepeatedApplyReadOnlyPolicy, xformsBC> bc_;
 };
 
+
+inline
+xformsBC & FormDocument::bc()
+{
+       return bc_;
+}
+
 #endif
index 46345e92f4bc674888bf3e6b237a709795361ae0..84f036a090fc43ad50bef8e6590e72b28620c6a8 100644 (file)
@@ -23,8 +23,8 @@
 
 
 FormError::FormError(LyXView * lv, Dialogs * d)
-       : FormInset( lv, d, _("LaTeX Error"), new OkCancelPolicy),
-         dialog_(0), inset_(0)
+       : FormInset( lv, d, _("LaTeX Error")),
+         inset_(0)
 {
        Assert(lv && d);
        // let the dialog be shown
@@ -34,15 +34,9 @@ FormError::FormError(LyXView * lv, Dialogs * d)
 }
 
 
-FormError::~FormError()
-{
-       delete dialog_;
-}
-
-
 FL_FORM * FormError::form() const
 {
-       if (dialog_) return dialog_->form;
+       if (dialog_.get()) return dialog_->form;
        return 0;
 }
 
@@ -78,13 +72,13 @@ void FormError::update()
 
 void FormError::build()
 {
-       dialog_ = build_error();
+       dialog_.reset(build_error());
 
        // Workaround dumb xforms sizing bug
        minw_ = form()->w;
        minh_ = form()->h;
        
         // Manage the cancel/close button
-       bc_.setCancel(dialog_->button_cancel);
-       bc_.refresh();
+       bc().setCancel(dialog_->button_cancel);
+       bc().refresh();
 }
index 748d71a0e57763c31c7fe757bf4cb547af2fe21e..5386cd3bc3e9d1b4c305c0c33e88bb9e55321fa7 100644 (file)
 #ifndef FORMERROR_H
 #define FORMERROR_H
 
+#include <boost/smart_ptr.hpp>
+#include "FormInset.h"
+#include "xformsBC.h"
+
 #ifdef __GNUG__
 #pragma interface
 #endif
 
-#include "FormInset.h"
-
 class InsetError;
 struct FD_form_error;
 
@@ -27,9 +29,9 @@ class FormError : public FormInset {
 public:
        /// Constructor
        FormError(LyXView *, Dialogs *);
-       ///
-       ~FormError();
 private:
+       /// Pointer to the actual instantiation of the ButtonController.
+       virtual xformsBC & bc();
        /// Disconnect signals. Also perform any necessary housekeeping.
        virtual void disconnect();
 
@@ -45,11 +47,19 @@ private:
        FD_form_error * build_error();
 
        /// Real GUI implementation.
-       FD_form_error * dialog_;
+       boost::scoped_ptr<FD_form_error> dialog_;
        /// pointer to the inset passed through showInset
        InsetError * inset_;
        /// the error message
        string message_;
+       /// The ButtonController
+       ButtonController<OkCancelPolicy, xformsBC> bc_;
 };
 
+
+inline
+xformsBC & FormError::bc()
+{
+       return bc_;
+}
 #endif
index 81b513f785becbc2aaf5dbaa2541bca01b8917f5..6c581b4db67671cd974c44b077a7d43acd10c9f6 100644 (file)
@@ -24,6 +24,7 @@
 #include "LyXView.h"
 #include "buffer.h"
 #include "FormExternal.h"
+#include "form_external.h"
 #include "frontends/FileDialog.h"
 #include "LString.h"
 #include "support/filetools.h"
@@ -33,19 +34,13 @@ using std::make_pair;
 using std::endl;
 
 FormExternal::FormExternal(LyXView * lv, Dialogs * d)
-       : FormBaseBD(lv, d, _("Edit external file"), new OkCancelReadOnlyPolicy),
-       inset_(0), ih_(0), dialog_(0)
+       : FormBaseBD(lv, d, _("Edit external file")),
+       inset_(0), ih_(0)
 {
        d->showExternal.connect(slot(this, &FormExternal::showInset));
 }
 
 
-FormExternal::~FormExternal()
-{
-       delete dialog_;
-}
-
-
 extern "C" void ExternalTemplateCB(FL_OBJECT * ob, long data)
 {
        FormExternal::templateCB(ob, data);
@@ -78,7 +73,7 @@ extern "C" void ExternalUpdateCB(FL_OBJECT * ob, long data)
 
 FL_FORM * FormExternal::form() const
 {
-       if (dialog_)
+       if (dialog_.get())
                return dialog_->form;
        return 0;
 }
@@ -90,7 +85,7 @@ void FormExternal::connect()
                 connect(slot(this, &FormExternal::updateSlot));
        h_ = d_->hideBufferDependent.
                 connect(slot(this, &FormExternal::hide));
-       FormBase::connect();
+       FormBaseDeprecated::connect();
 }
 
 
@@ -129,7 +124,7 @@ void FormExternal::showInset(InsetExternal * inset)
 
 void FormExternal::build()
 {
-       dialog_ = build_external();
+       dialog_.reset(build_external());
 
        fl_addto_choice(dialog_->choice_template,
                        getTemplatesComboString().c_str());
index b6f95f7103fa003c7a1742f4682f6af55d850dca..8e3e7762532ddd7cb7cf667f67775c54c81cfe9a 100644 (file)
 #ifndef FORMEXTERNAL_H
 #define FORMEXTERNAL_H
 
-#include "FormBase.h"
-#include "insets/insetexternal.h"
-
-#include "form_external.h"
+#include <boost/smart_ptr.hpp>
 
 #ifdef __GNUG__
 #pragma interface
 #endif
 
+#include "FormBaseDeprecated.h"
+#include "insets/insetexternal.h"
+#include "xformsBC.h"
+
+struct FD_form_external;
+
 /// The class for editing External insets via a dialog
 class FormExternal : public FormBaseBD {
 public:
+       ///
        FormExternal(LyXView *, Dialogs *);
 
-       ~FormExternal();
-
        /// Connect signals. Also perform any necessary initialisation.
        virtual void connect();
 
@@ -92,8 +94,21 @@ private:
        /// build the dialog
        FD_form_external * build_external();
 
+       /// Pointer to the actual instantiation of the ButtonController.
+       virtual xformsBC & bc();
+
        /// the dialog implementation
-       FD_form_external * dialog_;
+       boost::scoped_ptr<FD_form_external> dialog_;
+
+       /// The ButtonController
+       ButtonController<OkCancelReadOnlyPolicy, xformsBC> bc_;
 };
 
+
+inline
+xformsBC & FormExternal::bc()
+{
+       return bc_;
+}
+
 #endif // FORMEXTERNAL_H
index cae5ab4727573dcd82bfad21aa344d19ee395860..5d87dd0594fb24ea80f50e6b9f87c67c76f88e66 100644 (file)
 #ifndef FORMFILEDIALOG_H
 #define FORMFILEDIALOG_H
 
+#include <vector>
+#include <sigc++/signal_system.h>
+
 #ifdef __GNUG__
 #pragma interface
 #endif
 
 #include <config.h>
 
-#include <vector>
-#include <sigc++/signal_system.h>
-
 #include "LString.h"
 #include FORMS_H_LOCATION
 #include "form_filedialog.h"
index 5068694bc59bd7a0a0b8c06f592471f0b1193b4b..9323d4287c358b870716a8cf956d6c3b328d5a4a 100644 (file)
@@ -33,8 +33,8 @@ using std::endl;
 using std::make_pair;
 
 FormGraphics::FormGraphics(LyXView * lv, Dialogs * d)
-       : FormInset(lv, d, _("Graphics"), new NoRepeatedApplyReadOnlyPolicy),
-         dialog_(0), inset_(0),
+       : FormInset(lv, d, _("Graphics")),
+         inset_(0),
          // The buttons c-tor values are the number of buttons we use
          // This is only to reduce memory waste.
          widthButtons(5), heightButtons(4), displayButtons(4),
@@ -53,20 +53,12 @@ FormGraphics::~FormGraphics()
        widthButtons.reset();
        heightButtons.reset();
        displayButtons.reset();
-       
-       // Free the form.
-       // delete dialog_;
 }
 
 
 void FormGraphics::build()
 {
-       dialog_ = build_graphics();
-       Assert(dialog_ != 0);
-       if (!dialog_) {
-               lyxerr << "ERROR: Failed to create the Graphics Inset dialog." << endl;
-               return ;
-       }
+       dialog_.reset(build_graphics());
 
        // Workaround dumb xforms sizing bug
        minw_ = form()->w;
@@ -136,29 +128,30 @@ void FormGraphics::build()
                                           InsetGraphicsParams::NONE);
 
         // Manage the ok, apply, restore and cancel/close buttons
-       bc_.setOK(dialog_->button_ok);
-       bc_.setApply(dialog_->button_apply);
-       bc_.setCancel(dialog_->button_cancel);
-       bc_.setUndoAll(dialog_->button_restore);
-       bc_.refresh();
-
-       bc_.addReadOnly(dialog_->input_filename);
-       bc_.addReadOnly(dialog_->button_browse);
-       bc_.addReadOnly(dialog_->input_width);
-       bc_.addReadOnly(dialog_->input_height);
-       bc_.addReadOnly(dialog_->radio_button_group_width);
-       bc_.addReadOnly(dialog_->radio_button_group_height);
-       bc_.addReadOnly(dialog_->radio_button_group_display);
-       bc_.addReadOnly(dialog_->input_rotate_angle);
-       bc_.addReadOnly(dialog_->check_inline);
-       bc_.addReadOnly(dialog_->input_subcaption);
-       bc_.addReadOnly(dialog_->check_subcaption);
+       bc().setOK(dialog_->button_ok);
+       bc().setApply(dialog_->button_apply);
+       bc().setCancel(dialog_->button_cancel);
+       bc().setUndoAll(dialog_->button_restore);
+       bc().refresh();
+
+       bc().addReadOnly(dialog_->input_filename);
+       bc().addReadOnly(dialog_->button_browse);
+       bc().addReadOnly(dialog_->input_width);
+       bc().addReadOnly(dialog_->input_height);
+       bc().addReadOnly(dialog_->radio_button_group_width);
+       bc().addReadOnly(dialog_->radio_button_group_height);
+       bc().addReadOnly(dialog_->radio_button_group_display);
+       bc().addReadOnly(dialog_->input_rotate_angle);
+       bc().addReadOnly(dialog_->check_inline);
+       bc().addReadOnly(dialog_->input_subcaption);
+       bc().addReadOnly(dialog_->check_subcaption);
 }
 
 
 FL_FORM * FormGraphics::form() const
 {
-       if (dialog_ ) return dialog_->form;
+       if (dialog_.get())
+               return dialog_->form;
        return 0;
 }
 
@@ -266,7 +259,7 @@ void FormGraphics::update()
                      igp.inlineFigure);
 
        // update the dialog's read only / read-write status
-       bc_.readOnly(lv_->buffer()->isReadonly());
+       bc().readOnly(lv_->buffer()->isReadonly());
 
        // Now make sure that the buttons are set correctly.
        input(0, 0);
index f0946bc187626d6c419abbb3e809d918d0e48e24..4c82174b246f80627c09dc2dc9874c48e7b578a9 100644 (file)
 #ifndef FORMGRAPHICS_H
 #define FORMGRAPHICS_H
 
-#include "LString.h"
-#include "RadioButtonGroup.h"
-#include "ButtonPolicies.h"
-#include "FormInset.h"
+#include <boost/smart_ptr.hpp>
 
 #ifdef __GNUG__
 #pragma interface
 #endif 
 
+#include "LString.h"
+#include "RadioButtonGroup.h"
+#include "ButtonPolicies.h"
+#include "FormInset.h"
+#include "xformsBC.h"
+
 // Forward declarations for classes we use only as pointers.
 class InsetGraphics;
 
@@ -72,6 +75,8 @@ private:
                ADVANCEDINPUT
        };
 
+       /// Pointer to the actual instantiation of the ButtonController.
+       virtual xformsBC & bc();
        /// Build the dialog
        virtual void build();
        /// Filter the inputs
@@ -97,7 +102,7 @@ private:
        FD_form_graphics * build_graphics();
 
        /// Real GUI implementation.
-       FD_form_graphics * dialog_;
+       boost::scoped_ptr<FD_form_graphics> dialog_;
        /** Which Inset do we belong to?
           Used to set and update data to/from the inset.
        */
@@ -110,6 +115,14 @@ private:
        RadioButtonGroup displayButtons;
        /// Last used figure path
        string last_image_path;
+       /// The ButtonController
+       ButtonController<NoRepeatedApplyReadOnlyPolicy, xformsBC> bc_;
 };
 
+
+inline
+xformsBC & FormGraphics::bc()
+{
+       return bc_;
+}
 #endif 
index db3b5fc5728bf94a161e18284bba0b2f47d36ee7..1d33dd9557a5959cdd0bd202d3c8bed61f0d9248 100644 (file)
@@ -32,22 +32,16 @@ using std::make_pair;
 using std::pair;
 
 FormInclude::FormInclude(LyXView * lv, Dialogs * d)
-       : FormBaseBD(lv, d, _("Include file"), new OkCancelPolicy),
-         dialog_(0), ih_(0), inset_(0)
+       : FormBaseBD(lv, d, _("Include file")),
+         ih_(0), inset_(0)
 {
        d->showInclude.connect(slot(this, &FormInclude::showInclude));
 }
 
 
-FormInclude::~FormInclude()
-{
-       delete dialog_;
-}
-
-
 FL_FORM * FormInclude::form() const
 {
-       if (dialog_)
+       if (dialog_.get()) 
                return dialog_->form;
        return 0;
 }
@@ -59,7 +53,7 @@ void FormInclude::connect()
                 connect(slot(this, &FormInclude::updateSlot));
        h_ = d_->hideBufferDependent.
                 connect(slot(this, &FormInclude::hide));
-       FormBase::connect();
+       FormBaseDeprecated::connect();
 }
 
 
@@ -82,7 +76,7 @@ void FormInclude::updateSlot(bool switched)
 
 void FormInclude::build()
 {
-       dialog_ = build_include();
+       dialog_.reset(build_include());
 
        // Workaround dumb xforms sizing bug
        minw_ = form()->w;
@@ -116,7 +110,7 @@ void FormInclude::showInclude(InsetInclude * inset)
 
 void FormInclude::update()
 {
-       bc_.readOnly(lv_->buffer()->isReadonly());
+       bc().readOnly(lv_->buffer()->isReadonly());
 
        if (!inset_) {
                fl_set_input(dialog_->input_filename, "");
index 655324e290e6c0301cca77eb475086503a4af7ef..cb046173b973875e37be839ef2d3339f44819303 100644 (file)
@@ -1,3 +1,4 @@
+// -*- C++ -*-
 /**
  * \file FormInclude.h
  * Copyright 2001 the LyX Team
 #ifndef FORMINCLUDE_H
 #define FORMINCLUDE_H
 
+#include <boost/smart_ptr.hpp>
+
 #ifdef __GNUG__
 #pragma interface
 #endif
 
-#include "FormBase.h"
+#include "FormBaseDeprecated.h"
+#include "xformsBC.h"
 #include "insets/insetinclude.h"
 
-class InsetInclude;
 struct FD_form_include;
 
 /** This class provides an XForms implementation of the FormInclude Dialog.
@@ -26,21 +28,21 @@ class FormInclude : public FormBaseBD {
 public:
        ///
        FormInclude(LyXView *, Dialogs *);
-       ///
-       ~FormInclude();
 private:
        ///
        enum State {
                /// the browse button
-               BROWSE=0,
+               BROWSE = 0,
                /// the load file button
-               LOAD=5,
+               LOAD = 5,
                /// the verbatim radio choice
-               VERBATIM=10,
+               VERBATIM = 10,
                /// the input and include radio choices
-               INPUTINCLUDE=11
+               INPUTINCLUDE = 11
        };
  
+       /// Pointer to the actual instantiation of the ButtonController.
+       virtual xformsBC & bc();
        /// Slot launching dialog to an existing inset
        void showInclude(InsetInclude *);
 
@@ -67,8 +69,10 @@ private:
        FD_form_include * build_include();
 
        /// Real GUI implementation.
-       FD_form_include * dialog_;
+       boost::scoped_ptr<FD_form_include> dialog_;
+       /// The ButtonController
+       ButtonController<OkCancelReadOnlyPolicy, xformsBC> bc_;
+
        /// inset::hide connection.
        Connection ih_;
  
@@ -78,4 +82,10 @@ private:
        InsetInclude::InsetIncludeParams params;
 };
 
+
+inline
+xformsBC & FormInclude::bc()
+{
+  return bc_;
+}
 #endif
index c817ddb169d044b83f5e16bb8809785512aeac41..a0a6e3f025e95abafb4802042d25d73c605312bd 100644 (file)
@@ -26,8 +26,7 @@
 #include "lyxfunc.h"
 
 FormIndex::FormIndex(LyXView * lv, Dialogs * d)
-       : FormCommand(lv, d, _("Index"), new NoRepeatedApplyPolicy),
-         dialog_(0)
+       : FormCommand(lv, d, _("Index"))
 {
        // let the dialog be shown
        // These are permanent connections so we won't bother
@@ -37,15 +36,9 @@ FormIndex::FormIndex(LyXView * lv, Dialogs * d)
 }
 
 
-FormIndex::~FormIndex()
-{
-       delete dialog_;
-}
-
-
 FL_FORM * FormIndex::form() const
 {
-       if (dialog_) return dialog_->form;
+       if (dialog_.get()) return dialog_->form;
        return 0;
 }
 
@@ -59,7 +52,7 @@ void FormIndex::connect()
 
 void FormIndex::build()
 {
-       dialog_ = build_index();
+       dialog_.reset(build_index());
 
        // Workaround dumb xforms sizing bug
        minw_ = form()->w;
@@ -68,13 +61,13 @@ void FormIndex::build()
        fl_set_input_return(dialog_->input_key, FL_RETURN_CHANGED);
 
         // Manage the ok, apply, restore and cancel/close buttons
-       bc_.setOK(dialog_->button_ok);
-       bc_.setApply(dialog_->button_apply);
-       bc_.setCancel(dialog_->button_cancel);
-       bc_.setUndoAll(dialog_->button_restore);
-       bc_.refresh();
+       bc().setOK(dialog_->button_ok);
+       bc().setApply(dialog_->button_apply);
+       bc().setCancel(dialog_->button_cancel);
+       bc().setUndoAll(dialog_->button_restore);
+       bc().refresh();
 
-       bc_.addReadOnly(dialog_->input_key);
+       bc().addReadOnly(dialog_->input_key);
 }
 
 
@@ -83,8 +76,8 @@ void FormIndex::update()
        fl_set_input(dialog_->input_key, params.getContents().c_str());
        // Surely, this should reset the buttons to their original state?
        // It doesn't. Instead "Restore" becomes a "Close"
-       //bc_.refresh();
-       bc_.readOnly(lv_->buffer()->isReadonly());
+       //bc().refresh();
+       bc().readOnly(lv_->buffer()->isReadonly());
 }
 
 
index 698802d7292c723cc11f3c3ce666b18a0f81cebc..10094679aa6833ba69b569df1e6baa3a8cfda19d 100644 (file)
 #ifndef FORMINDEX_H
 #define FORMINDEX_H
 
+#include <boost/smart_ptr.hpp>
+#include "FormInset.h"
+#include "xformsBC.h"
+
 #ifdef __GNUG__
 #pragma interface
 #endif
 
-#include "FormInset.h"
 struct FD_form_index;
 
 /** This class provides an XForms implementation of the FormIndex Dialog.
@@ -25,9 +28,9 @@ class FormIndex : public FormCommand {
 public:
        ///
        FormIndex(LyXView *, Dialogs *);
-       ///
-       ~FormIndex();
 private:
+       /// Pointer to the actual instantiation of the ButtonController.
+       virtual xformsBC & bc();
        /// Connect signals etc. Set form's max size.
        virtual void connect();
        /// Build the dialog
@@ -41,7 +44,15 @@ private:
        ///
        FD_form_index * build_index();
        /// Real GUI implementation.
-       FD_form_index * dialog_;
+       boost::scoped_ptr<FD_form_index> dialog_;
+       /// The ButtonController
+       ButtonController<NoRepeatedApplyReadOnlyPolicy, xformsBC> bc_;
 };
 
+
+inline
+xformsBC & FormIndex::bc()
+{
+       return bc_;
+}
 #endif
index 7f81476aaf02e8b13eb7c17a62bc40d875c69239..6abee8e87fa3d2aa879c9d175d4edfc74a5aa4f1 100644 (file)
 #include "Dialogs.h"
 #include "LyXView.h"
 #include "FormInset.h"
+#include "xformsBC.h"
 
-FormInset::FormInset(LyXView * lv, Dialogs * d, string const & t,
-                    ButtonPolicy * bp,
-                    char const * close, char const * cancel)
-       : FormBaseBD(lv, d, t, bp, close, cancel), ih_(0)
+FormInset::FormInset(LyXView * lv, Dialogs * d, string const & t)
+       : FormBaseBD(lv, d, t), ih_(0)
 {}
 
 
@@ -35,7 +34,7 @@ void FormInset::connect()
                 connect(slot(this, &FormInset::updateSlot));
        h_ = d_->hideBufferDependent.
                 connect(slot(this, &FormInset::hide));
-       FormBase::connect();
+       FormBaseDeprecated::connect();
 }
 
 
@@ -55,10 +54,8 @@ void FormInset::updateSlot(bool switched)
 }
 
 
-FormCommand::FormCommand(LyXView * lv, Dialogs * d, string const & t,
-                        ButtonPolicy * bp,
-                        char const * close, char const * cancel)
-       : FormInset(lv, d, t, bp, close, cancel),
+FormCommand::FormCommand(LyXView * lv, Dialogs * d, string const & t)
+       : FormInset(lv, d, t),
          inset_(0)
 {}
 
@@ -95,6 +92,6 @@ void FormCommand::createInset(string const & arg)
 
        params.setFromString(arg);
        if ( !arg.empty() )
-               bc_.valid(); // so that the user can press Ok
+               bc().valid(); // so that the user can press Ok
        show();
 }
index 31d705ac558d0de35662d6014f11e7418c16125c..53946c6f49c5dc7c8f02ddbf376b7b8dee4667da 100644 (file)
@@ -12,7 +12,7 @@
 #ifndef FORMCOMMAND_H
 #define FORMCOMMAND_H
 
-#include "FormBase.h"
+#include "FormBaseDeprecated.h"
 #include "insets/insetcommand.h"
 
 #ifdef __GNUG__
 class FormInset : public FormBaseBD {
 protected:
        /// Constructor
-       FormInset(LyXView *, Dialogs *, string const &,
-                 ButtonPolicy * bp,
-                 char const * close = N_("Close"),
-                 char const * cancel = N_("Cancel"));
+       FormInset(LyXView *, Dialogs *, string const &);
 
        /// Connect signals. Also perform any necessary initialisation.
        virtual void connect();
@@ -49,10 +46,7 @@ protected:
 class FormCommand : public FormInset {
 protected:
        /// Constructor
-       FormCommand(LyXView *, Dialogs *, string const &,
-                   ButtonPolicy *,
-                   char const * close = N_("Close"),
-                   char const * cancel = N_("Cancel"));
+       FormCommand(LyXView *, Dialogs *, string const &);
 
        /// Disconnect signals. Also perform any necessary housekeeping.
        virtual void disconnect();
index d8accd95ff9f46ab1a358bb056d9c6571e492eec..dc74a12b0b89d37e13ce9519c824dc1c3840d2db 100644 (file)
@@ -32,13 +32,10 @@ FormLog::FormLog(LyXView * lv, Dialogs * d)
        d->showLogFile.connect(slot(this, &FormLog::show));
 }
 
-FormLog::~FormLog()
-{
-}
 
 void FormLog::update()
 {
-       if (!dialog_ || !lv_->view()->available())
+       if (!dialog_.get() || !lv_->view()->available())
                return;
  
        std::pair<Buffer::LogType, string> const logfile
index 9cb9ded05d464b9399b7339e8395d34b965fdf40..ed82c8e06203a8728cc4e688ec1badef675538b4 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef FORMLOG_H
 #define FORMLOG_H
 
-#include "FormBase.h"
+#include "FormBaseDeprecated.h"
 #include "FormBrowser.h"
 
 #ifdef __GNUG__
@@ -25,9 +25,8 @@ class Dialogs;
  */
 class FormLog : public FormBrowser {
 public:
+       ///
        FormLog(LyXView *, Dialogs *);
-       ~FormLog();
-
 private:
        /// Update the dialog.
        virtual void update();
index bae9fa87f841438ae5fde8f7d7e96ae3cb3b6ed0..0c28102a8a7581ae19b283175dc53a5061702c0f 100644 (file)
@@ -31,9 +31,7 @@ using Liason::setMinibuffer;
 #endif
 
 FormParagraph::FormParagraph(LyXView * lv, Dialogs * d)
-       : FormBaseBD(lv, d, _("Paragraph Layout"),
-                    new NoRepeatedApplyReadOnlyPolicy),
-       dialog_(0), general_(0), extra_(0)
+       : FormBaseBD(lv, d, _("Paragraph Layout"))
 {
     // let the popup be shown
     // This is a permanent connection so we won't bother
@@ -42,14 +40,6 @@ FormParagraph::FormParagraph(LyXView * lv, Dialogs * d)
 }
 
 
-FormParagraph::~FormParagraph()
-{
-    delete general_;
-    delete extra_;
-    delete dialog_;
-}
-
-
 void FormParagraph::redraw()
 {
        if( form() && form()->visible )
@@ -65,7 +55,7 @@ void FormParagraph::redraw()
 
 FL_FORM * FormParagraph::form() const
 {
-    if (dialog_) return dialog_->form;
+    if (dialog_.get()) return dialog_->form;
     return 0;
 }
 
@@ -73,7 +63,7 @@ FL_FORM * FormParagraph::form() const
 void FormParagraph::build()
 {
     // the tabbed folder
-    dialog_ = build_tabbed_paragraph();
+    dialog_.reset(build_tabbed_paragraph());
 
     // Workaround dumb xforms sizing bug
     minw_ = form()->w;
@@ -87,7 +77,7 @@ void FormParagraph::build()
     bc_.refresh();
 
     // the general paragraph data form
-    general_ = build_paragraph_general();
+    general_.reset(build_paragraph_general());
 
     fl_addto_choice(general_->choice_space_above,
                    _(" None | Defskip | Smallskip "
@@ -118,7 +108,7 @@ void FormParagraph::build()
     bc_.addReadOnly (general_->input_labelwidth);
 
     // the document class form
-    extra_ = build_paragraph_extra();
+    extra_.reset(build_paragraph_extra());
 
     fl_set_input_return(extra_->input_pextra_width, FL_RETURN_CHANGED);
     fl_set_input_return(extra_->input_pextra_widthp, FL_RETURN_CHANGED);
@@ -137,7 +127,7 @@ void FormParagraph::build()
 
 void FormParagraph::apply()
 {
-    if (!lv_->view()->available() || !dialog_)
+    if (!lv_->view()->available() || !dialog_.get())
        return;
 
     general_apply();
@@ -152,7 +142,7 @@ void FormParagraph::apply()
 
 void FormParagraph::update()
 {
-    if (!dialog_)
+    if (!dialog_.get())
         return;
 
     general_update();
@@ -296,7 +286,7 @@ void FormParagraph::extra_apply()
 
 void FormParagraph::general_update()
 {
-    if (!general_)
+    if (!general_.get())
         return;
 
     Buffer * buf = lv_->view()->buffer();
@@ -468,7 +458,7 @@ void FormParagraph::general_update()
 
 void FormParagraph::extra_update()
 {
-    if (!lv_->view()->available() || !extra_)
+    if (!lv_->view()->available() || !extra_.get())
         return;
 
     LyXParagraph * par = lv_->view()->text->cursor.par();
index 7104131d6bad6039c64c2df4ea1a3436a1fffaef..1a632672c39c9095c6750c6603206644391b494b 100644 (file)
 #ifndef FORM_PARAGRAPH_H
 #define FORM_PARAGRAPH_H
 
-#include "FormBase.h"
+#include <boost/smart_ptr.hpp>
+#include "FormBaseDeprecated.h"
+#include "xformsBC.h"
 
 #ifdef __GNUG_
 #pragma interface
 #endif
 
-
 struct FD_form_tabbed_paragraph;
 struct FD_form_paragraph_general;
 struct FD_form_paragraph_extra;
@@ -31,10 +32,9 @@ class FormParagraph : public FormBaseBD {
 public:
        ///
        FormParagraph(LyXView *, Dialogs *);
-       ///
-       ~FormParagraph();
-
 private:
+       /// Pointer to the actual instantiation of the ButtonController.
+       virtual xformsBC & bc();
        /** Redraw the form (on receipt of a Signal indicating, for example,
            that the xforms colours have been re-mapped). */
        virtual void redraw();
@@ -67,11 +67,19 @@ private:
        FD_form_paragraph_extra * build_paragraph_extra();
 
        /// Real GUI implementation.
-       FD_form_tabbed_paragraph  * dialog_;
+       boost::scoped_ptr<FD_form_tabbed_paragraph> dialog_;
        ///
-       FD_form_paragraph_general * general_;
+       boost::scoped_ptr<FD_form_paragraph_general> general_;
        ///
-       FD_form_paragraph_extra   * extra_;
+       boost::scoped_ptr<FD_form_paragraph_extra> extra_;
+       /// The ButtonController
+       ButtonController<NoRepeatedApplyReadOnlyPolicy, xformsBC> bc_;
 };
 
+
+inline
+xformsBC & FormParagraph::bc()
+{
+       return bc_;
+}
 #endif
index 79897e4769f16f420572909e41dc7257dee12531..af3746d99d0d41d5cd55ba07f43e70a8e1cb90d4 100644 (file)
 
 #include FORMS_H_LOCATION
 
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
 #include "form_preamble.h"
 #include "FormPreamble.h"
 #include "Dialogs.h"
@@ -24,8 +28,7 @@ using Liason::setMinibuffer;
 #endif
 
 FormPreamble::FormPreamble(LyXView * lv, Dialogs * d)
-       : FormBaseBD(lv, d, _("LaTeX preamble"), new NoRepeatedApplyReadOnlyPolicy),
-       dialog_(0)
+       : FormBaseBD(lv, d, _("LaTeX preamble"))
 {
     // let the popup be shown
     // This is a permanent connection so we won't bother
@@ -34,37 +37,33 @@ FormPreamble::FormPreamble(LyXView * lv, Dialogs * d)
 }
 
 
-FormPreamble::~FormPreamble()
-{
-   delete dialog_;
-}
-
-
 FL_FORM * FormPreamble::form() const
 {
-    if (dialog_) return dialog_->form;
+    if (dialog_.get()) return dialog_->form;
     return 0;
 }
 
+
 void FormPreamble::build()
 {
-   dialog_ = build_preamble();
+   dialog_.reset(build_preamble());
    // Workaround dumb xforms sizing bug
    minw_ = form()->w;
    minh_ = form()->h;
    
    fl_set_input_return(dialog_->input_preamble, FL_RETURN_CHANGED);
    // Manage the ok, apply and cancel/close buttons
-   bc_.setOK(dialog_->button_ok);
-   bc_.setApply(dialog_->button_apply);
-   bc_.setCancel(dialog_->button_cancel);
-   bc_.addReadOnly(dialog_->input_preamble);
-   bc_.refresh();
+   bc().setOK(dialog_->button_ok);
+   bc().setApply(dialog_->button_apply);
+   bc().setCancel(dialog_->button_cancel);
+   bc().addReadOnly(dialog_->input_preamble);
+   bc().refresh();
 }
 
+
 void FormPreamble::apply()
 {
-   if (!lv_->view()->available() || !dialog_)
+   if (!lv_->view()->available() || !dialog_.get())
      return;
    
    // is this needed?:
@@ -78,7 +77,7 @@ void FormPreamble::apply()
 
 void FormPreamble::update()
 {
-   if (!dialog_)
+   if (!dialog_.get())
      return;
 
    fl_set_input(dialog_->input_preamble,lv_->buffer()->params.preamble.c_str());
@@ -89,7 +88,7 @@ void FormPreamble::update()
    setEnabled(dialog_->button_apply,   enable);
    
    // need this?
-   // bc_.readOnly(lv_->buffer()->isReadonly());
+   // bc().readOnly(lv_->buffer()->isReadonly());
 }
 
 
index 55ca68fe7ebef401a8adc52058c28c4ff0365c9d..7f54cffd24eb3bcd2a02a9741e3bfae4ef20ba79 100644 (file)
@@ -1,3 +1,4 @@
+// -*- C++ -*-
 /**
  * \file FormPreamble.h
  * Copyright 2001 The LyX Team.
@@ -9,7 +10,13 @@
 #ifndef FORMPREAMBLE_H
 #define FORMPREAMBLE_H
 
-#include "FormBase.h"
+#include <boost/smart_ptr.hpp>
+#include "FormBaseDeprecated.h"
+#include "xformsBC.h"
+
+#ifdef __GNUG__
+#pragma interface
+#endif
 
 struct FD_form_preamble;
 
@@ -17,33 +24,37 @@ struct FD_form_preamble;
  */
 class FormPreamble : public FormBaseBD {
 public:
-   ///
-   FormPreamble(LyXView *, Dialogs *);
-   ///
-   ~FormPreamble();
-   
+       ///
+       FormPreamble(LyXView *, Dialogs *);
 private:
-   /** Redraw the form (on receipt of a Signal indicating, for example,
-    *  that the xforms colours have been re-mapped). 
-    */
+       /// Pointer to the actual instantiation of the ButtonController.
+       virtual xformsBC & bc();
 
-   /// Filter the inputs
-   // virtual bool input(FL_OBJECT *, long);
+       /// Filter the inputs
+       // virtual bool input(FL_OBJECT *, long);
    
-   /// Build the popup
-   virtual void build();
-   /// Apply from popup
-   virtual void apply();
-   /// Update the popup.
-   virtual void update();
-   ///
-   virtual FL_FORM * form() const;
+       /// Build the popup
+       virtual void build();
+       /// Apply from popup
+       virtual void apply();
+       /// Update the popup.
+       virtual void update();
+       ///
+       virtual FL_FORM * form() const;
    
-   /// Typedefinitions from the fdesign produced Header file
-   FD_form_preamble  * build_preamble();
+       /// Typedefinitions from the fdesign produced Header file
+       FD_form_preamble  * build_preamble();
    
-   /// Real GUI implementation.
-   FD_form_preamble  * dialog_;
+       /// Real GUI implementation.
+       boost::scoped_ptr<FD_form_preamble> dialog_;
+       /// The ButtonController
+       ButtonController<NoRepeatedApplyReadOnlyPolicy, xformsBC> bc_;
 };
 
+
+inline
+xformsBC & FormPreamble::bc()
+{
+  return bc_;
+}
 #endif
index dbeaae8e332507962d215b7106664703e6c5c1c9..b39740522abc60f3cf9d2aa9b49133f10b7603d6 100644 (file)
@@ -62,10 +62,7 @@ static Formats    local_formats;
 static Converters local_converters;
 
 FormPreferences::FormPreferences(LyXView * lv, Dialogs * d)
-       : FormBaseBI(lv, d, _("Preferences"), new PreferencesPolicy),
-         dialog_(0),
-         converters_tab_(0), inputs_tab_(0), look_n_feel_tab_(0),
-         outputs_tab_(0),  lang_opts_tab_(0),
+       : FormBaseBI(lv, d, _("Preferences")),
          warningPosted(false),
          colors_(*this), converters_(*this), inputs_misc_(*this),
          formats_(*this), interface_(*this), language_(*this), 
@@ -79,18 +76,6 @@ FormPreferences::FormPreferences(LyXView * lv, Dialogs * d)
 }
 
 
-FormPreferences::~FormPreferences()
-{
-       delete converters_tab_;
-       delete inputs_tab_;
-       delete look_n_feel_tab_;
-       delete outputs_tab_;
-       delete lang_opts_tab_;
-
-       delete dialog_;
-}
-
-
 void FormPreferences::connect()
 {
        fl_set_form_maxsize( dialog_->form, minw_, minh_ );
@@ -143,14 +128,14 @@ void FormPreferences::redraw()
 
 FL_FORM * FormPreferences::form() const
 {
-       if (dialog_) return dialog_->form;
+       if (dialog_.get()) return dialog_->form;
        return 0;
 }
 
 
 void FormPreferences::ok()
 {
-       FormBase::ok();
+       FormBaseDeprecated::ok();
 
        if (colors_.modifiedXformsPrefs) {
                string const filename =
@@ -171,31 +156,31 @@ void FormPreferences::hide()
            && outer_form->visible) {
                fl_hide_form(outer_form);
        }
-       FormBase::hide();
+       FormBaseDeprecated::hide();
 }
 
 
 void FormPreferences::build()
 {
-       dialog_ = build_preferences();
+       dialog_.reset(build_preferences());
 
        // Manage the restore, save, apply and cancel/close buttons
-       bc_.setOK(dialog_->button_ok);
-       bc_.setApply(dialog_->button_apply);
-       bc_.setCancel(dialog_->button_cancel);
-       bc_.setUndoAll(dialog_->button_restore);
-       bc_.refresh();
+       bc().setOK(dialog_->button_ok);
+       bc().setApply(dialog_->button_apply);
+       bc().setCancel(dialog_->button_cancel);
+       bc().setUndoAll(dialog_->button_restore);
+       bc().refresh();
 
        // Workaround dumb xforms sizing bug
        minw_ = form()->w;
        minh_ = form()->h;
 
        // build the tab folders
-       converters_tab_ = build_outer_tab();
-       look_n_feel_tab_ = build_outer_tab();
-       inputs_tab_ = build_outer_tab();
-       outputs_tab_ = build_outer_tab();
-       lang_opts_tab_ = build_outer_tab();
+       converters_tab_.reset(build_outer_tab());
+       look_n_feel_tab_.reset(build_outer_tab());
+       inputs_tab_.reset(build_outer_tab());
+       outputs_tab_.reset(build_outer_tab());
+       lang_opts_tab_.reset(build_outer_tab());
 
        // build actual tabfolder contents
        // these will become nested tabfolders
@@ -339,8 +324,7 @@ void FormPreferences::feedback(FL_OBJECT * ob)
                str = spellchecker_.feedback(ob);
        }
 
-       str = formatted(_(str), dialog_->text_warning->w-10,
-                       FL_SMALL_SIZE, FL_NORMAL_STYLE);
+       str = formatted(_(str), dialog_->text_warning->w-10, FL_SMALL_SIZE);
 
        fl_set_object_label(dialog_->text_warning, str.c_str());
        fl_set_object_lsize(dialog_->text_warning, FL_SMALL_SIZE);
@@ -379,7 +363,7 @@ bool FormPreferences::input(FL_OBJECT * ob, long)
 
 void FormPreferences::update()
 {
-       if (!dialog_) return;
+       if (!dialog_.get()) return;
     
        // read lyxrc entries
        colors_.update();
@@ -397,9 +381,14 @@ void FormPreferences::update()
 }
 
 
-FormPreferences::Colors::~Colors()
+FormPreferences::Colors::Colors(FormPreferences & p)
+       : parent_(p)
+{}
+
+
+FD_form_colors const * FormPreferences::Colors::dialog()
 {
-       delete dialog_;
+       return dialog_.get();
 }
 
 
@@ -478,7 +467,7 @@ void FormPreferences::Colors::apply()
 
 void FormPreferences::Colors::build()
 {
-       dialog_ = parent_.build_colors();
+       dialog_.reset(parent_.build_colors());
 
        fl_set_object_color(dialog_->button_color,
                            GUI_COLOR_CHOICE, GUI_COLOR_CHOICE);
@@ -944,9 +933,14 @@ string const FormPreferences::Colors::X11hexname(RGBColor const & col) const
 }
 
 
-FormPreferences::Converters::~Converters()
+FormPreferences::Converters::Converters(FormPreferences & p)
+       : parent_(p)
+{}
+
+
+FD_form_converters const * FormPreferences::Converters::dialog()
 {
-       delete dialog_;
+       return dialog_.get();
 }
 
 
@@ -960,7 +954,7 @@ void FormPreferences::Converters::apply() const
 
 void FormPreferences::Converters::build()
 {
-       dialog_ = parent_.build_converters();
+       dialog_.reset(parent_.build_converters());
 
        fl_set_input_return(dialog_->input_converter, FL_RETURN_CHANGED);
        fl_set_input_return(dialog_->input_flags, FL_RETURN_CHANGED);
@@ -1201,9 +1195,14 @@ void FormPreferences::Converters::UpdateChoices() const
 }
 
 
-FormPreferences::Formats::~Formats()
+FormPreferences::Formats::Formats( FormPreferences &  p )
+       : parent_(p)
+{}
+
+
+FD_form_formats const * FormPreferences::Formats::dialog()
 {
-       delete dialog_;
+       return dialog_.get();
 }
 
 
@@ -1215,7 +1214,7 @@ void FormPreferences::Formats::apply() const
 
 void FormPreferences::Formats::build()
 {
-       dialog_ = parent_.build_formats();
+       dialog_.reset(parent_.build_formats());
 
        fl_set_input_return(dialog_->input_format, FL_RETURN_CHANGED);
        fl_set_input_return(dialog_->input_viewer, FL_RETURN_CHANGED);
@@ -1421,9 +1420,14 @@ bool FormPreferences::Formats::Input()
 }
 
 
-FormPreferences::InputsMisc::~InputsMisc()
+FormPreferences::InputsMisc::InputsMisc( FormPreferences &  p )
+       : parent_(p)
+{}
+
+
+FD_form_inputs_misc const * FormPreferences::InputsMisc::dialog()
 {
-       delete dialog_;
+       return dialog_.get();
 }
 
 
@@ -1436,7 +1440,7 @@ void FormPreferences::InputsMisc::apply() const
 
 void FormPreferences::InputsMisc::build()
 {
-       dialog_ = parent_.build_inputs_misc();
+       dialog_.reset(parent_.build_inputs_misc());
 
        fl_set_input_return(dialog_->input_date_format, FL_RETURN_CHANGED);
 
@@ -1464,9 +1468,14 @@ void FormPreferences::InputsMisc::update()
 }
 
 
-FormPreferences::Interface::~Interface()
+FormPreferences::Interface::Interface( FormPreferences &  p )
+       : parent_(p)
+{}
+
+
+FD_form_interface const * FormPreferences::Interface::dialog()
 {
-       delete dialog_;
+       return dialog_.get();
 }
 
 
@@ -1486,7 +1495,7 @@ void FormPreferences::Interface::apply() const
 
 void FormPreferences::Interface::build()
 {
-       dialog_ = parent_.build_interface();
+       dialog_.reset(parent_.build_interface());
 
        fl_set_input_return(dialog_->input_popup_font, FL_RETURN_CHANGED);
        fl_set_input_return(dialog_->input_menu_font, FL_RETURN_CHANGED);
@@ -1576,10 +1585,14 @@ void FormPreferences::Interface::update()
 }
 
 
-FormPreferences::Language::~Language()
+FormPreferences::Language::Language( FormPreferences &  p )
+       : parent_(p)
+{}
+
+
+FD_form_language const * FormPreferences::Language::dialog()
 {
-       delete combo_default_lang;
-       delete dialog_;
+       return dialog_.get();
 }
 
 
@@ -1628,7 +1641,7 @@ void FormPreferences::Language::apply()
 
 void FormPreferences::Language::build()
 {
-       dialog_ = parent_.build_language();
+       dialog_.reset(parent_.build_language());
 
        fl_set_input_return(dialog_->input_package, FL_RETURN_CHANGED);
        fl_set_input_return(dialog_->input_command_begin, FL_RETURN_CHANGED);
@@ -1640,7 +1653,7 @@ void FormPreferences::Language::build()
 
        FL_OBJECT * obj = dialog_->choice_default_lang;
        fl_deactivate_object(dialog_->choice_default_lang);
-       combo_default_lang = new Combox(FL_COMBOX_DROPLIST);
+       combo_default_lang.reset(new Combox(FL_COMBOX_DROPLIST));
        combo_default_lang->add(obj->x, obj->y, obj->w, obj->h, 400,
                                parent_.lang_opts_tab_->tabfolder_outer,
                                parent_.dialog_->tabfolder_prefs);
@@ -1688,7 +1701,7 @@ FormPreferences::Language::feedback(FL_OBJECT const * const ob) const
 {
        string str;
 
-       if (reinterpret_cast<Combox const *>(ob) == combo_default_lang)
+       if (reinterpret_cast<Combox const *>(ob) == combo_default_lang.get())
                str = lyxrc.getDescription(LyXRC::RC_DEFAULT_LANGUAGE);
        else if (ob == dialog_->check_use_kbmap)
                str = lyxrc.getDescription(LyXRC::RC_KBMAP);
@@ -1800,13 +1813,18 @@ void FormPreferences::Language::ComboCB(int, void * v, Combox * combox)
     FormPreferences * pre = static_cast<FormPreferences*>(v);
     // This is safe, as nothing is done to the pointer, other than
     // to use its address in a block-if statement.
-    pre->bc_.valid(pre->input(reinterpret_cast<FL_OBJECT *>(combox), 0));
+    pre->bc().valid(pre->input(reinterpret_cast<FL_OBJECT *>(combox), 0));
 }
 
 
-FormPreferences::LnFmisc::~LnFmisc()
+FormPreferences::LnFmisc::LnFmisc( FormPreferences &  p )
+       : parent_(p)
+{}
+
+
+FD_form_lnf_misc const * FormPreferences::LnFmisc::dialog()
 {
-       delete dialog_;
+       return dialog_.get();
 }
 
 
@@ -1830,7 +1848,7 @@ void FormPreferences::LnFmisc::apply() const
 
 void FormPreferences::LnFmisc::build()
 {
-       dialog_ = parent_.build_lnf_misc();
+       dialog_.reset(parent_.build_lnf_misc());
 
        fl_set_counter_step(dialog_->counter_autosave, 1, 10);
        fl_set_counter_step(dialog_->counter_wm_jump, 1, 10);
@@ -1891,9 +1909,14 @@ void FormPreferences::LnFmisc::update()
 }
 
 
-FormPreferences::OutputsMisc::~OutputsMisc()
+FormPreferences::OutputsMisc::OutputsMisc( FormPreferences &  p )
+       : parent_(p)
+{}
+
+
+FD_form_outputs_misc const * FormPreferences::OutputsMisc::dialog()
 {
-       delete dialog_;
+       return dialog_.get();
 }
 
 
@@ -1914,7 +1937,7 @@ void FormPreferences::OutputsMisc::apply() const
 
 void FormPreferences::OutputsMisc::build()
 {
-       dialog_ = parent_.build_outputs_misc();
+       dialog_.reset(parent_.build_outputs_misc());
 
        fl_set_counter_step(dialog_->counter_line_len, 1, 10);
 
@@ -1970,9 +1993,14 @@ void FormPreferences::OutputsMisc::update()
 }
 
 
-FormPreferences::Paths::~Paths()
+FormPreferences::Paths::Paths( FormPreferences &  p )
+       : parent_(p)
+{}
+
+
+FD_form_paths const * FormPreferences::Paths::dialog()
 {
-       delete dialog_;
+       return dialog_.get();
 }
 
 
@@ -2013,7 +2041,7 @@ void FormPreferences::Paths::apply()
 
 void FormPreferences::Paths::build()
 {
-       dialog_ = parent_.build_paths();
+       dialog_.reset(parent_.build_paths());
 
        fl_set_input_return(dialog_->input_default_path, FL_RETURN_CHANGED);
        fl_set_input_return(dialog_->input_template_path, FL_RETURN_CHANGED);
@@ -2228,9 +2256,14 @@ void FormPreferences::Paths::update()
 }
 
 
-FormPreferences::Printer::~Printer()
+FormPreferences::Printer::Printer(FormPreferences &  p)
+       : parent_(p)
+{}
+
+
+FD_form_printer const * FormPreferences::Printer::dialog()
 {
-       delete dialog_;
+       return dialog_.get();
 }
 
 
@@ -2310,7 +2343,7 @@ FormPreferences::Printer::feedback(FL_OBJECT const * const ob) const
 
 void FormPreferences::Printer::build()
 {
-       dialog_ = parent_.build_printer();
+       dialog_.reset(parent_.build_printer());
 
        fl_set_input_return(dialog_->input_command, FL_RETURN_CHANGED);
        fl_set_input_return(dialog_->input_page_range, FL_RETURN_CHANGED);
@@ -2393,9 +2426,14 @@ void FormPreferences::Printer::update()
 }
 
 
-FormPreferences::ScreenFonts::~ScreenFonts()
+FormPreferences::ScreenFonts::ScreenFonts( FormPreferences &  p )
+       : parent_(p)
+{}
+
+
+FD_form_screen_fonts const * FormPreferences::ScreenFonts::dialog()
 {
-       delete dialog_;
+       return dialog_.get();
 }
 
 
@@ -2517,7 +2555,7 @@ void FormPreferences::ScreenFonts::apply() const
 
 void FormPreferences::ScreenFonts::build()
 {
-       dialog_ = parent_.build_screen_fonts();
+       dialog_.reset(parent_.build_screen_fonts());
 
        fl_set_counter_step(dialog_->counter_zoom, 1, 10);
        fl_set_counter_step(dialog_->counter_dpi,  1, 10);
@@ -2695,9 +2733,15 @@ void FormPreferences::ScreenFonts::update()
 }
 
 
-FormPreferences::SpellChecker::~SpellChecker()
+
+FormPreferences::SpellChecker::SpellChecker( FormPreferences &  p )
+       : parent_(p)
+{}
+
+
+FD_form_spellchecker const * FormPreferences::SpellChecker::dialog()
 {
-       delete dialog_;
+       return dialog_.get();
 }
 
 
@@ -2761,7 +2805,7 @@ void FormPreferences::SpellChecker::apply()
 
 void FormPreferences::SpellChecker::build()
 {
-       dialog_ = parent_.build_spellchecker();
+       dialog_.reset(parent_.build_spellchecker());
 
        fl_addto_choice(dialog_->choice_spell_command,
                        _(" none | ispell | aspell "));
@@ -2912,8 +2956,7 @@ void FormPreferences::printWarning(string const & warning)
        warningPosted = true;
 
        string str = _("WARNING!") + string(" ") + warning;
-       str = formatted(str, dialog_->text_warning->w-10,
-                        FL_SMALL_SIZE, FL_NORMAL_STYLE);
+       str = formatted(str, dialog_->text_warning->w-10, FL_SMALL_SIZE);
 
        fl_set_object_label(dialog_->text_warning, str.c_str());
        fl_set_object_lsize(dialog_->text_warning, FL_SMALL_SIZE);
index da1ea04e0f0de400df4f75c5203f3f88c96b69ec..c6d6ab45147bd096c72d8057836c398f7198b6f1 100644 (file)
 #ifndef FORMPREFERENCES_H
 #define FORMPREFERENCES_H
 
+#include <utility> // pair
+#include <boost/smart_ptr.hpp>
+
 #ifdef __GNUG_
 #pragma interface
 #endif
 
-#include <utility> // pair
-#include "FormBase.h"
+#include "FormBaseDeprecated.h"
 #include "Color.h" // NamedColor
-#include "xforms_helpers.h" // XformsColor
+#include "xforms_helpers.h" // XformColor
+#include "xformsBC.h"
 
 class Combox;
 class Dialogs;
@@ -54,12 +57,12 @@ public:
        /// #FormPreferences x(LyXFunc ..., Dialogs ...);#
        FormPreferences(LyXView *, Dialogs *);
        ///
-       ~FormPreferences();
-       ///
        static int FeedbackCB(FL_OBJECT *, int,
                              FL_Coord, FL_Coord, int, void *);
 
 private:
+       /// Pointer to the actual instantiation of the ButtonController.
+       virtual xformsBC & bc();
        /// Connect signals etc. Set form's max size.
        virtual void connect();
        /// Disconnect signals. Also perform any necessary housekeeping.
@@ -128,17 +131,17 @@ private:
        FD_form_spellchecker * build_spellchecker();
 
        /// Real GUI implementation.
-       FD_form_preferences * dialog_;
+       boost::scoped_ptr<FD_form_preferences> dialog_;
        /// Converters tabfolder
-       FD_form_outer_tab * converters_tab_;
+       boost::scoped_ptr<FD_form_outer_tab> converters_tab_;
        /// reLyX and other import/input stuff
-       FD_form_outer_tab * inputs_tab_;
+       boost::scoped_ptr<FD_form_outer_tab> inputs_tab_;
        /// HCI configuration
-       FD_form_outer_tab * look_n_feel_tab_;
+       boost::scoped_ptr<FD_form_outer_tab> look_n_feel_tab_;
        /// Outputs tabfolder
-       FD_form_outer_tab * outputs_tab_;
+       boost::scoped_ptr<FD_form_outer_tab> outputs_tab_;
        /// Spellchecker, language stuff, etc
-       FD_form_outer_tab * lang_opts_tab_;
+       boost::scoped_ptr<FD_form_outer_tab> lang_opts_tab_;
 
        /** Flag whether a warning has been posted to the text window.
            If so, don't redraw the window when the mouse leaves an object. */
@@ -156,11 +159,9 @@ private:
                        GUI_COLOR_CURSOR = FL_FREE_COL3
                };
                ///
-               Colors( FormPreferences & p ) : parent_(p), dialog_(0) {}
-               ///
-               ~Colors();
+               Colors( FormPreferences & p );
                ///
-               FD_form_colors const * dialog() { return dialog_; }
+               FD_form_colors const * dialog();
                ///
                void apply(); // not const as modifies modifiedXformsPrefs.
                ///
@@ -196,7 +197,7 @@ private:
                ///
                FormPreferences & parent_;
                ///
-               FD_form_colors * dialog_;
+               boost::scoped_ptr<FD_form_colors> dialog_;
 
                /// A vector of LyX LColor GUI name and associated RGB color.
                std::vector<NamedColor> lyxColorDB;
@@ -210,11 +211,9 @@ private:
        class Converters {
        public:
                ///
-               Converters( FormPreferences & p ) : parent_(p), dialog_(0) {}
+               Converters( FormPreferences & p );
                ///
-               ~Converters();
-               ///
-               FD_form_converters const * dialog() { return dialog_; }
+               FD_form_converters const * dialog();
                ///
                void apply() const;
                ///
@@ -247,7 +246,7 @@ private:
                ///
                FormPreferences & parent_;
                ///
-               FD_form_converters * dialog_;
+               boost::scoped_ptr<FD_form_converters> dialog_;
        };
        ///
        friend class Converters;
@@ -256,11 +255,9 @@ private:
        class Formats {
        public:
                ///
-               Formats( FormPreferences &  p ) : parent_(p), dialog_(0) {}
-               ///
-               ~Formats();
+               Formats( FormPreferences &  p );
                ///
-               FD_form_formats const * dialog() { return dialog_; }
+               FD_form_formats const * dialog();
                ///
                void apply() const;
                ///
@@ -287,7 +284,7 @@ private:
                ///
                FormPreferences & parent_;
                ///
-               FD_form_formats * dialog_;
+               boost::scoped_ptr<FD_form_formats> dialog_;
        };
        ///
        friend class Formats;
@@ -296,11 +293,9 @@ private:
        class InputsMisc {
        public:
                ///
-               InputsMisc( FormPreferences &  p ) : parent_(p), dialog_(0) {}
-               ///
-               ~InputsMisc();
+               InputsMisc( FormPreferences &  p );
                ///
-               FD_form_inputs_misc const * dialog() { return dialog_; }
+               FD_form_inputs_misc const * dialog();
                ///
                void apply() const;
                ///
@@ -314,7 +309,7 @@ private:
                ///
                FormPreferences & parent_;
                ///
-               FD_form_inputs_misc * dialog_;
+               boost::scoped_ptr<FD_form_inputs_misc> dialog_;
        };
        ///
        friend class InputsMisc;
@@ -323,11 +318,9 @@ private:
        class Interface {
        public:
                ///
-               Interface( FormPreferences &  p ) : parent_(p), dialog_(0) {}
+               Interface( FormPreferences &  p );
                ///
-               ~Interface();
-               ///
-               FD_form_interface const * dialog() { return dialog_; }
+               FD_form_interface const * dialog();
                ///
                void apply() const;
                ///
@@ -343,7 +336,7 @@ private:
                ///
                FormPreferences & parent_;
                ///
-               FD_form_interface * dialog_;
+               boost::scoped_ptr<FD_form_interface> dialog_;
        };
        ///
        friend class Interface;
@@ -352,12 +345,9 @@ private:
        class Language {
        public:
                ///
-               Language( FormPreferences &  p )
-                       : parent_(p), dialog_(0), combo_default_lang(0) {}
-               ///
-               ~Language();
+               Language( FormPreferences &  p );
                ///
-               FD_form_language const * dialog() { return dialog_; }
+               FD_form_language const * dialog();
                ///
                void apply(); // not const because calls update()
                ///
@@ -375,9 +365,9 @@ private:
                ///
                FormPreferences & parent_;
                ///
-               FD_form_language * dialog_;
+               boost::scoped_ptr<FD_form_language> dialog_;
                ///
-               Combox * combo_default_lang;
+               boost::scoped_ptr<Combox> combo_default_lang;
        };
        ///
        friend class Language;
@@ -386,11 +376,9 @@ private:
        class LnFmisc {
        public:
                ///
-               LnFmisc( FormPreferences &  p ) : parent_(p), dialog_(0) {}
+               LnFmisc( FormPreferences &  p );
                ///
-               ~LnFmisc();
-               ///
-               FD_form_lnf_misc const * dialog() { return dialog_; }
+               FD_form_lnf_misc const * dialog();
                ///
                void apply() const;
                ///
@@ -404,7 +392,7 @@ private:
                ///
                FormPreferences & parent_;
                ///
-               FD_form_lnf_misc * dialog_;
+               boost::scoped_ptr<FD_form_lnf_misc> dialog_;
        };
        ///
        friend class LnFmisc;
@@ -413,11 +401,9 @@ private:
        class OutputsMisc {
        public:
                ///
-               OutputsMisc( FormPreferences &  p ) : parent_(p), dialog_(0) {}
-               ///
-               ~OutputsMisc();
+               OutputsMisc( FormPreferences &  p );
                ///
-               FD_form_outputs_misc const * dialog() { return dialog_; }
+               FD_form_outputs_misc const * dialog();
                ///
                void apply() const;
                ///
@@ -431,7 +417,7 @@ private:
                ///
                FormPreferences & parent_;
                ///
-               FD_form_outputs_misc * dialog_;
+               boost::scoped_ptr<FD_form_outputs_misc> dialog_;
        };
        ///
        friend class OutputsMisc;
@@ -440,11 +426,9 @@ private:
        class Paths {
        public:
                ///
-               Paths( FormPreferences &  p ) : parent_(p), dialog_(0) {}
-               ///
-               ~Paths();
+               Paths( FormPreferences &  p );
                ///
-               FD_form_paths const * dialog() { return dialog_; }
+               FD_form_paths const * dialog();
                ///
                void apply();
                ///
@@ -460,7 +444,7 @@ private:
                ///
                FormPreferences & parent_;
                ///
-               FD_form_paths * dialog_;
+               boost::scoped_ptr<FD_form_paths> dialog_;
        };
        ///
        friend class Paths;
@@ -469,11 +453,9 @@ private:
        class Printer {
        public:
                ///
-               Printer( FormPreferences &  p ) : parent_(p), dialog_(0) {}
+               Printer( FormPreferences &  p );
                ///
-               ~Printer();
-               ///
-               FD_form_printer const * dialog() { return dialog_; }
+               FD_form_printer const * dialog();
                ///
                void apply() const;
                ///
@@ -487,7 +469,7 @@ private:
                ///
                FormPreferences & parent_;
                ///
-               FD_form_printer * dialog_;
+               boost::scoped_ptr<FD_form_printer> dialog_;
        };
        ///
        friend class Printer;
@@ -496,11 +478,9 @@ private:
        class ScreenFonts {
        public:
                ///
-               ScreenFonts( FormPreferences &  p ) : parent_(p), dialog_(0) {}
-               ///
-               ~ScreenFonts();
+               ScreenFonts( FormPreferences &  p );
                ///
-               FD_form_screen_fonts const * dialog() { return dialog_; }
+               FD_form_screen_fonts const * dialog();
                ///
                void apply() const;
                ///
@@ -516,7 +496,7 @@ private:
                ///
                FormPreferences & parent_;
                ///
-               FD_form_screen_fonts * dialog_;
+               boost::scoped_ptr<FD_form_screen_fonts> dialog_;
        };
        ///
        friend class ScreenFonts;
@@ -525,11 +505,9 @@ private:
        class SpellChecker {
        public:
                ///
-               SpellChecker( FormPreferences &  p ) : parent_(p), dialog_(0) {}
+               SpellChecker( FormPreferences &  p );
                ///
-               ~SpellChecker();
-               ///
-               FD_form_spellchecker const * dialog() { return dialog_; }
+               FD_form_spellchecker const * dialog();
                ///
                void apply(); // not const because calls update()!
                ///
@@ -545,7 +523,7 @@ private:
                ///
                FormPreferences & parent_;
                ///
-               FD_form_spellchecker * dialog_;
+               boost::scoped_ptr<FD_form_spellchecker> dialog_;
        };
        ///
        friend class SpellChecker;
@@ -595,7 +573,15 @@ private:
                ///
                RGBColor col;
        };
-
+       /// The ButtonController
+       ButtonController<PreferencesPolicy, xformsBC> bc_;
 };
 
+
+inline
+xformsBC & FormPreferences::bc()
+{
+       return bc_;
+}
+
 #endif
index b9d9542b2448d3dea368cfe92dac00337363cf37..d9ad659b49d75cf58962d8ccecb90ab6220212a6 100644 (file)
@@ -36,8 +36,8 @@ using Liason::getPrinterParams;
 using std::make_pair;
 
 FormPrint::FormPrint(LyXView * lv, Dialogs * d)
-       : FormBaseBD(lv, d, _("Print"), new OkApplyCancelPolicy),
-         dialog_(0), target_(2), order_(2), which_(3)
+       : FormBaseBD(lv, d, _("Print")),
+         target_(2), order_(2), which_(3)
 {
        // let the dialog be shown
        // This is a permanent connection so we won't bother
@@ -46,25 +46,19 @@ FormPrint::FormPrint(LyXView * lv, Dialogs * d)
 }
 
 
-FormPrint::~FormPrint()
-{
-       delete dialog_;
-}
-
-
 void FormPrint::build()
 {
-       dialog_ = build_print();
+       dialog_.reset(build_print());
 
        // Workaround dumb xforms sizing bug
        minw_ = form()->w;
        minh_ = form()->h;
 
        // Manage the ok, apply and cancel/close buttons
-       bc_.setOK(dialog_->button_ok);
-       bc_.setApply(dialog_->button_apply);
-       bc_.setCancel(dialog_->button_cancel);
-       bc_.refresh();
+       bc().setOK(dialog_->button_ok);
+       bc().setApply(dialog_->button_apply);
+       bc().setCancel(dialog_->button_cancel);
+       bc().refresh();
 
        // allow controlling of input and ok/apply (de)activation
        fl_set_input_return(dialog_->input_printer,
@@ -115,7 +109,8 @@ void FormPrint::build()
 
 FL_FORM * FormPrint::form() const
 {
-       if (dialog_) return dialog_->form;
+       if (dialog_.get())
+               return dialog_->form;
        return 0;
 }
 
@@ -162,7 +157,7 @@ void FormPrint::apply()
 
 void FormPrint::update()
 {
-       if (dialog_
+       if (dialog_.get()
            && lv_->view()->available()) {
                PrinterParams pp(getPrinterParams(lv_->buffer()));
 
@@ -196,7 +191,7 @@ void FormPrint::update()
 
                fl_set_input(dialog_->input_count,
                             tostr(pp.count_copies).c_str());
-               bc_.valid(true);
+               bc().valid(true);
        }
 }
 
index aee8d8c6bdf00ed45035823cbd3340226dba2e34..45aeca3cc6a9a7a703cb3a54f63622b3441a5eb3 100644 (file)
 #ifndef FORMPRINT_H
 #define FORMPRINT_H
 
-#include "FormBase.h"
-#include "RadioButtonGroup.h"
+#include <boost/smart_ptr.hpp>
 
 #ifdef __GNUG__
 #pragma interface
 #endif
 
+#include "FormBaseDeprecated.h"
+#include "RadioButtonGroup.h"
+#include "xformsBC.h"
+
 class LyXView;
 class Dialogs;
 struct FD_form_print;
@@ -35,10 +38,10 @@ class FormPrint : public FormBaseBD {
 public:
        /// #FormPrint x(LyXView ..., Dialogs ...);#
        FormPrint(LyXView *, Dialogs *);
-       ///
-       ~FormPrint();
 
 private:
+       /// Pointer to the actual instantiation of the ButtonController.
+       virtual xformsBC & bc();
        /// Update the dialog.
        virtual void update();
        /// Apply from dialog
@@ -56,13 +59,21 @@ private:
        FD_form_print * build_print();
        
        /// Real GUI implementation.
-       FD_form_print * dialog_;
+       boost::scoped_ptr<FD_form_print> dialog_;
        /// print target
        RadioButtonGroup target_;
        /// page order
        RadioButtonGroup order_;
        /// which pages
        RadioButtonGroup which_;
+       /// The ButtonController
+       ButtonController<OkApplyCancelPolicy, xformsBC> bc_;
 };
 
+
+inline
+xformsBC & FormPrint::bc()
+{
+       return bc_;
+}
 #endif
index bf8fd574c0506de21d3c6bedfc958e8c9d2e4d97..f649b060541a16e989e1c2511948c8665dcfc125 100644 (file)
@@ -35,8 +35,8 @@ using std::vector;
 bool saved_position;
 
 FormRef::FormRef(LyXView * lv, Dialogs * d)
-       : FormCommand(lv, d, _("Reference"), new NoRepeatedApplyPolicy),
-         at_ref(false), dialog_(0)
+       : FormCommand(lv, d, _("Reference")),
+         at_ref(false)
 {
        // let the dialog be shown
        // These are permanent connections so we won't bother
@@ -46,15 +46,10 @@ FormRef::FormRef(LyXView * lv, Dialogs * d)
 }
 
 
-FormRef::~FormRef()
-{
-       delete dialog_;
-}
-
-
 FL_FORM * FormRef::form() const
 {
-       if (dialog_) return dialog_->form;
+       if (dialog_.get())
+               return dialog_->form;
        return 0;
 }
 
@@ -68,7 +63,7 @@ void FormRef::disconnect()
 
 void FormRef::build()
 {
-       dialog_ = build_ref();
+       dialog_.reset(build_ref());
 
        for (int i = 0; !InsetRef::types[i].latex_name.empty(); ++i)
                fl_addto_choice(dialog_->type,
@@ -82,15 +77,15 @@ void FormRef::build()
        fl_deactivate_object(dialog_->ref);
 
         // Manage the ok and cancel/close buttons
-       bc_.setOK(dialog_->button_ok);
-       bc_.setApply(dialog_->button_apply);
-       bc_.setCancel(dialog_->button_cancel);
-       bc_.setUndoAll(dialog_->button_restore);
-       bc_.refresh();
+       bc().setOK(dialog_->button_ok);
+       bc().setApply(dialog_->button_apply);
+       bc().setCancel(dialog_->button_cancel);
+       bc().setUndoAll(dialog_->button_restore);
+       bc().refresh();
 
 #warning I had to uncomment this so the buttons could be disabled in update() (dekel)
-       //bc_.addReadOnly(dialog_->type);
-       //bc_.addReadOnly(dialog_->name);
+       //bc().addReadOnly(dialog_->type);
+       //bc().addReadOnly(dialog_->name);
 }
 
 
@@ -121,7 +116,7 @@ void FormRef::update()
        refs = lv_->buffer()->getLabelList();
        updateBrowser(refs);
 
-       bc_.readOnly(lv_->buffer()->isReadonly());
+       bc().readOnly(lv_->buffer()->isReadonly());
 }
 
 
index e899ee92dc3100bbbbae6a9583b075e9e7954e8d..c455414cf402a201d65dbae34a728d24e57566be 100644 (file)
 #ifndef FORMREF_H
 #define FORMREF_H
 
+#include <boost/smart_ptr.hpp>
+
 #ifdef __GNUG__
 #pragma interface
 #endif
 
 #include "FormInset.h"
+#include "xformsBC.h"
+
 struct FD_form_ref;
 
 /** This class provides an XForms implementation of the FormRef Dialog.
@@ -25,10 +29,9 @@ class FormRef : public FormCommand {
 public:
        ///
        FormRef(LyXView *, Dialogs *);
-       ///
-       ~FormRef();
-       ///
 private:
+       /// Pointer to the actual instantiation of the ButtonController.
+       virtual xformsBC & bc();
        /// Disconnect signals. Also perform any necessary housekeeping.
        virtual void disconnect();
 
@@ -54,7 +57,15 @@ private:
        std::vector<string> refs;
 
        /// Real GUI implementation.
-       FD_form_ref * dialog_;
+       boost::scoped_ptr<FD_form_ref> dialog_;
+       /// The ButtonController
+       ButtonController<NoRepeatedApplyPolicy, xformsBC> bc_;
 };
 
+
+inline
+xformsBC & FormRef::bc()
+{
+       return bc_;
+}
 #endif
index 8cca31c2e95805a0e45479d562ba2933fe40e569..5f87c1c7d56e7f86afcd2333ab7ac2ffec2088b0 100644 (file)
@@ -8,6 +8,10 @@
 
 #include <config.h>
 
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
 #include "FormSearch.h"
 #include "form_search.h"
 #include "gettext.h"
@@ -25,8 +29,7 @@ using Liason::setMinibuffer;
 
 
 FormSearch::FormSearch(LyXView * lv, Dialogs * d)
-       : FormBaseBD(lv, d, _("LyX: Find and Replace"), new NoRepeatedApplyReadOnlyPolicy),
-       dialog_(0)
+       : FormBaseBD(lv, d, _("LyX: Find and Replace"))
 {
     // let the popup be shown
     // This is a permanent connection so we won't bother
@@ -38,22 +41,16 @@ FormSearch::FormSearch(LyXView * lv, Dialogs * d)
 }
 
 
-FormSearch::~FormSearch()
-{
-   delete dialog_;
-}
-
-
 FL_FORM * FormSearch::form() const
 {
-    if (dialog_) 
-     return dialog_->form;
+    if (dialog_.get()
+           return dialog_->form;
     return 0;
 }
 
 void FormSearch::build()
 {
-   dialog_ = build_search();
+   dialog_.reset(build_search());
    // Workaround dumb xforms sizing bug
    minw_ = form()->w;
    minh_ = form()->h;
@@ -68,7 +65,7 @@ void FormSearch::build()
 
 void FormSearch::update()
 {
-   if (!dialog_)
+   if (!dialog_.get())
      return;
 
    bc_.readOnly(lv_->buffer()->isReadonly());
index 66ad7acf4682b1228ffe7781cf4c980db3ff9287..7167f2fa2692441c3d634079d7b16f36153280be 100644 (file)
@@ -9,7 +9,14 @@
 #ifndef FORMSEARCH_H
 #define FORMSEARCH_H
 
-#include "FormBase.h"
+#include <boost/smart_ptr.hpp>
+
+#ifdef __GNUG__
+#pragma interface
+#endif
+
+#include "FormBaseDeprecated.h"
+#include "xformsBC.h"
 
 struct FD_form_search;
 class LyXView;
@@ -19,40 +26,45 @@ class Dialogs;
  */
 class FormSearch : public FormBaseBD {
 public:
-   ///
-   FormSearch(LyXView *, Dialogs *);
-   ///
-   ~FormSearch();
+       ///
+       FormSearch(LyXView *, Dialogs *);
    
 private:
-   /** Redraw the form (on receipt of a Signal indicating, for example,
-    *  that the xform colours have been re-mapped). 
-    */
+       /// Pointer to the actual instantiation of the ButtonController.
+       virtual xformsBC & bc();
 
-   /// Filter the inputs
-   virtual bool input(FL_OBJECT *, long);
+       /// Filter the inputs
+       virtual bool input(FL_OBJECT *, long);
    
-   /// Build the popup
-   virtual void build();
-
-   /// Update the popup
-   virtual void update();
-
-   /// Searches occurance of string
-   /// if argument=true forward search otherwise backward search
-   void Find(bool const = true);
-   /// if argument=false replace once otherwise replace all
-   /// Replaces occurance of string
-   void Replace(bool const = false);
+       /// Build the popup
+       virtual void build();
+
+       /// Update the popup
+       virtual void update();
+
+       /// Searches occurance of string
+       /// if argument=true forward search otherwise backward search
+       void Find(bool const = true);
+       /// if argument=false replace once otherwise replace all
+       /// Replaces occurance of string
+       void Replace(bool const = false);
    
-   ///
-   virtual FL_FORM * form() const;
+       ///
+       virtual FL_FORM * form() const;
    
-   /// Typedefinitions from the fdesign produced Header file
-   FD_form_search  * build_search();
+       /// Typedefinitions from the fdesign produced Header file
+       FD_form_search  * build_search();
    
-   /// Real GUI implementation.
-   FD_form_search  * dialog_;
+       /// Real GUI implementation.
+       boost::scoped_ptr<FD_form_search> dialog_;
+       /// The ButtonController
+       ButtonController<NoRepeatedApplyReadOnlyPolicy, xformsBC> bc_;
 };
 
+
+inline
+xformsBC & FormSearch::bc()
+{
+       return bc_;
+}
 #endif
index 2316751d006fbe70be8439c553b8cbdc038e9fa5..18b4a90bc772ec8ec0ed1549eeb9552af3b1c4be 100644 (file)
@@ -38,25 +38,21 @@ extern "C" void C_FormSplashCB(FL_OBJECT * ob, long)
        FormSplash * form = static_cast<FormSplash*>(ob->form->u_vdata);
        form->hide();
 }
+
  
 FormSplash::FormSplash(LyXView *, Dialogs * d)
-       : dialog_(0), d_(d)
+       : d_(d)
 {
        c_ = d->showSplash.connect(slot(this, &FormSplash::show));
 }
 
 
-FormSplash::~FormSplash()
-{
-       c_.disconnect();
-       delete dialog_;
-}
-
-
 void FormSplash::show()
 {
-       if (!dialog_) {
+       if (!lyxrc.show_banner)
+               return;
+
+       if (!dialog_.get()) {
                build();
                fl_set_form_atclose(dialog_->form, C_FormSplashCloseCB, 0);
        }
@@ -78,21 +74,20 @@ void FormSplash::show()
 
 void FormSplash::hide()
 {
+       c_.disconnect();
+       if (dialog_->form && dialog_->form->visible)
+               fl_hide_form(dialog_->form);
        d_->destroySplash();
 }
 
  
 void FormSplash::build()
 {
-       if (!lyxrc.show_banner)
-               return;
        string banner_file = LibFileSearch("images", "banner", "xpm");
        if (banner_file.empty())
                return;
  
-       dialog_ = build_splash();
+       dialog_.reset(build_splash());
 
        // Workaround dumb xforms sizing bug
        fl_set_form_minsize(dialog_->form, dialog_->form->w, dialog_->form->h);
index ab868f90f118a90cf4f19f2362624f1fa034f14d..2579de3bf4157d215b736f900cc231f8f32d87b9 100644 (file)
 #ifndef FORMSPLASH_H
 #define FORMSPLASH_H
 
+#include <boost/smart_ptr.hpp>
+
 #ifdef __GNUG__
 #pragma interface
 #endif
 
+#include "FormBaseDeprecated.h"
+#include "xformsBC.h"
+
 #include "DialogBase.h"
  
 struct FD_form_splash;
@@ -24,10 +29,9 @@ class LyXView;
  */
 class FormSplash : public DialogBase {
 public:
+       ///
        FormSplash(LyXView *, Dialogs *);
 
-       ~FormSplash();
-
        /// hide (and destroy) the dialog
        void hide();
  
@@ -40,7 +44,7 @@ private:
        FD_form_splash * build_splash();
 
        /// Real GUI implementation.
-       FD_form_splash * dialog_;
+       boost::scoped_ptr<FD_form_splash> dialog_;
        /// our container
        Dialogs * d_; 
        /// the show connection
index ba3dba511310045e175eb8d50f93343337506277..810efead1db6ca50ab4bcfeae1f197cf9970adb2 100644 (file)
 
 #include <config.h>
 
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
 #include "FormTabular.h"
 #include "form_tabular.h"
 #include "LyXView.h"
@@ -24,9 +28,7 @@
 
 
 FormTabular::FormTabular(LyXView * lv, Dialogs * d)
-       : FormInset(lv, d, _("Tabular Layout"), new OkCancelReadOnlyPolicy),
-         dialog_(0), tabular_options_(0), column_options_(0),
-         cell_options_(0), longtable_options_(0),
+       : FormInset(lv, d, _("Tabular Layout")),
          inset_(0), actCell_(-1)
 {
        // let the dialog be shown
@@ -37,16 +39,6 @@ FormTabular::FormTabular(LyXView * lv, Dialogs * d)
 }
 
 
-FormTabular::~FormTabular()
-{
-       delete dialog_;
-       delete tabular_options_;
-       delete column_options_;
-       delete cell_options_;
-       delete longtable_options_;
-}
-
-
 void FormTabular::redraw()
 {
        if(form() && form()->visible)
@@ -62,7 +54,8 @@ void FormTabular::redraw()
 
 FL_FORM * FormTabular::form() const
 {
-       if (dialog_) return dialog_->form;
+       if (dialog_.get())
+               return dialog_->form;
        return 0;
 }
 
@@ -106,11 +99,11 @@ void FormTabular::updateInset(InsetTabular * inset)
 
 void FormTabular::build()
 {
-       dialog_ = build_tabular();
-       tabular_options_ = build_tabular_options();
-       column_options_ = build_column_options();
-       cell_options_ = build_cell_options();
-       longtable_options_ = build_longtable_options();
+       dialog_.reset(build_tabular());
+       tabular_options_.reset(build_tabular_options());
+       column_options_.reset(build_column_options());
+       cell_options_.reset(build_cell_options());
+       longtable_options_.reset(build_longtable_options());
 
        // Workaround dumb xforms sizing bug
        minw_ = form()->w;
index bd890000d7176c597a830056f30074acf65a5838..15051e752c45b64ce421ef90be285c12f0f9e534 100644 (file)
 #ifndef FORMTABULAR_H
 #define FORMTABULAR_H
 
+#include <boost/smart_ptr.hpp>
+
+#ifdef __GNUG__
+#pragma interface
+#endif
+
 #include "FormInset.h"
+#include "xformsBC.h"
 
 class InsetTabular;
 struct FD_form_tabular;
@@ -31,10 +38,10 @@ class FormTabular : public FormInset {
 public:
        /// #FormTabular x(LyXFunc ..., Dialogs ...);#
        FormTabular(LyXView *, Dialogs *);
-       ///
-       ~FormTabular();
 
 private:
+       /// Pointer to the actual instantiation of the ButtonController.
+       virtual xformsBC & bc();
        /** Redraw the form (on receipt of a Signal indicating, for example,
            that the xforms colours have been re-mapped). */
        virtual void redraw();
@@ -66,20 +73,28 @@ private:
        FD_form_longtable_options * build_longtable_options();
 
        /// Real GUI implementation.
-       FD_form_tabular * dialog_;
+       boost::scoped_ptr<FD_form_tabular> dialog_;
        ///
-       FD_form_tabular_options * tabular_options_;
+       boost::scoped_ptr<FD_form_tabular_options> tabular_options_;
        ///
-       FD_form_column_options * column_options_;
+       boost::scoped_ptr<FD_form_column_options> column_options_;
        ///
-       FD_form_cell_options * cell_options_;
+       boost::scoped_ptr<FD_form_cell_options> cell_options_;
        ///
-       FD_form_longtable_options * longtable_options_;
+       boost::scoped_ptr<FD_form_longtable_options> longtable_options_;
 
        /// pointer to the inset passed through showInset
        InsetTabular * inset_;
        ///
        int actCell_;
+       /// The ButtonController
+       ButtonController<OkCancelReadOnlyPolicy, xformsBC> bc_;
 };
 
+
+inline
+xformsBC & FormTabular::bc()
+{
+       return bc_;
+}
 #endif
index 78f93114c5afc19edcfdce8175b63bf3a9af2258..b04a5d80ab3f732c828752dec662b1f978f4d123 100644 (file)
@@ -28,9 +28,7 @@
 #include "support/lstrings.h"
 
 FormTabularCreate::FormTabularCreate(LyXView * lv, Dialogs * d)
-       : FormBaseBD(lv, d, _("Insert Tabular"),
-                    new OkApplyCancelReadOnlyPolicy),
-         dialog_(0)
+       : FormBaseBD(lv, d, _("Insert Tabular"))
 {
        // let the dialog be shown
        // This is a permanent connection so we won't bother
@@ -39,29 +37,24 @@ FormTabularCreate::FormTabularCreate(LyXView * lv, Dialogs * d)
 }
 
 
-FormTabularCreate::~FormTabularCreate()
-{
-       delete dialog_;
-}
-
-
 FL_FORM * FormTabularCreate::form() const
 {
-       if (dialog_) return dialog_->form;
+       if (dialog_.get())
+               return dialog_->form;
        return 0;
 }
 
 
 void FormTabularCreate::connect()
 {
-       bc_.valid(true);
+       bc().valid(true);
        FormBaseBD::connect();
 }
 
 
 void FormTabularCreate::build()
 {
-       dialog_ = build_tabular_create();
+       dialog_.reset(build_tabular_create());
 
        // Workaround dumb xforms sizing bug
        minw_ = form()->w;
@@ -75,10 +68,10 @@ void FormTabularCreate::build()
        fl_set_slider_precision(dialog_->slider_columns, 0);
 
         // Manage the ok, apply and cancel/close buttons
-       bc_.setOK(dialog_->button_ok);
-       bc_.setApply(dialog_->button_apply);
-       bc_.setCancel(dialog_->button_cancel);
-       bc_.refresh();
+       bc().setOK(dialog_->button_ok);
+       bc().setApply(dialog_->button_apply);
+       bc().setCancel(dialog_->button_cancel);
+       bc().refresh();
 }
 
 
@@ -94,5 +87,5 @@ void FormTabularCreate::apply()
 
 void FormTabularCreate::update()
 {
-       bc_.readOnly(lv_->buffer()->isReadonly());
+       bc().readOnly(lv_->buffer()->isReadonly());
 }
index 61d08f1c93d85d3dd3c245186f700b54c477012c..7e71ce366509182d1f570802c847301571893ca3 100644 (file)
 #ifndef FORMTABULARCREATE_H
 #define FORMTABULARCREATE_H
 
-#include "FormBase.h"
+#include <boost/smart_ptr.hpp>
 
 #ifdef __GNUG__
 #pragma interface
 #endif
 
+#include "FormBaseDeprecated.h"
+#include "xformsBC.h"
+
 class LyXView;
 class Dialogs;
 struct FD_form_tabular_create;
@@ -32,10 +35,10 @@ class FormTabularCreate : public FormBaseBD {
 public:
        /// #FormTabularCreate x(LyXView ..., Dialogs ...);#
        FormTabularCreate(LyXView *, Dialogs *);
-       ///
-       ~FormTabularCreate();
 
 private:
+       /// Pointer to the actual instantiation of the ButtonController.
+       virtual xformsBC & bc();
        /// Connect signals etc.
        virtual void connect();
 
@@ -52,7 +55,15 @@ private:
        FD_form_tabular_create * build_tabular_create();
        
        /// Real GUI implementation.
-       FD_form_tabular_create * dialog_;
+       boost::scoped_ptr<FD_form_tabular_create> dialog_;
+       /// The ButtonController
+       ButtonController<OkApplyCancelReadOnlyPolicy, xformsBC> bc_;
 };
 
+
+inline
+xformsBC & FormTabularCreate::bc()
+{
+       return bc_;
+}
 #endif
index d4a59fc02331bc7f857d5d8b3910e11a968be458..0e99e1d0377d2627fa7126d09440423f9533c36c 100644 (file)
 #include "lyxfunc.h"
 #include "support/lstrings.h"
 
+using std::vector;
+
 // The current code uses the apply() for handling the Update button and the
 // type-of-table selection and cancel() for the close button.  This is a little
 // confusing to the button controller so I've made an IgnorantPolicy to cover
 // this situation since the dialog doesn't care about buttons. ARRae 20001013
 FormToc::FormToc(LyXView * lv, Dialogs * d)
-       : FormCommand(lv, d, _("Table of Contents"), new OkCancelPolicy),
+       : FormCommand(lv, d, _("Table of Contents")),
          dialog_(0)
 {
        // let the dialog be shown
@@ -43,15 +45,10 @@ FormToc::FormToc(LyXView * lv, Dialogs * d)
 }
 
 
-FormToc::~FormToc()
-{
-       delete dialog_;
-}
-
-
 FL_FORM * FormToc::form() const
 {
-       if (dialog_ ) return dialog_->form;
+       if (dialog_.get())
+               return dialog_->form;
        return 0;
 }
 
@@ -65,7 +62,7 @@ void FormToc::disconnect()
 
 void FormToc::build()
 {
-       dialog_ = build_toc();
+       dialog_.reset(build_toc());
 
 #if 0
        fl_addto_choice(dialog_->choice_toc_type,
@@ -85,8 +82,8 @@ void FormToc::build()
        minh_ = form()->h;
 
         // Manage the cancel/close button
-       bc_.setCancel(dialog_->button_cancel);
-       bc_.refresh();
+       bc().setCancel(dialog_->button_cancel);
+       bc().refresh();
 }
 
 
index 68f8161a6551bbda46345303491684f00d6e7366..9716c074f6d0256bd7ce4b234fd59ecc2751f68a 100644 (file)
 #ifndef FORMTOC_H
 #define FORMTOC_H
 
+#include <boost/smart_ptr.hpp>
+
 #ifdef __GNUG__
 #pragma interface
 #endif
 
 #include "FormInset.h"
 #include "buffer.h"
+#include "xformsBC.h"
+
 struct FD_form_toc;
 
 /** This class provides an XForms implementation of the FormToc Dialog.
@@ -26,9 +30,9 @@ class FormToc : public FormCommand {
 public:
        ///
        FormToc(LyXView *, Dialogs *);
-       ///
-       ~FormToc();
 private:
+       /// Pointer to the actual instantiation of the ButtonController.
+       virtual xformsBC & bc();
        /// Disconnect signals. Also perform any necessary housekeeping.
        virtual void disconnect();
 
@@ -47,10 +51,18 @@ private:
        ///
        FD_form_toc * build_toc();
 
-       /// Real GUI implementation.
-       FD_form_toc * dialog_;
        ///
        Buffer::SingleList toclist;
+       /// Real GUI implementation.
+       boost::scoped_ptr<FD_form_toc> dialog_;
+       /// The ButtonController
+       ButtonController<OkCancelPolicy, xformsBC> bc_;
 };
 
+
+inline
+xformsBC & FormToc::bc()
+{
+       return bc_;
+}
 #endif
index f14e32633935b742d2cc2cd49c23a67636d7f046..cbcf1046d4f9b4ec43b6ee8bf98a230097c654f3 100644 (file)
@@ -17,7 +17,6 @@
 #pragma implementation
 #endif
 
-
 #include "Dialogs.h"
 #include "FormUrl.h"
 #include "LyXView.h"
@@ -26,8 +25,7 @@
 #include "lyxfunc.h"
 
 FormUrl::FormUrl(LyXView * lv, Dialogs * d)
-       : FormCommand(lv, d, _("Url"), new NoRepeatedApplyReadOnlyPolicy),
-         dialog_(0)
+       : FormCommand(lv, d, _("Url"))
 {
        // let the dialog be shown
        // These are permanent connections so we won't bother
@@ -37,15 +35,9 @@ FormUrl::FormUrl(LyXView * lv, Dialogs * d)
 }
 
 
-FormUrl::~FormUrl()
-{
-       delete dialog_;
-}
-
-
 FL_FORM * FormUrl::form() const
 {
-       if (dialog_) return dialog_->form;
+       if (dialog_.get()) return dialog_->form;
        return 0;
 }
 
@@ -59,7 +51,7 @@ void FormUrl::connect()
 
 void FormUrl::build()
 {
-       dialog_ = build_url();
+       dialog_.reset(build_url());
 
        // Workaround dumb xforms sizing bug
        minw_ = form()->w;
@@ -69,15 +61,15 @@ void FormUrl::build()
        fl_set_input_return(dialog_->url,  FL_RETURN_CHANGED);
 
         // Manage the ok, apply, restore and cancel/close buttons
-       bc_.setOK(dialog_->button_ok);
-       bc_.setApply(dialog_->button_apply);
-       bc_.setCancel(dialog_->button_cancel);
-       bc_.setUndoAll(dialog_->button_restore);
-       bc_.refresh();
-
-       bc_.addReadOnly(dialog_->name);
-       bc_.addReadOnly(dialog_->url);
-       bc_.addReadOnly(dialog_->radio_html);
+       bc().setOK(dialog_->button_ok);
+       bc().setApply(dialog_->button_apply);
+       bc().setCancel(dialog_->button_cancel);
+       bc().setUndoAll(dialog_->button_restore);
+       bc().refresh();
+
+       bc().addReadOnly(dialog_->name);
+       bc().addReadOnly(dialog_->url);
+       bc().addReadOnly(dialog_->radio_html);
 }
 
 
@@ -91,7 +83,7 @@ void FormUrl::update()
        else
                fl_set_button(dialog_->radio_html, 1);
 
-       bc_.readOnly(lv_->buffer()->isReadonly());
+       bc().readOnly(lv_->buffer()->isReadonly());
 }
 
 
index d39c8812e6835fcae4f770a7c4df68ca899a0ff1..3c9fad4f05928d727f19fbfe95a1edd1a0d35bc4 100644 (file)
 #ifndef FORMURL_H
 #define FORMURL_H
 
+#include <boost/smart_ptr.hpp>
+
 #ifdef __GNUG__
 #pragma interface
 #endif
 
 #include "FormInset.h"
+#include "xformsBC.h"
+
 struct FD_form_url;
 
 /** This class provides an XForms implementation of the FormUrl Dialog.
@@ -25,9 +29,9 @@ class FormUrl : public FormCommand {
 public:
        ///
        FormUrl(LyXView *, Dialogs *);
-       ///
-       ~FormUrl();
 private:
+       /// Pointer to the actual instantiation of the ButtonController.
+       virtual xformsBC & bc();
        /// Connect signals etc. Set form's max size.
        virtual void connect();
        /// Build the dialog
@@ -41,7 +45,15 @@ private:
        ///
        FD_form_url * build_url();
        /// Real GUI implementation.
-       FD_form_url * dialog_;
+       boost::scoped_ptr<FD_form_url> dialog_;
+       /// The ButtonController
+       ButtonController<NoRepeatedApplyReadOnlyPolicy, xformsBC> bc_;
 };
 
+
+inline
+xformsBC & FormUrl::bc()
+{
+       return bc_;
+}
 #endif
index 997cdcf792c1817102fd9472a1f6663479c41c4a..188cbeb76c7b2f1a841436f1f0faeea106d565e0 100644 (file)
@@ -32,13 +32,10 @@ FormVCLog::FormVCLog(LyXView * lv, Dialogs * d)
        d->showVCLogFile.connect(slot(this, &FormVCLog::show));
 }
 
-FormVCLog::~FormVCLog()
-{
-}
 
 void FormVCLog::update()
 {
-       if (!dialog_ || !lv_->view()->available())
+       if (!dialog_.get() || !lv_->view()->available())
                return;
  
        const string logfile = lv_->view()->buffer()->lyxvc.getLogFile();
index 345c8569ecf77e9e61df7a990d08bd2abb433c4b..56df0b2ee5791f9d0b430cc09dc65963483b0766 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef FORMVCLOG_H
 #define FORMVCLOG_H
 
-#include "FormBase.h"
+#include "FormBaseDeprecated.h"
 #include "FormBrowser.h"
 
 #ifdef __GNUG__
@@ -25,9 +25,8 @@ class Dialogs;
  */
 class FormVCLog : public FormBrowser {
 public:
+       ///
        FormVCLog(LyXView *, Dialogs *);
-       ~FormVCLog();
-
 private:
        /// Update the dialog.
        virtual void update();
index cc867e24fbdc5403de60c6c11cc79ba12cedd3ae..419654b4001c1f6e940f6787e6cdcd4603cbf267 100644 (file)
@@ -9,11 +9,12 @@
 
 #include <config.h>
 
+#include FORMS_H_LOCATION
+
 #ifdef __GNUG__
 #pragma implementation
 #endif
 
-#include FORMS_H_LOCATION
 #include "GUIRunTime.h"
 #include "debug.h"
 
index a5a2e9bdff8e9ba6aaf8c37463a3ca618a437a94..2e005510df58e8daeac47f882a11bf705a3681c0 100644 (file)
@@ -5,6 +5,7 @@ noinst_LTLIBRARIES = libxforms.la
 BOOST_INCLUDES = -I$(top_srcdir)/boost
 INCLUDES = -I${top_srcdir}/src/ \
        -I${top_srcdir}/src/frontends/ \
+       -I${top_srcdir}/src/frontends/controllers \
        ${SIGC_CFLAGS} $(BOOST_INCLUDES)
 LIBS=
 LDFLAGS=
@@ -12,8 +13,6 @@ LYXDATADIRS = forms
 ETAGS_ARGS = --lang=c++
 # Alphabetical order please.  It makes it easier to figure out what's missing. 
 libxforms_la_SOURCES = \
-       ButtonController.C \
-       ButtonController.h \
        Color.C \
        Color.h \
        Dialogs.C \
@@ -25,6 +24,8 @@ libxforms_la_SOURCES = \
        GUIRunTime.C \
        FormBase.C \
        FormBase.h \
+       FormBaseDeprecated.C \
+       FormBaseDeprecated.h \
        FormBibitem.C \
        FormBibitem.h \
        form_bibitem.C \
@@ -138,7 +139,9 @@ libxforms_la_SOURCES = \
        Toolbar_pimpl.C \
        Toolbar_pimpl.h \
        xforms_helpers.C \
-       xforms_helpers.h
+       xforms_helpers.h \
+       xformsBC.C \
+       xformsBC.h
 
 # These still have to be added. Sooner or later. ARRae-20000411
 #      GUI_defaults.C \
index bea1b71ca1d4e5436d1c5fe0ef6bc91f70b689fd..9ca79d8bdaf6b95d3f5691cb1e7e4655b53d5938 100644 (file)
@@ -7,13 +7,14 @@
 *
 *======================================================*/
 
+#include <config.h>
+
+#include <algorithm>
+
 #ifdef __GNUG__
 #pragma implementation
 #endif
 
-#include <config.h>
-
-#include <algorithm>
 #include "support/lstrings.h"
 #include "support/LAssert.h"
 #include "debug.h"
index 611532d1015be5da6db5db49f10b66e59c3f9007..f284f437786993ef4ecccfe0fc54e1bd2ce4159a 100644 (file)
 #ifndef MENUBAR_PIMPL_H
 #define MENUBAR_PIMPL_H
 
+#include <vector>
+#include <map>
+#include <boost/smart_ptr.hpp>
+#include FORMS_H_LOCATION
+
 #ifdef __GNUG__
 #pragma interface
 #endif
 
-#include <vector>
-#include <map>
-#include <boost/smart_ptr.hpp>
 #include "LString.h"
 #include "frontends/Menubar.h"
 #include "commandtags.h"
-#include FORMS_H_LOCATION
+
 class LyXView;
 class MenuBackend;
 class MenuItem;
index 863aafff1f964496570d85122199cb8e69ddd5de..7d20b97a2ad512bc7e909298c8b8a82f4682c119 100644 (file)
 
 #include <config.h> 
 
+#include <functional>
+#include <algorithm>
+#include <iterator>
+
 #ifdef __GNUG__
 #pragma implementation
 #endif 
@@ -19,9 +23,6 @@
 
 #include "debug.h" // for lyxerr
 
-#include <functional>
-#include <algorithm>
-#include <iterator>
 using std::find_if;
 using std::bind2nd;
 using std::endl;
index 658f8c30910f704f29a0884e95fd6552a33b0f80..bf96b6aca68a263d196d57041380ba1c86eb18d5 100644 (file)
 #ifndef RADIOBUTTONGROUP_H
 #define RADIOBUTTONGROUP_H
 
+#include <vector>
+#include <utility>
+
+#include FORMS_H_LOCATION
+
 #ifdef __GNUG__
 #pragma interface
 #endif 
 
-#include <vector>
-#include <utility>
-
 using std::vector;
 using std::pair;
 
-#include FORMS_H_LOCATION
 
 /** This class simplifies the work with a group of radio buttons,
  * the idea is that you register a bunch of radio buttons with the accompanying
index 3232c982ac050c1e9475d67783fda261bff3f6d9..81a2eab2ca14e5288ed69252d7b2e66fcf6a968e 100644 (file)
@@ -7,14 +7,14 @@
  * \author John Levon
  */
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
 #include <config.h>
 
 #include FORMS_H_LOCATION
 
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
 #include "Timeout_pimpl.h"
 #include "debug.h"
 
index a6efbab180352d37c80d028ecd7be356596d983a..9ee24325a24fe1ac9a598630ddeebc87951d7bfd 100644 (file)
 
 #include <config.h>
 
-#ifdef __GNUG__
-#pragma interface
-#endif
-
 #include "frontends/Timeout.h"
 
 #include <sigc++/signal_system.h>
 
+#ifdef __GNUG__
+#pragma interface
+#endif
+
 /**
  * This class executes the callback when the timeout expires
  * using XForms mechanisms
index bbafe2373ca028bf237149c1917c1fda40f21d9e..0ded184531c22d16c683d09f4f1ef7f60ecb3830 100644 (file)
 #ifndef TOOLBAR_PIMPL_H
 #define TOOLBAR_PIMPL_H
 
-#include "frontends/Toolbar.h"
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
 #include <vector>
 #include FORMS_H_LOCATION
+
+#include "frontends/Toolbar.h"
+
 #include "commandtags.h"
 #include "combox.h"
 #include "ToolbarDefaults.h"
 
+#ifdef __GNUG__
+#pragma interface
+#endif
+
 /** The LyX xforms toolbar class
   */
 struct Toolbar::Pimpl {
index 68c1f44ba3ecf3c45d566e99c92f22df180e0ff6..f650a8098c222ca69ea2f24dd83aad474fe14504 100644 (file)
@@ -31,24 +31,24 @@ FD_form_bibtex * FormBibtex::build_bibtex()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 20, 90, 90, 30, _("OK"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseOKCB, 3);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedOKCB, 3);
   {
     char const * const dummy = N_("Cancel|^[");
     fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 120, 90, 90, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseCancelCB, 2);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedCancelCB, 2);
   {
     char const * const dummy = N_("Style:|#S");
     fdui->style = obj = fl_add_input(FL_NORMAL_INPUT, 80, 50, 130, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fl_end_form();
 
   fdui->form->fdui = fdui;
index 8189af6e7a38b30abf7e929f40d1a2dc2faf03e9..3ea6ce3357fdb21c4bd4375ada18c5b193afb758 100644 (file)
@@ -5,9 +5,9 @@
 #define FD_form_bibtex_h_
 
 /** Callbacks, globals and object handlers **/
-extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseOKCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedOKCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedCancelCB(FL_OBJECT *, long);
 
 
 /**** Forms and Objects ****/
index 7e707d001f8d20d71c10e86a8313ec12bc72c4d3..c623cea6b53d5737082372961d5371a011f459cb 100644 (file)
@@ -34,7 +34,7 @@ FD_form_browser * FormBrowser::build_browser()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormBaseCancelCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedCancelCB, 0);
   {
     char const * const dummy = N_("Update|#Uu");
     fdui->button_update = obj = fl_add_button(FL_NORMAL_BUTTON, 270, 340, 90, 30, idex(_(dummy)));
@@ -42,7 +42,7 @@ FD_form_browser * FormBrowser::build_browser()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fl_end_form();
 
   fdui->form->fdui = fdui;
index 2a780f79482629a0f0baf21c38201c72130197e6..e2c80a3e19de7e306a945cc84c9a2911c7b001db 100644 (file)
@@ -5,8 +5,8 @@
 #define FD_form_browser_h_
 
 /** Callbacks, globals and object handlers **/
-extern  "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedCancelCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
 
 
 /**** Forms and Objects ****/
index 079f35e2c56a0003b35ec73165a870b5c01d8979..16d9c95aea37c2ce1884a6ab34a8cc66eeb20ab3 100644 (file)
@@ -38,7 +38,7 @@ FD_form_character * FormCharacter::build_character()
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
     fl_set_object_resize(obj, FL_RESIZE_X);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Series:|#S");
     fdui->choice_series = obj = fl_add_choice(FL_NORMAL_CHOICE, 94, 55, 191, 30, idex(_(dummy)));
@@ -48,7 +48,7 @@ FD_form_character * FormCharacter::build_character()
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
     fl_set_object_resize(obj, FL_RESIZE_X);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Shape:|#H");
     fdui->choice_shape = obj = fl_add_choice(FL_NORMAL_CHOICE, 94, 95, 191, 30, idex(_(dummy)));
@@ -58,7 +58,7 @@ FD_form_character * FormCharacter::build_character()
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
     fl_set_object_resize(obj, FL_RESIZE_X);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Size:|#Z");
     fdui->choice_size = obj = fl_add_choice(FL_NORMAL_CHOICE, 95, 275, 191, 30, idex(_(dummy)));
@@ -68,7 +68,7 @@ FD_form_character * FormCharacter::build_character()
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
     fl_set_object_resize(obj, FL_RESIZE_X);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Misc:|#M");
     fdui->choice_bar = obj = fl_add_choice(FL_NORMAL_CHOICE, 95, 335, 190, 30, idex(_(dummy)));
@@ -78,7 +78,7 @@ FD_form_character * FormCharacter::build_character()
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
     fl_set_object_resize(obj, FL_RESIZE_X);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Apply|#A");
     fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 60, 375, 80, 30, idex(_(dummy)));
@@ -86,7 +86,7 @@ FD_form_character * FormCharacter::build_character()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormBaseApplyCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedApplyCB, 0);
   {
     char const * const dummy = N_("Cancel|#N");
     fdui->button_close = obj = fl_add_button(FL_RETURN_BUTTON, 175, 375, 80, 30, idex(_(dummy)));
@@ -94,7 +94,7 @@ FD_form_character * FormCharacter::build_character()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormBaseCancelCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedCancelCB, 0);
   {
     char const * const dummy = N_("Color:|#C");
     fdui->choice_color = obj = fl_add_choice(FL_NORMAL_CHOICE, 95, 135, 191, 30, idex(_(dummy)));
@@ -104,7 +104,7 @@ FD_form_character * FormCharacter::build_character()
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
     fl_set_object_resize(obj, FL_RESIZE_X);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Toggle on all these|#T");
     fdui->check_toggle_all = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 30, 215, 255, 25, idex(_(dummy)));
@@ -112,13 +112,13 @@ FD_form_character * FormCharacter::build_character()
   }
     fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
     fl_set_object_resize(obj, FL_RESIZE_X);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->choice_language = obj = fl_add_choice(FL_DROPLIST_CHOICE, 95, 175, 190, 30, _("Language:"));
     fl_set_object_boxtype(obj, FL_FRAME_BOX);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
     fl_set_object_resize(obj, FL_RESIZE_X);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 10, 265, 280, 45, _("These are never toggled"));
     fl_set_object_lstyle(obj, FL_BOLD_STYLE);
     fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
index 6b5144415c68752c25a39198f56b3a9a2dea3ce8..74168bfd94d10d0511da5a9e14a0df734a4d7eed 100644 (file)
@@ -5,9 +5,9 @@
 #define FD_form_character_h_
 
 /** Callbacks, globals and object handlers **/
-extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseApplyCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedApplyCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedCancelCB(FL_OBJECT *, long);
 
 
 /**** Forms and Objects ****/
index c8e4cdf127a3d7c7f4499a375376e6d0f590a8d5..d41283bc9b098acaed75f5725ed7f7f1201d0dd1 100644 (file)
@@ -22,9 +22,9 @@ FD_form_citation * FormCitation::build_citation()
   FL_OBJECT *obj;
   FD_form_citation *fdui = new FD_form_citation;
 
-  fdui->form = fl_bgn_form(FL_NO_BOX, 435, 665);
+  fdui->form = fl_bgn_form(FL_NO_BOX, 430, 830);
   fdui->form->u_vdata = this;
-  fdui->box = obj = fl_add_box(FL_UP_BOX, 0, 0, 435, 665, "");
+  fdui->box = obj = fl_add_box(FL_UP_BOX, 0, 0, 430, 830, "");
   {
     char const * const dummy = N_("Inset keys|#I");
     fdui->browser_cite = obj = fl_add_browser(FL_HOLD_BROWSER, 10, 30, 180, 300, idex(_(dummy)));
@@ -63,13 +63,36 @@ FD_form_citation * FormCitation::build_citation()
     fl_set_object_gravity(obj, FL_North, FL_North);
     fl_set_object_resize(obj, FL_RESIZE_NONE);
     fl_set_object_callback(obj, C_FormBaseInputCB, 0);
-  fdui->browser_info = obj = fl_add_browser(FL_NORMAL_BROWSER, 10, 360, 410, 80, _("Info"));
+  fdui->browser_info = obj = fl_add_browser(FL_NORMAL_BROWSER, 10, 360, 410, 95, _("Info"));
     fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT);
     fl_set_object_gravity(obj, FL_SouthWest, FL_SouthEast);
     fl_set_object_resize(obj, FL_RESIZE_NONE);
+  fdui->frame_search = obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 10, 475, 410, 125, _("Search"));
+    fl_set_object_gravity(obj, FL_SouthWest, FL_SouthEast);
+  fdui->input_search = obj = fl_add_input(FL_NORMAL_INPUT, 25, 490, 380, 30, "");
+    fl_set_object_lalign(obj, FL_ALIGN_TOP);
+    fl_set_object_gravity(obj, FL_SouthWest, FL_SouthEast);
+    fl_set_object_resize(obj, FL_RESIZE_NONE);
+  fdui->button_search_type = obj = fl_add_button(FL_PUSH_BUTTON, 25, 525, 90, 30, _("Simple"));
+    fl_set_object_gravity(obj, FL_SouthWest, FL_SouthWest);
+    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+  {
+    char const * const dummy = N_("Previous|#P");
+    fdui->button_previous = obj = fl_add_button(FL_NORMAL_BUTTON, 315, 525, 90, 30, idex(_(dummy)));
+    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
+  }
+    fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
+    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+  {
+    char const * const dummy = N_("Next|#N");
+    fdui->button_next = obj = fl_add_button(FL_NORMAL_BUTTON, 315, 560, 90, 30, idex(_(dummy)));
+    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
+  }
+    fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
+    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
   {
     char const * const dummy = N_("Citation style|#s");
-    fdui->choice_style = obj = fl_add_choice(FL_NORMAL_CHOICE, 160, 470, 130, 30, idex(_(dummy)));
+    fdui->choice_style = obj = fl_add_choice(FL_NORMAL_CHOICE, 160, 630, 130, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_boxtype(obj, FL_FRAME_BOX);
@@ -78,7 +101,7 @@ FD_form_citation * FormCitation::build_citation()
     fl_set_object_callback(obj, C_FormBaseInputCB, 0);
   {
     char const * const dummy = N_("Text before|#T");
-    fdui->input_before = obj = fl_add_input(FL_NORMAL_INPUT, 100, 520, 250, 30, idex(_(dummy)));
+    fdui->input_before = obj = fl_add_input(FL_NORMAL_INPUT, 100, 680, 250, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_gravity(obj, FL_SouthWest, FL_SouthEast);
@@ -86,7 +109,7 @@ FD_form_citation * FormCitation::build_citation()
     fl_set_object_callback(obj, C_FormBaseInputCB, 0);
   {
     char const * const dummy = N_("Text after|#e");
-    fdui->input_after = obj = fl_add_input(FL_NORMAL_INPUT, 100, 570, 250, 30, idex(_(dummy)));
+    fdui->input_after = obj = fl_add_input(FL_NORMAL_INPUT, 100, 730, 250, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_gravity(obj, FL_SouthWest, FL_SouthEast);
@@ -94,24 +117,24 @@ FD_form_citation * FormCitation::build_citation()
     fl_set_object_callback(obj, C_FormBaseInputCB, 0);
   {
     char const * const dummy = N_("Restore|#R");
-    fdui->button_restore = obj = fl_add_button(FL_NORMAL_BUTTON, 10, 630, 90, 30, idex(_(dummy)));
+    fdui->button_restore = obj = fl_add_button(FL_NORMAL_BUTTON, 10, 790, 90, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_gravity(obj, FL_SouthWest, FL_SouthWest);
     fl_set_object_callback(obj, C_FormBaseRestoreCB, 0);
-  fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 130, 630, 90, 30, _("OK"));
+  fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 130, 790, 90, 30, _("OK"));
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
     fl_set_object_callback(obj, C_FormBaseOKCB, 0);
   {
     char const * const dummy = N_("Apply|#A");
-    fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 230, 630, 90, 30, idex(_(dummy)));
+    fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 230, 790, 90, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
     fl_set_object_callback(obj, C_FormBaseApplyCB, 0);
   {
     char const * const dummy = N_("Cancel|^[");
-    fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 330, 630, 90, 30, idex(_(dummy)));
+    fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 330, 790, 90, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
index f2b94e7f632a9b511f5295df44564d0f9d4fa9f2..931fa26dc5b278a37553236ca5e5ad7961d5eb6c 100644 (file)
@@ -25,6 +25,11 @@ struct FD_form_citation {
        FL_OBJECT *button_up;
        FL_OBJECT *button_down;
        FL_OBJECT *browser_info;
+       FL_OBJECT *frame_search;
+       FL_OBJECT *input_search;
+       FL_OBJECT *button_search_type;
+       FL_OBJECT *button_previous;
+       FL_OBJECT *button_next;
        FL_OBJECT *choice_style;
        FL_OBJECT *input_before;
        FL_OBJECT *input_after;
index 3d9425c06e5e0a32e9bdcd7278112559c6e18091..371744a8ec3154c61617c320cdcc2e7da3640d61 100644 (file)
@@ -45,7 +45,7 @@ FD_form_copyright * FormCopyright::build_copyright()
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_South, FL_South);
     fl_set_object_resize(obj, FL_RESIZE_NONE);
-    fl_set_object_callback(obj, C_FormBaseCancelCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedCancelCB, 0);
   fl_end_form();
 
   fdui->form->fdui = fdui;
index ee94cb3cd667776c31d29e0563987983d40ed50d..f98680d5f9e3a5ae36d0bb33900a7c9042843220 100644 (file)
@@ -5,7 +5,7 @@
 #define FD_form_copyright_h_
 
 /** Callbacks, globals and object handlers **/
-extern  "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedCancelCB(FL_OBJECT *, long);
 
 
 /**** Forms and Objects ****/
index 7a36aad2852e412f16b07907e4eff9772b396603..d6e86320a10455d5583e8ffa8ad49586d5b41e38 100644 (file)
@@ -29,7 +29,7 @@ FD_form_credits * FormCredits::build_credits()
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_South, FL_South);
     fl_set_object_resize(obj, FL_RESIZE_NONE);
-    fl_set_object_callback(obj, C_FormBaseCancelCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedCancelCB, 0);
   obj = fl_add_text(FL_NORMAL_TEXT, 10, 40, 480, 30, _("Matthias"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
index ef9791d423f9aa49420c277fe8e649ac7d8cac5e..a77b214469ca6cd1daed01b81ce234c01adffafb 100644 (file)
@@ -5,7 +5,7 @@
 #define FD_form_credits_h_
 
 /** Callbacks, globals and object handlers **/
-extern  "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedCancelCB(FL_OBJECT *, long);
 
 
 /**** Forms and Objects ****/
index 574eba255a37185e13d9159a5f77bcea5b33a75a..4ad059db717eb7ba4c86bfab9c99f50d65fa1148 100644 (file)
@@ -35,17 +35,17 @@ FD_form_tabbed_document * FormDocument::build_tabbed_document()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseCancelCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedCancelCB, INPUT);
   {
     char const * const dummy = N_("Apply|#A");
     fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 245, 410, 100, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseApplyCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedApplyCB, INPUT);
   fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 135, 410, 100, 30, _("OK"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseOKCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedOKCB, INPUT);
   fdui->text_warning = obj = fl_add_text(FL_NORMAL_TEXT, 20, 380, 435, 30, "");
     fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
   {
@@ -54,7 +54,7 @@ FD_form_tabbed_document * FormDocument::build_tabbed_document()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseRestoreCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedRestoreCB, INPUT);
   fl_end_form();
 
   fdui->form->fdui = fdui;
@@ -88,7 +88,7 @@ FD_form_doc_paper * FormDocument::build_doc_paper()
   }
     fl_set_object_boxtype(obj, FL_FRAME_BOX);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
   obj = fl_add_frame(FL_ENGRAVED_FRAME, 230, 205, 200, 130, "");
     fl_set_object_color(obj, FL_COL1, FL_COL1);
     fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT);
@@ -122,14 +122,14 @@ FD_form_doc_paper * FormDocument::build_doc_paper()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
   {
     char const * const dummy = N_("Landscape|#L");
     fdui->radio_landscape = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 20, 120, 120, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
   fl_end_group();
 
   {
@@ -139,7 +139,7 @@ FD_form_doc_paper * FormDocument::build_doc_paper()
   }
     fl_set_object_boxtype(obj, FL_FRAME_BOX);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
   obj = fl_add_text(FL_NORMAL_TEXT, 240, 75, 150, 20, _("Custom Papersize"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
@@ -150,70 +150,70 @@ FD_form_doc_paper * FormDocument::build_doc_paper()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
   {
     char const * const dummy = N_("Width:|#W");
     fdui->input_custom_width = obj = fl_add_input(FL_NORMAL_INPUT, 330, 100, 90, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
   {
     char const * const dummy = N_("Height:|#H");
     fdui->input_custom_height = obj = fl_add_input(FL_NORMAL_INPUT, 330, 140, 90, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
   {
     char const * const dummy = N_("Top:|#T");
     fdui->input_top_margin = obj = fl_add_input(FL_NORMAL_INPUT, 100, 175, 90, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
   {
     char const * const dummy = N_("Bottom:|#B");
     fdui->input_bottom_margin = obj = fl_add_input(FL_NORMAL_INPUT, 100, 215, 90, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
   {
     char const * const dummy = N_("Left:|#e");
     fdui->input_left_margin = obj = fl_add_input(FL_NORMAL_INPUT, 100, 255, 90, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
   {
     char const * const dummy = N_("Right:|#R");
     fdui->input_right_margin = obj = fl_add_input(FL_NORMAL_INPUT, 100, 295, 90, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
   {
     char const * const dummy = N_("Headheight:|#i");
     fdui->input_head_height = obj = fl_add_input(FL_NORMAL_INPUT, 330, 215, 90, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
   {
     char const * const dummy = N_("Headsep:|#d");
     fdui->input_head_sep = obj = fl_add_input(FL_NORMAL_INPUT, 330, 255, 90, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
   {
     char const * const dummy = N_("Footskip:|#F");
     fdui->input_foot_skip = obj = fl_add_input(FL_NORMAL_INPUT, 330, 295, 90, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
   fdui->text_warning = obj = fl_add_text(FL_NORMAL_TEXT, 10, 360, 420, 20, "");
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
@@ -257,7 +257,7 @@ FD_form_doc_class * FormDocument::build_doc_class()
   }
     fl_set_object_boxtype(obj, FL_FRAME_BOX);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
   {
     char const * const dummy = N_("Font Size:|#O");
     fdui->choice_doc_fontsize = obj = fl_add_choice(FL_NORMAL_CHOICE, 120, 140, 160, 30, idex(_(dummy)));
@@ -265,7 +265,7 @@ FD_form_doc_class * FormDocument::build_doc_class()
   }
     fl_set_object_boxtype(obj, FL_FRAME_BOX);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
   {
     char const * const dummy = N_("Class:|#C");
     fdui->choice_doc_class = obj = fl_add_choice(FL_NORMAL_CHOICE, 120, 20, 160, 30, idex(_(dummy)));
@@ -273,7 +273,7 @@ FD_form_doc_class * FormDocument::build_doc_class()
   }
     fl_set_object_boxtype(obj, FL_FRAME_BOX);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, CHECKCHOICECLASS);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, CHECKCHOICECLASS);
   {
     char const * const dummy = N_("Pagestyle:|#P");
     fdui->choice_doc_pagestyle = obj = fl_add_choice(FL_NORMAL_CHOICE, 120, 60, 160, 30, idex(_(dummy)));
@@ -281,7 +281,7 @@ FD_form_doc_class * FormDocument::build_doc_class()
   }
     fl_set_object_boxtype(obj, FL_FRAME_BOX);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
   {
     char const * const dummy = N_("Spacing|#g");
     fdui->choice_doc_spacing = obj = fl_add_choice(FL_NORMAL_CHOICE, 120, 290, 160, 30, idex(_(dummy)));
@@ -289,17 +289,17 @@ FD_form_doc_class * FormDocument::build_doc_class()
   }
     fl_set_object_boxtype(obj, FL_FRAME_BOX);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
   {
     char const * const dummy = N_("Extra Options:|#X");
     fdui->input_doc_extra = obj = fl_add_input(FL_NORMAL_INPUT, 120, 185, 160, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
   fdui->input_doc_skip = obj = fl_add_input(FL_NORMAL_INPUT, 220, 225, 60, 30, "");
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
   {
     char const * const dummy = N_("Default Skip:|#u");
     fdui->choice_doc_skip = obj = fl_add_choice(FL_NORMAL_CHOICE, 120, 225, 90, 30, idex(_(dummy)));
@@ -307,7 +307,7 @@ FD_form_doc_class * FormDocument::build_doc_class()
   }
     fl_set_object_boxtype(obj, FL_FRAME_BOX);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
 
   fdui->group_doc_sides = fl_bgn_group();
   {
@@ -316,14 +316,14 @@ FD_form_doc_class * FormDocument::build_doc_class()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
   {
     char const * const dummy = N_("Two|#T");
     fdui->radio_doc_sides_two = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 300, 60, 120, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
   fl_end_group();
 
 
@@ -334,14 +334,14 @@ FD_form_doc_class * FormDocument::build_doc_class()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
   {
     char const * const dummy = N_("Two|#w");
     fdui->radio_doc_columns_two = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 300, 150, 110, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
   fl_end_group();
 
 
@@ -352,20 +352,20 @@ FD_form_doc_class * FormDocument::build_doc_class()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
   {
     char const * const dummy = N_("Skip|#K");
     fdui->radio_doc_skip = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 300, 240, 110, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
     fl_set_button(obj, 1);
   fl_end_group();
 
   fdui->input_doc_spacing = obj = fl_add_input(FL_NORMAL_INPUT, 300, 290, 120, 30, "");
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
   fl_end_form();
 
   fdui->form->fdui = fdui;
@@ -397,7 +397,7 @@ FD_form_doc_language * FormDocument::build_doc_language()
   }
     fl_set_object_boxtype(obj, FL_FRAME_BOX);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
   {
     char const * const dummy = N_("Type:|#T");
     fdui->choice_quotes_language = obj = fl_add_choice(FL_NORMAL_CHOICE, 110, 140, 190, 30, idex(_(dummy)));
@@ -405,7 +405,7 @@ FD_form_doc_language * FormDocument::build_doc_language()
   }
     fl_set_object_boxtype(obj, FL_FRAME_BOX);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
  fl_bgn_group();
   {
     char const * const dummy = N_("Single|#S");
@@ -413,14 +413,14 @@ FD_form_doc_language * FormDocument::build_doc_language()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
   {
     char const * const dummy = N_("Double|#D");
     fdui->radio_double = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 210, 180, 90, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
   fl_end_group();
 
   {
@@ -430,7 +430,7 @@ FD_form_doc_language * FormDocument::build_doc_language()
   }
     fl_set_object_boxtype(obj, FL_FRAME_BOX);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
   fl_end_form();
 
   fdui->form->fdui = fdui;
@@ -460,15 +460,15 @@ FD_form_doc_options * FormDocument::build_doc_options()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
   fdui->slider_secnumdepth = obj = fl_add_counter(FL_SIMPLE_COUNTER, 155, 110, 80, 30, _("Section number depth"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_LEFT);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
   fdui->slider_tocdepth = obj = fl_add_counter(FL_SIMPLE_COUNTER, 155, 150, 80, 30, _("Table of contents depth"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_LEFT);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
   {
     char const * const dummy = N_("PS Driver:|#S");
     fdui->choice_postscript_driver = obj = fl_add_choice(FL_NORMAL_CHOICE, 155, 205, 190, 30, idex(_(dummy)));
@@ -476,14 +476,14 @@ FD_form_doc_options * FormDocument::build_doc_options()
   }
     fl_set_object_boxtype(obj, FL_FRAME_BOX);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
   {
     char const * const dummy = N_("Use AMS Math|#M");
     fdui->check_use_amsmath = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 140, 250, 200, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
   fl_end_form();
 
   fdui->form->fdui = fdui;
@@ -510,7 +510,7 @@ FD_form_doc_bullet * FormDocument::build_doc_bullet()
   obj = fl_add_box(FL_FLAT_BOX, 0, 0, 440, 345, "");
   fl_set_border_width(-3);
   fdui->bmtable_bullet_panel = obj = fl_add_bmtable(1, 90, 105, 265, 180, "");
-  fl_set_object_callback(obj, C_FormBaseInputCB, BULLETBMTABLE);
+  fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, BULLETBMTABLE);
   fl_set_object_lcol(obj, FL_BLUE);
   fl_set_object_boxtype(obj, FL_UP_BOX);
   fl_set_bmtable_pixmap_file(obj, 6, 6,
@@ -527,7 +527,7 @@ FD_form_doc_bullet * FormDocument::build_doc_bullet()
     fl_set_object_boxtype(obj, FL_FRAME_BOX);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_TOP);
-    fl_set_object_callback(obj, C_FormBaseInputCB, CHOICEBULLETSIZE);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, CHOICEBULLETSIZE);
   {
     char const * const dummy = N_("LaTeX|#L");
     fdui->input_bullet_latex = obj = fl_add_input(FL_NORMAL_INPUT, 80, 300, 275, 30, idex(_(dummy)));
@@ -535,7 +535,7 @@ FD_form_doc_bullet * FormDocument::build_doc_bullet()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lstyle(obj, FL_FIXED_STYLE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, INPUTBULLETLATEX);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUTBULLETLATEX);
 
   fdui->radio_bullet_depth = fl_bgn_group();
   {
@@ -544,7 +544,7 @@ FD_form_doc_bullet * FormDocument::build_doc_bullet()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_LARGE_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, BULLETDEPTH1);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, BULLETDEPTH1);
     fl_set_button(obj, 1);
   {
     char const * const dummy = N_("2|#2");
@@ -552,21 +552,21 @@ FD_form_doc_bullet * FormDocument::build_doc_bullet()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_LARGE_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, BULLETDEPTH2);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, BULLETDEPTH2);
   {
     char const * const dummy = N_("3|#3");
     fdui->radio_bullet_depth_3 = obj = fl_add_button(FL_RADIO_BUTTON, 225, 35, 55, 40, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_LARGE_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, BULLETDEPTH3);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, BULLETDEPTH3);
   {
     char const * const dummy = N_("4|#4");
     fdui->radio_bullet_depth_4 = obj = fl_add_button(FL_RADIO_BUTTON, 285, 35, 55, 40, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_LARGE_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, BULLETDEPTH4);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, BULLETDEPTH4);
   fl_end_group();
 
   obj = fl_add_text(FL_NORMAL_TEXT, 105, 10, 85, 20, _("Bullet Depth"));
@@ -581,7 +581,7 @@ FD_form_doc_bullet * FormDocument::build_doc_bullet()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_resize(obj, FL_RESIZE_NONE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, BULLETPANEL1);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, BULLETPANEL1);
     fl_set_button(obj, 1);
   {
     char const * const dummy = N_("Maths|#M");
@@ -590,7 +590,7 @@ FD_form_doc_bullet * FormDocument::build_doc_bullet()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_resize(obj, FL_RESIZE_NONE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, BULLETPANEL2);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, BULLETPANEL2);
   {
     char const * const dummy = N_("Ding 2|#i");
     fdui->radio_bullet_panel_ding2 = obj = fl_add_button(FL_RADIO_BUTTON, 15, 195, 65, 30, idex(_(dummy)));
@@ -598,7 +598,7 @@ FD_form_doc_bullet * FormDocument::build_doc_bullet()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_resize(obj, FL_RESIZE_NONE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, BULLETPANEL3);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, BULLETPANEL3);
   {
     char const * const dummy = N_("Ding 3|#n");
     fdui->radio_bullet_panel_ding3 = obj = fl_add_button(FL_RADIO_BUTTON, 15, 225, 65, 30, idex(_(dummy)));
@@ -606,7 +606,7 @@ FD_form_doc_bullet * FormDocument::build_doc_bullet()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_resize(obj, FL_RESIZE_NONE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, BULLETPANEL4);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, BULLETPANEL4);
   {
     char const * const dummy = N_("Ding 4|#g");
     fdui->radio_bullet_panel_ding4 = obj = fl_add_button(FL_RADIO_BUTTON, 15, 255, 65, 30, idex(_(dummy)));
@@ -614,7 +614,7 @@ FD_form_doc_bullet * FormDocument::build_doc_bullet()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_resize(obj, FL_RESIZE_NONE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, BULLETPANEL5);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, BULLETPANEL5);
   {
     char const * const dummy = N_("Ding 1|#D");
     fdui->radio_bullet_panel_ding1 = obj = fl_add_button(FL_RADIO_BUTTON, 15, 165, 65, 30, idex(_(dummy)));
@@ -622,7 +622,7 @@ FD_form_doc_bullet * FormDocument::build_doc_bullet()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_resize(obj, FL_RESIZE_NONE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, BULLETPANEL6);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, BULLETPANEL6);
   fl_end_group();
 
   fl_end_form();
index fd85e779ad7276783b620db57f2850d509615e8b..96dcfead4021c30f4949593af11cdd9df4bfd9e2 100644 (file)
@@ -5,20 +5,20 @@
 #define FD_form_tabbed_document_h_
 
 /** Callbacks, globals and object handlers **/
-extern  "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseApplyCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseOKCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseRestoreCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedCancelCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedApplyCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedOKCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedRestoreCB(FL_OBJECT *, long);
 
-extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
 
-extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
 
-extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
 
-extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
 
-extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
 
 
 /**** Forms and Objects ****/
index 591fa980fdc825bc5992b0cf0278a4625db4b7a1..c29073aa34ea237cee6a1cbaed3c937d5cf23b68 100644 (file)
@@ -34,7 +34,7 @@ FD_form_error * FormError::build_error()
   }
     fl_set_object_gravity(obj, FL_South, FL_South);
     fl_set_object_resize(obj, FL_RESIZE_NONE);
-    fl_set_object_callback(obj, C_FormBaseCancelCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedCancelCB, 0);
   fl_end_form();
 
   fdui->form->fdui = fdui;
index c87a7e2dd5db288eb9b7aed9013ab30f583cd71c..63521193ef2772fcccb4c28ab2f2b5d4796da736 100644 (file)
@@ -5,7 +5,7 @@
 #define FD_form_error_h_
 
 /** Callbacks, globals and object handlers **/
-extern  "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedCancelCB(FL_OBJECT *, long);
 
 
 /**** Forms and Objects ****/
index f37e4496cf0612dc4117dd304132a6af2ac7168f..54d6b8f719d3b3d3b5647a9aa690a9b6c6a30bf9 100644 (file)
@@ -34,53 +34,53 @@ FD_form_graphics * FormGraphics::build_graphics()
     fdui->input_filename = obj = fl_add_input(FL_NORMAL_INPUT, 150, 20, 210, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
-    fl_set_object_callback(obj, C_FormBaseInputCB, CHECKINPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, CHECKINPUT);
   {
     char const * const dummy = N_("Browse|#B");
     fdui->button_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 370, 20, 90, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
-    fl_set_object_callback(obj, C_FormBaseInputCB, BROWSE);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, BROWSE);
   obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 20, 70, 240, 160, _("Width"));
     fl_set_object_lalign(obj, FL_ALIGN_CENTER);
   obj = fl_add_text(FL_NORMAL_TEXT, 164, 60, 60, 20, _("Height"));
     fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
   fdui->input_width = obj = fl_add_input(FL_NORMAL_INPUT, 32, 190, 108, 30, "");
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, CHECKINPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, CHECKINPUT);
   fdui->input_height = obj = fl_add_input(FL_NORMAL_INPUT, 152, 190, 96, 30, "");
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, CHECKINPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, CHECKINPUT);
   obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 270, 70, 210, 160, _("Display"));
     fl_set_object_lalign(obj, FL_ALIGN_CENTER);
 
   fdui->radio_button_group_width = fl_bgn_group();
   // xgettext:no-c-format
   fdui->radio_width_percent_page = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 20, 140, 80, 30, _("% of Page"));
-    fl_set_object_callback(obj, C_FormBaseInputCB, CHECKINPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, CHECKINPUT);
   fdui->radio_width_default = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 20, 80, 80, 30, _("Default"));
-    fl_set_object_callback(obj, C_FormBaseInputCB, CHECKINPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, CHECKINPUT);
     fl_set_button(obj, 1);
   fdui->radio_width_cm = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 20, 100, 80, 30, _("cm"));
-    fl_set_object_callback(obj, C_FormBaseInputCB, CHECKINPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, CHECKINPUT);
   fdui->radio_width_inch = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 20, 120, 80, 30, _("Inch"));
-    fl_set_object_callback(obj, C_FormBaseInputCB, CHECKINPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, CHECKINPUT);
   // xgettext:no-c-format
   fdui->radio_width_percent_column = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 20, 160, 96, 30, _("% of Column"));
-    fl_set_object_callback(obj, C_FormBaseInputCB, CHECKINPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, CHECKINPUT);
   fl_end_group();
 
 
   fdui->radio_button_group_height = fl_bgn_group();
   // xgettext:no-c-format
   fdui->radio_height_percent_page = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 140, 140, 96, 30, _("% of Page"));
-    fl_set_object_callback(obj, C_FormBaseInputCB, CHECKINPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, CHECKINPUT);
   fdui->radio_height_inch = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 140, 120, 96, 30, _("Inch"));
-    fl_set_object_callback(obj, C_FormBaseInputCB, CHECKINPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, CHECKINPUT);
   fdui->radio_height_cm = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 140, 100, 80, 30, _("cm"));
-    fl_set_object_callback(obj, C_FormBaseInputCB, CHECKINPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, CHECKINPUT);
   fdui->radio_height_default = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 140, 80, 96, 30, _("Default"));
-    fl_set_object_callback(obj, C_FormBaseInputCB, CHECKINPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, CHECKINPUT);
     fl_set_button(obj, 1);
   fl_end_group();
 
@@ -115,43 +115,43 @@ FD_form_graphics * FormGraphics::build_graphics()
     fdui->input_rotate_angle = obj = fl_add_input(FL_INT_INPUT, 91, 260, 94, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
-    fl_set_object_callback(obj, C_FormBaseInputCB, CHECKINPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, CHECKINPUT);
   {
     char const * const dummy = N_("Inline Figure|#I");
     fdui->check_inline = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 279, 260, 201, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
-    fl_set_object_callback(obj, C_FormBaseInputCB, CHECKINPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, CHECKINPUT);
   fdui->input_subcaption = obj = fl_add_input(FL_NORMAL_INPUT, 158, 310, 322, 30, "");
-    fl_set_object_callback(obj, C_FormBaseInputCB, CHECKINPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, CHECKINPUT);
   {
     char const * const dummy = N_("Subcaption|#S");
     fdui->check_subcaption = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 120, 310, 30, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lalign(obj, FL_ALIGN_LEFT);
-    fl_set_object_callback(obj, C_FormBaseInputCB, CHECKINPUT);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, CHECKINPUT);
   {
     char const * const dummy = N_("Update|#U");
     fdui->button_restore = obj = fl_add_button(FL_NORMAL_BUTTON, 20, 350, 90, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_gravity(obj, FL_SouthWest, FL_SouthWest);
-    fl_set_object_callback(obj, C_FormBaseRestoreCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedRestoreCB, 0);
   fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 190, 350, 90, 30, _("Ok"));
-    fl_set_object_callback(obj, C_FormBaseOKCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedOKCB, 0);
   {
     char const * const dummy = N_("Apply|#A");
     fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 290, 350, 90, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
-    fl_set_object_callback(obj, C_FormBaseApplyCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedApplyCB, 0);
   {
     char const * const dummy = N_("Cancel|^[");
     fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 390, 350, 90, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
-    fl_set_object_callback(obj, C_FormBaseCancelCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedCancelCB, 0);
   fl_end_form();
 
   fdui->form->fdui = fdui;
index 0b33ef9e0d2dc422eea1e68cc5b8e8ba3f7a9ba4..1e4701b8ca7a6b42b8df4b21151ebb69bef456af 100644 (file)
@@ -5,11 +5,11 @@
 #define FD_form_graphics_h_
 
 /** Callbacks, globals and object handlers **/
-extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseRestoreCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseOKCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseApplyCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedRestoreCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedOKCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedApplyCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedCancelCB(FL_OBJECT *, long);
 
 
 /**** Forms and Objects ****/
index 77dffb5684dd3c4f340c66a20956ceefba70a558..de4d092878e78b8b5a16757c7d787f352631e45a 100644 (file)
@@ -32,7 +32,7 @@ FD_form_include * FormInclude::build_include()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Don't typeset|#D");
     fdui->check_typeset = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 180, 70, 150, 30, idex(_(dummy)));
@@ -41,21 +41,21 @@ FD_form_include * FormInclude::build_include()
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
   fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 120, 170, 100, 30, _("OK"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseOKCB, 1);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedOKCB, 1);
   {
     char const * const dummy = N_("Cancel|^[");
     fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 230, 170, 100, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseCancelCB, 2);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedCancelCB, 2);
   {
     char const * const dummy = N_("Load|#L");
     fdui->button_load = obj = fl_add_button(FL_NORMAL_BUTTON, 230, 130, 100, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 5);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 5);
   {
     char const * const dummy = N_("File name:|#F");
     fdui->input_filename = obj = fl_add_input(FL_NORMAL_INPUT, 10, 30, 210, 30, idex(_(dummy)));
@@ -77,21 +77,21 @@ FD_form_include * FormInclude::build_include()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 10);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 10);
   {
     char const * const dummy = N_("Use input|#i");
     fdui->check_useinput = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 10, 100, 160, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 11);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 11);
   {
     char const * const dummy = N_("Use include|#U");
     fdui->check_useinclude = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 10, 70, 160, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 11);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 11);
   fl_end_group();
 
   fl_end_form();
index f7585b4adf42649180a372aa9ea5d291ab982220..f72e5b2fbe2ee425cc0e5d68ec86f40427a098ba 100644 (file)
@@ -5,9 +5,9 @@
 #define FD_form_include_h_
 
 /** Callbacks, globals and object handlers **/
-extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseOKCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedOKCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedCancelCB(FL_OBJECT *, long);
 
 
 /**** Forms and Objects ****/
index a1ff9c7b37cea22e1e5e90a7aab2a958c523388e..d36be3bcd8d2f18b752298fff37d09fd1a9e5697 100644 (file)
@@ -32,7 +32,7 @@ FD_form_index * FormIndex::build_index()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_resize(obj, FL_RESIZE_X);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Restore|#R");
     fdui->button_restore = obj = fl_add_button(FL_NORMAL_BUTTON, 10, 60, 100, 30, idex(_(dummy)));
@@ -40,10 +40,10 @@ FD_form_index * FormIndex::build_index()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_SouthWest, FL_SouthWest);
-    fl_set_object_callback(obj, C_FormBaseRestoreCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedRestoreCB, 0);
   fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 190, 60, 100, 30, _("OK"));
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormBaseOKCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedOKCB, 0);
   {
     char const * const dummy = N_("Apply|#A");
     fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 300, 60, 100, 30, idex(_(dummy)));
@@ -51,7 +51,7 @@ FD_form_index * FormIndex::build_index()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormBaseApplyCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedApplyCB, 0);
   {
     char const * const dummy = N_("Cancel|^[");
     fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 410, 60, 100, 30, idex(_(dummy)));
@@ -59,7 +59,7 @@ FD_form_index * FormIndex::build_index()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormBaseCancelCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedCancelCB, 0);
   fl_end_form();
 
   fdui->form->fdui = fdui;
index ef097e092fc08ba504e8f7291ddce00e86226341..09ce209796e1f2621b615a0329a6daec47edc5af 100644 (file)
@@ -5,11 +5,11 @@
 #define FD_form_index_h_
 
 /** Callbacks, globals and object handlers **/
-extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseRestoreCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseOKCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseApplyCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedRestoreCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedOKCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedApplyCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedCancelCB(FL_OBJECT *, long);
 
 
 /**** Forms and Objects ****/
index 08fb5791a8ccbf3226870fa6d3e971777e3e4173..4a12307fdb40187d476d2b40985f54b0286c6dc2 100644 (file)
@@ -44,7 +44,7 @@ FD_form_paragraph_general * FormParagraph::build_paragraph_general()
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_West, FL_East);
     fl_set_object_resize(obj, FL_RESIZE_X);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   obj = fl_add_text(FL_NORMAL_TEXT, 370, 100, 60, 20, _("Indent"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
@@ -55,35 +55,35 @@ FD_form_paragraph_general * FormParagraph::build_paragraph_general()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Below|#E");
     fdui->check_lines_bottom = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 230, 60, 120, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Above|#o");
     fdui->check_pagebreaks_top = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 360, 30, 120, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Below|#l");
     fdui->check_pagebreaks_bottom = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 360, 60, 120, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("No Indent|#I");
     fdui->check_noindent = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 360, 120, 120, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
 
   fdui->group_radio_alignment = fl_bgn_group();
   {
@@ -92,36 +92,36 @@ FD_form_paragraph_general * FormParagraph::build_paragraph_general()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Left|#f");
     fdui->radio_align_left = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 10, 60, 80, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Block|#c");
     fdui->radio_align_block = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 100, 30, 80, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Center|#n");
     fdui->radio_align_center = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 100, 60, 80, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fl_end_group();
 
   fdui->input_space_above = obj = fl_add_input(FL_NORMAL_INPUT, 180, 120, 90, 30, "");
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->input_space_below = obj = fl_add_input(FL_NORMAL_INPUT, 180, 160, 90, 30, "");
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Above:|#v");
     fdui->choice_space_above = obj = fl_add_choice(FL_NORMAL_CHOICE, 70, 120, 100, 30, idex(_(dummy)));
@@ -129,7 +129,7 @@ FD_form_paragraph_general * FormParagraph::build_paragraph_general()
   }
     fl_set_object_boxtype(obj, FL_FRAME_BOX);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Below:|#w");
     fdui->choice_space_below = obj = fl_add_choice(FL_NORMAL_CHOICE, 70, 160, 100, 30, idex(_(dummy)));
@@ -137,7 +137,7 @@ FD_form_paragraph_general * FormParagraph::build_paragraph_general()
   }
     fl_set_object_boxtype(obj, FL_FRAME_BOX);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   obj = fl_add_text(FL_NORMAL_TEXT, 370, 10, 100, 20, _("Pagebreaks"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
@@ -160,14 +160,14 @@ FD_form_paragraph_general * FormParagraph::build_paragraph_general()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Keep|#p");
     fdui->check_space_below = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 270, 160, 40, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fl_end_form();
 
   fdui->form->fdui = fdui;
@@ -207,7 +207,7 @@ FD_form_paragraph_extra * FormParagraph::build_paragraph_extra()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     // xgettext:no-c-format
     char const * const dummy = N_("or %|#o");
@@ -215,7 +215,7 @@ FD_form_paragraph_extra * FormParagraph::build_paragraph_extra()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   obj = fl_add_text(FL_NORMAL_TEXT, 200, 10, 60, 20, _("Width"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
@@ -232,21 +232,21 @@ FD_form_paragraph_extra * FormParagraph::build_paragraph_extra()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Middle|#d");
     fdui->radio_pextra_middle = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 360, 60, 80, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Bottom|#B");
     fdui->radio_pextra_bottom = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 360, 90, 80, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fl_end_group();
 
   {
@@ -255,14 +255,14 @@ FD_form_paragraph_extra * FormParagraph::build_paragraph_extra()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Start new Minipage|#S");
     fdui->radio_pextra_startmp = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 10, 160, 260, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
 
   fdui->group_extraopt = fl_bgn_group();
   {
@@ -271,21 +271,21 @@ FD_form_paragraph_extra * FormParagraph::build_paragraph_extra()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Minipage|#M");
     fdui->radio_pextra_minipage = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 10, 60, 160, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Floatflt|#F");
     fdui->radio_pextra_floatflt = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 10, 90, 160, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fl_end_group();
 
   fl_end_form();
@@ -319,24 +319,24 @@ FD_form_tabbed_paragraph * FormParagraph::build_tabbed_paragraph()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseCancelCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedCancelCB, 0);
   {
     char const * const dummy = N_("Apply|#A");
     fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 290, 310, 100, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseApplyCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedApplyCB, 0);
   fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 180, 310, 100, 30, _("OK"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseOKCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedOKCB, 0);
   {
     char const * const dummy = N_("Restore|#R");
     fdui->button_restore = obj = fl_add_button(FL_NORMAL_BUTTON, 10, 310, 100, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseRestoreCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedRestoreCB, 0);
   fdui->text_warning = obj = fl_add_text(FL_NORMAL_TEXT, 10, 280, 490, 30, "");
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
index 37b7830c0dc31cc0d76e7006e141776be8c7a9ca..d6f0e3167999872feff252293564daa288567892 100644 (file)
@@ -5,14 +5,14 @@
 #define FD_form_paragraph_general_h_
 
 /** Callbacks, globals and object handlers **/
-extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
 
-extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
 
-extern  "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseApplyCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseOKCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseRestoreCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedCancelCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedApplyCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedOKCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedRestoreCB(FL_OBJECT *, long);
 
 
 /**** Forms and Objects ****/
index 85e301e14b607ed7fd663038b28c83c76a64103e..b8ac189cb3c5e271b414eb4e3c1cb7df37a4ab1c 100644 (file)
@@ -32,7 +32,7 @@ FD_form_preamble * FormPreamble::build_preamble()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormBaseOKCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedOKCB, 0);
   {
     char const * const dummy = N_("Apply|#A");
     fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 160, 380, 100, 30, idex(_(dummy)));
@@ -40,7 +40,7 @@ FD_form_preamble * FormPreamble::build_preamble()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormBaseApplyCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedApplyCB, 0);
   {
     char const * const dummy = N_("Cancel|^[");
     fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 270, 380, 100, 30, idex(_(dummy)));
@@ -48,11 +48,11 @@ FD_form_preamble * FormPreamble::build_preamble()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormBaseCancelCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedCancelCB, 0);
   fdui->input_preamble = obj = fl_add_input(FL_MULTILINE_INPUT, 10, 10, 360, 360, "");
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_NorthWest, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fl_end_form();
 
   fdui->form->fdui = fdui;
index 6e826d0ddb2dd3e5866a5ee412e0873e71a68314..51607f04a6fe5400f4c9abe764e7ffbd7f96899e 100644 (file)
@@ -5,10 +5,10 @@
 #define FD_form_preamble_h_
 
 /** Callbacks, globals and object handlers **/
-extern  "C" void C_FormBaseOKCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseApplyCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedOKCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedApplyCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedCancelCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
 
 
 /**** Forms and Objects ****/
index b936d78e074f346be67fed87ce4bf843dd1b625a..f78dc671dbd245d80e93f4a0db7935aaf93743fb 100644 (file)
@@ -35,24 +35,24 @@ FD_form_preferences * FormPreferences::build_preferences()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseApplyCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedApplyCB, 0);
   {
     char const * const dummy = N_("Cancel|^[");
     fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 370, 390, 90, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseCancelCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedCancelCB, 0);
   fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 170, 390, 90, 30, _("Save"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseOKCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedOKCB, 0);
   {
     char const * const dummy = N_("Restore|#R");
     fdui->button_restore = obj = fl_add_button(FL_NORMAL_BUTTON, 5, 390, 90, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseRestoreCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedRestoreCB, 0);
   obj = fl_add_frame(FL_ENGRAVED_FRAME, 0, 425, 470, 1, "");
   fdui->text_warning = obj = fl_add_text(FL_NORMAL_TEXT, 5, 430, 460, 70, "");
     fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
@@ -106,13 +106,13 @@ FD_form_screen_fonts * FormPreferences::build_screen_fonts()
   obj = fl_add_box(FL_FLAT_BOX, 0, 0, 455, 375, "");
   fdui->input_roman = obj = fl_add_input(FL_NORMAL_INPUT, 210, 5, 200, 30, _("Roman"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->input_sans = obj = fl_add_input(FL_NORMAL_INPUT, 210, 35, 200, 30, _("Sans Serif"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->input_typewriter = obj = fl_add_input(FL_NORMAL_INPUT, 210, 65, 200, 30, _("Typewriter"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     // xgettext:no-c-format
     char const * const dummy = N_("Zoom %|#Z");
@@ -121,7 +121,7 @@ FD_form_screen_fonts * FormPreferences::build_screen_fonts()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_LEFT);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
     fl_set_counter_precision(obj, 0);
     fl_set_counter_bounds(obj, 0, 999);
     fl_set_counter_value(obj, 150);
@@ -129,29 +129,29 @@ FD_form_screen_fonts * FormPreferences::build_screen_fonts()
   fdui->check_scalable = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 60, 143, 33, 31, _("Use scalable fonts"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_RIGHT);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
     fl_set_button(obj, 1);
   fdui->input_screen_encoding = obj = fl_add_input(FL_NORMAL_INPUT, 210, 95, 200, 30, _("Encoding"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->input_script = obj = fl_add_input(FL_FLOAT_INPUT, 200, 199, 70, 30, _("script"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->input_footnote = obj = fl_add_input(FL_FLOAT_INPUT, 340, 198, 70, 30, _("footnote"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->input_large = obj = fl_add_input(FL_FLOAT_INPUT, 340, 228, 70, 30, _("large"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->input_largest = obj = fl_add_input(FL_FLOAT_INPUT, 200, 259, 70, 30, _("largest"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->input_huge = obj = fl_add_input(FL_FLOAT_INPUT, 340, 258, 70, 30, _("huge"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->input_normal = obj = fl_add_input(FL_FLOAT_INPUT, 200, 229, 70, 30, _("normal"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Screen DPI|#D");
     fdui->counter_dpi = obj = fl_add_counter(FL_NORMAL_COUNTER, 310, 160, 100, 30, idex(_(dummy)));
@@ -159,23 +159,23 @@ FD_form_screen_fonts * FormPreferences::build_screen_fonts()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_LEFT);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
     fl_set_counter_precision(obj, 0);
     fl_set_counter_bounds(obj, 0, 999);
     fl_set_counter_value(obj, 150);
     fl_set_counter_step(obj, 1, 1);
   fdui->input_tiny = obj = fl_add_input(FL_FLOAT_INPUT, 60, 198, 70, 30, _("tiny"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->input_larger = obj = fl_add_input(FL_FLOAT_INPUT, 60, 258, 70, 30, _("larger"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->input_small = obj = fl_add_input(FL_FLOAT_INPUT, 60, 228, 70, 30, _("small"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->input_huger = obj = fl_add_input(FL_FLOAT_INPUT, 60, 288, 70, 30, _("huger"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fl_end_form();
 
   fdui->form->fdui = fdui;
@@ -207,7 +207,7 @@ FD_form_outputs_misc * FormPreferences::build_outputs_misc()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_LEFT);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
     fl_set_counter_precision(obj, 0);
     fl_set_counter_bounds(obj, 0, 120);
     fl_set_counter_value(obj, 75);
@@ -218,7 +218,7 @@ FD_form_outputs_misc * FormPreferences::build_outputs_misc()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Default paper size|#p");
     fdui->choice_default_papersize = obj = fl_add_choice(FL_NORMAL_CHOICE, 219, 142, 199, 29, idex(_(dummy)));
@@ -226,21 +226,21 @@ FD_form_outputs_misc * FormPreferences::build_outputs_misc()
   }
     fl_set_object_boxtype(obj, FL_FRAME_BOX);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("ascii roff|#r");
     fdui->input_ascii_roff = obj = fl_add_input(FL_NORMAL_INPUT, 121, 209, 285, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("checktex|#c");
     fdui->input_checktex = obj = fl_add_input(FL_NORMAL_INPUT, 121, 250, 285, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 12, 186, 406, 120, _("Outside code interaction"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lstyle(obj, FL_BOLD_STYLE);
@@ -275,7 +275,7 @@ FD_form_spellchecker * FormPreferences::build_spellchecker()
     fl_set_object_boxtype(obj, FL_FRAME_BOX);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_TOP);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Use alternative language|#a");
     fdui->check_alt_lang = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 208, 100, 30, 30, idex(_(dummy)));
@@ -283,9 +283,9 @@ FD_form_spellchecker * FormPreferences::build_spellchecker()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_LEFT);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->input_alt_lang = obj = fl_add_input(FL_NORMAL_INPUT, 239, 100, 170, 30, "");
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Use escape characters|#e");
     fdui->check_escape_chars = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 208, 130, 30, 30, idex(_(dummy)));
@@ -293,9 +293,9 @@ FD_form_spellchecker * FormPreferences::build_spellchecker()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_LEFT);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->input_escape_chars = obj = fl_add_input(FL_NORMAL_INPUT, 239, 130, 170, 30, "");
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Use personal dictionary|#d");
     fdui->check_personal_dict = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 208, 160, 30, 30, idex(_(dummy)));
@@ -303,16 +303,16 @@ FD_form_spellchecker * FormPreferences::build_spellchecker()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_LEFT);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->input_personal_dict = obj = fl_add_input(FL_NORMAL_INPUT, 239, 160, 170, 30, "");
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Browse...|#B");
     fdui->button_personal_dict = obj = fl_add_button(FL_NORMAL_BUTTON, 239, 190, 89, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Accept compound words|#w");
     fdui->check_compound_words = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 130, 230, 30, 30, idex(_(dummy)));
@@ -320,7 +320,7 @@ FD_form_spellchecker * FormPreferences::build_spellchecker()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_RIGHT);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Use input encoding|#i");
     fdui->check_input_enc = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 130, 260, 30, 30, idex(_(dummy)));
@@ -328,7 +328,7 @@ FD_form_spellchecker * FormPreferences::build_spellchecker()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_RIGHT);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fl_end_form();
 
   fdui->form->fdui = fdui;
@@ -358,7 +358,7 @@ FD_form_inputs_misc * FormPreferences::build_inputs_misc()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fl_end_form();
 
   fdui->form->fdui = fdui;
@@ -388,14 +388,14 @@ FD_form_language * FormPreferences::build_language()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Default language|#l");
     fdui->choice_default_lang = obj = fl_add_choice(FL_NORMAL_CHOICE, 231, 56, 200, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_boxtype(obj, FL_FRAME_BOX);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Keyboard\nmap|#K");
     fdui->check_use_kbmap = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 78, 113, 30, 30, idex(_(dummy)));
@@ -403,7 +403,7 @@ FD_form_language * FormPreferences::build_language()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_LEFT);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("RtL support|#R");
     fdui->check_rtl_support = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 140, 161, 30, 30, idex(_(dummy)));
@@ -411,7 +411,7 @@ FD_form_language * FormPreferences::build_language()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_LEFT);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Mark foreign|#M");
     fdui->check_mark_foreign = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 140, 187, 30, 30, idex(_(dummy)));
@@ -419,7 +419,7 @@ FD_form_language * FormPreferences::build_language()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_LEFT);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Auto begin|#b");
     fdui->check_auto_begin = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 265, 161, 30, 30, idex(_(dummy)));
@@ -427,7 +427,7 @@ FD_form_language * FormPreferences::build_language()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_LEFT);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Auto finish|#f");
     fdui->check_auto_end = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 265, 187, 30, 30, idex(_(dummy)));
@@ -435,39 +435,39 @@ FD_form_language * FormPreferences::build_language()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_LEFT);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Command start|#s");
     fdui->input_command_begin = obj = fl_add_input(FL_NORMAL_INPUT, 131, 224, 300, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Command end|#e");
     fdui->input_command_end = obj = fl_add_input(FL_NORMAL_INPUT, 131, 257, 300, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("1st|#1");
     fdui->input_kbmap1 = obj = fl_add_input(FL_NORMAL_INPUT, 144, 97, 195, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("2nd|#2");
     fdui->input_kbmap2 = obj = fl_add_input(FL_NORMAL_INPUT, 144, 129, 195, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->button_kbmap1_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 341, 99, 90, 30, _("Browse"));
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->button_kbmap2_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 341, 128, 90, 30, _("Browse"));
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Use babel|#U");
     fdui->check_use_babel = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 390, 161, 30, 30, idex(_(dummy)));
@@ -475,7 +475,7 @@ FD_form_language * FormPreferences::build_language()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_LEFT);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Global|#G");
     fdui->check_global_options = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 390, 187, 30, 30, idex(_(dummy)));
@@ -483,7 +483,7 @@ FD_form_language * FormPreferences::build_language()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_LEFT);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fl_end_form();
 
   fdui->form->fdui = fdui;
@@ -517,14 +517,14 @@ FD_form_colors * FormPreferences::build_colors()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_TOP);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Modify|#M");
     fdui->button_modify = obj = fl_add_button(FL_NORMAL_BUTTON, 310, 285, 90, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("S|#S");
     fdui->slider_saturation = obj = fl_add_slider(FL_HOR_NICE_SLIDER, 251, 135, 150, 30, idex(_(dummy)));
@@ -532,7 +532,7 @@ FD_form_colors * FormPreferences::build_colors()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_LEFT);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
     fl_set_slider_size(obj, 0.15);
   {
     char const * const dummy = N_("V|#V");
@@ -541,7 +541,7 @@ FD_form_colors * FormPreferences::build_colors()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_LEFT);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
     fl_set_slider_size(obj, 0.15);
   {
     char const * const dummy = N_("H|#H");
@@ -549,7 +549,7 @@ FD_form_colors * FormPreferences::build_colors()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lalign(obj, FL_ALIGN_CENTER);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("R|#R");
     fdui->slider_red = obj = fl_add_slider(FL_VERT_FILL_SLIDER, 250, 25, 40, 180, idex(_(dummy)));
@@ -557,7 +557,7 @@ FD_form_colors * FormPreferences::build_colors()
   }
     fl_set_object_color(obj, FL_COL1, FL_RED);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
     fl_set_slider_size(obj, 0.15);
   {
     char const * const dummy = N_("B|#B");
@@ -566,7 +566,7 @@ FD_form_colors * FormPreferences::build_colors()
   }
     fl_set_object_color(obj, FL_COL1, FL_BLUE);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
     fl_set_slider_size(obj, 0.15);
   {
     char const * const dummy = N_("G|#G");
@@ -575,11 +575,11 @@ FD_form_colors * FormPreferences::build_colors()
   }
     fl_set_object_color(obj, FL_COL1, FL_GREEN);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
     fl_set_slider_size(obj, 0.15);
   fdui->button_colorspace = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 310, 219, 30, 30, "");
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->text_color_values = obj = fl_add_text(FL_NORMAL_TEXT, 250, 250, 150, 30, "");
     fl_set_object_boxtype(obj, FL_DOWN_BOX);
     fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
@@ -613,49 +613,49 @@ FD_form_converters * FormPreferences::build_converters()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_TOP);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Delete|#D");
     fdui->button_delete = obj = fl_add_button(FL_NORMAL_BUTTON, 340, 270, 90, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Add|#A");
     fdui->button_add = obj = fl_add_button(FL_NORMAL_BUTTON, 240, 270, 90, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Converter|#C");
     fdui->input_converter = obj = fl_add_input(FL_NORMAL_INPUT, 280, 110, 150, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("From|#F");
     fdui->choice_from = obj = fl_add_choice(FL_NORMAL_CHOICE, 280, 30, 150, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_boxtype(obj, FL_FRAME_BOX);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("To|#T");
     fdui->choice_to = obj = fl_add_choice(FL_NORMAL_CHOICE, 280, 70, 150, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_boxtype(obj, FL_FRAME_BOX);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Flags|#F");
     fdui->input_flags = obj = fl_add_input(FL_NORMAL_INPUT, 280, 150, 150, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fl_end_form();
 
   fdui->form->fdui = fdui;
@@ -686,56 +686,56 @@ FD_form_formats * FormPreferences::build_formats()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_TOP);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Format|#F");
     fdui->input_format = obj = fl_add_input(FL_NORMAL_INPUT, 280, 30, 150, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("GUI name|#G");
     fdui->input_gui_name = obj = fl_add_input(FL_NORMAL_INPUT, 280, 70, 150, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Delete|#D");
     fdui->button_delete = obj = fl_add_button(FL_NORMAL_BUTTON, 340, 270, 90, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Add|#A");
     fdui->button_add = obj = fl_add_button(FL_NORMAL_BUTTON, 240, 270, 90, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Extension|#E");
     fdui->input_extension = obj = fl_add_input(FL_NORMAL_INPUT, 280, 150, 150, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Viewer|#V");
     fdui->input_viewer = obj = fl_add_input(FL_NORMAL_INPUT, 280, 190, 150, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Shortcut|#S");
     fdui->input_shrtcut = obj = fl_add_input(FL_NORMAL_INPUT, 280, 110, 150, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fl_end_form();
 
   fdui->form->fdui = fdui;
@@ -765,7 +765,7 @@ FD_form_lnf_misc * FormPreferences::build_lnf_misc()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
     fl_set_button(obj, 1);
   {
     char const * const dummy = N_("Auto region delete|#A");
@@ -773,7 +773,7 @@ FD_form_lnf_misc * FormPreferences::build_lnf_misc()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
     fl_set_button(obj, 1);
   {
     char const * const dummy = N_("Exit confirmation|#E");
@@ -781,16 +781,16 @@ FD_form_lnf_misc * FormPreferences::build_lnf_misc()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
     fl_set_button(obj, 1);
   fdui->check_display_shrtcuts = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 15, 105, 30, 30, _("Display keyboard shortcuts"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
     fl_set_button(obj, 1);
   fdui->counter_autosave = obj = fl_add_counter(FL_NORMAL_COUNTER, 320, 255, 115, 30, _("Autosave interval"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_LEFT);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
     fl_set_counter_precision(obj, 0);
     fl_set_counter_bounds(obj, 0, 1200);
     fl_set_counter_value(obj, 300);
@@ -801,7 +801,7 @@ FD_form_lnf_misc * FormPreferences::build_lnf_misc()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
     fl_set_button(obj, 1);
   {
     char const * const dummy = N_("Cursor follows scrollbar|#C");
@@ -809,12 +809,12 @@ FD_form_lnf_misc * FormPreferences::build_lnf_misc()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
     fl_set_button(obj, 1);
   fdui->counter_wm_jump = obj = fl_add_counter(FL_NORMAL_COUNTER, 320, 225, 115, 30, _("Wheel mouse jump"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_LEFT);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
     fl_set_counter_precision(obj, 0);
     fl_set_counter_bounds(obj, 0, 250);
     fl_set_counter_value(obj, 100);
@@ -844,40 +844,40 @@ FD_form_interface * FormPreferences::build_interface()
   obj = fl_add_box(FL_FLAT_BOX, 0, 0, 450, 350, "");
   fdui->input_popup_font = obj = fl_add_input(FL_NORMAL_INPUT, 230, 30, 200, 30, _("Popup Font"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->input_menu_font = obj = fl_add_input(FL_NORMAL_INPUT, 230, 60, 200, 30, _("Menu Font"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->input_popup_encoding = obj = fl_add_input(FL_NORMAL_INPUT, 230, 90, 200, 30, _("Popup Encoding"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Bind file|#B");
     fdui->input_bind_file = obj = fl_add_input(FL_NORMAL_INPUT, 160, 178, 190, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->button_bind_file_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 350, 178, 80, 30, _("Browse..."));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("User Interface file|#U");
     fdui->input_ui_file = obj = fl_add_input(FL_NORMAL_INPUT, 160, 148, 190, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->button_ui_file_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 350, 148, 80, 30, _("Browse..."));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Override X-Windows dead-keys|#O");
     fdui->check_override_x_dead_keys = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 24, 230, 30, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
     fl_set_button(obj, 1);
   fl_end_form();
 
@@ -904,58 +904,58 @@ FD_form_printer * FormPreferences::build_printer()
   obj = fl_add_box(FL_FLAT_BOX, 0, 0, 450, 350, "");
   fdui->input_command = obj = fl_add_input(FL_NORMAL_INPUT, 130, 75, 80, 30, _("command"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->input_page_range = obj = fl_add_input(FL_NORMAL_INPUT, 130, 105, 80, 30, _("page range"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->input_copies = obj = fl_add_input(FL_NORMAL_INPUT, 130, 135, 80, 30, _("copies"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->input_reverse = obj = fl_add_input(FL_NORMAL_INPUT, 130, 165, 80, 30, _("reverse"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->input_to_printer = obj = fl_add_input(FL_NORMAL_INPUT, 130, 195, 80, 30, _("to printer"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->input_file_extension = obj = fl_add_input(FL_NORMAL_INPUT, 130, 225, 80, 30, _("file extension"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->input_spool_command = obj = fl_add_input(FL_NORMAL_INPUT, 130, 255, 80, 30, _("spool command"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->input_paper_type = obj = fl_add_input(FL_NORMAL_INPUT, 130, 285, 80, 30, _("paper type"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->input_even_pages = obj = fl_add_input(FL_NORMAL_INPUT, 360, 75, 80, 30, _("even pages"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->input_odd_pages = obj = fl_add_input(FL_NORMAL_INPUT, 360, 105, 80, 30, _("odd pages"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->input_collated = obj = fl_add_input(FL_NORMAL_INPUT, 360, 135, 80, 30, _("collated"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->input_landscape = obj = fl_add_input(FL_NORMAL_INPUT, 360, 165, 80, 30, _("landscape"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->input_to_file = obj = fl_add_input(FL_NORMAL_INPUT, 360, 195, 80, 30, _("to file"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->input_extra_options = obj = fl_add_input(FL_NORMAL_INPUT, 360, 225, 80, 30, _("extra options"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->input_spool_prefix = obj = fl_add_input(FL_NORMAL_INPUT, 360, 255, 80, 30, _("spool printer prefix"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->input_paper_size = obj = fl_add_input(FL_NORMAL_INPUT, 360, 285, 80, 30, _("paper size"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->input_name = obj = fl_add_input(FL_NORMAL_INPUT, 130, 10, 80, 30, _("name"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->check_adapt_output = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 240, 10, 30, 30, _("adapt output"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 0, 60, 452, 260, _("Printer Command and Flags"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
   fl_end_form();
@@ -987,10 +987,10 @@ FD_form_paths * FormPreferences::build_paths()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->button_default_path_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 340, 10, 90, 30, _("Browse..."));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Last file count|#L");
     fdui->counter_lastfiles = obj = fl_add_counter(FL_SIMPLE_COUNTER, 170, 130, 90, 30, idex(_(dummy)));
@@ -998,7 +998,7 @@ FD_form_paths * FormPreferences::build_paths()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_LEFT);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
     fl_set_counter_precision(obj, 0);
     fl_set_counter_bounds(obj, 0, 9);
     fl_set_counter_value(obj, 4);
@@ -1009,10 +1009,10 @@ FD_form_paths * FormPreferences::build_paths()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->button_template_path_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 340, 40, 90, 30, _("Browse..."));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Check last files|#C");
     fdui->check_last_files = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 134, 100, 30, 30, idex(_(dummy)));
@@ -1020,17 +1020,17 @@ FD_form_paths * FormPreferences::build_paths()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_LEFT);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
     fl_set_button(obj, 1);
   fdui->button_temp_dir_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 340, 70, 90, 30, _("Browse..."));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->input_lastfiles = obj = fl_add_input(FL_NORMAL_INPUT, 170, 100, 170, 30, "");
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->button_lastfiles_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 340, 100, 90, 30, _("Browse..."));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Backup path|#B");
     fdui->check_make_backups = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 134, 170, 30, 30, idex(_(dummy)));
@@ -1038,27 +1038,27 @@ FD_form_paths * FormPreferences::build_paths()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
     fl_set_button(obj, 1);
   fdui->input_backup_path = obj = fl_add_input(FL_NORMAL_INPUT, 170, 170, 170, 30, "");
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->button_backup_path_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 340, 170, 90, 30, _("Browse..."));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("LyXServer pipe|#S");
     fdui->input_serverpipe = obj = fl_add_input(FL_NORMAL_INPUT, 169, 217, 170, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->button_serverpipe_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 339, 217, 90, 30, _("Browse..."));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->input_temp_dir = obj = fl_add_input(FL_NORMAL_INPUT, 170, 70, 170, 30, "");
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Temp dir|#d");
     fdui->check_use_temp_dir = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 134, 70, 30, 30, idex(_(dummy)));
@@ -1066,7 +1066,7 @@ FD_form_paths * FormPreferences::build_paths()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_LEFT);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
     fl_set_button(obj, 1);
   fl_end_form();
 
index 6bab3f4c187b7aa7c85283d09451791a203dd7cf..54da663ac9cf64153bd7b193a4bc6da1f31f6a69 100644 (file)
@@ -5,35 +5,35 @@
 #define FD_form_preferences_h_
 
 /** Callbacks, globals and object handlers **/
-extern  "C" void C_FormBaseApplyCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseOKCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseRestoreCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedApplyCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedCancelCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedOKCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedRestoreCB(FL_OBJECT *, long);
 
 
-extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
 
-extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
 
-extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
 
-extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
 
-extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
 
-extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
 
-extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
 
-extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
 
-extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
 
-extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
 
-extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
 
-extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
 
 
 /**** Forms and Objects ****/
index b09ddd223dfba484edbf6057fe498934994333b7..be29a6d22b22389065505e3dd03791a342933298 100644 (file)
@@ -27,10 +27,10 @@ FD_form_print * FormPrint::build_print()
   obj = fl_add_box(FL_UP_BOX, 0, 0, 340, 390, "");
   fdui->input_printer = obj = fl_add_input(FL_NORMAL_INPUT, 90, 225, 230, 30, "");
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->input_file = obj = fl_add_input(FL_NORMAL_INPUT, 90, 265, 230, 30, "");
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
 
   fdui->group_radio_printto = fl_bgn_group();
   {
@@ -39,33 +39,33 @@ FD_form_print * FormPrint::build_print()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("File|#F");
     fdui->radio_file = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 10, 265, 80, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fl_end_group();
 
   fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 10, 350, 100, 30, _("OK"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseOKCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedOKCB, 0);
   {
     char const * const dummy = N_("Apply|#A");
     fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 120, 350, 100, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseApplyCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedApplyCB, 0);
   {
     char const * const dummy = N_("Cancel|^[");
     fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 230, 350, 100, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseCancelCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedCancelCB, 0);
 
   fdui->group_radio_pages = fl_bgn_group();
   {
@@ -74,21 +74,21 @@ FD_form_print * FormPrint::build_print()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Only Odd Pages|#O");
     fdui->radio_odd_pages = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 10, 60, 160, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Only Even Pages|#E");
     fdui->radio_even_pages = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 10, 90, 160, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fl_end_group();
 
 
@@ -99,33 +99,33 @@ FD_form_print * FormPrint::build_print()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Reverse Order|#R");
     fdui->radio_order_reverse = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 180, 60, 150, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fl_end_group();
 
   fdui->input_from_page = obj = fl_add_input(FL_INT_INPUT, 20, 160, 50, 30, _("Pages:"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->input_count = obj = fl_add_input(FL_INT_INPUT, 190, 160, 130, 30, _("Count:"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Collated|#C");
     fdui->radio_collated = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 180, 115, 140, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fdui->input_to_page = obj = fl_add_input(FL_INT_INPUT, 110, 160, 50, 30, _("to"));
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 10, 20, 160, 180, _("Print"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lstyle(obj, FL_BOLD_STYLE);
@@ -144,7 +144,7 @@ FD_form_print * FormPrint::build_print()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fl_end_form();
 
   fdui->form->fdui = fdui;
index eda70ba0d4aecb5c2e3234c10e8414827d53a6d7..fc38503e0ee5496ebff25402358b80277577c360 100644 (file)
@@ -5,10 +5,10 @@
 #define FD_form_print_h_
 
 /** Callbacks, globals and object handlers **/
-extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseOKCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseApplyCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedOKCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedApplyCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedCancelCB(FL_OBJECT *, long);
 
 
 /**** Forms and Objects ****/
index 6c950cd066c6b647ac130bb5f7cc539bf9b43c04..651284a1c43f64eaf573ba2ae0d31d813261333e 100644 (file)
@@ -28,14 +28,14 @@ FD_form_ref * FormRef::build_ref()
   fdui->browser = obj = fl_add_browser(FL_HOLD_BROWSER, 10, 10, 270, 240, "");
     fl_set_object_lalign(obj, FL_ALIGN_TOP);
     fl_set_object_gravity(obj, FL_NorthWest, FL_South);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 2);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 2);
   {
     char const * const dummy = N_("Update|#U");
     fdui->button_update = obj = fl_add_button(FL_NORMAL_BUTTON, 40, 260, 90, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_gravity(obj, FL_SouthWest, FL_SouthWest);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 3);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 3);
   {
     char const * const dummy = N_("Sort|#S");
     fdui->sort = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 170, 260, 30, 30, idex(_(dummy)));
@@ -43,7 +43,7 @@ FD_form_ref * FormRef::build_ref()
   }
     fl_set_object_lalign(obj, FL_ALIGN_RIGHT);
     fl_set_object_gravity(obj, FL_SouthWest, FL_SouthWest);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 4);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 4);
   {
     char const * const dummy = N_("Name:|#N");
     fdui->name = obj = fl_add_input(FL_NORMAL_INPUT, 370, 10, 150, 40, idex(_(dummy)));
@@ -60,38 +60,38 @@ FD_form_ref * FormRef::build_ref()
     fl_set_object_boxtype(obj, FL_FRAME_BOX);
     fl_set_object_lalign(obj, FL_ALIGN_TOP);
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 5);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 5);
   {
     char const * const dummy = N_("Goto reference|#G");
     fdui->button_go = obj = fl_add_button(FL_NORMAL_BUTTON, 340, 200, 140, 40, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 1);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 1);
   fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 230, 300, 90, 30, _("OK"));
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormBaseOKCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedOKCB, 0);
   {
     char const * const dummy = N_("Cancel|^[");
     fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 430, 300, 90, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormBaseCancelCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedCancelCB, 0);
   {
     char const * const dummy = N_("Apply|#A");
     fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 330, 300, 90, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormBaseApplyCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedApplyCB, 0);
   {
     char const * const dummy = N_("Restore|#R");
     fdui->button_restore = obj = fl_add_button(FL_NORMAL_BUTTON, 10, 300, 90, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormBaseRestoreCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedRestoreCB, 0);
   fl_end_form();
 
   fdui->form->fdui = fdui;
index e37f57ff18d54bddab5ed5c7da6bc6f3a23a4190..2ebce3212db31be14cecb7f904d72f02ed685b4d 100644 (file)
@@ -5,11 +5,11 @@
 #define FD_form_ref_h_
 
 /** Callbacks, globals and object handlers **/
-extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseOKCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseApplyCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseRestoreCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedOKCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedCancelCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedApplyCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedRestoreCB(FL_OBJECT *, long);
 
 
 /**** Forms and Objects ****/
index 00bd8ba0ab58fb91da0d4c38c9d7d6a945eaa28f..fa28b3bc9de327b120d740c489beb6c1ea1f107b 100644 (file)
@@ -35,7 +35,7 @@ FD_form_search * FormSearch::build_search()
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
     fl_set_object_resize(obj, FL_RESIZE_X);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Replace with|#W");
     fdui->input_replace = obj = fl_add_input(FL_NORMAL_INPUT, 110, 40, 180, 30, idex(_(dummy)));
@@ -44,7 +44,7 @@ FD_form_search * FormSearch::build_search()
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
     fl_set_object_resize(obj, FL_RESIZE_X);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_(" >|#F^s");
     fdui->findnext = obj = fl_add_button(FL_NORMAL_BUTTON, 200, 80, 90, 30, idex(_(dummy)));
@@ -52,7 +52,7 @@ FD_form_search * FormSearch::build_search()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_(" <|#B^r");
     fdui->findprev = obj = fl_add_button(FL_NORMAL_BUTTON, 110, 80, 90, 30, idex(_(dummy)));
@@ -60,7 +60,7 @@ FD_form_search * FormSearch::build_search()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Replace|#R#r");
     fdui->replace = obj = fl_add_button(FL_NORMAL_BUTTON, 110, 120, 90, 30, idex(_(dummy)));
@@ -68,7 +68,7 @@ FD_form_search * FormSearch::build_search()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Close|^[");
     fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 350, 120, 80, 30, idex(_(dummy)));
@@ -76,21 +76,21 @@ FD_form_search * FormSearch::build_search()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormBaseCancelCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedCancelCB, 0);
   {
     char const * const dummy = N_("Case sensitive|#s#S");
     fdui->casesensitive = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 300, 20, 150, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_gravity(obj, FL_NorthEast, FL_NorthEast);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Match word|#M#m");
     fdui->matchword = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 300, 50, 150, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_gravity(obj, FL_NorthEast, FL_NorthEast);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Replace All|#A#a");
     fdui->replaceall = obj = fl_add_button(FL_NORMAL_BUTTON, 200, 120, 90, 30, idex(_(dummy)));
@@ -98,7 +98,7 @@ FD_form_search * FormSearch::build_search()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fl_end_form();
 
   fdui->form->fdui = fdui;
index 414700558344f2c6b19da2845d0f8c2b8d210e27..c9ac9ecf8b62139402608d27b2a76de2579888b6 100644 (file)
@@ -5,8 +5,8 @@
 #define FD_form_search_h_
 
 /** Callbacks, globals and object handlers **/
-extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedCancelCB(FL_OBJECT *, long);
 
 
 /**** Forms and Objects ****/
index d6b674ecd72bd96f8aefe763d8e830358eaceaa0..7111cbb6a97499bf2ed40edc42c5494c23ee5a5c 100644 (file)
@@ -33,7 +33,7 @@ FD_form_tabular * FormTabular::build_tabular()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseCancelCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedCancelCB, 0);
   fdui->input_tabular_column = obj = fl_add_input(FL_NORMAL_INPUT, 65, 260, 60, 30, "");
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT);
@@ -73,54 +73,54 @@ FD_form_tabular_options * FormTabular::build_tabular_options()
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Delete Column|#O");
     fdui->button_delete_column = obj = fl_add_button(FL_NORMAL_BUTTON, 140, 40, 120, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Append Row|#p");
     fdui->button_append_row = obj = fl_add_button(FL_NORMAL_BUTTON, 10, 70, 120, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Delete Row|#w");
     fdui->button_delete_row = obj = fl_add_button(FL_NORMAL_BUTTON, 140, 70, 120, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Set Borders|#S");
     fdui->button_set_borders = obj = fl_add_button(FL_NORMAL_BUTTON, 10, 10, 120, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Unset Borders|#U");
     fdui->button_unset_borders = obj = fl_add_button(FL_NORMAL_BUTTON, 140, 10, 120, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Longtable|#L");
     fdui->radio_longtable = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 280, 30, 90, 25, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Rotate 90°|#9");
     fdui->radio_rotate_tabular = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 280, 55, 90, 25, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 280, 20, 120, 75, _("Spec. Table"));
     fl_set_object_lstyle(obj, FL_BOLD_STYLE);
   fl_end_form();
@@ -153,7 +153,7 @@ FD_form_column_options * FormTabular::build_column_options()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Bottom|#b");
     fdui->radio_border_bottom = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 85, 75, 25, 25, idex(_(dummy)));
@@ -161,7 +161,7 @@ FD_form_column_options * FormTabular::build_column_options()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_BOTTOM_LEFT);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Left|#l");
     fdui->radio_border_left = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 65, 60, 25, 25, idex(_(dummy)));
@@ -169,7 +169,7 @@ FD_form_column_options * FormTabular::build_column_options()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_LEFT);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Right|#r");
     fdui->radio_border_right = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 105, 60, 25, 25, idex(_(dummy)));
@@ -177,49 +177,49 @@ FD_form_column_options * FormTabular::build_column_options()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_RIGHT);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Left|#e");
     fdui->radio_align_left = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 205, 30, 110, 25, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Right|#i");
     fdui->radio_align_right = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 205, 80, 115, 25, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Center|#c");
     fdui->radio_align_center = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 205, 55, 115, 25, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Top|#p");
     fdui->radio_valign_top = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 345, 30, 125, 25, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Center|#n");
     fdui->radio_valign_center = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 345, 55, 125, 25, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Bottom|#o");
     fdui->radio_valign_bottom = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 345, 80, 120, 25, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 20, 20, 170, 105, _("Borders"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lstyle(obj, FL_BOLD_STYLE);
@@ -236,7 +236,7 @@ FD_form_column_options * FormTabular::build_column_options()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_TOP);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Alignment|#A");
     fdui->input_special_alignment = obj = fl_add_input(FL_NORMAL_INPUT, 85, 170, 215, 30, idex(_(dummy)));
@@ -244,7 +244,7 @@ FD_form_column_options * FormTabular::build_column_options()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_TOP);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 20, 135, 450, 80, _("Special column"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_TOP);
@@ -279,7 +279,7 @@ FD_form_cell_options * FormTabular::build_cell_options()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Bottom|#b");
     fdui->radio_border_bottom = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 85, 75, 25, 25, idex(_(dummy)));
@@ -287,7 +287,7 @@ FD_form_cell_options * FormTabular::build_cell_options()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_BOTTOM_LEFT);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Left|#l");
     fdui->radio_border_left = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 65, 60, 25, 25, idex(_(dummy)));
@@ -295,7 +295,7 @@ FD_form_cell_options * FormTabular::build_cell_options()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_LEFT);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Right|#r");
     fdui->radio_border_right = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 105, 60, 25, 25, idex(_(dummy)));
@@ -303,49 +303,49 @@ FD_form_cell_options * FormTabular::build_cell_options()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_RIGHT);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Left|#e");
     fdui->radio_align_left = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 205, 30, 110, 25, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Right|#i");
     fdui->radio_align_right = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 205, 80, 115, 25, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Center|#c");
     fdui->radio_align_center = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 205, 55, 115, 25, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Top|#p");
     fdui->radio_valign_top = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 345, 30, 125, 25, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Center|#n");
     fdui->radio_valign_center = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 345, 55, 125, 25, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Bottom|#o");
     fdui->radio_valign_bottom = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 345, 80, 120, 25, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 20, 20, 170, 105, _("Borders"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lstyle(obj, FL_BOLD_STYLE);
@@ -360,31 +360,31 @@ FD_form_cell_options * FormTabular::build_cell_options()
     fdui->input_mcolumn_width = obj = fl_add_input(FL_NORMAL_INPUT, 280, 180, 175, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Alignment|#A");
     fdui->input_special_multialign = obj = fl_add_input(FL_NORMAL_INPUT, 280, 145, 175, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Multicolumn|#M");
     fdui->radio_multicolumn = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 30, 140, 130, 25, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Use Minipage|#s");
     fdui->radio_useminipage = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 30, 165, 130, 25, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Rotate 90°|#9");
     fdui->radio_rotate_cell = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 30, 190, 130, 25, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 20, 135, 150, 80, _("Special Cell"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lstyle(obj, FL_BOLD_STYLE);
@@ -419,31 +419,31 @@ FD_form_longtable_options * FormTabular::build_longtable_options()
     fdui->radio_lt_firsthead = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 30, 55, 90, 25, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Head|#H");
     fdui->radio_lt_head = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 30, 30, 90, 25, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Foot|#F");
     fdui->radio_lt_foot = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 195, 30, 90, 25, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Last Foot|#L");
     fdui->radio_lt_lastfoot = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 195, 55, 90, 25, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("New Page|#N");
     fdui->radio_lt_newpage = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 355, 25, 90, 25, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 20, 20, 150, 75, _("Header"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lstyle(obj, FL_BOLD_STYLE);
index d8e25ee9a5e5a8d587e237ff4328774b9512d3dd..24be20b707b468422edb23700eff2101e8f2ce18 100644 (file)
@@ -5,15 +5,15 @@
 #define FD_form_tabular_h_
 
 /** Callbacks, globals and object handlers **/
-extern  "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedCancelCB(FL_OBJECT *, long);
 
-extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
 
-extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
 
-extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
 
-extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
 
 
 /**** Forms and Objects ****/
index 80d46292c09fb72f774997547ce035f6491e5fc9..1579272f6c6984f555531b485799af5005c8d929 100644 (file)
@@ -27,21 +27,21 @@ FD_form_tabular_create * FormTabularCreate::build_tabular_create()
   obj = fl_add_box(FL_UP_BOX, 0, 0, 310, 130, "");
   fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 10, 90, 90, 30, _("OK"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseOKCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedOKCB, 0);
   {
     char const * const dummy = N_("Apply|#A");
     fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 110, 90, 90, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseApplyCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedApplyCB, 0);
   {
     char const * const dummy = N_("Cancel|^[");
     fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 210, 90, 90, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseCancelCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedCancelCB, 0);
   fdui->slider_columns = obj = fl_add_valslider(FL_HOR_SLIDER, 80, 50, 220, 30, _("Columns"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_LEFT);
index 677c9ac1f2dea848b2dfedf8936c9cbffda2c23a..ae2f48faef529f837088c64fbd053da7661b8e7b 100644 (file)
@@ -5,9 +5,9 @@
 #define FD_form_tabular_create_h_
 
 /** Callbacks, globals and object handlers **/
-extern  "C" void C_FormBaseOKCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseApplyCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedOKCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedApplyCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedCancelCB(FL_OBJECT *, long);
 
 
 /**** Forms and Objects ****/
index 46538a0e389634d05a3258ce7468c88631055a25..61869625b57ddbe2736447bfdff64916654df446 100644 (file)
@@ -27,7 +27,7 @@ FD_form_toc * FormToc::build_toc()
   obj = fl_add_box(FL_UP_BOX, 0, 0, 420, 340, "");
   fdui->browser_toc = obj = fl_add_browser(FL_HOLD_BROWSER, 10, 10, 400, 280, "");
     fl_set_object_gravity(obj, FL_NorthWest, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Update|#U");
     fdui->button_update = obj = fl_add_button(FL_NORMAL_BUTTON, 200, 300, 100, 30, idex(_(dummy)));
@@ -35,7 +35,7 @@ FD_form_toc * FormToc::build_toc()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Type|#T");
     fdui->choice_toc_type = obj = fl_add_choice(FL_NORMAL_CHOICE, 60, 300, 130, 30, idex(_(dummy)));
@@ -43,7 +43,7 @@ FD_form_toc * FormToc::build_toc()
   }
     fl_set_object_boxtype(obj, FL_FRAME_BOX);
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Close|^[^M");
     fdui->button_cancel = obj = fl_add_button(FL_RETURN_BUTTON, 310, 300, 100, 30, idex(_(dummy)));
@@ -51,7 +51,7 @@ FD_form_toc * FormToc::build_toc()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormBaseCancelCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedCancelCB, 0);
   fl_end_form();
 
   fdui->form->fdui = fdui;
index 38556cf0b207bec0b4b186973fac434d32972750..0e0780902a380c86d8db0618908295ff147ab081 100644 (file)
@@ -5,8 +5,8 @@
 #define FD_form_toc_h_
 
 /** Callbacks, globals and object handlers **/
-extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedCancelCB(FL_OBJECT *, long);
 
 
 /**** Forms and Objects ****/
index 4d5e4b002e13eadaed4b519a2f47cb4bc031ba00..c91a362d242cfd05df70d7a010a639cf464a2cff 100644 (file)
@@ -33,7 +33,7 @@ FD_form_url * FormUrl::build_url()
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
     fl_set_object_resize(obj, FL_RESIZE_X);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Name|#N");
     fdui->name = obj = fl_add_input(FL_NORMAL_INPUT, 70, 90, 440, 30, idex(_(dummy)));
@@ -42,7 +42,7 @@ FD_form_url * FormUrl::build_url()
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
     fl_set_object_resize(obj, FL_RESIZE_X);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("HTML type|#H");
     fdui->radio_html = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 480, 10, 30, 30, idex(_(dummy)));
@@ -52,7 +52,7 @@ FD_form_url * FormUrl::build_url()
     fl_set_object_lalign(obj, FL_ALIGN_LEFT);
     fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
     fl_set_object_resize(obj, FL_RESIZE_X);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   {
     char const * const dummy = N_("Cancel|^[");
     fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 410, 130, 100, 30, idex(_(dummy)));
@@ -60,10 +60,10 @@ FD_form_url * FormUrl::build_url()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormBaseCancelCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedCancelCB, 0);
   fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 190, 130, 100, 30, _("OK"));
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormBaseOKCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedOKCB, 0);
   {
     char const * const dummy = N_("Apply|#A");
     fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 300, 130, 100, 30, idex(_(dummy)));
@@ -71,7 +71,7 @@ FD_form_url * FormUrl::build_url()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormBaseApplyCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedApplyCB, 0);
   {
     char const * const dummy = N_("Restore|#R");
     fdui->button_restore = obj = fl_add_button(FL_NORMAL_BUTTON, 10, 130, 100, 30, idex(_(dummy)));
@@ -79,7 +79,7 @@ FD_form_url * FormUrl::build_url()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormBaseRestoreCB, 0);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedRestoreCB, 0);
   fl_end_form();
 
   fdui->form->fdui = fdui;
index 79bb42685652ad3a1a2e1ffb5203bdb6fbb367af..b6221726eb969bd00bf2170dfce3045c448e2208 100644 (file)
@@ -5,11 +5,11 @@
 #define FD_form_url_h_
 
 /** Callbacks, globals and object handlers **/
-extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseOKCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseApplyCB(FL_OBJECT *, long);
-extern  "C" void C_FormBaseRestoreCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedCancelCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedOKCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedApplyCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedRestoreCB(FL_OBJECT *, long);
 
 
 /**** Forms and Objects ****/
index 65693be14487cba0173675ac8c75c02142b0d3b2..ad0a54b41d8f4dba88c9053d962e697dcd13f3e8 100644 (file)
@@ -45,7 +45,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: database
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -63,7 +63,7 @@ shortcut: ^M
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_ok
-callback: C_FormBaseOKCB
+callback: C_FormBaseDeprecatedOKCB
 argument: 3
 
 --------------------
@@ -81,7 +81,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_cancel
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
 argument: 2
 
 --------------------
@@ -99,7 +99,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: style
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 ==============================
index 2a7071f89a4226ea2fc0286e42dd50515d9d5e74..9a565286a685d92f90e9239a58d978baa8dea5e3 100644 (file)
@@ -63,7 +63,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_SouthEast FL_SouthEast
 name: button_close
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
 argument: 0
 
 --------------------
@@ -81,7 +81,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_SouthEast FL_SouthEast
 name: button_update
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 ==============================
index fbc4bc394c661d1fa6056968216c8e3ebf403e22..25ce74c2858c03b13804851363980a36599ea31a 100644 (file)
@@ -64,7 +64,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NorthWest FL_NorthEast
 name: choice_family
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -82,7 +82,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NorthWest FL_NorthEast
 name: choice_series
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -100,7 +100,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NorthWest FL_NorthEast
 name: choice_shape
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -118,7 +118,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NorthWest FL_NorthEast
 name: choice_size
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -136,7 +136,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NorthWest FL_NorthEast
 name: choice_bar
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -154,7 +154,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_SouthEast FL_SouthEast
 name: button_apply
-callback: C_FormBaseApplyCB
+callback: C_FormBaseDeprecatedApplyCB
 argument: 0
 
 --------------------
@@ -172,7 +172,7 @@ shortcut: ^M
 resize: FL_RESIZE_NONE
 gravity: FL_SouthEast FL_SouthEast
 name: button_close
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
 argument: 0
 
 --------------------
@@ -190,7 +190,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NorthWest FL_NorthEast
 name: choice_color
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -208,7 +208,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NorthWest FL_NorthEast
 name: check_toggle_all
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -226,7 +226,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NorthWest FL_NorthEast
 name: choice_language
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
index e322032589d75fa4653a6f5b7af3f4c0eec0d7a4..a373942bf001495631a27cc904cbd007da1699ef 100644 (file)
@@ -8,14 +8,14 @@ Unit of measure: FL_COORD_PIXEL
 
 =============== FORM ===============
 Name: form_citation
-Width: 435
-Height: 665
-Number of Objects: 15
+Width: 430
+Height: 830
+Number of Objects: 20
 
 --------------------
 class: FL_BOX
 type: UP_BOX
-box: 0 0 435 665
+box: 0 0 430 830
 boxtype: FL_UP_BOX
 colors: FL_COL1 FL_COL1
 alignment: FL_ALIGN_CENTER
@@ -141,7 +141,7 @@ argument: 0
 --------------------
 class: FL_BROWSER
 type: NORMAL_BROWSER
-box: 10 360 410 80
+box: 10 360 410 95
 boxtype: FL_DOWN_BOX
 colors: FL_COL1 FL_YELLOW
 alignment: FL_ALIGN_TOP_LEFT
@@ -156,10 +156,100 @@ name: browser_info
 callback: 
 argument: 
 
+--------------------
+class: FL_LABELFRAME
+type: ENGRAVED_FRAME
+box: 10 475 410 125
+boxtype: FL_NO_BOX
+colors: FL_BLACK FL_COL1
+alignment: FL_ALIGN_TOP_LEFT
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLACK
+label: Search
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_SouthWest FL_SouthEast
+name: frame_search
+callback: 
+argument: 
+
+--------------------
+class: FL_INPUT
+type: NORMAL_INPUT
+box: 25 490 380 30
+boxtype: FL_DOWN_BOX
+colors: FL_COL1 FL_MCOL
+alignment: FL_ALIGN_TOP
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLACK
+label: 
+shortcut: 
+resize: FL_RESIZE_NONE
+gravity: FL_SouthWest FL_SouthEast
+name: input_search
+callback: 
+argument: 
+
+--------------------
+class: FL_BUTTON
+type: PUSH_BUTTON
+box: 25 525 90 30
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLACK
+label: Simple
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_SouthWest FL_SouthWest
+name: button_search_type
+callback: C_FormBaseInputCB
+argument: 0
+
+--------------------
+class: FL_BUTTON
+type: NORMAL_BUTTON
+box: 315 525 90 30
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLACK
+label: Previous|#P
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_SouthEast FL_SouthEast
+name: button_previous
+callback: C_FormBaseInputCB
+argument: 0
+
+--------------------
+class: FL_BUTTON
+type: NORMAL_BUTTON
+box: 315 560 90 30
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLACK
+label: Next|#N
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_SouthEast FL_SouthEast
+name: button_next
+callback: C_FormBaseInputCB
+argument: 0
+
 --------------------
 class: FL_CHOICE
 type: NORMAL_CHOICE
-box: 160 470 130 30
+box: 160 630 130 30
 boxtype: FL_FRAME_BOX
 colors: FL_COL1 FL_BLACK
 alignment: FL_ALIGN_LEFT
@@ -177,7 +267,7 @@ argument: 0
 --------------------
 class: FL_INPUT
 type: NORMAL_INPUT
-box: 100 520 250 30
+box: 100 680 250 30
 boxtype: FL_DOWN_BOX
 colors: FL_COL1 FL_MCOL
 alignment: FL_ALIGN_LEFT
@@ -195,7 +285,7 @@ argument: 0
 --------------------
 class: FL_INPUT
 type: NORMAL_INPUT
-box: 100 570 250 30
+box: 100 730 250 30
 boxtype: FL_DOWN_BOX
 colors: FL_COL1 FL_MCOL
 alignment: FL_ALIGN_LEFT
@@ -213,7 +303,7 @@ argument: 0
 --------------------
 class: FL_BUTTON
 type: NORMAL_BUTTON
-box: 10 630 90 30
+box: 10 790 90 30
 boxtype: FL_UP_BOX
 colors: FL_COL1 FL_COL1
 alignment: FL_ALIGN_CENTER
@@ -231,7 +321,7 @@ argument: 0
 --------------------
 class: FL_BUTTON
 type: RETURN_BUTTON
-box: 130 630 90 30
+box: 130 790 90 30
 boxtype: FL_UP_BOX
 colors: FL_COL1 FL_COL1
 alignment: FL_ALIGN_CENTER
@@ -249,7 +339,7 @@ argument: 0
 --------------------
 class: FL_BUTTON
 type: NORMAL_BUTTON
-box: 230 630 90 30
+box: 230 790 90 30
 boxtype: FL_UP_BOX
 colors: FL_COL1 FL_COL1
 alignment: FL_ALIGN_CENTER
@@ -267,7 +357,7 @@ argument: 0
 --------------------
 class: FL_BUTTON
 type: NORMAL_BUTTON
-box: 330 630 90 30
+box: 330 790 90 30
 boxtype: FL_UP_BOX
 colors: FL_COL1 FL_COL1
 alignment: FL_ALIGN_CENTER
index cc16d01bd38d91bb1c1c0113e6ae5af5af9f09fa..1c4297503cac29ee4cffb6ee7d7d50e67c6e26cd 100644 (file)
@@ -99,7 +99,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_South FL_South
 name: button_cancel
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
 argument: 0
 
 ==============================
index 56bce85c7d1dcb090187cc565014df8a48e38a4e..6f489eecc3ace1c4275556473c0599246d44d680 100644 (file)
@@ -45,7 +45,7 @@ shortcut: ^M
 resize: FL_RESIZE_NONE
 gravity: FL_South FL_South
 name: button_cancel
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
 argument: 0
 
 --------------------
index 6f94594c23005f1364d3f8bbe5393229652ba412..e94e73bbab3637a5955836f31be9237b0007c731 100644 (file)
@@ -20,7 +20,7 @@
 -    fl_set_pixmapbutton_file(obj, _("/nfs/sinco/source/lyx/lyx-devel/lib/images/psnfss2.xpm"));
 +  fl_set_border_width(-3);
 +  fdui->bmtable_bullet_panel = obj = fl_add_bmtable(1, 90, 105, 265, 180, "");
-+  fl_set_object_callback(obj, C_FormBaseInputCB, BULLETBMTABLE);
++  fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, BULLETBMTABLE);
 +  fl_set_object_lcol(obj, FL_BLUE);
 +  fl_set_object_boxtype(obj, FL_UP_BOX);
 +  fl_set_bmtable_pixmap_file(obj, 6, 6,
index b8bb057c0cff78739c25649386a4cb7926bfa298..36671eab72d77088378d39fa45307eb7b73c8d3c 100644 (file)
@@ -64,7 +64,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_cancel
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
 argument: INPUT
 
 --------------------
@@ -82,7 +82,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_apply
-callback: C_FormBaseApplyCB
+callback: C_FormBaseDeprecatedApplyCB
 argument: INPUT
 
 --------------------
@@ -100,7 +100,7 @@ shortcut: ^M
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_ok
-callback: C_FormBaseOKCB
+callback: C_FormBaseDeprecatedOKCB
 argument: INPUT
 
 --------------------
@@ -136,7 +136,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_restore
-callback: C_FormBaseRestoreCB
+callback: C_FormBaseDeprecatedRestoreCB
 argument: INPUT
 
 =============== FORM ===============
@@ -196,7 +196,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: choice_paperpackage
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUT
 
 --------------------
@@ -376,7 +376,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_portrait
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUT
 
 --------------------
@@ -394,7 +394,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_landscape
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUT
 
 --------------------
@@ -430,7 +430,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: choice_papersize2
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUT
 
 --------------------
@@ -466,7 +466,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: push_use_geometry
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUT
 
 --------------------
@@ -484,7 +484,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_custom_width
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUT
 
 --------------------
@@ -502,7 +502,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_custom_height
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUT
 
 --------------------
@@ -520,7 +520,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_top_margin
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUT
 
 --------------------
@@ -538,7 +538,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_bottom_margin
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUT
 
 --------------------
@@ -556,7 +556,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_left_margin
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUT
 
 --------------------
@@ -574,7 +574,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_right_margin
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUT
 
 --------------------
@@ -592,7 +592,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_head_height
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUT
 
 --------------------
@@ -610,7 +610,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_head_sep
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUT
 
 --------------------
@@ -628,7 +628,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_foot_skip
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUT
 
 --------------------
@@ -742,7 +742,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: choice_doc_fonts
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUT
 
 --------------------
@@ -760,7 +760,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: choice_doc_fontsize
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUT
 
 --------------------
@@ -778,7 +778,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: choice_doc_class
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: CHECKCHOICECLASS
 
 --------------------
@@ -796,7 +796,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: choice_doc_pagestyle
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUT
 
 --------------------
@@ -814,7 +814,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: choice_doc_spacing
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUT
 
 --------------------
@@ -832,7 +832,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_doc_extra
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUT
 
 --------------------
@@ -850,7 +850,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_doc_skip
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUT
 
 --------------------
@@ -868,7 +868,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: choice_doc_skip
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUT
 
 --------------------
@@ -904,7 +904,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_doc_sides_one
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUT
 
 --------------------
@@ -922,7 +922,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_doc_sides_two
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUT
 
 --------------------
@@ -976,7 +976,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_doc_columns_one
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUT
 
 --------------------
@@ -994,7 +994,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_doc_columns_two
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUT
 
 --------------------
@@ -1048,7 +1048,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_doc_indent
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUT
 
 --------------------
@@ -1066,7 +1066,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_doc_skip
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUT
        value: 1
 
@@ -1103,7 +1103,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_doc_spacing
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUT
 
 =============== FORM ===============
@@ -1163,7 +1163,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: choice_inputenc
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUT
 
 --------------------
@@ -1181,7 +1181,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: choice_quotes_language
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUT
 
 --------------------
@@ -1217,7 +1217,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_single
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUT
 
 --------------------
@@ -1235,7 +1235,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_double
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUT
 
 --------------------
@@ -1271,7 +1271,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: choice_language
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUT
 
 =============== FORM ===============
@@ -1313,7 +1313,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_float_placement
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUT
 
 --------------------
@@ -1331,7 +1331,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: slider_secnumdepth
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUT
 
 --------------------
@@ -1349,7 +1349,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: slider_tocdepth
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUT
 
 --------------------
@@ -1367,7 +1367,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: choice_postscript_driver
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUT
 
 --------------------
@@ -1385,7 +1385,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_use_amsmath
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUT
 
 =============== FORM ===============
@@ -1465,7 +1465,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: choice_bullet_size
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: CHOICEBULLETSIZE
 
 --------------------
@@ -1483,7 +1483,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_bullet_latex
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: INPUTBULLETLATEX
 
 --------------------
@@ -1519,7 +1519,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_bullet_depth_1
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: BULLETDEPTH1
        value: 1
 
@@ -1538,7 +1538,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_bullet_depth_2
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: BULLETDEPTH2
 
 --------------------
@@ -1556,7 +1556,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_bullet_depth_3
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: BULLETDEPTH3
 
 --------------------
@@ -1574,7 +1574,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_bullet_depth_4
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: BULLETDEPTH4
 
 --------------------
@@ -1646,7 +1646,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_NoGravity FL_NoGravity
 name: radio_bullet_panel_standard
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: BULLETPANEL1
        value: 1
 
@@ -1665,7 +1665,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_NoGravity FL_NoGravity
 name: radio_bullet_panel_maths
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: BULLETPANEL2
 
 --------------------
@@ -1683,7 +1683,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_NoGravity FL_NoGravity
 name: radio_bullet_panel_ding2
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: BULLETPANEL3
 
 --------------------
@@ -1701,7 +1701,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_NoGravity FL_NoGravity
 name: radio_bullet_panel_ding3
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: BULLETPANEL4
 
 --------------------
@@ -1719,7 +1719,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_NoGravity FL_NoGravity
 name: radio_bullet_panel_ding4
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: BULLETPANEL5
 
 --------------------
@@ -1737,7 +1737,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_NoGravity FL_NoGravity
 name: radio_bullet_panel_ding1
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: BULLETPANEL6
 
 --------------------
index e60d43106e7354a531ddd55b269d52efe99b2d63..b0af973d9eadb82973c9e97188b17e080d9daadc 100644 (file)
@@ -63,7 +63,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_South FL_South
 name: button_cancel
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
 argument: 0
 
 ==============================
index aa6609a3be3194eeb16f7be50aa26783e43f937a..68e22412c1b42714a5ea1152fd65830b8e3c3d86 100644 (file)
@@ -81,7 +81,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_filename
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: CHECKINPUT
 
 --------------------
@@ -99,7 +99,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_browse
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: BROWSE
 
 --------------------
@@ -153,7 +153,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_width
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: CHECKINPUT
 
 --------------------
@@ -171,7 +171,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_height
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: CHECKINPUT
 
 --------------------
@@ -225,7 +225,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_width_percent_page
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: CHECKINPUT
 
 --------------------
@@ -243,7 +243,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_width_default
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: CHECKINPUT
        value: 1
 
@@ -262,7 +262,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_width_cm
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: CHECKINPUT
 
 --------------------
@@ -280,7 +280,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_width_inch
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: CHECKINPUT
 
 --------------------
@@ -298,7 +298,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_width_percent_column
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: CHECKINPUT
 
 --------------------
@@ -352,7 +352,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_height_percent_page
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: CHECKINPUT
 
 --------------------
@@ -370,7 +370,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_height_inch
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: CHECKINPUT
 
 --------------------
@@ -388,7 +388,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_height_cm
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: CHECKINPUT
 
 --------------------
@@ -406,7 +406,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_height_default
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: CHECKINPUT
        value: 1
 
@@ -570,7 +570,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_rotate_angle
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: CHECKINPUT
 
 --------------------
@@ -588,7 +588,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_inline
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: CHECKINPUT
 
 --------------------
@@ -606,7 +606,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_subcaption
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: CHECKINPUT
 
 --------------------
@@ -624,7 +624,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_subcaption
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: CHECKINPUT
 
 --------------------
@@ -642,7 +642,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_SouthWest FL_SouthWest
 name: button_restore
-callback: C_FormBaseRestoreCB
+callback: C_FormBaseDeprecatedRestoreCB
 argument: 0
 
 --------------------
@@ -660,7 +660,7 @@ shortcut: ^M
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_ok
-callback: C_FormBaseOKCB
+callback: C_FormBaseDeprecatedOKCB
 argument: 0
 
 --------------------
@@ -678,7 +678,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_apply
-callback: C_FormBaseApplyCB
+callback: C_FormBaseDeprecatedApplyCB
 argument: 0
 
 --------------------
@@ -696,7 +696,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_cancel
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
 argument: 0
 
 ==============================
index 540fb9a1b67bd0900f4f8b30940533141e73b9e1..2d2f7ddff46bd88808104bd4c16ef265021dd5cb 100644 (file)
@@ -63,7 +63,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_browse
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -99,7 +99,7 @@ shortcut: ^M
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_ok
-callback: C_FormBaseOKCB
+callback: C_FormBaseDeprecatedOKCB
 argument: 1
 
 --------------------
@@ -117,7 +117,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_cancel
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
 argument: 2
 
 --------------------
@@ -135,7 +135,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_load
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 5
 
 --------------------
@@ -207,7 +207,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_verbatim
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 10
 
 --------------------
@@ -225,7 +225,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_useinput
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 11
 
 --------------------
@@ -243,7 +243,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_useinclude
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 11
 
 --------------------
index 4b32d17eac60dcc3bb31aef76925c076bb44b498..82489344a97bbae6b21003b67e6255d088e70928 100644 (file)
@@ -45,7 +45,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NoGravity FL_NoGravity
 name: input_key
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -63,7 +63,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_SouthWest FL_SouthWest
 name: button_restore
-callback: C_FormBaseRestoreCB
+callback: C_FormBaseDeprecatedRestoreCB
 argument: 0
 
 --------------------
@@ -81,7 +81,7 @@ shortcut: ^M
 resize: FL_RESIZE_NONE
 gravity: FL_SouthEast FL_SouthEast
 name: button_ok
-callback: C_FormBaseOKCB
+callback: C_FormBaseDeprecatedOKCB
 argument: 0
 
 --------------------
@@ -99,7 +99,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_SouthEast FL_SouthEast
 name: button_apply
-callback: C_FormBaseApplyCB
+callback: C_FormBaseDeprecatedApplyCB
 argument: 0
 
 --------------------
@@ -117,7 +117,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_SouthEast FL_SouthEast
 name: button_cancel
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
 argument: 0
 
 ==============================
index 6e692984c1f92913e1daa91263fbedd71c1043ab..96f882e31bd0f2f73e73b33661a6198079fe42a7 100644 (file)
@@ -135,7 +135,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_West FL_East
 name: input_labelwidth
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -171,7 +171,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_lines_top
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -189,7 +189,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_lines_bottom
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -207,7 +207,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_pagebreaks_top
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -225,7 +225,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_pagebreaks_bottom
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -243,7 +243,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_noindent
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -279,7 +279,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_align_right
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -297,7 +297,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_align_left
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -315,7 +315,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_align_block
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -333,7 +333,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_align_center
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -369,7 +369,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_space_above
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -387,7 +387,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_space_below
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -405,7 +405,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: choice_space_above
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -423,7 +423,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: choice_space_below
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -513,7 +513,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_space_above
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -531,7 +531,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_space_below
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 =============== FORM ===============
@@ -645,7 +645,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_pextra_width
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -663,7 +663,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_pextra_widthp
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -735,7 +735,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_pextra_top
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -753,7 +753,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_pextra_middle
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -771,7 +771,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_pextra_bottom
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -807,7 +807,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_pextra_hfill
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -825,7 +825,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_pextra_startmp
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -861,7 +861,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_pextra_indent
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -879,7 +879,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_pextra_minipage
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -897,7 +897,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_pextra_floatflt
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -975,7 +975,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_cancel
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
 argument: 0
 
 --------------------
@@ -993,7 +993,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_apply
-callback: C_FormBaseApplyCB
+callback: C_FormBaseDeprecatedApplyCB
 argument: 0
 
 --------------------
@@ -1011,7 +1011,7 @@ shortcut: ^M
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_ok
-callback: C_FormBaseOKCB
+callback: C_FormBaseDeprecatedOKCB
 argument: 0
 
 --------------------
@@ -1029,7 +1029,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_restore
-callback: C_FormBaseRestoreCB
+callback: C_FormBaseDeprecatedRestoreCB
 argument: 0
 
 --------------------
index 65b17ed7ed7382d4567ad4ba6cec3447e8ed7090..e464e35fe106eed4ca68cc5f27dd2bc058a9e53e 100644 (file)
@@ -46,7 +46,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_SouthEast FL_SouthEast
 name: button_ok
-callback: C_FormBaseOKCB
+callback: C_FormBaseDeprecatedOKCB
 argument: 0
 
 --------------------
@@ -64,7 +64,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_SouthEast FL_SouthEast
 name: button_apply
-callback: C_FormBaseApplyCB
+callback: C_FormBaseDeprecatedApplyCB
 argument: 0
 
 --------------------
@@ -82,7 +82,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_SouthEast FL_SouthEast
 name: button_cancel
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
 argument: 0
 
 --------------------
@@ -100,7 +100,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NorthWest FL_SouthEast
 name: input_preamble
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 
 
 ==============================
index 3e84690f7ba003cca5562763659e6f51fa7a91ad..06df621d42c9b69513d47fe7878f28680ce6804b 100644 (file)
@@ -64,7 +64,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_apply
-callback: C_FormBaseApplyCB
+callback: C_FormBaseDeprecatedApplyCB
 argument: 0
 
 --------------------
@@ -82,7 +82,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_cancel
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
 argument: 0
 
 --------------------
@@ -100,7 +100,7 @@ shortcut: ^M
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_ok
-callback: C_FormBaseOKCB
+callback: C_FormBaseDeprecatedOKCB
 argument: 0
 
 --------------------
@@ -118,7 +118,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_restore
-callback: C_FormBaseRestoreCB
+callback: C_FormBaseDeprecatedRestoreCB
 argument: 0
 
 --------------------
@@ -238,7 +238,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_roman
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -256,7 +256,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_sans
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -274,7 +274,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_typewriter
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -292,7 +292,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: counter_zoom
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
   bounds: 0 999
   precision: 0
@@ -314,7 +314,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_scalable
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
        value: 1
 
@@ -333,7 +333,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_screen_encoding
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -351,7 +351,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_script
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -369,7 +369,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_footnote
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -387,7 +387,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_large
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -405,7 +405,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_largest
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -423,7 +423,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_huge
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -441,7 +441,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_normal
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -459,7 +459,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: counter_dpi
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
   bounds: 0 999
   precision: 0
@@ -481,7 +481,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_tiny
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -499,7 +499,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_larger
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -517,7 +517,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_small
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -535,7 +535,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_huger
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 =============== FORM ===============
@@ -577,7 +577,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: counter_line_len
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
   bounds: 0 120
   precision: 0
@@ -599,7 +599,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_tex_encoding
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -617,7 +617,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: choice_default_papersize
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -635,7 +635,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_ascii_roff
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -653,7 +653,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_checktex
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -713,7 +713,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: choice_spell_command
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -731,7 +731,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_alt_lang
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -749,7 +749,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_alt_lang
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -767,7 +767,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_escape_chars
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -785,7 +785,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_escape_chars
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -803,7 +803,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_personal_dict
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -821,7 +821,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_personal_dict
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -839,7 +839,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_personal_dict
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -857,7 +857,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_compound_words
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -875,7 +875,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_input_enc
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 =============== FORM ===============
@@ -917,7 +917,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_date_format
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 =============== FORM ===============
@@ -959,7 +959,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_package
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -977,7 +977,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: choice_default_lang
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -995,7 +995,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_use_kbmap
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -1013,7 +1013,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_rtl_support
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -1031,7 +1031,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_mark_foreign
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -1049,7 +1049,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_auto_begin
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -1067,7 +1067,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_auto_end
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -1085,7 +1085,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_command_begin
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -1103,7 +1103,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_command_end
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -1121,7 +1121,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_kbmap1
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -1139,7 +1139,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_kbmap2
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -1157,7 +1157,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_kbmap1_browse
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -1175,7 +1175,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_kbmap2_browse
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -1193,7 +1193,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_use_babel
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -1211,7 +1211,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_global_options
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 =============== FORM ===============
@@ -1271,7 +1271,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: browser_lyx_objs
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -1289,7 +1289,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_modify
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -1307,7 +1307,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: slider_saturation
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
        slsize: 0.15
 
@@ -1326,7 +1326,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: slider_value
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
        slsize: 0.15
 
@@ -1345,7 +1345,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: dial_hue
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -1363,7 +1363,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: slider_red
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
        slsize: 0.15
 
@@ -1382,7 +1382,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: slider_blue
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
        slsize: 0.15
 
@@ -1401,7 +1401,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: slider_green
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
        slsize: 0.15
 
@@ -1420,7 +1420,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_colorspace
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -1480,7 +1480,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: browser_all
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -1498,7 +1498,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_delete
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -1516,7 +1516,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_add
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -1534,7 +1534,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_converter
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -1552,7 +1552,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: choice_from
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -1570,7 +1570,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: choice_to
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -1588,7 +1588,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_flags
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 =============== FORM ===============
@@ -1630,7 +1630,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: browser_all
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -1648,7 +1648,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_format
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -1666,7 +1666,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_gui_name
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -1684,7 +1684,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_delete
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -1702,7 +1702,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_add
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -1720,7 +1720,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_extension
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -1738,7 +1738,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_viewer
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -1756,7 +1756,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_shrtcut
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 =============== FORM ===============
@@ -1798,7 +1798,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_banner
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
        value: 1
 
@@ -1817,7 +1817,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_auto_region_delete
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
        value: 1
 
@@ -1836,7 +1836,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_exit_confirm
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
        value: 1
 
@@ -1855,7 +1855,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_display_shrtcuts
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
        value: 1
 
@@ -1874,7 +1874,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: counter_autosave
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
   bounds: 0 1200
   precision: 0
@@ -1896,7 +1896,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_ask_new_file
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
        value: 1
 
@@ -1915,7 +1915,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_cursor_follows_scrollbar
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
        value: 1
 
@@ -1934,7 +1934,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: counter_wm_jump
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
   bounds: 0 250
   precision: 0
@@ -1980,7 +1980,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_popup_font
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -1998,7 +1998,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_menu_font
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -2016,7 +2016,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_popup_encoding
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -2034,7 +2034,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_bind_file
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -2052,7 +2052,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_bind_file_browse
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -2070,7 +2070,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_ui_file
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -2088,7 +2088,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_ui_file_browse
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -2106,7 +2106,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_override_x_dead_keys
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
        value: 1
 
@@ -2149,7 +2149,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_command
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -2167,7 +2167,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_page_range
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -2185,7 +2185,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_copies
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -2203,7 +2203,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_reverse
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -2221,7 +2221,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_to_printer
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -2239,7 +2239,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_file_extension
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -2257,7 +2257,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_spool_command
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -2275,7 +2275,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_paper_type
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -2293,7 +2293,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_even_pages
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -2311,7 +2311,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_odd_pages
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -2329,7 +2329,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_collated
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -2347,7 +2347,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_landscape
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -2365,7 +2365,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_to_file
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -2383,7 +2383,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_extra_options
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -2401,7 +2401,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_spool_prefix
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -2419,7 +2419,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_paper_size
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -2437,7 +2437,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_name
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -2455,7 +2455,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_adapt_output
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -2515,7 +2515,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_default_path
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -2533,7 +2533,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_default_path_browse
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -2551,7 +2551,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: counter_lastfiles
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
   bounds: 0 9
   precision: 0
@@ -2573,7 +2573,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_template_path
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -2591,7 +2591,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_template_path_browse
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -2609,7 +2609,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_last_files
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
        value: 1
 
@@ -2628,7 +2628,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_temp_dir_browse
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -2646,7 +2646,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_lastfiles
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -2664,7 +2664,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_lastfiles_browse
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -2682,7 +2682,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_make_backups
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
        value: 1
 
@@ -2701,7 +2701,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_backup_path
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -2719,7 +2719,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_backup_path_browse
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -2737,7 +2737,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_serverpipe
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -2755,7 +2755,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_serverpipe_browse
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -2773,7 +2773,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_temp_dir
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -2791,7 +2791,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_use_temp_dir
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
        value: 1
 
index 548bb50da81427ed5d10e6d79c6b198e01953043..1da4f1e48fae236e031294487a223765c3bf9e48 100644 (file)
@@ -45,7 +45,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_printer
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -63,7 +63,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_file
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -99,7 +99,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_printer
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -117,7 +117,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_file
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -153,7 +153,7 @@ shortcut: ^M
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_ok
-callback: C_FormBaseOKCB
+callback: C_FormBaseDeprecatedOKCB
 argument: 0
 
 --------------------
@@ -171,7 +171,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_apply
-callback: C_FormBaseApplyCB
+callback: C_FormBaseDeprecatedApplyCB
 argument: 0
 
 --------------------
@@ -189,7 +189,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_cancel
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
 argument: 0
 
 --------------------
@@ -225,7 +225,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_all_pages
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -243,7 +243,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_odd_pages
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -261,7 +261,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_even_pages
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -315,7 +315,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_order_normal
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -333,7 +333,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_order_reverse
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -369,7 +369,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_from_page
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -387,7 +387,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_count
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -405,7 +405,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_collated
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -423,7 +423,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_to_page
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -513,7 +513,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_browse
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 ==============================
index 5a974f486034f089c6307c48fc0a465fc701515a..be0b7dcc5cf9548fea92c16db8989e6638c5c3fc 100644 (file)
@@ -45,7 +45,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NorthWest FL_South
 name: browser
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 2
 
 --------------------
@@ -63,7 +63,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_SouthWest FL_SouthWest
 name: button_update
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 3
 
 --------------------
@@ -81,7 +81,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_SouthWest FL_SouthWest
 name: sort
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 4
 
 --------------------
@@ -135,7 +135,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_SouthEast FL_SouthEast
 name: type
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 5
 
 --------------------
@@ -153,7 +153,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_SouthEast FL_SouthEast
 name: button_go
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 1
 
 --------------------
@@ -171,7 +171,7 @@ shortcut: ^M
 resize: FL_RESIZE_NONE
 gravity: FL_SouthEast FL_SouthEast
 name: button_ok
-callback: C_FormBaseOKCB
+callback: C_FormBaseDeprecatedOKCB
 argument: 0
 
 --------------------
@@ -189,7 +189,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_SouthEast FL_SouthEast
 name: button_cancel
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
 argument: 0
 
 --------------------
@@ -207,7 +207,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_SouthEast FL_SouthEast
 name: button_apply
-callback: C_FormBaseApplyCB
+callback: C_FormBaseDeprecatedApplyCB
 argument: 0
 
 --------------------
@@ -225,7 +225,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_SouthEast FL_SouthEast
 name: button_restore
-callback: C_FormBaseRestoreCB
+callback: C_FormBaseDeprecatedRestoreCB
 argument: 0
 
 ==============================
index bd9196ce631bf8da8f2c5a88f955c710a7f0a7f6..bfec4e870d6731224c28e937432fd1859af39da0 100644 (file)
@@ -63,7 +63,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NorthWest FL_NorthEast
 name: input_search
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -81,7 +81,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NorthWest FL_NorthEast
 name: input_replace
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -99,7 +99,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_SouthEast FL_SouthEast
 name: findnext
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -117,7 +117,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_SouthEast FL_SouthEast
 name: findprev
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -135,7 +135,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_SouthEast FL_SouthEast
 name: replace
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -153,7 +153,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_SouthEast FL_SouthEast
 name: button_cancel
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
 argument: 0
 
 --------------------
@@ -171,7 +171,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_NorthEast FL_NorthEast
 name: casesensitive
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -189,7 +189,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_NorthEast FL_NorthEast
 name: matchword
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -207,7 +207,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_SouthEast FL_SouthEast
 name: replaceall
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 ==============================
index 906504f6d0cf119a2404a8bf13f8ceb5253e8753..d5cbc0bfb0e76c917a6880c664630437c2653dc8 100644 (file)
@@ -64,7 +64,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_close
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
 argument: 0
 
 --------------------
@@ -160,7 +160,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_append_column
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -178,7 +178,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_delete_column
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -196,7 +196,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_append_row
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -214,7 +214,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_delete_row
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -232,7 +232,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_set_borders
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -250,7 +250,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_unset_borders
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -268,7 +268,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_longtable
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -286,7 +286,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_rotate_tabular
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -346,7 +346,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_border_top
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -364,7 +364,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_border_bottom
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -382,7 +382,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_border_left
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -400,7 +400,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_border_right
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -418,7 +418,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_align_left
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -436,7 +436,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_align_right
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -454,7 +454,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_align_center
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -472,7 +472,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_valign_top
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -490,7 +490,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_valign_center
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -508,7 +508,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_valign_bottom
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -580,7 +580,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_column_width
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -598,7 +598,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_special_alignment
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -658,7 +658,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_border_top
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -676,7 +676,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_border_bottom
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -694,7 +694,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_border_left
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -712,7 +712,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_border_right
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -730,7 +730,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_align_left
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -748,7 +748,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_align_right
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -766,7 +766,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_align_center
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -784,7 +784,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_valign_top
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -802,7 +802,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_valign_center
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -820,7 +820,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_valign_bottom
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -892,7 +892,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_mcolumn_width
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -910,7 +910,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_special_multialign
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -928,7 +928,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_multicolumn
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -946,7 +946,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_useminipage
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -964,7 +964,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_rotate_cell
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -1042,7 +1042,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_lt_firsthead
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -1060,7 +1060,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_lt_head
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -1078,7 +1078,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_lt_foot
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -1096,7 +1096,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_lt_lastfoot
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -1114,7 +1114,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_lt_newpage
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
index 838c000b14206c5a878a1e294fffb97b7f529383..63e2740a5030bb12abf2f330b7420b04675ab6b0 100644 (file)
@@ -46,7 +46,7 @@ shortcut: ^M
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_ok
-callback: C_FormBaseOKCB
+callback: C_FormBaseDeprecatedOKCB
 argument: 0
 
 --------------------
@@ -64,7 +64,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_apply
-callback: C_FormBaseApplyCB
+callback: C_FormBaseDeprecatedApplyCB
 argument: 0
 
 --------------------
@@ -82,7 +82,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_cancel
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
 argument: 0
 
 --------------------
index 75624447cd64ffffffec60ea0efde689dc61efbd..8b38ad414e482de5a9642970c5ab0a61b32e9d31 100644 (file)
@@ -45,7 +45,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NorthWest FL_SouthEast
 name: browser_toc
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -63,7 +63,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_SouthEast FL_SouthEast
 name: button_update
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -81,7 +81,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_SouthEast FL_SouthEast
 name: choice_toc_type
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -99,7 +99,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_SouthEast FL_SouthEast
 name: button_cancel
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
 argument: 0
 
 ==============================
index 7fa732da88935a209a7e8c3368da5aec889fe867..84730de145cb5ad66ea9991cdcc1ee12343a96aa 100644 (file)
@@ -45,7 +45,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NorthWest FL_NorthEast
 name: url
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -63,7 +63,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NorthWest FL_NorthEast
 name: name
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -81,7 +81,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NorthWest FL_NorthEast
 name: radio_html
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
 argument: 0
 
 --------------------
@@ -99,7 +99,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_SouthEast FL_SouthEast
 name: button_cancel
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
 argument: 0
 
 --------------------
@@ -117,7 +117,7 @@ shortcut: ^M
 resize: FL_RESIZE_ALL
 gravity: FL_SouthEast FL_SouthEast
 name: button_ok
-callback: C_FormBaseOKCB
+callback: C_FormBaseDeprecatedOKCB
 argument: 0
 
 --------------------
@@ -135,7 +135,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_SouthEast FL_SouthEast
 name: button_apply
-callback: C_FormBaseApplyCB
+callback: C_FormBaseDeprecatedApplyCB
 argument: 0
 
 --------------------
@@ -153,7 +153,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_SouthEast FL_SouthEast
 name: button_restore
-callback: C_FormBaseRestoreCB
+callback: C_FormBaseDeprecatedRestoreCB
 argument: 0
 
 ==============================
index 5555d516d51550903b5d1a0ac30b2901ab9fb559..ecde4ae6e9f2e0ac9dbcc2e8aea65ab185c4f0ed 100644 (file)
@@ -4,7 +4,7 @@
  * be extended to include other generally useful xforms-specific tools.
  */
 
-#include "config.h"
+#include <config.h>
 #include FORMS_H_LOCATION
 #include "support/lstrings.h"
 #include "input_validators.h"
diff --git a/src/frontends/xforms/xformsBC.C b/src/frontends/xforms/xformsBC.C
new file mode 100644 (file)
index 0000000..216667f
--- /dev/null
@@ -0,0 +1,58 @@
+#include <config.h>
+
+#include FORMS_H_LOCATION
+
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
+#include "xformsBC.h"
+#include "xforms_helpers.h"
+
+
+xformsBC::xformsBC(string const & cancel, string const & close)
+       : ButtonControllerBase(cancel, close),
+         okay_(0), apply_(0), cancel_(0), undo_all_(0), read_only_()
+{}
+
+
+void xformsBC::refresh()
+{
+       if (okay_) {
+               if (bp().buttonStatus(ButtonPolicy::OKAY)) {
+                       setEnabled(okay_, true);
+               } else {
+                       setEnabled(okay_, false);
+               }
+       }
+       if (apply_) {
+               if (bp().buttonStatus(ButtonPolicy::APPLY)) {
+                       setEnabled(apply_, true);
+               } else {
+                       setEnabled(apply_, false);
+               }
+       }
+       if (undo_all_) {
+               if (bp().buttonStatus(ButtonPolicy::UNDO_ALL)) {
+                       setEnabled(undo_all_, true);
+               } else {
+                       setEnabled(undo_all_, false);
+               }
+       }
+       if (cancel_) {
+               if (bp().buttonStatus(ButtonPolicy::CANCEL)) {
+                       fl_set_object_label(cancel_, cancel_label.c_str());
+               } else {
+                       fl_set_object_label(cancel_, close_label.c_str());
+               }
+       }
+       if (!read_only_.empty()) {
+               bool enable = true;
+               if (bp().isReadOnly()) enable = false;
+               for (std::list<FL_OBJECT *>::iterator iter = read_only_.begin();
+                    iter != read_only_.end(); ++iter) {
+                       setEnabled(*iter, enable);
+               }
+       }
+}
diff --git a/src/frontends/xforms/xformsBC.h b/src/frontends/xforms/xformsBC.h
new file mode 100644 (file)
index 0000000..d65ac7d
--- /dev/null
@@ -0,0 +1,84 @@
+// -*- C++ -*-
+/* This file is part of
+ * ======================================================
+ *
+ *           LyX, The Document Processor
+ *
+ *           Copyright 1995 Matthias Ettrich
+ *           Copyright 1995-2000 The LyX Team.
+ *
+ *           This file Copyright 2000
+ *           Allan Rae
+ * ======================================================
+ *
+ * Author: Allan Rae <rae@lyx.org>
+ * Non-xforms-specific code stripped-out and placed in a base class by
+ * Angus Leeming <a.leeming@ic.ac.uk>
+ */
+
+#ifndef XFORMSBC_H
+#define XFORMSBC_H
+
+#include "ButtonController.h"
+#include <list>
+
+#ifdef __GNUG__
+#pragma interface
+#endif
+
+/** General purpose button controller for up to four buttons.
+    Controls the activation of the OK, Apply and Cancel buttons.
+    Actually supports 4 buttons in all and it's up to the user to decide on
+    the activation policy and which buttons correspond to which output of the
+    state machine.
+*/
+class xformsBC : public ButtonControllerBase
+{
+public:
+       ///
+       xformsBC(string const &, string const &);
+
+       /* Initialise Button Functions */
+       /// Call refresh() when finished setting the buttons.
+       void setOK(FL_OBJECT * obj) {
+               okay_ = obj;
+       }
+       ///
+       void setApply(FL_OBJECT * obj) {
+               apply_ = obj;
+       }
+       ///
+       void setCancel(FL_OBJECT * obj) {
+               cancel_ = obj;
+       }
+       ///
+       void setUndoAll(FL_OBJECT * obj) {
+               undo_all_ = obj;
+       }
+       ///
+       void addReadOnly(FL_OBJECT * obj) {
+               read_only_.push_front(obj);
+       }
+       ///
+       void eraseReadOnly() {
+               read_only_.erase(read_only_.begin(), read_only_.end());
+       }
+
+       /* Action Functions */
+       /// force a refresh of the buttons
+       virtual void refresh();
+
+private:
+       ///
+       FL_OBJECT * okay_;
+       ///
+       FL_OBJECT * apply_;
+       ///
+       FL_OBJECT * cancel_;
+       ///
+       FL_OBJECT * undo_all_;
+       /// List of items to be deactivated when in one of the read-only states
+       std::list<FL_OBJECT *> read_only_;
+};
+
+#endif // XFORMSBC_H
index 0781cd1c9ef4f37519e82a7a3d66a70d32ce02bd..d7d2bd2240445948586e1eec90064e62824d1109 100644 (file)
@@ -14,7 +14,8 @@
 void setEnabled(FL_OBJECT *, bool enable);
 
 // Take a string and add breaks so that it fits into a desired label width, w
-string formatted(string const &label, int w, int size, int style);
+string formatted(string const &label, int w,
+                int=FL_NORMAL_SIZE, int=FL_NORMAL_STYLE);
 
 class LyXView;