+2002-08-12 Angus Leeming <leeming@lyx.org>
+
+ * DialogBase.h: no longer derive from boost::signals::trackable.
+
+ * Toolbar.[Ch] (c-tor): no londer passed a Dialogs &.
+
2002-08-08 John Levon <levon@movementarian.org>
* Toolbar.C:
#ifndef DIALOGBASE_H
#define DIALOGBASE_H
-#include <boost/signals/trackable.hpp>
#include <boost/utility.hpp>
/** Abstract base class of all dialogs.
satisfy that request. Thus a dialog will have to "pull" the necessary
details from the core of the program.
*/
-class DialogBase : public boost::signals::trackable, boost::noncopyable
+class DialogBase : boost::noncopyable
{
public:
/**@name Constructors and Deconstructors */
using std::endl;
-Toolbar::Toolbar(LyXView * o, Dialogs & d,
- int x, int y, ToolbarDefaults const &tbd)
+Toolbar::Toolbar(LyXView * o, int x, int y, ToolbarDefaults const &tbd)
: last_textclass_(-1)
{
- pimpl_ = new Pimpl(o, d, x, y);
+ pimpl_ = new Pimpl(o, x, y);
// extracts the toolbar actions from tbd
for (ToolbarDefaults::const_iterator cit = tbd.begin();
class LyXView;
class ToolbarDefaults;
-class Dialogs;
+
/** The LyX GUI independent toolbar class
The GUI interface is implemented in the corresponding Toolbar_pimpl class.
class Toolbar {
public:
///
- Toolbar(LyXView * o, Dialogs & d,
- int x, int y, ToolbarDefaults const &);
+ Toolbar(LyXView * o, int x, int y, ToolbarDefaults const &);
///
~Toolbar();
+2002-08-12 Angus Leeming <leeming@lyx.org>
+
+ * ControlButtons.[Ch] (bc, view): no longer virtual.
+ (setView, setButtonController): new methods, invoked by GUI.
+
+ * ControlDialog.h (show):
+ * ControlInset.h (createInset, showInset): make public, so that GUI can
+ invoke them.
+
+ * GUI.h: GUI now contains a controller, rather than deriving from it.
+ remove all those friend functions since we can now access the show,
+ createInset, showInset controller methods.
+
+ * ViewBase.h: simplifiy, enabling ControlButtons to be forward-declared.
+ (ViewBC): scrapped.
+
+ * character.h: #include a couple of STL files.
+
2002-08-08 John Levon <levon@movementarian.org>
* ControlCommandBuffer.C: LyXAction cleanup
#include "ButtonControllerBase.h"
#include "ViewBase.h"
#include "lyxrc.h"
+#include "support/LAssert.h"
+
ControlButtons::ControlButtons()
- : emergency_exit_(false), is_closing_(false)
+ : emergency_exit_(false), is_closing_(false), bc_ptr_(0), view_ptr_(0)
{}
{
return lyxrc.dialogs_iconify_with_main;
}
+
+
+ButtonControllerBase & ControlButtons::bc()
+{
+ lyx::Assert(bc_ptr_);
+ return *bc_ptr_;
+}
+
+
+ViewBase & ControlButtons::view()
+{
+ lyx::Assert(view_ptr_);
+ return *view_ptr_;
+}
+
+
+void ControlButtons::setView(ViewBase & v)
+{
+ view_ptr_ = &v;
+}
+
+
+void ControlButtons::setButtonController(ButtonControllerBase & bc)
+{
+ bc_ptr_ = &bc;
+}
+
///
virtual ~ControlButtons() {}
- /// These functions are called when the controlling buttons are pressed.
+ /** These functions are called by the view when the appropriate buttons
+ * are pressed.
+ */
///
void ApplyButton();
///
void CancelButton();
///
void RestoreButton();
- ///
+
+ /// Returns the user-specified iconification policy.
bool IconifyWithMain() 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;
+ ///
+ ButtonControllerBase & bc();
+
+ ///
+ void setView(ViewBase &);
+ ///
+ void setButtonController(ButtonControllerBase &);
protected:
+ ///
+ ViewBase & view();
+
/** When Applying it's useful to know whether the dialog is about
to close or not (no point refreshing the display for example). */
bool isClosing() const { return is_closing_; }
/// 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;
-
/** This flag can be set by one of the miriad the controller methods
to ensure that the dialog is shut down. */
bool emergency_exit_;
private:
///
bool is_closing_;
-
+ /// We own neither of these pointers.
+ ButtonControllerBase * bc_ptr_;
+ ///
+ ViewBase * view_ptr_;
};
#endif // CONTROLBUTTONS_H
///
ControlDialog(LyXView &, Dialogs &);
-protected:
- /// Show the dialog.
+ /** Show the dialog.
+ * Publicly accessible so that it can be invoked by the Dialogs class.
+ */
virtual void show();
+
+protected:
/// Hide the dialog.
virtual void hide();
/// Update the dialog.
///
Params const & 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(Inset *);
+
+protected:
/// Allow the daughter methods to access the inset.
Inset * inset() const;
#define GUI_H
#include "ButtonController.h"
-#include "ViewBase.h"
-/** This class instantiates and makes available the GUI-specific
- ButtonController and View.
+
+/** This class makes a whole out of the disparate parts of a dialog.
*/
-template <class Controller, class GUIview, class Policy, class GUIbc>
-class GUI : public Controller {
+template <typename Controller, typename GUIview,
+ typename Policy, typename GUIbc>
+class GUI {
public:
///
- GUI(LyXView & lv, Dialogs & d) : Controller(lv, d), view_(*this, d) {}
+ GUI(LyXView & lv, Dialogs & d);
///
- virtual ButtonControllerBase & bc() { return bc_; }
+ Controller & controller() { return controller_; }
///
- virtual ViewBase & view() { return view_; }
-
- friend void gui_ShowAboutlyx(LyXView &, Dialogs &);
- friend void gui_ShowBibitem(InsetCommand *, LyXView &, Dialogs &);
- friend void gui_ShowBibtex(InsetCommand *, LyXView &, Dialogs &);
- friend void gui_ShowCharacter(LyXView &, Dialogs &);
- friend void gui_SetUserFreeFont(LyXView &, Dialogs &);
- friend void gui_ShowCitation(InsetCommand *, LyXView &, Dialogs &);
- friend void gui_CreateCitation(string const &, LyXView &, Dialogs &);
- friend void gui_ShowDocument(LyXView &, Dialogs &);
- friend void gui_ShowError(InsetError *, LyXView &, Dialogs &);
- friend void gui_ShowERT(InsetERT *, LyXView &, Dialogs &);
- friend void gui_UpdateERT(InsetERT *, LyXView &, Dialogs &);
- friend void gui_ShowExternal(InsetExternal *, LyXView &, Dialogs &);
- friend void gui_ShowFloat(InsetFloat *, LyXView &, Dialogs &);
- friend void gui_ShowForks(LyXView &, Dialogs &);
- friend void gui_ShowGraphics(InsetGraphics *, LyXView &, Dialogs &);
- friend void gui_ShowInclude(InsetInclude *, LyXView &, Dialogs &);
- friend void gui_ShowIndex(InsetCommand *, LyXView &, Dialogs &);
- friend void gui_CreateIndex(LyXView &, Dialogs &);
- friend void gui_ShowLogFile(LyXView &, Dialogs &);
- friend void gui_ShowMathPanel(LyXView &, Dialogs &);
- friend void gui_ShowMinipage(InsetMinipage *, LyXView &, Dialogs &);
- friend void gui_UpdateMinipage(InsetMinipage *, LyXView &, Dialogs &);
- friend void gui_ShowParagraph(LyXView &, Dialogs &);
- friend void gui_ShowPreamble(LyXView &, Dialogs &);
- friend void gui_ShowPreferences(LyXView &, Dialogs &);
- friend void gui_ShowPrint(LyXView &, Dialogs &);
- friend void gui_ShowRef(InsetCommand *, LyXView &, Dialogs &);
- friend void gui_CreateRef(string const &, LyXView &, Dialogs &);
- friend void gui_ShowSearch(LyXView &, Dialogs &);
- friend void gui_ShowSendto(LyXView &, Dialogs &);
- friend void gui_ShowSpellchecker(LyXView &, Dialogs &);
- friend void gui_ShowTabularCreate(LyXView &, Dialogs &);
- friend void gui_ShowTexinfo(LyXView &, Dialogs &);
- friend void gui_ShowTOC(InsetCommand *, LyXView &, Dialogs &);
- friend void gui_CreateTOC(string const &, LyXView &, Dialogs &);
- friend void gui_ShowUrl(InsetCommand *, LyXView &, Dialogs &);
- friend void gui_CreateUrl(string const &, LyXView &, Dialogs &);
- friend void gui_ShowVCLogFile(LyXView &, Dialogs &);
+ Controller const & controller() const { return controller_; }
private:
+ ///
+ Controller controller_;
///
ButtonController<Policy, GUIbc> bc_;
///
GUIview view_;
};
+
+template <typename Controller, typename GUIview,
+ typename Policy, typename GUIbc>
+GUI<Controller, GUIview, Policy, GUIbc>::GUI(LyXView & lv, Dialogs & d)
+ : controller_(lv, d),
+ view_()
+{
+ controller_.setView(view_);
+ controller_.setButtonController(bc_);
+ view_.setController(controller_);
+}
+
+
#endif // GUI_H
#ifndef VIEWBASE_H
#define VIEWBASE_H
-#include <boost/utility.hpp>
-#include "ControlButtons.h"
+#include "support/LAssert.h"
+
+class ControlButtons;
+
class ViewBase {
public:
///
- ViewBase(ControlButtons & c) : controller_(c) {}
+ ViewBase() : controller_ptr_(0) {}
///
virtual ~ViewBase() {}
/// Apply changes to LyX data from dialog.
virtual void apply() = 0;
+ /// build the dialog
+ virtual void build() = 0;
/// Hide the dialog.
virtual void hide() = 0;
/// Redraw the dialog (e.g. if the colors have been remapped).
virtual void show() = 0;
/// Update dialog before/whilst showing it.
virtual void update() = 0;
- /// build the dialog
- virtual void build() = 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(); }
-
- /** Defaults to nothing. Can be used by the Controller, however, to
- indicate to the View that something has changed and that the
- dialog therefore needs updating. */
+ /** Defaults to nothing. Can be used by the controller, however, to
+ * indicate to the view that something has changed and that the
+ * dialog therefore needs updating.
+ */
virtual void partialUpdate(int) {}
-protected:
- /// The view is, after all, controlled!
- ControlButtons & controller_;
-};
-
-
-/** A generic class to cast the ButtonController controller_.bc_ to it's
- daughter class. */
-template <class GUIbc>
-class ViewBC : public ViewBase {
-public:
+ /** This should be set by the GUI class that owns both the controller
+ * and the view
+ */
+ void setController(ControlButtons & c) { controller_ptr_ = &c; }
+
///
- ViewBC(ControlButtons & c) : ViewBase(c) {}
-
-protected:
+ ControlButtons & getController()
+ {
+ lyx::Assert(controller_ptr_);
+ return *controller_ptr_;
+ }
///
- GUIbc & bc() const
+ ControlButtons const & getController() const
{
- return static_cast<GUIbc &>(controller_.bc());
- // return dynamic_cast<GUIbc &>(controller_.bc());
+ lyx::Assert(controller_ptr_);
+ return *controller_ptr_;
}
+
+protected:
+ /// We don't own this.
+ ControlButtons * controller_ptr_;
};
+
#endif // VIEWBASE_H
#include "lyxfont.h"
#include "LColor.h"
+#include <utility>
+#include <vector>
+
/** Functions of use to the character GUI controller and view */
namespace frnt {
///
+2002-08-12 Angus Leeming <leeming@lyx.org>
+
+ * Menubar_pimpl.C: no need to #include "Dialogs.h". Remove semi-colon
+ from namespace closing delimiter.
+
+ * Menubar_pimpl.h: remove MenuItemInfo:: prefix from c-tor declaration.
+
+ * QAbout.[Ch]:
+ * QBibitem.[Ch]:
+ * QBibtex.[Ch]:
+ * QCharacter.[Ch]:
+ * QCitation.[Ch]:
+ * QERT.[Ch]:
+ * QError.[Ch]:
+ * QExternal.[Ch]:
+ * QFloat.[Ch]:
+ * QGraphics.[Ch]:
+ * QInclude.[Ch]:
+ * QIndex.[Ch]:
+ * QLog.[Ch]:
+ * QMinipage.[Ch]:
+ * QParagraph.[Ch]:
+ * QPreamble.[Ch]:
+ * QPrint.[Ch]:
+ * QRef.[Ch]:
+ * QSearch.[Ch]:
+ * QShowFile.[Ch]:
+ * QSpellchecker.[Ch]:
+ * QTabularCreate.[Ch]:
+ * QTexinfo.[Ch]:
+ * QThesaurus.[Ch]:
+ * QToc.[Ch]:
+ * QURL.[Ch]:
+ * QVCLog.[Ch]:
+ No longer pass Controller or Dialogs to the c-tor.
+ No longer forward-declare Dialogs.
+
+ * Qt2Base.[Ch]: derives from ViewBase directly.
+ No longer passed ControlButtons & or Dialogs &.
+ (bc): new method, enabling the daughter classes to access the
+ ButtonController.
+ (slotWMHide):
+ (slotApply):
+ (slotOK):
+ (slotClose):
+ (slotRestore): changes due to a change in the ViewBase class.
+
+ * QtView.C (c-tor): no longer pass Dialogs & to the Toolbar.
+
+ * Toolbar_pimpl.[Ch] (c-tor): no longer passed a Dialogs &.
+
+ * guiapi.C: access the controller methods by explicit invocation of the
+ controller.
+
2002-08-09 John Levon <levon@movementarian.org>
* Toolbar_pimpl.C: add missing header
#include "LyXAction.h"
#include "kbmap.h"
#include "buffer.h"
-#include "Dialogs.h"
#include "lyxfunc.h"
#include "FloatList.h"
#include "support/lstrings.h"
return label;
}
-};
+}
typedef vector<int>::size_type size_type;
/// stored state for menu items
struct MenuItemInfo {
// I REALLY hate this stupid requirement of std::map
- MenuItemInfo::MenuItemInfo()
+ MenuItemInfo()
: parent_(0), id_(0), item_(0) {};
- MenuItemInfo::MenuItemInfo(QMenuData * p, int id, MenuItem const * item)
+ MenuItemInfo(QMenuData * p, int id, MenuItem const * item)
: parent_(p), id_(id), item_(item) {};
/// menu containing item
typedef Qt2CB<ControlAboutlyx, Qt2DB<QAboutDialog> > base_class;
-QAbout::QAbout(ControlAboutlyx & c, Dialogs &)
- : base_class(c, _("About LyX"))
+QAbout::QAbout()
+ : base_class(_("About LyX"))
{
}
#include "Qt2Base.h"
#include "boost/utility.hpp"
-class Dialogs;
class LyXView;
class QAboutDialog;
class ControlAboutlyx;
: public Qt2CB<ControlAboutlyx, Qt2DB<QAboutDialog> >
{
public:
- QAbout(ControlAboutlyx &, Dialogs &);
+ QAbout();
private:
/// not needed
typedef Qt2CB<ControlBibitem, Qt2DB<QBibitemDialog> > base_class;
-QBibitem::QBibitem(ControlBibitem & c, Dialogs &)
- : base_class(c, _("Bibliography Item"))
+QBibitem::QBibitem()
+ : base_class(_("Bibliography Item"))
{
}
friend class QBibitemDialog;
public:
- QBibitem(ControlBibitem &, Dialogs &);
+ QBibitem();
protected:
virtual bool isValid();
typedef Qt2CB<ControlBibtex, Qt2DB<QBibtexDialog> > base_class;
-QBibtex::QBibtex(ControlBibtex & c, Dialogs &)
- : base_class(c, _("BibTeX"))
+QBibtex::QBibtex()
+ : base_class(_("BibTeX"))
{
}
friend class QBibtexDialog;
public:
- QBibtex(ControlBibtex &, Dialogs &);
+ QBibtex();
protected:
virtual bool isValid();
typedef Qt2CB<ControlCharacter, Qt2DB<QCharacterDialog> > base_class;
-QCharacter::QCharacter(ControlCharacter & c, Dialogs &)
- : base_class(c, _("Character"))
+QCharacter::QCharacter()
+ : base_class(_("Character"))
{
}
class ControlCharacter;
class QCharacterDialog;
-class Dialogs;
+
class QCharacter :
public Qt2CB<ControlCharacter, Qt2DB<QCharacterDialog> >
friend class QCharacterDialog;
public:
- QCharacter(ControlCharacter &, Dialogs &);
+ QCharacter();
private:
/// Apply changes
typedef Qt2CB<ControlCitation, Qt2DB<QCitationDialog> > base_class;
-QCitation::QCitation(ControlCitation & c, Dialogs &)
- : base_class(c, _("Citation"))
+QCitation::QCitation()
+ : base_class(_("Citation"))
{}
class ControlCitation;
class QCitationDialog;
-class Dialogs;
+
class QCitation : public Qt2CB<ControlCitation, Qt2DB<QCitationDialog> >
{
public:
///
- QCitation(ControlCitation &, Dialogs &);
+ QCitation();
private:
///
typedef Qt2CB<ControlERT, Qt2DB<QERTDialog> > base_class;
-QERT::QERT(ControlERT & c, Dialogs &)
- : base_class(c, _("LaTeX ERT"))
+QERT::QERT()
+ : base_class(_("LaTeX ERT"))
{
}
class ControlERT;
class QERTDialog;
-class Dialogs;
+
class QERT :
public Qt2CB<ControlERT, Qt2DB<QERTDialog> >
friend class QERTDialog;
public:
- QERT(ControlERT &, Dialogs &);
+ QERT();
private:
/// Apply changes
typedef Qt2CB<ControlError, Qt2DB<QErrorDialog> > base_class;
-QError::QError(ControlError & c, Dialogs &)
- : base_class(c, _("LaTeX Error"))
+QError::QError()
+ : base_class(_("LaTeX Error"))
{
}
class ControlError;
class QErrorDialog;
-class Dialogs;
+
class QError :
public Qt2CB<ControlError, Qt2DB<QErrorDialog> >
friend class QErrorDialog;
public:
- QError(ControlError &, Dialogs &);
+ QError();
private:
/// Apply changes
typedef Qt2CB<ControlExternal, Qt2DB<QExternalDialog> > base_class;
-QExternal::QExternal(ControlExternal & c, Dialogs &)
- : base_class(c, _("External"))
+QExternal::QExternal()
+ : base_class(_("External"))
{
}
friend class QExternalDialog;
public:
- QExternal(ControlExternal &, Dialogs &);
+ QExternal();
protected:
virtual bool isValid();
typedef Qt2CB<ControlFloat, Qt2DB<QFloatDialog> > base_class;
-QFloat::QFloat(ControlFloat & c, Dialogs &)
- : base_class(c, _("LaTeX Information"))
+QFloat::QFloat()
+ : base_class(_("LaTeX Information"))
{
}
///
friend class QFloatDialog;
///
- QFloat(ControlFloat &, Dialogs &);
+ QFloat();
private:
/// Apply changes
virtual void apply();
typedef Qt2CB<ControlGraphics, Qt2DB<QGraphicsDialog> > base_class;
-QGraphics::QGraphics(ControlGraphics & c, Dialogs &)
- : base_class(c, _("Graphics"))
+QGraphics::QGraphics()
+ : base_class(_("Graphics"))
{
}
///
friend class QGraphicsDialog;
///
- QGraphics(ControlGraphics &, Dialogs &);
+ QGraphics();
protected:
virtual bool isValid();
typedef Qt2CB<ControlInclude, Qt2DB<QIncludeDialog> > base_class;
-QInclude::QInclude(ControlInclude & c, Dialogs &)
- : base_class(c, _("Include"))
+QInclude::QInclude()
+ : base_class(_("Include"))
{
}
///
friend class QIncludeDialog;
///
- QInclude(ControlInclude &, Dialogs &);
+ QInclude();
protected:
virtual bool isValid();
typedef Qt2CB<ControlIndex, Qt2DB<QIndexDialog> > base_class;
-QIndex::QIndex(ControlIndex & c, Dialogs &)
- : base_class(c, _("Index"))
+QIndex::QIndex()
+ : base_class(_("Index"))
{
}
class ControlIndex;
class QIndexDialog;
-class Dialogs;
+
class QIndex :
public Qt2CB<ControlIndex, Qt2DB<QIndexDialog> >
friend class QIndexDialog;
public:
- QIndex(ControlIndex &, Dialogs &);
+ QIndex();
protected:
virtual bool isValid();
typedef Qt2CB<ControlLog, Qt2DB<QLogDialog> > base_class;
-QLog::QLog(ControlLog & c, Dialogs &)
- : base_class(c, _("Log"))
+QLog::QLog()
+ : base_class(_("Log"))
{
}
///
friend class QLogDialog;
///
- QLog(ControlLog &, Dialogs &);
+ QLog();
private:
/// Apply changes
typedef Qt2CB<ControlMinipage, Qt2DB<QMinipageDialog> > base_class;
-QMinipage::QMinipage(ControlMinipage & c, Dialogs &)
- : base_class(c, _("Minipage"))
+QMinipage::QMinipage()
+ : base_class(_("Minipage"))
{
}
///
friend class QMinipageDialog;
///
- QMinipage(ControlMinipage &, Dialogs &);
+ QMinipage();
private:
/// Apply changes
typedef Qt2CB<ControlParagraph, Qt2DB<QParagraphDialog> > base_class;
-QParagraph::QParagraph(ControlParagraph & c, Dialogs &)
- : base_class(c, _("Paragraph Layout"))
+QParagraph::QParagraph()
+ : base_class(_("Paragraph Layout"))
{}
void QParagraph::build_dialog()
class ControlParagraph;
class QParagraphDialog;
-class Dialogs;
+
class QParagraph :
public Qt2CB<ControlParagraph, Qt2DB<QParagraphDialog> >
friend class QParagraphDialog;
public:
- QParagraph(ControlParagraph &, Dialogs &);
+ QParagraph();
private:
/// Apply changes
typedef Qt2CB<ControlPreamble, Qt2DB<QPreambleDialog> > base_class;
-QPreamble::QPreamble(ControlPreamble & c, Dialogs &)
- : base_class(c, _("LaTeX Preamble"))
+QPreamble::QPreamble()
+ : base_class(_("LaTeX Preamble"))
{
}
///
friend class QPreambleDialog;
///
- QPreamble(ControlPreamble &, Dialogs &);
+ QPreamble();
private:
/// Apply changes
typedef Qt2CB<ControlPrint, Qt2DB<QPrintDialog> > base_class;
-QPrint::QPrint(ControlPrint & c, Dialogs &)
- : base_class(c, _("Print"))
+QPrint::QPrint()
+ : base_class(_("Print"))
{
}
///
friend class QPrintDialog;
///
- QPrint(ControlPrint &, Dialogs &);
+ QPrint();
private:
/// Apply changes
typedef Qt2CB<ControlRef, Qt2DB<QRefDialog> > base_class;
-QRef::QRef(ControlRef & c, Dialogs &)
- : base_class(c, _("Cross Reference")),
+QRef::QRef()
+ : base_class(_("Cross Reference")),
sort_(false), at_ref_(false)
{
}
class ControlRef;
class QRefDialog;
-class Dialogs;
+
class QRef :
public Qt2CB<ControlRef, Qt2DB<QRefDialog> >
friend class QRefDialog;
public:
- QRef(ControlRef & c, Dialogs &);
+ QRef();
private:
/// apply changes
typedef Qt2CB<ControlSearch, Qt2DB<QSearchDialog> > base_class;
-QSearch::QSearch(ControlSearch & c, Dialogs &)
- : base_class(c, _("Search"))
+QSearch::QSearch()
+ : base_class(_("Search"))
{
}
class ControlSearch;
class QSearchDialog;
-class Dialogs;
+
///
class QSearch
///
friend class QSearchDialog;
///
- QSearch(ControlSearch &, Dialogs &);
+ QSearch();
private:
/// Apply changes
typedef Qt2CB<ControlShowFile, Qt2DB<QShowFileDialog> > base_class;
-QShowFile::QShowFile(ControlShowFile & c, Dialogs &)
- : base_class(c, _("ShowFile"))
+QShowFile::QShowFile()
+ : base_class(_("ShowFile"))
{
}
class ControlShowFile;
class QShowFileDialog;
-class Dialogs;
+
class QShowFile :
public Qt2CB<ControlShowFile, Qt2DB<QShowFileDialog> >
friend class QShowFileDialog;
public:
- QShowFile(ControlShowFile &, Dialogs &);
+ QShowFile();
private:
/// Apply changes
typedef Qt2CB<ControlSpellchecker, Qt2DB<QSpellcheckerDialog> > base_class;
-QSpellchecker::QSpellchecker(ControlSpellchecker & c, Dialogs &)
- : base_class(c, _("Spellchecker"))
+QSpellchecker::QSpellchecker()
+ : base_class(_("Spellchecker"))
{
}
class ControlSpellchecker;
class QSpellcheckerDialog;
-class Dialogs;
+
class QSpellchecker :
public Qt2CB<ControlSpellchecker, Qt2DB<QSpellcheckerDialog> >
friend class QSpellcheckerDialog;
public:
- QSpellchecker(ControlSpellchecker &, Dialogs &);
+ QSpellchecker();
/// update from controller
void partialUpdate(int id);
typedef Qt2CB<ControlTabularCreate, Qt2DB<QTabularCreateDialog> > base_class;
-QTabularCreate::QTabularCreate(ControlTabularCreate & c, Dialogs &)
- : base_class(c, _("Insert table"))
+QTabularCreate::QTabularCreate()
+ : base_class(_("Insert table"))
{
}
class ControlTabularCreate;
class QTabularCreateDialog;
-class Dialogs;
+
///
class QTabularCreate
///
friend class QTabularCreateDialog;
///
- QTabularCreate(ControlTabularCreate &, Dialogs &);
+ QTabularCreate();
private:
/// Apply changes
typedef Qt2CB<ControlTexinfo, Qt2DB<QTexinfoDialog> > base_class;
-QTexinfo::QTexinfo(ControlTexinfo & c, Dialogs &)
- : base_class(c, _("LaTeX Information")), warningPosted(false), activeStyle(ControlTexinfo::cls)
+QTexinfo::QTexinfo()
+ : base_class(_("LaTeX Information")), warningPosted(false), activeStyle(ControlTexinfo::cls)
{
}
///
friend class QTexinfoDialog;
///
- QTexinfo(ControlTexinfo &, Dialogs &);
+ QTexinfo();
private:
/// Apply changes
virtual void apply() { };
typedef Qt2CB<ControlThesaurus, Qt2DB<QThesaurusDialog> > base_class;
-QThesaurus::QThesaurus(ControlThesaurus & c, Dialogs &)
- : base_class(c, _("Thesaurus"))
+QThesaurus::QThesaurus()
+ : base_class(_("Thesaurus"))
{
}
///
friend class QThesaurusDialog;
///
- QThesaurus(ControlThesaurus &, Dialogs &);
+ QThesaurus();
private:
/// Apply changes
virtual void apply() { };
typedef Qt2CB<ControlToc, Qt2DB<QTocDialog> > base_class;
-QToc::QToc(ControlToc & c, Dialogs &)
- : base_class(c, _("Table of contents")), depth_(1)
+QToc::QToc()
+ : base_class(_("Table of contents")), depth_(1)
{}
public Qt2CB<ControlToc, Qt2DB<QTocDialog> >
{
public:
- QToc(ControlToc &, Dialogs &);
+ QToc();
friend class QTocDialog;
typedef Qt2CB<ControlUrl, Qt2DB<QURLDialog> > base_class;
-QURL::QURL(ControlUrl & c, Dialogs &)
- : base_class(c, _("URL"))
+QURL::QURL()
+ : base_class(_("URL"))
{
}
class ControlUrl;
class QURLDialog;
-class Dialogs;
+
class QURL :
public Qt2CB<ControlUrl, Qt2DB<QURLDialog> >
{
friend class QURLDialog;
public:
- QURL(ControlUrl & c, Dialogs &);
+ QURL();
protected:
virtual bool isValid();
typedef Qt2CB<ControlVCLog, Qt2DB<QVCLogDialog> > base_class;
-QVCLog::QVCLog(ControlVCLog & c, Dialogs &)
- : base_class(c, _("VCLog"))
+QVCLog::QVCLog()
+ : base_class(_("VCLog"))
{
}
///
friend class QVCLogDialog;
///
- QVCLog(ControlVCLog &, Dialogs &);
+ QVCLog();
private:
/// Apply changes
#include "Dialogs.h"
#include "Qt2Base.h"
#include "Qt2BC.h"
+#include "ControlButtons.h"
#include "support/LAssert.h"
-Qt2Base::Qt2Base(ControlButtons & c, QString const & t)
- : ViewBC<Qt2BC>(c), updating_(false), title_(t)
+Qt2Base::Qt2Base(QString const & t)
+ : ViewBase(), updating_(false), title_(t)
{}
+Qt2BC & Qt2Base::bc()
+{
+ return static_cast<Qt2BC &>(getController().bc());
+ // return dynamic_cast<Qt2BC &>(getController().bc());
+}
+
+
void Qt2Base::show()
{
if (!form()) {
void Qt2Base::slotWMHide()
{
- CancelButton();
+ getController().CancelButton();
}
void Qt2Base::slotApply()
{
- ApplyButton();
+ getController().ApplyButton();
}
void Qt2Base::slotOK()
{
- OKButton();
+ getController().OKButton();
}
void Qt2Base::slotClose()
{
- CancelButton();
+ getController().CancelButton();
}
void Qt2Base::slotRestore()
{
- RestoreButton();
+ getController().RestoreButton();
}
#include "LString.h"
#include "debug.h"
#include "ButtonPolicies.h"
-#include "ControlButtons.h"
#include <boost/scoped_ptr.hpp>
/** This class is an Qt2 GUI base class.
*/
-class Qt2Base : public QObject, public ViewBC<Qt2BC>
+class Qt2Base : public QObject, public ViewBase
{
Q_OBJECT
public:
///
- Qt2Base(ControlButtons &, QString const &);
+ Qt2Base(QString const &);
///
virtual ~Qt2Base() {}
/// is the dialog currently valid ?
virtual bool isValid();
+ ///
+ Qt2BC & bc();
+
/// are we updating ?
bool updating_;
class Qt2DB: public Qt2Base
{
protected:
- Qt2DB(ControlButtons &, QString const &);
+ Qt2DB(QString const &);
/// update the dialog
virtual void update();
template <class Dialog>
-Qt2DB<Dialog>::Qt2DB(ControlButtons & c, QString const & t)
- : Qt2Base(c, t)
+Qt2DB<Dialog>::Qt2DB(QString const & t)
+ : Qt2Base(t)
{}
protected:
///
- Qt2CB(ControlButtons &, QString const &);
+ Qt2CB(QString const &);
/// The parent controller
- Controller & controller() const;
+ Controller & controller();
+ /// The parent controller
+ Controller const & controller() const;
};
template <class Controller, class Base>
-Qt2CB<Controller, Base>::Qt2CB(ControlButtons & c, QString const & t)
- : Base(c, t)
+Qt2CB<Controller, Base>::Qt2CB(QString const & t)
+ : Base(t)
{}
template <class Controller, class Base>
-Controller & Qt2CB<Controller, Base>::controller() const
+Controller & Qt2CB<Controller, Base>::controller()
+{
+ return static_cast<Controller &>(getController());
+}
+
+
+template <class Controller, class Base>
+Controller const & Qt2CB<Controller, Base>::controller() const
{
- return static_cast<Controller &>(controller_);
- //return dynamic_cast<Controller &>(controller_);
+ return static_cast<Controller const &>(getController());
}
connect(menuBar(), SIGNAL(activated(int)),
this, SLOT(activated(int)));
- toolbar_.reset(new Toolbar(this, *getDialogs(), 0, 0, toolbardefaults));
+ toolbar_.reset(new Toolbar(this, 0, 0, toolbardefaults));
statusBar()->setSizeGripEnabled(false);
};
-Toolbar::Pimpl::Pimpl(LyXView * o, Dialogs &, int, int)
+Toolbar::Pimpl::Pimpl(LyXView * o, int, int)
: owner_(static_cast<QtView *>(o)),
combo_(0)
{
friend class ToolbarProxy;
public:
- Pimpl(LyXView * o, Dialogs &, int x, int y);
+ Pimpl(LyXView * o, int x, int y);
~Pimpl();
{
static GUI<ControlAboutlyx, QAbout,
OkCancelPolicy, Qt2BC> cal(lv, d);
- cal.show();
+ cal.controller().show();
}
{
static GUI<ControlBibitem, QBibitem,
OkCancelReadOnlyPolicy, Qt2BC> cbi(lv, d);
- cbi.showInset(ic);
+ cbi.controller().showInset(ic);
}
{
static GUI<ControlBibtex, QBibtex,
OkCancelReadOnlyPolicy, Qt2BC> cbt(lv, d);
- cbt.showInset(ic);
+ cbt.controller().showInset(ic);
}
void gui_ShowCharacter(LyXView & lv, Dialogs & d)
{
- controlCharacterSingleton.get(lv, d).show();
+ controlCharacterSingleton.get(lv, d).controller().show();
}
void gui_SetUserFreeFont(LyXView & lv, Dialogs & d)
{
- controlCharacterSingleton.get(lv, d).apply();
+ controlCharacterSingleton.get(lv, d).controller().apply();
}
void gui_ShowCitation(InsetCommand * ic, LyXView & lv, Dialogs & d)
{
- controlCitationSingleton.get(lv, d).showInset(ic);
+ controlCitationSingleton.get(lv, d).controller().showInset(ic);
}
void gui_CreateCitation(string const & s, LyXView & lv, Dialogs & d)
{
- controlCitationSingleton.get(lv, d).createInset(s);
+ controlCitationSingleton.get(lv, d).controller().createInset(s);
}
{
static GUI<ControlError, QError,
OkCancelPolicy, Qt2BC> ce(lv, d);
- ce.showInset(ie);
+ ce.controller().showInset(ie);
}
void gui_ShowERT(InsetERT * ie, LyXView & lv, Dialogs & d)
{
- controlERTSingleton.get(lv, d).showInset(ie);
+ controlERTSingleton.get(lv, d).controller().showInset(ie);
}
void gui_UpdateERT(InsetERT * ie, LyXView & lv, Dialogs & d)
{
- controlERTSingleton.get(lv, d).showInset(ie);
+ controlERTSingleton.get(lv, d).controller().showInset(ie);
}
{
static GUI<ControlExternal, QExternal,
OkApplyCancelReadOnlyPolicy, Qt2BC> ce(lv, d);
- ce.showInset(ie);
+ ce.controller().showInset(ie);
}
{
static GUI<ControlShowFile, QShowFile,
OkCancelPolicy, Qt2BC> csf(lv, d);
- csf.showFile(f);
+ csf.controller().showFile(f);
}
{
static GUI<ControlFloat, QFloat,
NoRepeatedApplyReadOnlyPolicy, Qt2BC> cf(lv, d);
- cf.showInset(ifl);
+ cf.controller().showInset(ifl);
}
#if 0
static GUI<ControlForks, QForks,
OkApplyCancelPolicy, Qt2BC> cf(lv, d);
- cf.show();
+ cf.controller().show();
#endif
}
{
static GUI<ControlGraphics, QGraphics,
NoRepeatedApplyReadOnlyPolicy, Qt2BC> cg(lv, d);
- cg.showInset(ig);
+ cg.controller().showInset(ig);
}
{
static GUI<ControlInclude, QInclude,
OkCancelReadOnlyPolicy, Qt2BC> ci(lv, d);
- ci.showInset(ii);
+ ci.controller().showInset(ii);
}
void gui_ShowIndex(InsetCommand * ic, LyXView & lv, Dialogs & d)
{
- controlIndexSingleton.get(lv, d).showInset(ic);
+ controlIndexSingleton.get(lv, d).controller().showInset(ic);
}
void gui_CreateIndex(LyXView & lv, Dialogs & d)
{
- controlIndexSingleton.get(lv, d).createInset("");
+ controlIndexSingleton.get(lv, d).controller().createInset("");
}
{
static GUI<ControlLog, QLog,
OkCancelPolicy, Qt2BC> cl(lv, d);
- cl.show();
+ cl.controller().show();
}
void gui_ShowMinipage(InsetMinipage * im, LyXView & lv, Dialogs & d)
{
- controlMinipageSingleton.get(lv, d).showInset(im);
+ controlMinipageSingleton.get(lv, d).controller().showInset(im);
}
void gui_UpdateMinipage(InsetMinipage * im, LyXView & lv, Dialogs & d)
{
- controlMinipageSingleton.get(lv, d).showInset(im);
+ controlMinipageSingleton.get(lv, d).controller().showInset(im);
}
void gui_ShowParagraph(LyXView & lv, Dialogs & d)
{
- controlParagraphSingleton.get(lv, d).show();
+ controlParagraphSingleton.get(lv, d).controller().show();
#if 0
static GUI<ControlParagraph, QParagraph,
OkApplyCancelReadOnlyPolicy, Qt2BC> cp(lv, d);
- cp.show();
+ cp.controller().show();
#endif
}
{
static GUI<ControlPreamble, QPreamble,
NoRepeatedApplyReadOnlyPolicy, Qt2BC> cp(lv, d);
- cp.show();
+ cp.controller().show();
}
{
static GUI<ControlPrint, QPrint,
OkApplyCancelPolicy, Qt2BC> cp(lv, d);
- cp.show();
+ cp.controller().show();
}
void gui_ShowRef(InsetCommand * ic, LyXView & lv, Dialogs & d)
{
- controlRefSingleton.get(lv, d).showInset(ic);
+ controlRefSingleton.get(lv, d).controller().showInset(ic);
}
void gui_CreateRef(string const & s, LyXView & lv, Dialogs & d)
{
- controlRefSingleton.get(lv, d).createInset(s);
+ controlRefSingleton.get(lv, d).controller().createInset(s);
}
{
static GUI<ControlSearch, QSearch,
NoRepeatedApplyReadOnlyPolicy, Qt2BC> cs(lv, d);
- cs.show();
+ cs.controller().show();
}
{
static GUI<ControlSpellchecker, QSpellchecker,
NoRepeatedApplyReadOnlyPolicy, Qt2BC> cp(lv, d);
- cp.show();
+ cp.controller().show();
}
{
static GUI<ControlTabularCreate, QTabularCreate,
OkApplyCancelReadOnlyPolicy, Qt2BC> ctc(lv, d);
- ctc.show();
+ ctc.controller().show();
}
{
static GUI<ControlTexinfo, QTexinfo,
OkCancelPolicy, Qt2BC> ct(lv, d);
- ct.show();
+ ct.controller().show();
}
#ifdef HAVE_LIBAIKSAURUS
static GUI<ControlThesaurus, QThesaurus,
OkApplyCancelReadOnlyPolicy, Qt2BC> ct(lv, d);
- ct.showEntry(s);
+ ct.controller().showEntry(s);
#endif
}
void gui_ShowTOC(InsetCommand * ic, LyXView & lv, Dialogs & d)
{
- controlTocSingleton.get(lv, d).showInset(ic);
+ controlTocSingleton.get(lv, d).controller().showInset(ic);
}
void gui_CreateTOC(string const & s, LyXView & lv, Dialogs & d)
{
- controlTocSingleton.get(lv, d).createInset(s);
+ controlTocSingleton.get(lv, d).controller().createInset(s);
}
void gui_ShowUrl(InsetCommand * ic, LyXView & lv, Dialogs & d)
{
- controlUrlSingleton.get(lv, d).showInset(ic);
+ controlUrlSingleton.get(lv, d).controller().showInset(ic);
}
void gui_CreateUrl(string const & s, LyXView & lv, Dialogs & d)
{
- controlUrlSingleton.get(lv, d).createInset(s);
+ controlUrlSingleton.get(lv, d).controller().createInset(s);
}
{
static GUI<ControlVCLog, QVCLog,
OkCancelPolicy, Qt2BC> cv(lv, d);
- cv.show();
+ cv.controller().show();
}
} // extern "C"
+2002-08-12 Angus Leeming <leeming@lyx.org>
+
+ * Dialogs.C (c-tor): connect the Tooltips::toggleEnabled method to
+ the Dialogs::toggleTooltips signal.
+
+ * FormAboutlyx.[Ch]:
+ * FormBibitem.[Ch]:
+ * FormBibtex.[Ch]:
+ * FormBrowser.[Ch]:
+ * FormCharacter.[Ch]:
+ * FormCitation.[Ch]:
+ * FormERT.[Ch]:
+ * FormError.[Ch]:
+ * FormExternal.[Ch]:
+ * FormFloat.[Ch]:
+ * FormForks.[Ch]:
+ * FormGraphics.[Ch]:
+ * FormInclude.[Ch]:
+ * FormIndex.[Ch]:
+ * FormLog.[Ch]:
+ * FormMinipage.[Ch]:
+ * FormParagraph.[Ch]:
+ * FormPreamble.[Ch]:
+ * FormPrint.[Ch]:
+ * FormRef.[Ch]:
+ * FormSearch.[Ch]:
+ * FormSendto.[Ch]:
+ * FormShowFile.[Ch]:
+ * FormSpellchecker.[Ch]:
+ * FormTabularCreate.[Ch]:
+ * FormTexinfo.[Ch]:
+ * FormThesaurus.[Ch]:
+ * FormToc.[Ch]:
+ * FormURL.[Ch]:
+ * FormVCLog.[Ch]:
+ No longer pass Controller or Dialogs to the c-tor.
+ No longer forward-declare Dialogs.
+
+ * FormBase.[Ch]: derives from ViewBase directly.
+ No longer passed ControlButtons & or Dialogs &.
+ (bc): new method, enabling the daughter classes to access the
+ ButtonController.
+ (C_FormBaseApplyCB):
+ (C_FormBaseOKCB):
+ (C_FormBaseCancelCB):
+ (C_FormBaseRestoreCB):
+ (C_WMHideCB): changes due to a change in the ViewBase class.
+
+ * Toolbar_pimpl.[Ch] (c-tor):
+ * Tooltips.[Ch] (c-tor): no longer passed a Dialogs &.
+
+ * Tooltips.h (toggleEnabled): made public for the Dialogs c-tor.
+
+ * XFormsView.[Ch] (c-tor, create_form_form_main): no longer pass
+ Dialogs & to the Toolbar.
+
+ * guiapi.C: access the controller methods by explicit invocation of the
+ controller.
+
2002-08-12 Lars Gullik Bjønnes <larsbj@gullik.net>
* FormDocument.C (saveParamsAsDefault): ParagraphList changes
#include "Dialogs.h"
#include "Tooltips.h"
+#include <boost/bind.hpp>
+
LyXView * dialogs_lyxview;
#if 1
dialogs_lyxview = lv;
#endif
+ toggleTooltips.connect(boost::bind(&Tooltips::toggleEnabled));
// reduce the number of connections needed in
// dialogs by a simple connection here.
hideAll.connect(hideBufferDependent);
typedef FormCB<ControlAboutlyx, FormDB<FD_aboutlyx> > base_class;
-FormAboutlyx::FormAboutlyx(ControlAboutlyx & c, Dialogs & d)
- : base_class(c, d, _("About LyX"), false)
+FormAboutlyx::FormAboutlyx()
+ : base_class(_("About LyX"), false)
{}
class FormAboutlyx : public FormCB<ControlAboutlyx, FormDB<FD_aboutlyx> > {
public:
///
- FormAboutlyx(ControlAboutlyx &, Dialogs &);
+ FormAboutlyx();
private:
/// not needed.
#pragma implementation
#endif
-#include "Dialogs.h"
#include "FormBase.h"
+
+#include "ControlButtons.h"
#include "xformsBC.h"
#include "xforms_resize.h"
#include "Tooltips.h"
} // extern "C"
-FormBase::FormBase(ControlButtons & c, Dialogs & d,
- string const & t, bool allowResize)
- : ViewBC<xformsBC>(c), minw_(0), minh_(0), allow_resize_(allowResize),
- title_(t), tooltips_(new Tooltips(d))
+FormBase::FormBase(string const & t, bool allowResize)
+ : ViewBase(), minw_(0), minh_(0), allow_resize_(allowResize),
+ title_(t), tooltips_(new Tooltips())
{}
}
+xformsBC & FormBase::bc()
+{
+ return static_cast<xformsBC &>(getController().bc());
+ // return dynamic_cast<GUIbc &>(controller_ptr_->bc());
+}
+
+
void FormBase::show()
{
if (!form()) {
if (!allow_resize_)
fl_set_form_maxsize(form(), minw_, minh_);
+ int const iconify = getController().IconifyWithMain() ?
+ FL_TRANSIENT : 0;
+
fl_show_form(form(),
FL_PLACE_MOUSE | FL_FREE_SIZE,
- (controller_.IconifyWithMain() ? FL_TRANSIENT : 0),
+ iconify,
title_.c_str());
}
void C_FormBaseApplyCB(FL_OBJECT * ob, long)
{
- GetForm(ob)->ApplyButton();
+ GetForm(ob)->getController().ApplyButton();
}
void C_FormBaseOKCB(FL_OBJECT * ob, long)
{
- GetForm(ob)->OKButton();
+ GetForm(ob)->getController().OKButton();
}
void C_FormBaseCancelCB(FL_OBJECT * ob, long)
{
FormBase * form = GetForm(ob);
- form->CancelButton();
+ form->getController().CancelButton();
}
void C_FormBaseRestoreCB(FL_OBJECT * ob, long)
{
- GetForm(ob)->RestoreButton();
+ GetForm(ob)->getController().RestoreButton();
}
// Close the dialog cleanly, even if the WM is used to do so.
lyx::Assert(form && form->u_vdata);
FormBase * ptr = static_cast<FormBase *>(form->u_vdata);
- ptr->CancelButton();
+ ptr->getController().CancelButton();
return FL_CANCEL;
}
class xformsBC;
class Tooltips;
-class Dialogs;
+
/** This class is an XForms GUI base class.
*/
-class FormBase : public ViewBC<xformsBC>, public FeedbackController
+class FormBase : public ViewBase, public FeedbackController
{
public:
///
- FormBase(ControlButtons &, Dialogs &,
- string const &, bool allowResize);
+ FormBase(string const &, bool allowResize);
///
virtual ~FormBase();
*/
static void setPrehandler(FL_OBJECT * ob);
+ ///
+ xformsBC & bc();
+
private:
/// Pointer to the actual instantiation of xform's form
virtual FL_FORM * form() const = 0;
{
protected:
///
- FormDB(ControlButtons &, Dialogs &,
- string const &, bool allowResize=true);
+ FormDB(string const &, bool allowResize=true);
/// Pointer to the actual instantiation of xform's form
virtual FL_FORM * form() const;
/// Real GUI implementation.
template <class Dialog>
-FormDB<Dialog>::FormDB(ControlButtons & c, Dialogs & d,
- string const & t, bool allowResize)
- : FormBase(c, d, t, allowResize)
+FormDB<Dialog>::FormDB(string const & t, bool allowResize)
+ : FormBase(t, allowResize)
{}
{
protected:
///
- FormCB(Controller &, Dialogs &,
- string const &, bool allowResize = true);
+ FormCB(string const &, bool allowResize = true);
/// The parent controller
- Controller & controller() const;
+ Controller & controller();
+ ///
+ Controller const & controller() const;
};
template <class Controller, class Base>
-FormCB<Controller, Base>::FormCB(Controller & c, Dialogs & d,
- string const & t, bool allowResize)
- : Base(c, d, t, allowResize)
+FormCB<Controller, Base>::FormCB(string const & t, bool allowResize)
+ : Base(t, allowResize)
{}
template <class Controller, class Base>
-Controller & FormCB<Controller, Base>::controller() const
+Controller & FormCB<Controller, Base>::controller()
+{
+ return static_cast<Controller &>(getController());
+}
+
+
+template <class Controller, class Base>
+Controller const & FormCB<Controller, Base>::controller() const
{
- return static_cast<Controller &>(controller_);
- //return dynamic_cast<Controller &>(controller_);
+ return static_cast<Controller const &>(getController());
}
string const & t, bool allowResize)
: lv_(lv), d_(d), title_(t),
minw_(0), minh_(0), allow_resize_(allowResize),
- tooltips_(new Tooltips(*d))
+ tooltips_(new Tooltips())
{
lyx::Assert(lv && d);
}
#include "forms_fwd.h"
-//#include <boost/signals/trackable.hpp>
+#include <boost/signals/connection.hpp>
class Buffer;
class Dialogs;
typedef FormCB<ControlBibitem, FormDB<FD_bibitem> > base_class;
-FormBibitem::FormBibitem(ControlBibitem & c, Dialogs & d)
- : base_class(c, d, _("Bibliography Entry"))
+FormBibitem::FormBibitem()
+ : base_class(_("Bibliography Entry"))
{}
class FormBibitem : public FormCB<ControlBibitem, FormDB<FD_bibitem> > {
public:
///
- FormBibitem(ControlBibitem &, Dialogs &);
+ FormBibitem();
private:
/// Set the Params variable for the Controller.
virtual void apply();
typedef FormCB<ControlBibtex, FormDB<FD_bibtex> > base_class;
-FormBibtex::FormBibtex(ControlBibtex & c, Dialogs & d)
- : base_class(c, d, _("BibTeX Database"))
+FormBibtex::FormBibtex()
+ : base_class(_("BibTeX Database"))
{}
class FormBibtex : public FormCB<ControlBibtex, FormDB<FD_bibtex> > {
public:
///
- FormBibtex(ControlBibtex &, Dialogs &);
+ FormBibtex();
private:
/// Set the Params variable for the Controller.
virtual void apply();
#include "forms/form_browser.h"
#include "xformsBC.h"
-FormBrowser::FormBrowser(ControlButtons & c, Dialogs & d,
- string const & t, bool allowResize)
- : FormDB<FD_browser>(c, d, t, allowResize)
+FormBrowser::FormBrowser(string const & t, bool allowResize)
+ : FormDB<FD_browser>(t, allowResize)
{}
class FormBrowser : public FormDB<FD_browser> {
public:
///
- FormBrowser(ControlButtons &, Dialogs &,
- string const &, bool allowResize = true);
+ FormBrowser(string const &, bool allowResize = true);
private:
/// Build the dialog.
virtual void build();
typedef FormCB<ControlCharacter, FormDB<FD_character> > base_class;
-FormCharacter::FormCharacter(ControlCharacter & c, Dialogs & d)
- : base_class(c, d, _("Character Layout"), false)
+FormCharacter::FormCharacter()
+ : base_class(_("Character Layout"), false)
{}
: public FormCB<ControlCharacter, FormDB<FD_character> > {
public:
///
- FormCharacter(ControlCharacter &, Dialogs &);
+ FormCharacter();
private:
/// Apply from dialog
typedef FormCB<ControlCitation, FormDB<FD_citation> > base_class;
-FormCitation::FormCitation(ControlCitation & c, Dialogs & d)
- : base_class(c, d, _("Citation"), false)
+FormCitation::FormCitation()
+ : base_class(_("Citation"), false)
{}
class FormCitation : public FormCB<ControlCitation, FormDB<FD_citation> > {
public:
///
- FormCitation(ControlCitation &, Dialogs &);
+ FormCitation();
private:
///
enum State {
typedef FormCB<ControlERT, FormDB<FD_ert> > base_class;
-FormERT::FormERT(ControlERT & c, Dialogs & d)
- : base_class(c, d, _("ERT Options"))
+FormERT::FormERT()
+ : base_class(_("ERT Options"))
{}
: public FormCB<ControlERT, FormDB<FD_ert> > {
public:
///
- FormERT(ControlERT &, Dialogs &);
+ FormERT();
private:
/// Set the Params variable for the Controller.
virtual void apply();
typedef FormCB<ControlError, FormDB<FD_error> > base_class;
-FormError::FormError(ControlError & c, Dialogs & d)
- : base_class(c, d, _("LaTeX Error"))
+FormError::FormError()
+ : base_class(_("LaTeX Error"))
{}
class FormError : public FormCB<ControlError, FormDB<FD_error> > {
public:
/// Constructor
- FormError(ControlError &, Dialogs &);
+ FormError();
private:
/// not needed.
virtual void apply() {}
typedef FormCB<ControlExternal, FormDB<FD_external> > base_class;
-FormExternal::FormExternal(ControlExternal & c, Dialogs & d)
- : base_class(c, d, _("Edit external file"))
+FormExternal::FormExternal()
+ : base_class(_("Edit external file"))
{}
class FormExternal : public FormCB<ControlExternal, FormDB<FD_external> > {
public:
///
- FormExternal(ControlExternal &, Dialogs &);
+ FormExternal();
private:
/// apply changes
void apply();
typedef FormCB<ControlFloat, FormDB<FD_float> > base_class;
-FormFloat::FormFloat(ControlFloat & c, Dialogs & d)
- : base_class(c, d, _("Float Options"))
+FormFloat::FormFloat()
+ : base_class(_("Float Options"))
{}
class FormFloat : public FormCB<ControlFloat, FormDB<FD_float> > {
public:
///
- FormFloat(ControlFloat &, Dialogs &);
+ FormFloat();
private:
/// Set the Params variable for the Controller.
virtual void apply();
typedef FormCB<ControlForks, FormDB<FD_forks> > base_class;
-FormForks::FormForks(ControlForks & c, Dialogs & d)
- : base_class(c, d, _("Child processes"))
+FormForks::FormForks()
+ : base_class(_("Child processes"))
{}
class FormForks : public FormCB<ControlForks, FormDB<FD_forks> > {
public:
///
- FormForks(ControlForks &, Dialogs &);
+ FormForks();
/// preemptive handler for feedback messages
void feedbackCB(FL_OBJECT *, int);
typedef FormCB<ControlGraphics, FormDB<FD_graphics> > base_class;
-FormGraphics::FormGraphics(ControlGraphics & c, Dialogs & d)
- : base_class(c, d, _("Graphics"), false)
+FormGraphics::FormGraphics()
+ : base_class(_("Graphics"), false)
{}
class FormGraphics : public FormCB<ControlGraphics, FormDB<FD_graphics> > {
public:
///
- FormGraphics(ControlGraphics &, Dialogs &);
+ FormGraphics();
private:
/** Redraw the form (on receipt of a Signal indicating, for example,
typedef FormCB<ControlInclude, FormDB<FD_include> > base_class;
-FormInclude::FormInclude(ControlInclude & c, Dialogs & d)
- : base_class(c, d, _("Include file"))
+FormInclude::FormInclude()
+ : base_class(_("Include file"))
{}
string const in_name = fl_get_input(dialog_->input_filename);
if (!rtrim(in_name).empty() && controller().fileExists(in_name)) {
// ApplyButton();
- OKButton();
+ controller().OKButton();
controller().load(rtrim(in_name));
action = ButtonPolicy::SMI_NOOP;
}
class FormInclude : public FormCB<ControlInclude, FormDB<FD_include> > {
public:
///
- FormInclude(ControlInclude &, Dialogs &);
+ FormInclude();
private:
/// Set the Params variable for the Controller.
virtual void apply();
typedef FormCB<ControlIndex, FormDB<FD_index> > base_class;
-FormIndex::FormIndex(ControlIndex & c, Dialogs & d)
- : base_class(c, d, _("Index"))
+FormIndex::FormIndex()
+ : base_class(_("Index"))
{}
class FormIndex : public FormCB<ControlIndex, FormDB<FD_index> > {
public:
///
- FormIndex(ControlIndex &, Dialogs &);
+ FormIndex();
private:
/// Set the Params variable for the Controller.
virtual void apply();
#include "gettext.h"
#include FORMS_H_LOCATION
-FormLog::FormLog(ControlLog & c, Dialogs & d)
- : FormCB<ControlLog, FormBrowser>(c, d, _("LaTeX Log"))
+FormLog::FormLog()
+ : FormCB<ControlLog, FormBrowser>( _("LaTeX Log"))
{}
class FormLog : public FormCB<ControlLog, FormBrowser> {
public:
///
- FormLog(ControlLog &, Dialogs &);
+ FormLog();
// Functions accessible to the Controller.
typedef FormCB<ControlMinipage, FormDB<FD_minipage> > base_class;
-FormMinipage::FormMinipage(ControlMinipage & c, Dialogs & d)
- : base_class(c, d, _("Minipage Options"))
+FormMinipage::FormMinipage()
+ : base_class(_("Minipage Options"))
{}
: public FormCB<ControlMinipage, FormDB<FD_minipage> > {
public:
///
- FormMinipage(ControlMinipage &, Dialogs &);
+ FormMinipage();
private:
/// Set the Params variable for the Controller.
virtual void apply();
typedef FormCB<ControlParagraph, FormDB<FD_paragraph> > base_class;
-FormParagraph::FormParagraph(ControlParagraph & c, Dialogs & d)
- : base_class(c, d, _("Paragraph Layout"), false)
+FormParagraph::FormParagraph()
+ : base_class(_("Paragraph Layout"), false)
{}
void FormParagraph::build()
: public FormCB<ControlParagraph, FormDB<FD_paragraph> > {
public:
///
- FormParagraph(ControlParagraph &, Dialogs &);
+ FormParagraph();
private:
/// Build the dialog
virtual void build();
typedef FormCB<ControlPreamble, FormDB<FD_preamble> > base_class;
-FormPreamble::FormPreamble(ControlPreamble & c, Dialogs & d)
- : base_class(c, d, _("LaTeX preamble"))
+FormPreamble::FormPreamble()
+ : base_class(_("LaTeX preamble"))
{}
class FormPreamble : public FormCB<ControlPreamble, FormDB<FD_preamble> > {
public:
///
- FormPreamble(ControlPreamble &, Dialogs &);
+ FormPreamble();
private:
/// Apply from dialog
virtual void apply();
typedef FormCB<ControlPrint, FormDB<FD_print> > base_class;
-FormPrint::FormPrint(ControlPrint & c, Dialogs & d)
- : base_class(c, d, _("Print")),
+FormPrint::FormPrint()
+ : base_class(_("Print")),
target_(2), order_(2), which_(3)
{}
class FormPrint : public FormCB<ControlPrint, FormDB<FD_print> > {
public:
///
- FormPrint(ControlPrint &, Dialogs &);
+ FormPrint();
private:
/// Apply from dialog
virtual void apply();
typedef FormCB<ControlRef, FormDB<FD_ref> > base_class;
-FormRef::FormRef(ControlRef & c, Dialogs & d)
- : base_class(c, d, _("Reference")),
+FormRef::FormRef()
+ : base_class(_("Reference")),
at_ref_(false)
{}
class FormRef : public FormCB<ControlRef, FormDB<FD_ref> > {
public:
///
- FormRef(ControlRef &, Dialogs &);
+ FormRef();
private:
/// Set the Params variable for the Controller.
virtual void apply();
typedef FormCB<ControlSearch, FormDB<FD_search> > base_class;
-FormSearch::FormSearch(ControlSearch & c, Dialogs & d)
- : base_class(c, d, _("LyX: Find and Replace"))
+FormSearch::FormSearch()
+ : base_class(_("LyX: Find and Replace"))
{}
class FormSearch : public FormCB<ControlSearch, FormDB<FD_search> > {
public:
///
- FormSearch(ControlSearch &, Dialogs &);
+ FormSearch();
private:
/// not needed.
virtual void apply() {}
typedef FormCB<ControlSendto, FormDB<FD_sendto> > base_class;
-FormSendto::FormSendto(ControlSendto & c, Dialogs & d)
- : base_class(c, d, _("Send document to command"))
+FormSendto::FormSendto()
+ : base_class(_("Send document to command"))
{}
class FormSendto : public FormCB<ControlSendto, FormDB<FD_sendto> > {
public:
///
- FormSendto(ControlSendto &, Dialogs &);
+ FormSendto();
private:
/// Apply from dialog (modify or create inset)
virtual void apply();
#include FORMS_H_LOCATION
-FormShowFile::FormShowFile(ControlShowFile & c, Dialogs & d)
- : FormCB<ControlShowFile, FormBrowser>(c, d, string())
+FormShowFile::FormShowFile()
+ : FormCB<ControlShowFile, FormBrowser>(string())
{}
class FormShowFile : public FormCB<ControlShowFile, FormBrowser> {
public:
///
- FormShowFile(ControlShowFile &, Dialogs &);
+ FormShowFile();
// Functions accessible to the Controller.
typedef FormCB<ControlSpellchecker, FormDB<FD_spellchecker> > base_class;
-FormSpellchecker::FormSpellchecker(ControlSpellchecker & c, Dialogs & d)
- : base_class(c, d, _("LyX: Spellchecker"), false)
+FormSpellchecker::FormSpellchecker()
+ : base_class(_("LyX: Spellchecker"), false)
{}
class FormSpellchecker : public FormCB<ControlSpellchecker, FormDB<FD_spellchecker> > {
public:
///
- FormSpellchecker(ControlSpellchecker &, Dialogs &);
+ FormSpellchecker();
private:
/// not needed.
void apply() {}
typedef FormCB<ControlTabularCreate, FormDB<FD_tabular_create> > base_class;
-FormTabularCreate::FormTabularCreate(ControlTabularCreate & c, Dialogs & d)
- : base_class(c, d, _("Insert Tabular"))
+FormTabularCreate::FormTabularCreate()
+ : base_class(_("Insert Tabular"))
{}
public FormCB<ControlTabularCreate, FormDB<FD_tabular_create> > {
public:
///
- FormTabularCreate(ControlTabularCreate &, Dialogs &);
+ FormTabularCreate();
private:
/// Apply from dialog
virtual void apply();
typedef FormCB<ControlTexinfo, FormDB<FD_texinfo> > base_class;
-FormTexinfo::FormTexinfo(ControlTexinfo & c, Dialogs & d)
- : base_class(c, d, _("LaTeX Information")),
+FormTexinfo::FormTexinfo()
+ : base_class(_("LaTeX Information")),
activeStyle(ControlTexinfo::cls)
{}
class FormTexinfo : public FormCB<ControlTexinfo, FormDB<FD_texinfo> > {
public:
///
- FormTexinfo(ControlTexinfo &, Dialogs &);
+ FormTexinfo();
private:
/// not needed
virtual void apply() {}
typedef FormCB<ControlThesaurus, FormDB<FD_thesaurus> > base_class;
-FormThesaurus::FormThesaurus(ControlThesaurus & c, Dialogs & d)
- : base_class(c, d, _("LyX: Thesaurus"), false),
+FormThesaurus::FormThesaurus()
+ : base_class(_("LyX: Thesaurus"), false),
clickline_(-1)
{
}
class FormThesaurus : public FormCB<ControlThesaurus, FormDB<FD_thesaurus> > {
public:
///
- FormThesaurus(ControlThesaurus &, Dialogs &);
+ FormThesaurus();
private:
/// not needed.
virtual void apply() {}
typedef FormCB<ControlToc, FormDB<FD_toc> > base_class;
-FormToc::FormToc(ControlToc & c, Dialogs & d)
- : base_class(c, d, _("Table of Contents"))
+FormToc::FormToc()
+ : base_class(_("Table of Contents"))
{}
class FormToc : public FormCB<ControlToc, FormDB<FD_toc> > {
public:
///
- FormToc(ControlToc &, Dialogs &);
+ FormToc();
private:
/// not needed
virtual void apply() {}
typedef FormCB<ControlUrl, FormDB<FD_url> > base_class;
-FormUrl::FormUrl(ControlUrl & c, Dialogs & d)
- : base_class(c, d, _("Url"))
+FormUrl::FormUrl()
+ : base_class(_("Url"))
{}
class FormUrl : public FormCB<ControlUrl, FormDB<FD_url> > {
public:
///
- FormUrl(ControlUrl &, Dialogs &);
+ FormUrl();
private:
/// Apply from dialog (modify or create inset)
virtual void apply();
#include "gettext.h"
#include FORMS_H_LOCATION
-FormVCLog::FormVCLog(ControlVCLog & c, Dialogs & d)
- : FormCB<ControlVCLog, FormBrowser>(c, d, _("Version Control Log"))
+FormVCLog::FormVCLog()
+ : FormCB<ControlVCLog, FormBrowser>(_("Version Control Log"))
{}
class FormVCLog : public FormCB<ControlVCLog, FormBrowser> {
public:
///
- FormVCLog(ControlVCLog &, Dialogs &);
+ FormVCLog();
// Functions accessible to the Controller.
-Toolbar::Pimpl::Pimpl(LyXView * o, Dialogs & d, int x, int y)
+Toolbar::Pimpl::Pimpl(LyXView * o, int x, int y)
: owner_(static_cast<XFormsView *>(o)), xpos(x), ypos(y)
{
combox_ = 0;
- tooltip_ = new Tooltips(d);
+ tooltip_ = new Tooltips();
}
class XFormsView;
class Tooltips;
-class Dialogs;
class Combox;
/** The LyX xforms toolbar class
static void layoutSelectedCB(int, void *, Combox *);
/// create an empty toolbar
- Pimpl(LyXView * o, Dialogs &, int x, int y);
+ Pimpl(LyXView * o, int x, int y);
~Pimpl();
#endif
#include "Tooltips.h"
-#include "Dialogs.h"
#include "xforms_helpers.h" // formatted
#include "gettext.h"
#include "support/lstrings.h"
#if FL_VERSION > 0 || FL_REVISION >= 89
-Tooltips::Tooltips(Dialogs & d)
+Tooltips::Tooltips()
{
- static bool first = true;
- if (first) {
- first = false;
- d.toggleTooltips.connect(boost::bind(&Tooltips::toggleEnabled));
- }
toggled.connect(boost::bind(&Tooltips::set, this));
}
#include <map>
-class Dialogs;
-
-
#ifdef __GNUG__
#pragma interface
#endif
class Tooltips : boost::noncopyable, public boost::signals::trackable {
public:
- Tooltips(Dialogs &);
+ ///
+ Tooltips();
/// Initialise a tooltip for this ob.
void init(FL_OBJECT * ob, string const & tip);
#endif
-private:
-
- /// Are the tooltips on or off?
- static bool enabled_;
-
/** This method is connected to Dialogs::toggleTooltips and toggles
* the state of enabled_.
*/
static void toggleEnabled();
+private:
+
+ /// Are the tooltips on or off?
+ static bool enabled_;
+
/** Once enabled_ is changed, then this signal is emitted to update
* all the tooltips.
*/
XFormsView::XFormsView(int width, int height)
: LyXView()
{
- create_form_form_main(*getDialogs(), width, height);
+ create_form_form_main(width, height);
fl_set_form_atclose(getForm(), C_XFormsView_atCloseMainFormCB, 0);
view_state_con = view_state_changed.connect(boost::bind(&XFormsView::show_view_state, this));
}
-void XFormsView::create_form_form_main(Dialogs & dia, int width, int height)
+void XFormsView::create_form_form_main(int width, int height)
/* to make this work as it should, .lyxrc should have been
* read first; OR maybe this one should be made dynamic.
* Hmmmm. Lgb.
menubar_.reset(new Menubar(this, menubackend));
- toolbar_.reset(new Toolbar(this, dia,
- air, 30 + air + bw, toolbardefaults));
+ toolbar_.reset(new Toolbar(this, air, 30 + air + bw, toolbardefaults));
int const ywork = 60 + 2 * air + bw;
int const workheight = height - ywork - (25 + 2 * air);
#include "frontends/LyXView.h"
-class Dialogs;
class XMiniBuffer;
/**
void show_view_state();
/// makes the main form.
- void create_form_form_main(Dialogs & d, int width, int height);
+ void create_form_form_main(int width, int height);
/// the minibuffer
boost::scoped_ptr<XMiniBuffer> minibuffer_;
///
{
static GUI<ControlAboutlyx, FormAboutlyx,
OkCancelPolicy, xformsBC> cal(lv, d);
- cal.show();
+ cal.controller().show();
}
{
static GUI<ControlBibitem, FormBibitem,
OkCancelReadOnlyPolicy, xformsBC> cbi(lv, d);
- cbi.showInset(ic);
+ cbi.controller().showInset(ic);
}
{
static GUI<ControlBibtex, FormBibtex,
OkCancelReadOnlyPolicy, xformsBC> cbt(lv, d);
- cbt.showInset(ic);
+ cbt.controller().showInset(ic);
}
void gui_ShowCharacter(LyXView & lv, Dialogs & d)
{
- controlCharacterSingleton.get(lv, d).show();
+ controlCharacterSingleton.get(lv, d).controller().show();
}
void gui_SetUserFreeFont(LyXView & lv, Dialogs & d)
{
- controlCharacterSingleton.get(lv, d).apply();
+ controlCharacterSingleton.get(lv, d).controller().apply();
}
void gui_ShowCitation(InsetCommand * ic, LyXView & lv, Dialogs & d)
{
- controlCitationSingleton.get(lv, d).showInset(ic);
+ controlCitationSingleton.get(lv, d).controller().showInset(ic);
}
void gui_CreateCitation(string const & s, LyXView & lv, Dialogs & d)
{
- controlCitationSingleton.get(lv, d).createInset(s);
+ controlCitationSingleton.get(lv, d).controller().createInset(s);
}
{
static GUI<ControlError, FormError,
OkCancelPolicy, xformsBC> ce(lv, d);
- ce.showInset(ie);
+ ce.controller().showInset(ie);
}
void gui_ShowERT(InsetERT * ie, LyXView & lv, Dialogs & d)
{
- controlERTSingleton.get(lv, d).showInset(ie);
+ controlERTSingleton.get(lv, d).controller().showInset(ie);
}
void gui_UpdateERT(InsetERT * ie, LyXView & lv, Dialogs & d)
{
- controlERTSingleton.get(lv, d).showInset(ie);
+ controlERTSingleton.get(lv, d).controller().showInset(ie);
}
{
static GUI<ControlExternal, FormExternal,
OkApplyCancelReadOnlyPolicy, xformsBC> ce(lv, d);
- ce.showInset(ie);
+ ce.controller().showInset(ie);
}
{
static GUI<ControlShowFile, FormShowFile,
OkCancelPolicy, xformsBC> csf(lv, d);
- csf.showFile(f);
+ csf.controller().showFile(f);
}
{
static GUI<ControlFloat, FormFloat,
NoRepeatedApplyReadOnlyPolicy, xformsBC> cf(lv, d);
- cf.showInset(ifl);
+ cf.controller().showInset(ifl);
}
{
static GUI<ControlForks, FormForks,
OkApplyCancelPolicy, xformsBC> cf(lv, d);
- cf.show();
+ cf.controller().show();
}
{
static GUI<ControlGraphics, FormGraphics,
NoRepeatedApplyReadOnlyPolicy, xformsBC> cg(lv, d);
- cg.showInset(ig);
+ cg.controller().showInset(ig);
}
{
static GUI<ControlInclude, FormInclude,
OkCancelReadOnlyPolicy, xformsBC> ci(lv, d);
- ci.showInset(ii);
+ ci.controller().showInset(ii);
}
void gui_ShowIndex(InsetCommand * ic, LyXView & lv, Dialogs & d)
{
- controlIndexSingleton.get(lv, d).showInset(ic);
+ controlIndexSingleton.get(lv, d).controller().showInset(ic);
}
void gui_CreateIndex(LyXView & lv, Dialogs & d)
{
- controlIndexSingleton.get(lv, d).createInset("");
+ controlIndexSingleton.get(lv, d).controller().createInset("");
}
{
static GUI<ControlLog, FormLog,
OkCancelPolicy, xformsBC> cl(lv, d);
- cl.show();
+ cl.controller().show();
}
void gui_ShowMinipage(InsetMinipage * im, LyXView & lv, Dialogs & d)
{
- controlMinipageSingleton.get(lv, d).showInset(im);
+ controlMinipageSingleton.get(lv, d).controller().showInset(im);
}
void gui_UpdateMinipage(InsetMinipage * im, LyXView & lv, Dialogs & d)
{
- controlMinipageSingleton.get(lv, d).showInset(im);
+ controlMinipageSingleton.get(lv, d).controller().showInset(im);
}
{
static GUI<ControlParagraph, FormParagraph,
OkApplyCancelReadOnlyPolicy, xformsBC> cp(lv, d);
- cp.show();
+ cp.controller().show();
}
{
static GUI<ControlPreamble, FormPreamble,
NoRepeatedApplyReadOnlyPolicy, xformsBC> cp(lv, d);
- cp.show();
+ cp.controller().show();
}
{
static GUI<ControlPrint, FormPrint,
OkApplyCancelPolicy, xformsBC> cp(lv, d);
- cp.show();
+ cp.controller().show();
}
void gui_ShowRef(InsetCommand * ic, LyXView & lv, Dialogs & d)
{
- controlRefSingleton.get(lv, d).showInset(ic);
+ controlRefSingleton.get(lv, d).controller().showInset(ic);
}
void gui_CreateRef(string const & s, LyXView & lv, Dialogs & d)
{
- controlRefSingleton.get(lv, d).createInset(s);
+ controlRefSingleton.get(lv, d).controller().createInset(s);
}
{
static GUI<ControlSearch, FormSearch,
NoRepeatedApplyReadOnlyPolicy, xformsBC> cs(lv, d);
- cs.show();
+ cs.controller().show();
}
{
static GUI<ControlSendto, FormSendto,
OkApplyCancelPolicy, xformsBC> cs(lv, d);
- cs.show();
+ cs.controller().show();
}
{
static GUI<ControlSpellchecker, FormSpellchecker,
NoRepeatedApplyReadOnlyPolicy, xformsBC> cp(lv, d);
- cp.show();
+ cp.controller().show();
}
{
static GUI<ControlTabularCreate, FormTabularCreate,
OkApplyCancelReadOnlyPolicy, xformsBC> ctc(lv, d);
- ctc.show();
+ ctc.controller().show();
}
{
static GUI<ControlTexinfo, FormTexinfo,
OkCancelPolicy, xformsBC> ct(lv, d);
- ct.show();
+ ct.controller().show();
}
{
static GUI<ControlThesaurus, FormThesaurus,
OkApplyCancelReadOnlyPolicy, xformsBC> ct(lv, d);
- ct.showEntry(s);
+ ct.controller().showEntry(s);
}
#else
void gui_ShowTOC(InsetCommand * ic, LyXView & lv, Dialogs & d)
{
- controlTocSingleton.get(lv, d).showInset(ic);
+ controlTocSingleton.get(lv, d).controller().showInset(ic);
}
void gui_CreateTOC(string const & s, LyXView & lv, Dialogs & d)
{
- controlTocSingleton.get(lv, d).createInset(s);
+ controlTocSingleton.get(lv, d).controller().createInset(s);
}
void gui_ShowUrl(InsetCommand * ic, LyXView & lv, Dialogs & d)
{
- controlUrlSingleton.get(lv, d).showInset(ic);
+ controlUrlSingleton.get(lv, d).controller().showInset(ic);
}
void gui_CreateUrl(string const & s, LyXView & lv, Dialogs & d)
{
- controlUrlSingleton.get(lv, d).createInset(s);
+ controlUrlSingleton.get(lv, d).controller().createInset(s);
}
{
static GUI<ControlVCLog, FormVCLog,
OkCancelPolicy, xformsBC> cv(lv, d);
- cv.show();
+ cv.controller().show();
}
} // extern "C"