+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.
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 \
+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.
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) \
+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
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;
///
#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;
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.
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
# 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 \
--- /dev/null
+Makefile.in
+Makefile
+*.deps
+*.lo
+.libs
+libcontrollers.la
--- /dev/null
+// -*- 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);
+}
--- /dev/null
+// -*- 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
--- /dev/null
+// -*- 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");
+ }
+}
--- /dev/null
+// -*- 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
--- /dev/null
+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.
--- /dev/null
+// -*- 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();
+}
--- /dev/null
+// -*- 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
--- /dev/null
+// -*- 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());
+ }
+}
--- /dev/null
+// -*- 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
--- /dev/null
+// -*- 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;
+}
--- /dev/null
+// -*- 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
+
+
+
--- /dev/null
+// -*- 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());
+ }
+}
--- /dev/null
+// -*- 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
--- /dev/null
+// -*- 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();
+}
+
--- /dev/null
+// -*- 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
--- /dev/null
+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
--- /dev/null
+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.
--- /dev/null
+// -*- 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
+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
#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"
#include "FormIndex.h"
#include "FormLog.h"
#include "FormParagraph.h"
+#include "FormPreamble.h"
#include "FormPreferences.h"
#include "FormPrint.h"
#include "FormRef.h"
#pragma implementation
#endif
-// temporary till ported
-extern void ShowCredits();
-
/* We don't implement this, but it's needed whilst we
* still rely on xforms
*/
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;
- }
}
#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) {
}
}
-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;
}
}
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) {
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;
}
}
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;
}
}
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();
}
#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
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;
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
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 \
../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 \
QtLyXView.h \
Timeout_pimpl.C \
Timeout_pimpl.h \
+ kdeBC.C \
+ kdeBC.h \
FormCitation.C \
FormCitation.h \
FormCopyright.C \
void CitationDialog::closeEvent(QCloseEvent * e)
{
- form_->close();
+ form_->CancelButton();
e->accept();
}
// to connect apply() and hide()
#include "FormCitation.h"
+#include "kdeBC.h"
#include <qdialog.h>
#include <qlistbox.h>
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) {
tmpskip = VSpace(length);
break;
}
-
+
if (!(tmpskip == params.getDefSkip())) {
redo = true;
params.setDefSkip(tmpskip);
--- /dev/null
+#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);
+ }
+ }
+}
--- /dev/null
+// -*- 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
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 \
+++ /dev/null
-#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);
-}
+++ /dev/null
-// -*- 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
+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
*======================================================*/
#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;
*/
#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?
#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()
}
-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()) {
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);
}
* 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
--- /dev/null
+// -*- 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();
+}
--- /dev/null
+// -*- 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
* \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));
}
+// -*- 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
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;
}
void FormBibtex::build()
{
- dialog_ = build_bibtex();
+ dialog_.reset(build_bibtex());
// Workaround dumb xforms sizing bug
minw_ = form()->w;
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);
}
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());
}
+// -*- 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;
/**
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
///
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
#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)
{
#ifndef FORMBROWSER_H
#define FORMBROWSER_H
-#include "FormBase.h"
+#include <boost/smart_ptr.hpp>
+
+#include "FormBaseDeprecated.h"
+#include "xformsBC.h"
#ifdef __GNUG__
#pragma interface
*/
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;
/// generated build function
FD_form_browser * build_browser();
+ /// The ButtonController
+ ButtonController<OkCancelPolicy, xformsBC> bc_;
};
+
+inline
+xformsBC & FormBrowser::bc()
+{
+ return bc_;
+}
#endif
#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"
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
}
-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;
}
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 "));
// 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();
void FormCharacter::apply()
{
- if (!lv_->view()->available() || !dialog_)
+ if (!lv_->view()->available() || !dialog_.get())
return;
LyXFont font(LyXFont::ALL_IGNORE);
void FormCharacter::update()
{
- if (!dialog_)
+ if (!dialog_.get())
return;
- bc_.readOnly(lv_->buffer()->isReadonly());
+ bc().readOnly(lv_->buffer()->isReadonly());
}
#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;
*/
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
* ======================================================
*/
-#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;
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;
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...
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());
}
{
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);
// 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;
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;
} 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);
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());
- }
-}
* 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;
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
#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
}
-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;
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();
}
#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.
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
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
#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
}
-FormCredits::~FormCredits()
-{
- delete dialog_;
-}
-
-
FL_FORM * FormCredits::form() const
{
- if (dialog_ )
- return dialog_->form;
+ if (dialog_.get())
+ return dialog_->form;
return 0;
}
void FormCredits::build()
{
- dialog_ = build_credits();
+ dialog_.reset(build_credits());
// Workaround dumb xforms sizing bug
minw_ = form()->w;
#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.
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
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
#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"
#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
}
-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 )
FL_FORM * FormDocument::form() const
{
- if (dialog_) return dialog_->form;
+ if (dialog_.get()) return dialog_->form;
return 0;
}
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 "));
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
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);
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");
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);
_(" ``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);
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"));
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);
void FormDocument::apply()
{
- if (!lv_->view()->available() || !dialog_)
+ if (!lv_->view()->available() || !dialog_.get())
return;
bool redo = class_apply();
void FormDocument::update()
{
- if (!dialog_)
+ if (!dialog_.get())
return;
checkReadOnly();
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));
}
void FormDocument::class_update(BufferParams const & params)
{
- if (!class_)
+ if (!class_.get())
return;
LyXTextClass const & tclass = textclasslist.TextClass(params.textclass);
void FormDocument::language_update(BufferParams const & params)
{
- if (!language_)
+ if (!language_.get())
return;
combo_language->select_text(params.language->lang());
void FormDocument::options_update(BufferParams const & params)
{
- if (!options_)
+ if (!options_.get())
return;
fl_set_choice_text(options_->choice_postscript_driver,
void FormDocument::paper_update(BufferParams const & params)
{
- if (!paper_)
+ if (!paper_.get())
return;
fl_set_choice(paper_->choice_papersize2, params.papersize2 + 1);
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();
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,
void FormDocument::UpdateLayoutDocument(BufferParams const & params)
{
- if (!dialog_)
+ if (!dialog_.get())
return;
checkReadOnly();
#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
/// #FormDocument x(Communicator ..., Popups ...);#
FormDocument(LyXView *, Dialogs *);
///
- ~FormDocument();
- ///
static void ComboInputCB(int, void *, Combox *);
-
private:
///
enum State {
///
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();
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;
///
///
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
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
}
-FormError::~FormError()
-{
- delete dialog_;
-}
-
-
FL_FORM * FormError::form() const
{
- if (dialog_) return dialog_->form;
+ if (dialog_.get()) return dialog_->form;
return 0;
}
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();
}
#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;
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();
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
#include "LyXView.h"
#include "buffer.h"
#include "FormExternal.h"
+#include "form_external.h"
#include "frontends/FileDialog.h"
#include "LString.h"
#include "support/filetools.h"
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);
FL_FORM * FormExternal::form() const
{
- if (dialog_)
+ if (dialog_.get())
return dialog_->form;
return 0;
}
connect(slot(this, &FormExternal::updateSlot));
h_ = d_->hideBufferDependent.
connect(slot(this, &FormExternal::hide));
- FormBase::connect();
+ FormBaseDeprecated::connect();
}
void FormExternal::build()
{
- dialog_ = build_external();
+ dialog_.reset(build_external());
fl_addto_choice(dialog_->choice_template,
getTemplatesComboString().c_str());
#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();
/// 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
#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"
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),
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;
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;
}
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);
#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;
ADVANCEDINPUT
};
+ /// Pointer to the actual instantiation of the ButtonController.
+ virtual xformsBC & bc();
/// Build the dialog
virtual void build();
/// Filter the inputs
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.
*/
RadioButtonGroup displayButtons;
/// Last used figure path
string last_image_path;
+ /// The ButtonController
+ ButtonController<NoRepeatedApplyReadOnlyPolicy, xformsBC> bc_;
};
+
+inline
+xformsBC & FormGraphics::bc()
+{
+ return bc_;
+}
#endif
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;
}
connect(slot(this, &FormInclude::updateSlot));
h_ = d_->hideBufferDependent.
connect(slot(this, &FormInclude::hide));
- FormBase::connect();
+ FormBaseDeprecated::connect();
}
void FormInclude::build()
{
- dialog_ = build_include();
+ dialog_.reset(build_include());
// Workaround dumb xforms sizing bug
minw_ = form()->w;
void FormInclude::update()
{
- bc_.readOnly(lv_->buffer()->isReadonly());
+ bc().readOnly(lv_->buffer()->isReadonly());
if (!inset_) {
fl_set_input(dialog_->input_filename, "");
+// -*- 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.
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 *);
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_;
InsetInclude::InsetIncludeParams params;
};
+
+inline
+xformsBC & FormInclude::bc()
+{
+ return bc_;
+}
#endif
#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
}
-FormIndex::~FormIndex()
-{
- delete dialog_;
-}
-
-
FL_FORM * FormIndex::form() const
{
- if (dialog_) return dialog_->form;
+ if (dialog_.get()) return dialog_->form;
return 0;
}
void FormIndex::build()
{
- dialog_ = build_index();
+ dialog_.reset(build_index());
// Workaround dumb xforms sizing bug
minw_ = form()->w;
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);
}
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());
}
#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.
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
///
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
#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)
{}
connect(slot(this, &FormInset::updateSlot));
h_ = d_->hideBufferDependent.
connect(slot(this, &FormInset::hide));
- FormBase::connect();
+ FormBaseDeprecated::connect();
}
}
-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)
{}
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();
}
#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();
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();
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
#ifndef FORMLOG_H
#define FORMLOG_H
-#include "FormBase.h"
+#include "FormBaseDeprecated.h"
#include "FormBrowser.h"
#ifdef __GNUG__
*/
class FormLog : public FormBrowser {
public:
+ ///
FormLog(LyXView *, Dialogs *);
- ~FormLog();
-
private:
/// Update the dialog.
virtual void update();
#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
}
-FormParagraph::~FormParagraph()
-{
- delete general_;
- delete extra_;
- delete dialog_;
-}
-
-
void FormParagraph::redraw()
{
if( form() && form()->visible )
FL_FORM * FormParagraph::form() const
{
- if (dialog_) return dialog_->form;
+ if (dialog_.get()) return dialog_->form;
return 0;
}
void FormParagraph::build()
{
// the tabbed folder
- dialog_ = build_tabbed_paragraph();
+ dialog_.reset(build_tabbed_paragraph());
// Workaround dumb xforms sizing bug
minw_ = form()->w;
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 "
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);
void FormParagraph::apply()
{
- if (!lv_->view()->available() || !dialog_)
+ if (!lv_->view()->available() || !dialog_.get())
return;
general_apply();
void FormParagraph::update()
{
- if (!dialog_)
+ if (!dialog_.get())
return;
general_update();
void FormParagraph::general_update()
{
- if (!general_)
+ if (!general_.get())
return;
Buffer * buf = lv_->view()->buffer();
void FormParagraph::extra_update()
{
- if (!lv_->view()->available() || !extra_)
+ if (!lv_->view()->available() || !extra_.get())
return;
LyXParagraph * par = lv_->view()->text->cursor.par();
#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;
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();
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
#include FORMS_H_LOCATION
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
#include "form_preamble.h"
#include "FormPreamble.h"
#include "Dialogs.h"
#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
}
-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?:
void FormPreamble::update()
{
- if (!dialog_)
+ if (!dialog_.get())
return;
fl_set_input(dialog_->input_preamble,lv_->buffer()->params.preamble.c_str());
setEnabled(dialog_->button_apply, enable);
// need this?
- // bc_.readOnly(lv_->buffer()->isReadonly());
+ // bc().readOnly(lv_->buffer()->isReadonly());
}
+// -*- C++ -*-
/**
* \file FormPreamble.h
* Copyright 2001 The LyX Team.
#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;
*/
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
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),
}
-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_ );
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 =
&& 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
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);
void FormPreferences::update()
{
- if (!dialog_) return;
+ if (!dialog_.get()) return;
// read lyxrc entries
colors_.update();
}
-FormPreferences::Colors::~Colors()
+FormPreferences::Colors::Colors(FormPreferences & p)
+ : parent_(p)
+{}
+
+
+FD_form_colors const * FormPreferences::Colors::dialog()
{
- delete dialog_;
+ return dialog_.get();
}
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);
}
-FormPreferences::Converters::~Converters()
+FormPreferences::Converters::Converters(FormPreferences & p)
+ : parent_(p)
+{}
+
+
+FD_form_converters const * FormPreferences::Converters::dialog()
{
- delete dialog_;
+ return dialog_.get();
}
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);
}
-FormPreferences::Formats::~Formats()
+FormPreferences::Formats::Formats( FormPreferences & p )
+ : parent_(p)
+{}
+
+
+FD_form_formats const * FormPreferences::Formats::dialog()
{
- delete dialog_;
+ return dialog_.get();
}
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);
}
-FormPreferences::InputsMisc::~InputsMisc()
+FormPreferences::InputsMisc::InputsMisc( FormPreferences & p )
+ : parent_(p)
+{}
+
+
+FD_form_inputs_misc const * FormPreferences::InputsMisc::dialog()
{
- delete dialog_;
+ return dialog_.get();
}
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);
}
-FormPreferences::Interface::~Interface()
+FormPreferences::Interface::Interface( FormPreferences & p )
+ : parent_(p)
+{}
+
+
+FD_form_interface const * FormPreferences::Interface::dialog()
{
- delete dialog_;
+ return dialog_.get();
}
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);
}
-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();
}
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);
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);
{
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);
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();
}
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);
}
-FormPreferences::OutputsMisc::~OutputsMisc()
+FormPreferences::OutputsMisc::OutputsMisc( FormPreferences & p )
+ : parent_(p)
+{}
+
+
+FD_form_outputs_misc const * FormPreferences::OutputsMisc::dialog()
{
- delete dialog_;
+ return dialog_.get();
}
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);
}
-FormPreferences::Paths::~Paths()
+FormPreferences::Paths::Paths( FormPreferences & p )
+ : parent_(p)
+{}
+
+
+FD_form_paths const * FormPreferences::Paths::dialog()
{
- delete dialog_;
+ return dialog_.get();
}
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);
}
-FormPreferences::Printer::~Printer()
+FormPreferences::Printer::Printer(FormPreferences & p)
+ : parent_(p)
+{}
+
+
+FD_form_printer const * FormPreferences::Printer::dialog()
{
- delete dialog_;
+ return dialog_.get();
}
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);
}
-FormPreferences::ScreenFonts::~ScreenFonts()
+FormPreferences::ScreenFonts::ScreenFonts( FormPreferences & p )
+ : parent_(p)
+{}
+
+
+FD_form_screen_fonts const * FormPreferences::ScreenFonts::dialog()
{
- delete dialog_;
+ return dialog_.get();
}
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);
}
-FormPreferences::SpellChecker::~SpellChecker()
+
+FormPreferences::SpellChecker::SpellChecker( FormPreferences & p )
+ : parent_(p)
+{}
+
+
+FD_form_spellchecker const * FormPreferences::SpellChecker::dialog()
{
- delete dialog_;
+ return dialog_.get();
}
void FormPreferences::SpellChecker::build()
{
- dialog_ = parent_.build_spellchecker();
+ dialog_.reset(parent_.build_spellchecker());
fl_addto_choice(dialog_->choice_spell_command,
_(" none | ispell | aspell "));
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);
#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;
/// #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.
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. */
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.
///
///
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;
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;
///
///
FormPreferences & parent_;
///
- FD_form_converters * dialog_;
+ boost::scoped_ptr<FD_form_converters> dialog_;
};
///
friend class Converters;
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;
///
///
FormPreferences & parent_;
///
- FD_form_formats * dialog_;
+ boost::scoped_ptr<FD_form_formats> dialog_;
};
///
friend class Formats;
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;
///
///
FormPreferences & parent_;
///
- FD_form_inputs_misc * dialog_;
+ boost::scoped_ptr<FD_form_inputs_misc> dialog_;
};
///
friend class InputsMisc;
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;
///
///
FormPreferences & parent_;
///
- FD_form_interface * dialog_;
+ boost::scoped_ptr<FD_form_interface> dialog_;
};
///
friend class Interface;
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()
///
///
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;
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;
///
///
FormPreferences & parent_;
///
- FD_form_lnf_misc * dialog_;
+ boost::scoped_ptr<FD_form_lnf_misc> dialog_;
};
///
friend class LnFmisc;
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;
///
///
FormPreferences & parent_;
///
- FD_form_outputs_misc * dialog_;
+ boost::scoped_ptr<FD_form_outputs_misc> dialog_;
};
///
friend class OutputsMisc;
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();
///
///
FormPreferences & parent_;
///
- FD_form_paths * dialog_;
+ boost::scoped_ptr<FD_form_paths> dialog_;
};
///
friend class Paths;
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;
///
///
FormPreferences & parent_;
///
- FD_form_printer * dialog_;
+ boost::scoped_ptr<FD_form_printer> dialog_;
};
///
friend class Printer;
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;
///
///
FormPreferences & parent_;
///
- FD_form_screen_fonts * dialog_;
+ boost::scoped_ptr<FD_form_screen_fonts> dialog_;
};
///
friend class ScreenFonts;
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()!
///
///
FormPreferences & parent_;
///
- FD_form_spellchecker * dialog_;
+ boost::scoped_ptr<FD_form_spellchecker> dialog_;
};
///
friend class SpellChecker;
///
RGBColor col;
};
-
+ /// The ButtonController
+ ButtonController<PreferencesPolicy, xformsBC> bc_;
};
+
+inline
+xformsBC & FormPreferences::bc()
+{
+ return bc_;
+}
+
#endif
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
}
-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,
FL_FORM * FormPrint::form() const
{
- if (dialog_) return dialog_->form;
+ if (dialog_.get())
+ return dialog_->form;
return 0;
}
void FormPrint::update()
{
- if (dialog_
+ if (dialog_.get()
&& lv_->view()->available()) {
PrinterParams pp(getPrinterParams(lv_->buffer()));
fl_set_input(dialog_->input_count,
tostr(pp.count_copies).c_str());
- bc_.valid(true);
+ bc().valid(true);
}
}
#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;
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
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
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
}
-FormRef::~FormRef()
-{
- delete dialog_;
-}
-
-
FL_FORM * FormRef::form() const
{
- if (dialog_) return dialog_->form;
+ if (dialog_.get())
+ return dialog_->form;
return 0;
}
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,
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);
}
refs = lv_->buffer()->getLabelList();
updateBrowser(refs);
- bc_.readOnly(lv_->buffer()->isReadonly());
+ bc().readOnly(lv_->buffer()->isReadonly());
}
#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.
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();
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
#include <config.h>
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
#include "FormSearch.h"
#include "form_search.h"
#include "gettext.h"
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
}
-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;
void FormSearch::update()
{
- if (!dialog_)
+ if (!dialog_.get())
return;
bc_.readOnly(lv_->buffer()->isReadonly());
#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;
*/
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
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);
}
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);
#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;
*/
class FormSplash : public DialogBase {
public:
+ ///
FormSplash(LyXView *, Dialogs *);
- ~FormSplash();
-
/// hide (and destroy) the dialog
void hide();
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
#include <config.h>
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
#include "FormTabular.h"
#include "form_tabular.h"
#include "LyXView.h"
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
}
-FormTabular::~FormTabular()
-{
- delete dialog_;
- delete tabular_options_;
- delete column_options_;
- delete cell_options_;
- delete longtable_options_;
-}
-
-
void FormTabular::redraw()
{
if(form() && form()->visible)
FL_FORM * FormTabular::form() const
{
- if (dialog_) return dialog_->form;
+ if (dialog_.get())
+ return dialog_->form;
return 0;
}
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;
#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;
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();
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
#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
}
-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;
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();
}
void FormTabularCreate::update()
{
- bc_.readOnly(lv_->buffer()->isReadonly());
+ bc().readOnly(lv_->buffer()->isReadonly());
}
#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;
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();
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
#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
}
-FormToc::~FormToc()
-{
- delete dialog_;
-}
-
-
FL_FORM * FormToc::form() const
{
- if (dialog_ ) return dialog_->form;
+ if (dialog_.get())
+ return dialog_->form;
return 0;
}
void FormToc::build()
{
- dialog_ = build_toc();
+ dialog_.reset(build_toc());
#if 0
fl_addto_choice(dialog_->choice_toc_type,
minh_ = form()->h;
// Manage the cancel/close button
- bc_.setCancel(dialog_->button_cancel);
- bc_.refresh();
+ bc().setCancel(dialog_->button_cancel);
+ bc().refresh();
}
#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.
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();
///
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
#pragma implementation
#endif
-
#include "Dialogs.h"
#include "FormUrl.h"
#include "LyXView.h"
#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
}
-FormUrl::~FormUrl()
-{
- delete dialog_;
-}
-
-
FL_FORM * FormUrl::form() const
{
- if (dialog_) return dialog_->form;
+ if (dialog_.get()) return dialog_->form;
return 0;
}
void FormUrl::build()
{
- dialog_ = build_url();
+ dialog_.reset(build_url());
// Workaround dumb xforms sizing bug
minw_ = form()->w;
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);
}
else
fl_set_button(dialog_->radio_html, 1);
- bc_.readOnly(lv_->buffer()->isReadonly());
+ bc().readOnly(lv_->buffer()->isReadonly());
}
#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.
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
///
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
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();
#ifndef FORMVCLOG_H
#define FORMVCLOG_H
-#include "FormBase.h"
+#include "FormBaseDeprecated.h"
#include "FormBrowser.h"
#ifdef __GNUG__
*/
class FormVCLog : public FormBrowser {
public:
+ ///
FormVCLog(LyXView *, Dialogs *);
- ~FormVCLog();
-
private:
/// Update the dialog.
virtual void update();
#include <config.h>
+#include FORMS_H_LOCATION
+
#ifdef __GNUG__
#pragma implementation
#endif
-#include FORMS_H_LOCATION
#include "GUIRunTime.h"
#include "debug.h"
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=
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 \
GUIRunTime.C \
FormBase.C \
FormBase.h \
+ FormBaseDeprecated.C \
+ FormBaseDeprecated.h \
FormBibitem.C \
FormBibitem.h \
form_bibitem.C \
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 \
*
*======================================================*/
+#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"
#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;
#include <config.h>
+#include <functional>
+#include <algorithm>
+#include <iterator>
+
#ifdef __GNUG__
#pragma implementation
#endif
#include "debug.h" // for lyxerr
-#include <functional>
-#include <algorithm>
-#include <iterator>
using std::find_if;
using std::bind2nd;
using std::endl;
#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
* \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"
#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
#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 {
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;
#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 ****/
}
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)));
}
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;
#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 ****/
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)));
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)));
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)));
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)));
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)));
}
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)));
}
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)));
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)));
}
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);
#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 ****/
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)));
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);
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);
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);
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);
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;
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;
#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 ****/
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);
#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 ****/
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);
{
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;
}
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);
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();
{
}
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);
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);
}
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)));
}
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)));
}
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)));
}
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)));
}
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)));
}
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();
{
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();
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();
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;
}
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)));
}
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");
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();
{
}
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;
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)));
}
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;
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,
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)));
}
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();
{
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");
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"));
}
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");
}
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)));
}
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)));
}
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)));
}
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)));
}
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();
#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 ****/
}
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;
#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 ****/
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();
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;
#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 ****/
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)));
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)));
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();
#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 ****/
}
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)));
}
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)));
}
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)));
}
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;
#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 ****/
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);
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();
{
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)));
}
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)));
}
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);
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;
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");
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);
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();
{
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();
{
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();
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);
#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 ****/
}
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)));
}
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)));
}
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;
#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 ****/
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);
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");
}
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);
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)));
}
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;
}
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);
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)));
}
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);
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)));
}
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)));
}
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)));
}
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)));
}
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)));
}
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;
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;
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)));
}
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)));
}
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)));
}
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)));
}
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)));
}
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)));
}
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)));
}
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;
}
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)));
}
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");
}
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");
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)));
}
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");
}
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");
}
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);
}
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;
}
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;
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");
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");
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);
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");
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);
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();
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();
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)));
}
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);
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)));
}
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)));
}
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)));
}
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();
#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 ****/
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();
{
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();
{
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();
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);
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;
#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 ****/
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)));
}
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)));
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;
#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 ****/
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)));
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)));
}
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)));
}
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)));
}
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)));
}
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)));
}
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;
#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 ****/
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);
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();
}
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)));
}
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)));
}
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)));
}
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);
}
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)));
}
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);
}
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)));
}
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)));
}
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)));
}
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);
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);
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);
#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 ****/
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);
#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 ****/
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)));
}
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)));
}
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)));
}
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;
#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 ****/
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)));
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)));
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)));
}
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)));
}
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)));
}
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;
#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 ****/
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: database
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_ok
-callback: C_FormBaseOKCB
+callback: C_FormBaseDeprecatedOKCB
argument: 3
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_cancel
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
argument: 2
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: style
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
==============================
resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast
name: button_close
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
argument: 0
--------------------
resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast
name: button_update
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
==============================
resize: FL_RESIZE_X
gravity: FL_NorthWest FL_NorthEast
name: choice_family
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_X
gravity: FL_NorthWest FL_NorthEast
name: choice_series
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_X
gravity: FL_NorthWest FL_NorthEast
name: choice_shape
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_X
gravity: FL_NorthWest FL_NorthEast
name: choice_size
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_X
gravity: FL_NorthWest FL_NorthEast
name: choice_bar
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast
name: button_apply
-callback: C_FormBaseApplyCB
+callback: C_FormBaseDeprecatedApplyCB
argument: 0
--------------------
resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast
name: button_close
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
argument: 0
--------------------
resize: FL_RESIZE_X
gravity: FL_NorthWest FL_NorthEast
name: choice_color
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_X
gravity: FL_NorthWest FL_NorthEast
name: check_toggle_all
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_X
gravity: FL_NorthWest FL_NorthEast
name: choice_language
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
=============== 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
--------------------
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
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
--------------------
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
--------------------
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
--------------------
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
--------------------
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
--------------------
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
--------------------
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
resize: FL_RESIZE_NONE
gravity: FL_South FL_South
name: button_cancel
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
argument: 0
==============================
resize: FL_RESIZE_NONE
gravity: FL_South FL_South
name: button_cancel
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
argument: 0
--------------------
- 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,
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_cancel
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
argument: INPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_apply
-callback: C_FormBaseApplyCB
+callback: C_FormBaseDeprecatedApplyCB
argument: INPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_ok
-callback: C_FormBaseOKCB
+callback: C_FormBaseDeprecatedOKCB
argument: INPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_restore
-callback: C_FormBaseRestoreCB
+callback: C_FormBaseDeprecatedRestoreCB
argument: INPUT
=============== FORM ===============
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: choice_paperpackage
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_portrait
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_landscape
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: choice_papersize2
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: push_use_geometry
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_custom_width
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_custom_height
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_top_margin
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_bottom_margin
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_left_margin
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_right_margin
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_head_height
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_head_sep
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_foot_skip
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: choice_doc_fonts
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: choice_doc_fontsize
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: choice_doc_class
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: CHECKCHOICECLASS
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: choice_doc_pagestyle
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: choice_doc_spacing
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_doc_extra
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_doc_skip
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: choice_doc_skip
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_doc_sides_one
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_doc_sides_two
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_doc_columns_one
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_doc_columns_two
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_doc_indent
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_doc_skip
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUT
value: 1
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_doc_spacing
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUT
=============== FORM ===============
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: choice_inputenc
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: choice_quotes_language
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_single
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_double
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: choice_language
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUT
=============== FORM ===============
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_float_placement
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: slider_secnumdepth
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: slider_tocdepth
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: choice_postscript_driver
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_use_amsmath
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUT
=============== FORM ===============
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: choice_bullet_size
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: CHOICEBULLETSIZE
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_bullet_latex
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: INPUTBULLETLATEX
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_bullet_depth_1
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: BULLETDEPTH1
value: 1
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_bullet_depth_2
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: BULLETDEPTH2
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_bullet_depth_3
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: BULLETDEPTH3
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_bullet_depth_4
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: BULLETDEPTH4
--------------------
resize: FL_RESIZE_NONE
gravity: FL_NoGravity FL_NoGravity
name: radio_bullet_panel_standard
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: BULLETPANEL1
value: 1
resize: FL_RESIZE_NONE
gravity: FL_NoGravity FL_NoGravity
name: radio_bullet_panel_maths
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: BULLETPANEL2
--------------------
resize: FL_RESIZE_NONE
gravity: FL_NoGravity FL_NoGravity
name: radio_bullet_panel_ding2
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: BULLETPANEL3
--------------------
resize: FL_RESIZE_NONE
gravity: FL_NoGravity FL_NoGravity
name: radio_bullet_panel_ding3
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: BULLETPANEL4
--------------------
resize: FL_RESIZE_NONE
gravity: FL_NoGravity FL_NoGravity
name: radio_bullet_panel_ding4
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: BULLETPANEL5
--------------------
resize: FL_RESIZE_NONE
gravity: FL_NoGravity FL_NoGravity
name: radio_bullet_panel_ding1
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: BULLETPANEL6
--------------------
resize: FL_RESIZE_NONE
gravity: FL_South FL_South
name: button_cancel
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
argument: 0
==============================
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_filename
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: CHECKINPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_browse
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: BROWSE
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_width
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: CHECKINPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_height
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: CHECKINPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_width_percent_page
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: CHECKINPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_width_default
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: CHECKINPUT
value: 1
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_width_cm
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: CHECKINPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_width_inch
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: CHECKINPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_width_percent_column
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: CHECKINPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_height_percent_page
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: CHECKINPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_height_inch
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: CHECKINPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_height_cm
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: CHECKINPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_height_default
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: CHECKINPUT
value: 1
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_rotate_angle
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: CHECKINPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_inline
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: CHECKINPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_subcaption
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: CHECKINPUT
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_subcaption
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: CHECKINPUT
--------------------
resize: FL_RESIZE_NONE
gravity: FL_SouthWest FL_SouthWest
name: button_restore
-callback: C_FormBaseRestoreCB
+callback: C_FormBaseDeprecatedRestoreCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_ok
-callback: C_FormBaseOKCB
+callback: C_FormBaseDeprecatedOKCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_apply
-callback: C_FormBaseApplyCB
+callback: C_FormBaseDeprecatedApplyCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_cancel
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
argument: 0
==============================
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_browse
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_ok
-callback: C_FormBaseOKCB
+callback: C_FormBaseDeprecatedOKCB
argument: 1
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_cancel
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
argument: 2
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_load
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 5
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_verbatim
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 10
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_useinput
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 11
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_useinclude
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 11
--------------------
resize: FL_RESIZE_X
gravity: FL_NoGravity FL_NoGravity
name: input_key
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_NONE
gravity: FL_SouthWest FL_SouthWest
name: button_restore
-callback: C_FormBaseRestoreCB
+callback: C_FormBaseDeprecatedRestoreCB
argument: 0
--------------------
resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast
name: button_ok
-callback: C_FormBaseOKCB
+callback: C_FormBaseDeprecatedOKCB
argument: 0
--------------------
resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast
name: button_apply
-callback: C_FormBaseApplyCB
+callback: C_FormBaseDeprecatedApplyCB
argument: 0
--------------------
resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast
name: button_cancel
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
argument: 0
==============================
resize: FL_RESIZE_X
gravity: FL_West FL_East
name: input_labelwidth
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_lines_top
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_lines_bottom
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_pagebreaks_top
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_pagebreaks_bottom
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_noindent
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_align_right
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_align_left
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_align_block
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_align_center
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_space_above
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_space_below
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: choice_space_above
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: choice_space_below
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_space_above
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_space_below
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
=============== FORM ===============
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_pextra_width
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_pextra_widthp
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_pextra_top
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_pextra_middle
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_pextra_bottom
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_pextra_hfill
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_pextra_startmp
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_pextra_indent
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_pextra_minipage
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_pextra_floatflt
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_cancel
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_apply
-callback: C_FormBaseApplyCB
+callback: C_FormBaseDeprecatedApplyCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_ok
-callback: C_FormBaseOKCB
+callback: C_FormBaseDeprecatedOKCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_restore
-callback: C_FormBaseRestoreCB
+callback: C_FormBaseDeprecatedRestoreCB
argument: 0
--------------------
resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast
name: button_ok
-callback: C_FormBaseOKCB
+callback: C_FormBaseDeprecatedOKCB
argument: 0
--------------------
resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast
name: button_apply
-callback: C_FormBaseApplyCB
+callback: C_FormBaseDeprecatedApplyCB
argument: 0
--------------------
resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast
name: button_cancel
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NorthWest FL_SouthEast
name: input_preamble
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument:
==============================
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_apply
-callback: C_FormBaseApplyCB
+callback: C_FormBaseDeprecatedApplyCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_cancel
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_ok
-callback: C_FormBaseOKCB
+callback: C_FormBaseDeprecatedOKCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_restore
-callback: C_FormBaseRestoreCB
+callback: C_FormBaseDeprecatedRestoreCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_roman
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_sans
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_typewriter
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
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
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_scalable
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
value: 1
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_screen_encoding
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_script
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_footnote
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_large
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_largest
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_huge
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_normal
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
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
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_tiny
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_larger
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_small
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_huger
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
=============== FORM ===============
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
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_tex_encoding
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: choice_default_papersize
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_ascii_roff
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_checktex
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: choice_spell_command
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_alt_lang
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_alt_lang
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_escape_chars
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_escape_chars
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_personal_dict
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_personal_dict
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_personal_dict
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_compound_words
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_input_enc
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
=============== FORM ===============
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_date_format
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
=============== FORM ===============
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_package
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: choice_default_lang
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_use_kbmap
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_rtl_support
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_mark_foreign
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_auto_begin
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_auto_end
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_command_begin
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_command_end
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_kbmap1
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_kbmap2
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_kbmap1_browse
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_kbmap2_browse
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_use_babel
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_global_options
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
=============== FORM ===============
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: browser_lyx_objs
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_modify
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: slider_saturation
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
slsize: 0.15
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: slider_value
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
slsize: 0.15
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: dial_hue
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: slider_red
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
slsize: 0.15
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: slider_blue
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
slsize: 0.15
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: slider_green
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
slsize: 0.15
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_colorspace
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: browser_all
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_delete
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_add
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_converter
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: choice_from
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: choice_to
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_flags
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
=============== FORM ===============
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: browser_all
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_format
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_gui_name
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_delete
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_add
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_extension
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_viewer
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_shrtcut
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
=============== FORM ===============
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_banner
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
value: 1
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_auto_region_delete
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
value: 1
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_exit_confirm
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
value: 1
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_display_shrtcuts
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
value: 1
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
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_ask_new_file
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
value: 1
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_cursor_follows_scrollbar
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
value: 1
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
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_popup_font
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_menu_font
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_popup_encoding
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_bind_file
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_bind_file_browse
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_ui_file
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_ui_file_browse
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
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
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_command
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_page_range
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_copies
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_reverse
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_to_printer
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_file_extension
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_spool_command
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_paper_type
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_even_pages
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_odd_pages
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_collated
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_landscape
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_to_file
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_extra_options
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_spool_prefix
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_paper_size
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_name
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_adapt_output
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_default_path
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_default_path_browse
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
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
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_template_path
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_template_path_browse
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_last_files
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
value: 1
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_temp_dir_browse
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_lastfiles
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_lastfiles_browse
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_make_backups
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
value: 1
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_backup_path
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_backup_path_browse
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_serverpipe
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_serverpipe_browse
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_temp_dir
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_use_temp_dir
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
value: 1
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_printer
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_file
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_printer
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_file
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_ok
-callback: C_FormBaseOKCB
+callback: C_FormBaseDeprecatedOKCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_apply
-callback: C_FormBaseApplyCB
+callback: C_FormBaseDeprecatedApplyCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_cancel
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_all_pages
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_odd_pages
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_even_pages
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_order_normal
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_order_reverse
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_from_page
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_count
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_collated
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_to_page
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_browse
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
==============================
resize: FL_RESIZE_ALL
gravity: FL_NorthWest FL_South
name: browser
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 2
--------------------
resize: FL_RESIZE_NONE
gravity: FL_SouthWest FL_SouthWest
name: button_update
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 3
--------------------
resize: FL_RESIZE_NONE
gravity: FL_SouthWest FL_SouthWest
name: sort
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 4
--------------------
resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast
name: type
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 5
--------------------
resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast
name: button_go
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 1
--------------------
resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast
name: button_ok
-callback: C_FormBaseOKCB
+callback: C_FormBaseDeprecatedOKCB
argument: 0
--------------------
resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast
name: button_cancel
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
argument: 0
--------------------
resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast
name: button_apply
-callback: C_FormBaseApplyCB
+callback: C_FormBaseDeprecatedApplyCB
argument: 0
--------------------
resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast
name: button_restore
-callback: C_FormBaseRestoreCB
+callback: C_FormBaseDeprecatedRestoreCB
argument: 0
==============================
resize: FL_RESIZE_X
gravity: FL_NorthWest FL_NorthEast
name: input_search
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_X
gravity: FL_NorthWest FL_NorthEast
name: input_replace
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast
name: findnext
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast
name: findprev
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast
name: replace
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast
name: button_cancel
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
argument: 0
--------------------
resize: FL_RESIZE_NONE
gravity: FL_NorthEast FL_NorthEast
name: casesensitive
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_NONE
gravity: FL_NorthEast FL_NorthEast
name: matchword
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast
name: replaceall
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
==============================
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_close
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_append_column
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_delete_column
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_append_row
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_delete_row
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_set_borders
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_unset_borders
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_longtable
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_rotate_tabular
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_border_top
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_border_bottom
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_border_left
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_border_right
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_align_left
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_align_right
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_align_center
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_valign_top
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_valign_center
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_valign_bottom
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_column_width
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_special_alignment
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_border_top
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_border_bottom
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_border_left
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_border_right
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_align_left
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_align_right
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_align_center
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_valign_top
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_valign_center
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_valign_bottom
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_mcolumn_width
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_special_multialign
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_multicolumn
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_useminipage
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_rotate_cell
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_lt_firsthead
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_lt_head
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_lt_foot
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_lt_lastfoot
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_lt_newpage
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_ok
-callback: C_FormBaseOKCB
+callback: C_FormBaseDeprecatedOKCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_apply
-callback: C_FormBaseApplyCB
+callback: C_FormBaseDeprecatedApplyCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_cancel
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NorthWest FL_SouthEast
name: browser_toc
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast
name: button_update
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast
name: choice_toc_type
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast
name: button_cancel
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
argument: 0
==============================
resize: FL_RESIZE_X
gravity: FL_NorthWest FL_NorthEast
name: url
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_X
gravity: FL_NorthWest FL_NorthEast
name: name
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_X
gravity: FL_NorthWest FL_NorthEast
name: radio_html
-callback: C_FormBaseInputCB
+callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast
name: button_cancel
-callback: C_FormBaseCancelCB
+callback: C_FormBaseDeprecatedCancelCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_SouthEast FL_SouthEast
name: button_ok
-callback: C_FormBaseOKCB
+callback: C_FormBaseDeprecatedOKCB
argument: 0
--------------------
resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast
name: button_apply
-callback: C_FormBaseApplyCB
+callback: C_FormBaseDeprecatedApplyCB
argument: 0
--------------------
resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast
name: button_restore
-callback: C_FormBaseRestoreCB
+callback: C_FormBaseDeprecatedRestoreCB
argument: 0
==============================
* 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"
--- /dev/null
+#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);
+ }
+ }
+}
--- /dev/null
+// -*- 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
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;