#pragma interface
#endif
-#include FORMS_H_LOCATION
#include "LString.h"
#include "undo.h"
#include "commandtags.h"
///
long current_scrollbar_value;
///
- FL_OBJECT * figinset_canvas;
- ///
Timeout cursor_timeout;
///
int last_click_x;
+2001-04-03 Angus Leeming <a.leeming@ic.ac.uk>
+
+ * BufferView.h:
+ * BufferView_pimpl.h: remove xforms cruft. Both classes are
+ independent of xforms.
+
2001-04-02 Juergen Vigna <jug@sad.it>
* spellchecker.C: fixed namespace placing!
+2001-04-03 John Levon <moz@compsoc.man.ac.uk>
+
+ * Dialogs.h: s/popup/dialog/
+
2001-03-22 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* Liason.C (printBuffer): do not forget file name
Dialogs(LyXView *);
//@}
- /** Redraw all visible popups because, for example, the GUI colours
+ /** Redraw all visible dialogs because, for example, the GUI colours
have been re-mapped. */
static SigC::Signal0<void> redrawGUI;
/**@name Global Hide and Update Signals */
//@{
- /// Hide all visible popups
+ /// Hide all visible dialogs
SigC::Signal0<void> hideAll;
/// Hide any dialogs that require a buffer for them to operate
///
void setCancel(Button * obj) { cancel_ = obj; }
///
- void setUndoAll(Button * obj) { undo_all_ = obj; }
+ void setRestore(Button * obj) { restore_ = obj; }
///
void addReadOnly(Widget * obj) { read_only_.push_back(obj); }
///
Button * okay_;
Button * apply_;
- Button * undo_all_;
Button * cancel_;
+ Button * restore_;
typedef std::list<Widget *> Widgets;
Widgets read_only_;
template <class Button, class Widget>
GuiBC<Button, Widget>::GuiBC(string const & cancel, string const & close)
: ButtonControllerBase(cancel, close)
- , okay_(0), apply_(0), cancel_(0), undo_all_(0)
+ , okay_(0), apply_(0), restore_(0), cancel_(0)
{}
bool const enabled = bp().buttonStatus(ButtonPolicy::APPLY);
setButtonEnabled(apply_, enabled);
}
- if (undo_all_) {
- bool const enabled = bp().buttonStatus(ButtonPolicy::UNDO_ALL);
- setButtonEnabled(undo_all_, enabled);
+ if (restore_) {
+ bool const enabled = bp().buttonStatus(ButtonPolicy::RESTORE);
+ setButtonEnabled(restore_, enabled);
}
if (cancel_) {
bool const enabled = bp().buttonStatus(ButtonPolicy::CANCEL);
}
-void ButtonControllerBase::undoAll()
+void ButtonControllerBase::restore()
{
- input(ButtonPolicy::SMI_UNDO_ALL);
+ input(ButtonPolicy::SMI_RESTORE);
}
///
void cancel();
///
- void undoAll();
+ void restore();
///
void hide();
///
{
// Build the state output map
outputs_[INITIAL] = CLOSE;
- outputs_[VALID] = UNDO_ALL | OKAY | APPLY | CANCEL;
- outputs_[INVALID] = UNDO_ALL | CANCEL;
+ outputs_[VALID] = RESTORE | OKAY | APPLY | CANCEL;
+ outputs_[INVALID] = RESTORE | CANCEL;
outputs_[APPLIED] = OKAY | CLOSE;
// Build the state machine one state at a time
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_machine_[VALID][SMI_RESTORE] = 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_machine_[INVALID][SMI_RESTORE] = INITIAL;
// State::APPLIED
state_machine_[APPLIED][SMI_VALID] = VALID;
state_machine_[APPLIED][SMI_INVALID] = INVALID;
{
// Build the state output map
outputs_[INITIAL] = CLOSE;
- outputs_[VALID] = UNDO_ALL | OKAY | CANCEL;
- outputs_[INVALID] = UNDO_ALL | CANCEL;
+ outputs_[VALID] = RESTORE | OKAY | CANCEL;
+ outputs_[INVALID] = RESTORE | CANCEL;
// Build the state machine one state at a time
// NOTE: Since CANCEL and HIDE always go to INITIAL they are
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_RESTORE] = 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_machine_[INVALID][SMI_RESTORE] = INITIAL;
}
{
// Build the state output map
outputs_[INITIAL] = CLOSE;
- outputs_[VALID] = UNDO_ALL | OKAY | CANCEL;
- outputs_[INVALID] = UNDO_ALL | CANCEL;
+ outputs_[VALID] = RESTORE | OKAY | CANCEL;
+ outputs_[INVALID] = RESTORE | CANCEL;
outputs_[RO_INITIAL] = CLOSE;
- outputs_[RO_VALID] = UNDO_ALL | CANCEL;
- outputs_[RO_INVALID] = UNDO_ALL | CANCEL;
+ outputs_[RO_VALID] = RESTORE | CANCEL;
+ outputs_[RO_INVALID] = RESTORE | CANCEL;
// Build the state machine one state at a time
// NOTE: Since CANCEL and HIDE always go to INITIAL they are
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_RESTORE] = 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_RESTORE] = INITIAL;
state_machine_[INVALID][SMI_READ_ONLY] = RO_INVALID;
// State::RO_INITIAL
state_machine_[RO_INITIAL][SMI_READ_ONLY] = RO_INITIAL;
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_machine_[RO_VALID][SMI_RESTORE] = 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;
+ state_machine_[RO_INVALID][SMI_RESTORE] = RO_INITIAL;
}
{
// Build the state output map
outputs_[INITIAL] = CLOSE;
- outputs_[VALID] = UNDO_ALL | OKAY | APPLY | CANCEL;
- outputs_[INVALID] = UNDO_ALL | CANCEL;
+ outputs_[VALID] = RESTORE | OKAY | APPLY | CANCEL;
+ outputs_[INVALID] = RESTORE | CANCEL;
outputs_[RO_INITIAL] = CLOSE;
- outputs_[RO_VALID] = UNDO_ALL | CANCEL;
- outputs_[RO_INVALID] = UNDO_ALL | CANCEL;
+ outputs_[RO_VALID] = RESTORE | CANCEL;
+ outputs_[RO_INVALID] = RESTORE | CANCEL;
// Build the state machine one state at a time
// NOTE: Since CANCEL and HIDE always go to INITIAL they are
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_RESTORE] = 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_RESTORE] = INITIAL;
state_machine_[INVALID][SMI_READ_ONLY] = RO_INVALID;
// State::RO_INITIAL
state_machine_[RO_INITIAL][SMI_READ_ONLY] = RO_INITIAL;
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_machine_[RO_VALID][SMI_RESTORE] = 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_machine_[RO_INVALID][SMI_RESTORE] = RO_INITIAL;
}
{
// Build the state output map
outputs_[INITIAL] = CLOSE;
- outputs_[VALID] = UNDO_ALL | OKAY | APPLY | CANCEL;
- outputs_[INVALID] = UNDO_ALL | CANCEL;
+ outputs_[VALID] = RESTORE | OKAY | APPLY | CANCEL;
+ outputs_[INVALID] = RESTORE | CANCEL;
outputs_[APPLIED] = OKAY | APPLY | CLOSE;
outputs_[RO_INITIAL] = CLOSE;
- outputs_[RO_VALID] = UNDO_ALL | CANCEL;
- outputs_[RO_INVALID] = UNDO_ALL | CANCEL;
+ outputs_[RO_VALID] = RESTORE | CANCEL;
+ outputs_[RO_INVALID] = RESTORE | CANCEL;
outputs_[RO_APPLIED] = CLOSE;
// Build the state machine one state at a time
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_RESTORE] = 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_RESTORE] = INITIAL;
state_machine_[INVALID][SMI_READ_ONLY] = RO_INVALID;
// State::APPLIED
state_machine_[APPLIED][SMI_APPLY] = APPLIED;
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_machine_[RO_VALID][SMI_RESTORE] = 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_machine_[RO_INVALID][SMI_RESTORE] = RO_INITIAL;
// State::RO_APPLIED
state_machine_[RO_APPLIED][SMI_READ_ONLY] = RO_APPLIED;
state_machine_[RO_APPLIED][SMI_INVALID] = RO_INVALID;
{
// Build the state output map
outputs_[INITIAL] = CLOSE;
- outputs_[VALID] = UNDO_ALL | OKAY | APPLY | CANCEL;
- outputs_[INVALID] = UNDO_ALL | CANCEL;
+ outputs_[VALID] = RESTORE | OKAY | APPLY | CANCEL;
+ outputs_[INVALID] = RESTORE | CANCEL;
outputs_[APPLIED] = OKAY | APPLY | CLOSE;
// Build the state machine one state at a time
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_RESTORE] = 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_machine_[INVALID][SMI_RESTORE] = INITIAL;
// State::APPLIED
state_machine_[APPLIED][SMI_APPLY] = APPLIED;
state_machine_[APPLIED][SMI_READ_ONLY] = APPLIED;
{
// Build the state output map
outputs_[INITIAL] = CLOSE;
- outputs_[VALID] = UNDO_ALL | OKAY | APPLY | CANCEL;
- outputs_[INVALID] = UNDO_ALL | CANCEL;
+ outputs_[VALID] = RESTORE | OKAY | APPLY | CANCEL;
+ outputs_[INVALID] = RESTORE | CANCEL;
// Build the state machine one state at a time
// NOTE: Since CANCEL and HIDE always go to INITIAL they are
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_RESTORE] = 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;
+ state_machine_[INVALID][SMI_RESTORE] = INITIAL;
}
///
CANCEL = 4,
///
- UNDO_ALL = 8
+ RESTORE = 8
};
///
static const Button ALL_BUTTONS =
- Button(OKAY | APPLY | CANCEL | UNDO_ALL);
+ Button(OKAY | APPLY | CANCEL | RESTORE);
/** State machine inputs.
All the policies so far have both CANCEL and HIDE always going to
HIDE are treated differently.
*/
enum SMInput {
- ///
+ /// the dialog contents are now valid
SMI_VALID = 0,
- ///
+ /// the dialog contents are now invalid
SMI_INVALID,
- ///
+ /// an apply-and-hide action has happened
SMI_OKAY,
- ///
+ /// an apply action has happened
SMI_APPLY,
- ///
+ /// a cancel action has happened
SMI_CANCEL,
- ///
- SMI_UNDO_ALL,
- ///
+ /// a restore action has happened
+ SMI_RESTORE,
+ /// the dialog has been hidden
SMI_HIDE,
- ///
+ /// the dialog contents are read-only
SMI_READ_ONLY,
- ///
+ /// the dialog contents can be modified
SMI_READ_WRITE,
- ///
+ /// the state of the dialog contents has not changed
SMI_NOOP,
- ///
- SMI_TOTAL // not a real input
+ /// for internal use
+ SMI_TOTAL
};
/// Trigger a transition with this input.
+2001-04-03 John Levon <moz@compsoc.man.ac.uk>
+
+ * ButtonController.h:
+ * ButtonControllerBase.h:
+ * ButtonControllerBase.C:
+ * ButtonPolicies.h:
+ * ButtonPolicies.C:
+ * ControlButton.h:
+ * ControlButton.C:
+ * ControlButtons.h:
+ * ControlButtons.C:
+ * ControlConnections.h:
+ * ControlDialogs.h:
+ * ControlInset.h:
+ * ControlExternal.C:
+ * Makefile.am:
+ * README:
+ * ViewBase.h: s/ControlButton/ControlButtons/
+ s/popup/dialog/
+ s/UndoAll/Restore/ + associated
+
2001-03-30 Angus Leeming <a.leeming@ic.ac.uk>
* ControlToc.[Ch]: new files; a controller for the TOC popup.
+++ /dev/null
-// -*- C++ -*-
-/* This file is part of
- * ======================================================
- *
- * LyX, The Document Processor
- *
- * Copyright 2001 The LyX Team.
- *
- * ======================================================
- *
- * \file ControlButton.C
- * \author Angus Leeming <a.leeming@ic.ac.uk>
- */
-
-#include <config.h>
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "ControlButton.h"
-
-void ControlButton::ApplyButton()
-{
- apply();
- bc().apply();
-}
-
-
-void ControlButton::OKButton()
-{
- apply();
- hide();
- bc().ok();
-}
-
-
-void ControlButton::CancelButton()
-{
- hide();
- bc().cancel();
-}
-
-
-void ControlButton::RestoreButton()
-{
- update();
- bc().undoAll();
-}
+++ /dev/null
-/* This file is part of
- * ======================================================
- *
- * LyX, The Document Processor
- *
- * Copyright 2001 The LyX Team.
- *
- * ======================================================
- *
- * \file ControlButton.h
- * \author Angus Leeming <a.leeming@ic.ac.uk>
- *
- * ControlButton serves only to control the activation of the Ok, Apply, Cancel
- * and Restore buttons on the View popup.
- *
- * More generally, the class is part of a hierarchy of controller classes
- * that together connect the GUI-dependent popup to any appropriate
- * signals and dispatches any changes to the kernel.
- *
- * These controllers have 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 CONTROLBUTTON_H
-#define CONTROLBUTTON_H
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "DialogBase.h" // This can go eventually
-#include "ButtonControllerBase.h"
-
-class ViewBase;
-
-/** Abstract base class for Controllers with a ButtonController.
- */
-class ControlButton : public DialogBase
-{
-public: // methods
- ///
- ControlButton() {}
- ///
- virtual ~ControlButton() {};
-
- /// These functions are called when the controlling buttons are pressed.
- ///
- void ApplyButton();
- ///
- void OKButton();
- ///
- void CancelButton();
- ///
- void RestoreButton();
-
- /** 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;
-};
-
-#include "ViewBase.h"
-
-#endif // CONTROLBUTTON_H
--- /dev/null
+// -*- C++ -*-
+/* This file is part of
+ * ======================================================
+ *
+ * LyX, The Document Processor
+ *
+ * Copyright 2001 The LyX Team.
+ *
+ * ======================================================
+ *
+ * \file ControlButtons.C
+ * \author Angus Leeming <a.leeming@ic.ac.uk>
+ */
+
+#include <config.h>
+
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
+#include "ControlButtons.h"
+
+void ControlButtons::ApplyButton()
+{
+ apply();
+ bc().apply();
+}
+
+
+void ControlButtons::OKButton()
+{
+ apply();
+ hide();
+ bc().ok();
+}
+
+
+void ControlButtons::CancelButton()
+{
+ hide();
+ bc().cancel();
+}
+
+
+void ControlButtons::RestoreButton()
+{
+ update();
+ bc().restore();
+}
--- /dev/null
+/* This file is part of
+ * ======================================================
+ *
+ * LyX, The Document Processor
+ *
+ * Copyright 2001 The LyX Team.
+ *
+ * ======================================================
+ *
+ * \file ControlButtonss.h
+ * \author Angus Leeming <a.leeming@ic.ac.uk>
+ *
+ * ControlButtons serves only to control the activation of the Ok, Apply, Cancel
+ * and Restore buttons on the View dialog.
+ *
+ * More generally, the class is part of a hierarchy of controller classes
+ * that together connect the GUI-dependent dialog to any appropriate
+ * signals and dispatches any changes to the kernel.
+ *
+ * These controllers have 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 CONTROLBUTTONS_H
+#define CONTROLBUTTONS_H
+
+#ifdef __GNUG__
+#pragma interface
+#endif
+
+#include "DialogBase.h" // This can go eventually
+#include "ButtonControllerBase.h"
+
+class ViewBase;
+
+/** Abstract base class for Controllers with a ButtonController.
+ */
+class ControlButtons : public DialogBase
+{
+public: // methods
+ ///
+ ControlButtons() {}
+ ///
+ virtual ~ControlButtons() {};
+
+ /// These functions are called when the controlling buttons are pressed.
+ ///
+ void ApplyButton();
+ ///
+ void OKButton();
+ ///
+ void CancelButton();
+ ///
+ void RestoreButton();
+
+ /** 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;
+};
+
+#include "ViewBase.h"
+
+#endif // CONTROLBUTTONS_H
* \author Angus Leeming <a.leeming@ic.ac.uk>
*/
+#include <config.h>
#include <algorithm>
#ifdef __GNUG__
#pragma implementation
#endif
-#include <config.h>
-
#include "ControlCitation.h"
#include "buffer.h"
#include "Dialogs.h"
#include "ControlCommand.h"
#include "biblio.h" // biblio::InfoMap
-/** A controller for Citation dialogs. All citation-specific functionality
- should go in here.
+/** A controller for Citation dialogs.
*/
class ControlCitation : public ControlCommand
{
* ControlConnectBase, ControlConnectBI and ControlConnectBD.
*
* Together they control the connection/disconnection of signals with the LyX
- * kernel. Controllers of individual popups interacting with the kernel through
+ * kernel. Controllers of individual dialogs interacting with the kernel through
* signals/slots will all be derived from ControlConnectBI or ControlConnectBD.
*
- * A popup is classed as "Buffer Dependent" if its contents change with the
- * buffer (document). An example would be the Citation popup. Such a popup
+ * A dialog is classed as "Buffer Dependent" if its contents change with the
+ * buffer (document). An example would be the Citation dialog. Such a dialog
* would be derived, therefore, from ControlConnectBD.
*
- * Conversely, a popup is "Buffer Independent" if its contents do not change
- * when the buffer changes. An example would be the Copyright popup. Such a
- * popup, is therefore derived from ControlConnectBI.
+ * Conversely, a dialog is "Buffer Independent" if its contents do not change
+ * when the buffer changes. An example would be the Copyright dialog. Such a
+ * dialog is therefore derived from ControlConnectBI.
*
*/
#pragma interface
#endif
-#include "ControlButton.h"
+#include "ControlButtons.h"
class Dialogs;
class LyXView;
kernel. It is meant to be used solely as the parent class to
ControlConnectBI and ControlConnectBD.
*/
-class ControlConnectBase : public ControlButton
+class ControlConnectBase : public ControlButtons
{
public:
///
* \file ControlDialogs.h
* \author Angus Leeming <a.leeming@ic.ac.uk>
*
- * ControlDialog is to be used as a parent class for popups that are not
- * Inset-popups. (An ugly description I know, but I hope the meaning is clear!
- * Can anyone do any better?) Examples would be the Document and Paragraph
- * popups.
+ * ControlDialog is to be used as a parent class for dialogs that are not
+ * views onto parameters of insets. (An ugly description I know, but I hope
+ * the meaning is clear! * Can anyone do any better?) Examples would be the
+ * Document and Paragraph dialogs.
*/
#ifndef CONTROLDIALOGS_H
void ControlExternal::editExternal()
{
// fill the local, controller's copy of the Params struct with
- // the contents of the popup's fields.
+ // the contents of the dialog's fields.
view().apply();
// Create a local copy of the inset and initialise it with this
* \file ControlInsets.h
* \author Angus Leeming <a.leeming@ic.ac.uk>
*
- * ControlInset is to be used as a parent class for popups that display and
+ * ControlInset is to be used as a parent class for dialogs that display and
* can perhaps modify the contents of an individual inset. An example being the
- * ubiquitous Citation popup.
+ * ubiquitous Citation dialog.
*/
#ifndef CONTROLINSET_H
- /// Instantiation of ControlButton virtual methods.
+ /// Instantiation of ControlButtons virtual methods.
/// Get changed parameters and Dispatch them to the kernel.
virtual void apply();
Buffer::Lists::const_iterator end = tmp.end();
for (; cit != end; ++cit) {
- types.push_back(cit->first.c_str());
+ types.push_back(cit->first);
}
return types;
d_.showVCLogFile.connect(slot(this, &ControlVCLog::show));
}
+// FIXME: this is all wrong, getLogFile() actually creates a file
+// which we must unlink.
+
+// FIXME: I need to get the Buffer Filename for my window title, need
+// to add to params.
void ControlVCLog::setParams()
{
ControlBibitem.h \
ControlBibtex.C \
ControlBibtex.h \
- ControlButton.C \
- ControlButton.h \
+ ControlButtons.C \
+ ControlButtons.h \
ControlCharacter.C \
ControlCharacter.h \
ControlCitation.C \
This directory provides the controllers that act as an interface between the
-LyX kernel and the GUI-specific implementations of each popup. It also
+LyX kernel and the GUI-specific implementations of each dialog. It also
provides abstract base classes from which GUI-specific implemetations of the
-ButtonController and each separate popup should be derived (see
+ButtonController and each separate dialog should be derived (see
ButtonControlBase.[Ch] and ViewBase.h respectively).
-The Controller connects the GUI-specific popup to any appropriate signals and
+The Controller connects the GUI-specific dialog 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
+This leaves the GUI-specific dialog (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.
bc().setOK(dialog_->button_ok);
bc().setApply(dialog_->button_apply);
bc().setCancel(dialog_->button_cancel);
- bc().setUndoAll(dialog_->button_restore);
+ bc().setRestore(dialog_->button_restore);
The button controller alters the state of the buttons (active/inactive).
xforms works by callbacks, so clicking on say the button_ok button
causes a callback event to (see FormBase.C)
#define VIEWBASE_H
#include <boost/utility.hpp>
-#include "ControlButton.h"
+#include "ControlButtons.h"
#include "ControlSplash.h"
class ViewBase {
public:
///
- ViewBase(ControlButton & c) : controller_(c) {}
+ ViewBase(ControlButtons & c) : controller_(c) {}
///
virtual ~ViewBase() {}
protected:
/// The view is, after all, controlled!
- ControlButton & controller_;
+ ControlButtons & controller_;
};
class ViewBC : public ViewBase {
public:
///
- ViewBC(ControlButton & c) : ViewBase(c) {}
+ ViewBC(ControlButtons & c) : ViewBase(c) {}
protected:
///
+2001-04-03 John Levon <moz@compsoc.man.ac.uk>
+
+ * Dialogs.C: s/popup/dialog/
+
+ * FormUrl.C:
+ * GnomeBase.C:
+ * GnomeBase.h: s/ControlButton/ControlButtons/
+ s/UndoAll/Restore/
+
2001-04-02 Michael Koziarski <michael@koziarski.org>
* FormCopyright.[Ch]: Reimplemented as an MVC dialog.
#include "FormMinipage.h"
*/
-// Signal enabling all visible popups to be redrawn if so desired.
+// Signal enabling all visible dialogs to be redrawn if so desired.
// E.g., when the GUI colours have been remapped.
SigC::Signal0<void> Dialogs::redrawGUI;
bc().setOK(ok_btn());
bc().setCancel(cancel_btn());
bc().setApply(apply_btn());
- bc().setUndoAll(restore_btn());
+ bc().setRestore(restore_btn());
// Make sure everything is in the correct state.
bc().refresh();
#include <gnome--/dialog.h>
-GnomeBase::GnomeBase(ControlButton & c,
+GnomeBase::GnomeBase(ControlButtons & c,
string const & glade_file, string const & name)
: ViewBC<gnomeBC>(c)
, file_(glade_file), widget_name_(name), xml_(0)
class GnomeBase : public ViewBC<gnomeBC>, public SigC::Object {
public:
///
- GnomeBase(ControlButton & c, string const & glade_file, string const & name);
+ GnomeBase(ControlButtons & c, string const & glade_file, string const & name);
///
virtual ~GnomeBase();
+2001-04-03 John Levon <moz@compsoc.man.ac.uk>
+
+ * FormCharacter.C:
+ * FormDocument.h:
+ * FormSearch.C:
+ * Dialogs.C: s/popup/dialog/
+
+ * qt2BC.h:
+ * qt2BC.C:
+ * FormCitation.C:
+ * FormDocument.C: s/UndoAll/Restore/
+
+ * Qt2Base.h:
+ * Qt2Base.C: s/ControlButton/ControlButtons/
+
+
2001-04-02 Kalle Dalheimer <kalle@klaralvdalens-datakonsult.se>
* Makefile.am: Simplified Makefile.am
#include "qt2BC.h"
-// Signal enabling all visible popups to be redrawn if so desired.
+// Signal enabling all visible dialogs to be redrawn if so desired.
// E.g., when the GUI colours have been remapped.
SigC::Signal0<void> Dialogs::redrawGUI;
FormCharacter::FormCharacter(LyXView *v, Dialogs *d)
: dialog_(0), lv_(v), d_(d), h_(0), u_(0)
{
- // let the popup be shown
+ // let the dialog be shown
// This is a permanent connection so we won't bother
// storing a copy because we won't be disconnecting.
d->showLayoutCharacter.connect(slot(this, &FormCharacter::show));
bc().setOK(dialog_->okPB);
bc().setApply(dialog_->applyPB);
bc().setCancel(dialog_->cancelPB);
- bc().setUndoAll(dialog_->restorePB);
+ bc().setRestore(dialog_->restorePB);
bc().addReadOnly(dialog_->addPB);
bc().addReadOnly(dialog_->delPB);
bc().setOK(dialog_->okPB);
bc().setApply(dialog_->applyPB);
bc().setCancel(dialog_->cancelPB);
- bc().setUndoAll(dialog_->restorePB);
+ bc().setRestore(dialog_->restorePB);
bc().refresh();
// the document paper page
class LyXView;
class Dialogs;
-/** This class provides an Qt2 implementation of the FormDocument Popup.
+/** This class provides an Qt2 implementation of the FormDocument dialog.
The table-layout-form here changes values for latex-tabulars
@author Kalle Dalheimer
*/
: public Qt2CB<ControlDocument, Qt2DB<FormDocumentDialogImpl> >
{
public:
- /// #FormDocument x(Communicator ..., Popups ...);#
FormDocument(LyXView *, Dialogs *);
private:
///
virtual void build();
// /// Filter the inputs
// virtual bool input( FL_OBJECT *, long );
- /// Update the popup.
+ /// Update the dialog.
virtual void update();
- /// Apply from popup
+ /// Apply from dialog
virtual void apply();
- /// Cancel from popup
+ /// Cancel from dialog
virtual void cancel();
// ///
FormSearch::FormSearch(LyXView *v, Dialogs *d)
: dialog_(0), lv_(v), d_(d), h_(0), u_(0)
{
- // let the popup be shown
+ // let the dialog be shown
// This is a permanent connection so we won't bother
// storing a copy because we won't be disconnecting.
d->showSearch.connect(SigC::slot(this, &FormSearch::show));
#include <stdio.h>
-Qt2Base::Qt2Base(::ControlButton & c, QString const & t)
+Qt2Base::Qt2Base(ControlButtons & c, QString const & t)
: ViewBC<qt2BC>(c), title_(t)
{}
#include "ViewBase.h"
#include "LString.h"
#include "ButtonPolicies.h"
-#include "ControlButton.h"
+#include "ControlButtons.h"
class qt2BC;
Q_OBJECT
public:
///
- Qt2Base(::ControlButton &, const QString &);
+ Qt2Base(ControlButtons &, const QString &);
///
virtual ~Qt2Base() {}
{
protected:
///
- Qt2DB(::ControlButton &, const QString&);
+ Qt2DB(ControlButtons &, const QString&);
/// Pointer to the actual instantiation of the Qt dialog
virtual QDialog* form() const;
/// Real GUI implementation.
template <class Dialog>
-Qt2DB<Dialog>::Qt2DB(::ControlButton & c, const QString& t)
+Qt2DB<Dialog>::Qt2DB(ControlButtons & c, const QString& t)
: Qt2Base(c, t)
{}
{
protected:
///
- Qt2CB(::ControlButton &, const QString&);
+ Qt2CB(ControlButtons &, const QString&);
/// The parent controller
Controller & controller() const;
};
template <class Controller, class Base>
-Qt2CB<Controller, Base>::Qt2CB(::ControlButton & c, const QString& t)
+Qt2CB<Controller, Base>::Qt2CB(ControlButtons & c, const QString& t)
: Base(c, t)
{}
/**
- * \file xformsBC.C
+ * \file qt2BC.C
* Copyright 2001 the LyX Team
* Read the file COPYING
*
qt2BC::qt2BC(string const & cancel, string const & close)
: ButtonControllerBase(cancel, close),
- okay_(0), apply_(0), cancel_(0), undo_all_(0), read_only_()
+ okay_(0), apply_(0), cancel_(0), restore_(0), read_only_()
{}
apply_->setEnabled( false );
}
}
- if (undo_all_) {
- if (bp().buttonStatus(ButtonPolicy::UNDO_ALL)) {
- undo_all_->setEnabled( true );
+ if (restore_) {
+ if (bp().buttonStatus(ButtonPolicy::RESTORE)) {
+ restore_->setEnabled( true );
} else {
- undo_all_->setEnabled( false );
+ restore_->setEnabled( false );
}
}
if (cancel_) {
cancel_ = obj;
}
///
- void setUndoAll(QButton * obj) {
- undo_all_ = obj;
+ void setRestore(QButton * obj) {
+ restore_ = obj;
}
///
void addReadOnly(QWidget * obj) {
///
QButton * cancel_;
///
- QButton * undo_all_;
+ QButton * restore_;
/// List of items to be deactivated when in one of the read-only states
std::list<QWidget *> read_only_;
};
+2001-04-03 John Levon <moz@compsoc.man.ac.uk>
+
+ * Dialogs.C: s/popup/dialog/
+
+ * Form*.C:
+ * FormBase.h:
+ * FormBase.C: s/ControlButton/ControlButtons/
+ move bc().refresh() into base show() method
+
+ * Form*.C:
+ * FormBaseDeprecated.C:
+ s/UndoAll/restore/
+
2001-03-30 Angus Leeming <a.leeming@ic.ac.uk>
* FormMathsPanel.C (c-tor): set button controller cancel label to close.
#include "FormPreferences.h"
#include "FormTabular.h"
-// Signal enabling all visible popups to be redrawn if so desired.
+// Signal enabling all visible dialogs to be redrawn if so desired.
// E.g., when the GUI colours have been remapped.
SigC::Signal0<void> Dialogs::redrawGUI;
extern "C" int C_FormBaseWMHideCB(FL_FORM * form, void *);
-FormBase::FormBase(ControlButton & c, string const & t)
+FormBase::FormBase(ControlButtons & c, string const & t)
: ViewBC<xformsBC>(c), minw_(0), minh_(0), title_(t)
{}
if (!form()) {
build();
+ bc().refresh();
+
// work around dumb xforms sizing bug
minw_ = form()->w;
minh_ = form()->h;
{
public:
///
- FormBase(ControlButton &, string const &);
+ FormBase(ControlButtons &, string const &);
///
virtual ~FormBase() {}
{
protected:
///
- FormDB(ControlButton &, string const &);
+ FormDB(ControlButtons &, string const &);
/// Pointer to the actual instantiation of xform's form
virtual FL_FORM * form() const;
/// Real GUI implementation.
template <class Dialog>
-FormDB<Dialog>::FormDB(ControlButton & c, string const & t)
+FormDB<Dialog>::FormDB(ControlButtons & c, string const & t)
: FormBase(c, t)
{}
{
protected:
///
- FormCB(ControlButton &, string const &);
+ FormCB(ControlButtons &, string const &);
/// The parent controller
Controller & controller() const;
};
template <class Controller, class Base>
-FormCB<Controller, Base>::FormCB(ControlButton & c, string const & t)
+FormCB<Controller, Base>::FormCB(ControlButtons & c, string const & t)
: Base(c, t)
{}
FormBaseDeprecated * pre =
static_cast<FormBaseDeprecated*>(ob->form->u_vdata);
Assert(pre);
- pre->bc().undoAll();
+ pre->bc().restore();
pre->restore();
}
// Manage the ok, apply, restore and cancel/close buttons
bc().setOK(dialog_->button_ok);
bc().setCancel(dialog_->button_cancel);
- bc().refresh();
bc().addReadOnly(dialog_->key);
bc().addReadOnly(dialog_->label);
// Manage the ok, apply, restore and cancel/close buttons
bc().setOK(dialog_->button_ok);
bc().setCancel(dialog_->button_cancel);
- bc().refresh();
bc().addReadOnly(dialog_->database);
bc().addReadOnly(dialog_->style);
#include "form_browser.h"
#include "xformsBC.h"
-FormBrowser::FormBrowser(ControlButton & c, string const & t)
+FormBrowser::FormBrowser(ControlButtons & c, string const & t)
: FormDB<FD_form_browser>(c, t)
{}
// Manage the close button
bc().setCancel(dialog_->button_close);
- bc().refresh();
}
class FormBrowser : public FormDB<FD_form_browser> {
public:
///
- FormBrowser(ControlButton &, string const &);
+ FormBrowser(ControlButtons &, string const &);
private:
/// Build the dialog.
// 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);
}
FormCharacter(ControlCharacter &);
private:
- /// Apply from popup
+ /// Apply from dialog
virtual void apply();
- /// Build the popup
+ /// Build the dialog
virtual void build();
/// Nothing to update...
bc().setOK(dialog_->button_ok);
bc().setApply(dialog_->button_apply);
bc().setCancel(dialog_->button_cancel);
- bc().setUndoAll(dialog_->button_restore);
+ bc().setRestore(dialog_->button_restore);
bc().addReadOnly(dialog_->button_add);
bc().addReadOnly(dialog_->button_del);
bc().addReadOnly(dialog_->input_before);
bc().addReadOnly(dialog_->input_after);
- bc().refresh();
}
// Manage the cancel/close button
bc().setCancel(dialog_->button_cancel);
- bc().refresh();
}
// Manage the cancel/close button
bc().setCancel(dialog_->button_cancel);
- bc().refresh();
std::stringstream ss;
fl_add_browser_line(dialog_->browser_credits,
FormDocument::FormDocument(LyXView * lv, Dialogs * d)
: FormBaseBD(lv, d, _("Document Layout")), fbullet(0)
{
- // let the popup be shown
+ // let the dialog be shown
// This is a permanent connection so we won't bother
// storing a copy because we won't be disconnecting.
d->showLayoutDocument.connect(slot(this, &FormDocument::show));
bc().setOK(dialog_->button_ok);
bc().setApply(dialog_->button_apply);
bc().setCancel(dialog_->button_cancel);
- bc().setUndoAll(dialog_->button_restore);
- bc().refresh();
+ bc().setRestore(dialog_->button_restore);
// the document paper form
paper_.reset(build_doc_paper());
bullets_->form);
if ((XpmVersion < 4) || (XpmVersion == 4 && XpmRevision < 7)) {
lyxerr << _("Your version of libXpm is older than 4.7.\n"
- "The `bullet' tab of the document popup "
+ "The `bullet' tab of the document dialog "
"has been disabled") << '\n';
fl_deactivate_object(fbullet);
fl_set_object_lcol(fbullet, FL_INACTIVE);
struct FD_form_doc_options;
struct FD_form_doc_bullet;
-/** This class provides an XForms implementation of the FormDocument Popup.
+/** This class provides an XForms implementation of the FormDocument dialog.
The table-layout-form here changes values for latex-tabulars
@author Jürgen Vigna
*/
class FormDocument : public FormBaseBD {
public:
- /// #FormDocument x(Communicator ..., Popups ...);#
FormDocument(LyXView *, Dialogs *);
///
static void ComboInputCB(int, void *, Combox *);
virtual void build();
/// Filter the inputs
virtual bool input( FL_OBJECT *, long );
- /// Update the popup.
+ /// Update the dialog.
virtual void update();
- /// Apply from popup
+ /// Apply from dialog
virtual void apply();
- /// Cancel from popup
+ /// Cancel from dialog
virtual void cancel();
///
// Manage the cancel/close button
bc().setCancel(dialog_->button_cancel);
- bc().refresh();
}
bc().setOK(dialog_->button_ok);
bc().setApply(dialog_->button_apply);
bc().setCancel(dialog_->button_cancel);
- bc().refresh();
bc().addReadOnly(dialog_->input_filename);
bc().addReadOnly(dialog_->button_filenamebrowse);
bc().setOK(dialog_->button_ok);
bc().setApply(dialog_->button_apply);
bc().setCancel(dialog_->button_cancel);
- bc().setUndoAll(dialog_->button_restore);
- bc().refresh();
+ bc().setRestore(dialog_->button_restore);
bc().addReadOnly(dialog_->input_filename);
bc().addReadOnly(dialog_->button_browse);
// Manage the ok and cancel buttons
bc().setOK(dialog_->button_ok);
bc().setCancel(dialog_->button_cancel);
- bc().refresh();
bc().addReadOnly(dialog_->button_browse);
bc().addReadOnly(dialog_->check_verbatim);
bc().setOK(dialog_->button_ok);
bc().setApply(dialog_->button_apply);
bc().setCancel(dialog_->button_cancel);
- bc().setUndoAll(dialog_->button_restore);
+ bc().setRestore(dialog_->button_restore);
bc().addReadOnly(dialog_->input_key);
- bc().refresh();
}
fl_end_form();
bc().setCancel(button_cancel);
- bc().refresh();
}
///
int GetIndex(FL_OBJECT *);
- /// Build the popup
+ /// Build the dialog
virtual void build();
/// apply the data
virtual void apply();
bc().setCancel(dialog_->button_cancel);
bc().addReadOnly(dialog_->bmtable);
- bc().refresh();
}
FormMathsDeco(LyXView *, Dialogs *, FormMathsPanel const &);
private:
- /// Build the popup
+ /// Build the dialog
virtual void build();
/// Apply from dialog (modify or create inset)
virtual void apply();
/// Pointer to the actual instantiation of the xforms form
virtual FL_FORM * form() const;
- // build the popup
+ // build the form
FD_form_maths_deco * build_maths_deco();
// Real GUI implementation
bc().addReadOnly(dialog_->radio_right);
bc().addReadOnly(dialog_->radio_left);
bc().addReadOnly(dialog_->button_pix);
-
- bc().refresh();
}
FormMathsDelim(LyXView *, Dialogs *, FormMathsPanel const &);
private:
- /// Build the popup
+ /// Build the dialog
virtual void build();
/// input handler
virtual bool input(FL_OBJECT *, long);
/// Pointer to the actual instantiation of the xforms form
virtual FL_FORM * form() const;
- // build the popup
+ // build the form
FD_form_maths_delim * build_maths_delim();
// Real GUI implementation
bc().addReadOnly(dialog_->slider_columns);
bc().addReadOnly(dialog_->choice_valign);
bc().addReadOnly(dialog_->input_halign);
-
- bc().refresh();
}
int AlignFilter(char const *, int);
private:
- /// Build the popup
+ /// Build the dialog
virtual void build();
/// input handler
virtual bool input(FL_OBJECT *, long);
/// Pointer to the actual instantiation of the xforms form
virtual FL_FORM * form() const;
- // build the popup
+ // build the form
FD_form_maths_matrix * build_maths_matrix();
// Real GUI implementation
varsize_->addBitmap(14, 3, 5, varsz_width, varsz_height, varsz_bits);
bc().setCancel(dialog_->button_close);
- bc().refresh();
}
bool FormMathsPanel::input(FL_OBJECT *, long data)
/// Pointer to the actual instantiation of the ButtonController.
virtual xformsBC & bc();
- /// Build the popup
+ /// Build the dialog
virtual void build();
/// input handler
virtual bool input(FL_OBJECT *, long);
bc().addReadOnly(dialog_->radio_negative);
bc().addReadOnly(dialog_->radio_quadratin);
bc().addReadOnly(dialog_->radio_twoquadratin);
-
- bc().refresh();
}
FormMathsSpace(LyXView *, Dialogs *, FormMathsPanel const &);
private:
- /// Build the popup
+ /// Build the dialog
virtual void build();
/// input handler
virtual bool input(FL_OBJECT *, long);
/// Pointer to the actual instantiation of the xforms form
virtual FL_FORM * form() const;
- // build the popup
+ // build the form
FD_form_maths_space * build_maths_space();
// Real GUI implementation
bc().setOK(dialog_->button_ok);
bc().setApply(dialog_->button_apply);
bc().setCancel(dialog_->button_cancel);
- bc().setUndoAll(dialog_->button_restore);
+ bc().setRestore(dialog_->button_restore);
bc().addReadOnly(dialog_->input_width);
bc().addReadOnly(dialog_->choice_width_units);
bc().addReadOnly(dialog_->radio_top);
bc().addReadOnly(dialog_->radio_middle);
bc().addReadOnly(dialog_->radio_bottom);
-
- bc().refresh();
}
FormParagraph::FormParagraph(LyXView * lv, Dialogs * d)
: FormBaseBD(lv, d, _("Paragraph Layout"))
{
- // let the popup be shown
+ // let the dialog be shown
// This is a permanent connection so we won't bother
// storing a copy because we won't be disconnecting.
d->showLayoutParagraph.connect(slot(this, &FormParagraph::show));
bc_.setOK(dialog_->button_ok);
bc_.setApply(dialog_->button_apply);
bc_.setCancel(dialog_->button_cancel);
- bc_.setUndoAll(dialog_->button_restore);
- bc_.refresh();
+ bc_.setRestore(dialog_->button_restore);
// the general paragraph data form
general_.reset(build_paragraph_general());
struct FD_form_paragraph_general;
struct FD_form_paragraph_extra;
-/** This class provides an XForms implementation of the FormParagraph Popup.
+/** This class provides an XForms implementation of the FormParagraph dialog.
* @author Jürgen Vigna
*/
class FormParagraph : public FormBaseBD {
/** Redraw the form (on receipt of a Signal indicating, for example,
that the xforms colours have been re-mapped). */
virtual void redraw();
- /// Build the popup
+ /// Build the dialog
virtual void build();
- /// Apply from popup
+ /// Apply from dialog
virtual void apply();
- /// Update the popup.
+ /// Update the dialog
virtual void update();
/// Filter the inputs on callback from xforms
virtual bool input(FL_OBJECT * ob, long);
bc().setApply(dialog_->button_apply);
bc().setCancel(dialog_->button_cancel);
bc().addReadOnly(dialog_->input_preamble);
- bc().refresh();
}
///
FormPreamble(ControlPreamble &);
private:
- /// Apply from popup
+ /// Apply from dialog
virtual void apply();
- /// Build the popup
+ /// Build the dialog
virtual void build();
- /// Update the popup.
+ /// Update the dialog
virtual void update();
/// Fdesign generated method
bc().setOK(dialog_->button_ok);
bc().setApply(dialog_->button_apply);
bc().setCancel(dialog_->button_cancel);
- bc().setUndoAll(dialog_->button_restore);
- bc().refresh();
+ bc().setRestore(dialog_->button_restore);
// build the tab folders
converters_tab_.reset(build_outer_tab());
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,
bc().setOK(dialog_->button_ok);
bc().setApply(dialog_->button_apply);
bc().setCancel(dialog_->button_cancel);
- bc().setUndoAll(dialog_->button_restore);
- bc().refresh();
+ bc().setRestore(dialog_->button_restore);
}
bc().addReadOnly(dialog_->input_replace);
bc().addReadOnly(dialog_->replace);
bc().addReadOnly(dialog_->replaceall);
- bc().refresh();
}
bc().setOK(dialog_->button_ok);
bc().setApply(dialog_->button_apply);
bc().setCancel(dialog_->button_cancel);
- bc().refresh();
}
// Manage the cancel/close button
bc().setCancel(dialog_->button_cancel);
- 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().setRestore(dialog_->button_restore);
bc().addReadOnly(dialog_->name);
bc().addReadOnly(dialog_->url);
/* input_validators.C
* A collection of input filtering and validating functions for use in
- * XForms popups. Mainly meant for filtering input boxes although may
+ * XForms dialogs. Mainly meant for filtering input boxes although may
* be extended to include other generally useful xforms-specific tools.
*/
/** Input validators and filters for xforms.
* A collection of input filtering and validating functions for use in
- * XForms popups. Mainly meant for filtering input boxes although may
+ * XForms dialogs. Mainly meant for filtering input boxes although may
* be extended to include other generally useful xforms-specific tools.
*/