+2003-03-09 Angus Leeming <leeming@lyx.org>
+
+ * lyxfunc.C (dispatch): call Dialogs::show("about") rather
+ than Dialogs::showAboutlyx().
+
2003-03-09 Angus Leeming <leeming@lyx.org>
* factory.C (createInset): call Dialogs::show("tabularcreate") rather
::sscanf(cmd.argument.c_str(),"%d%d", &r, &c);
return new InsetTabular(*bv->buffer(), r, c);
}
- bv->owner()->getDialogs().show("tabularcreate", string(), 0);
+ bv->owner()->getDialogs().show("tabularcreate");
return 0;
case LFUN_INSET_CAPTION:
+2003-03-09 Angus Leeming <leeming@lyx.org>
+
+ * Dialogs.h: remove showAboutlyx.
+ * guiapi.[Ch]: remove gui_showAboutlyx.
+
+ * Dialogs.[Ch] (show): new method for non-inset dialogs.
+
2003-03-09 Angus Leeming <leeming@lyx.org>
* Dialogs.h: remove showTabularCreate.
- * guiapi.[Ch]: remove gui_updateTabularCreate.
+ * guiapi.[Ch]: remove gui_showTabularCreate.
2003-03-09 Angus Leeming <leeming@lyx.org>
}
+void Dialogs::show(string const & name)
+{
+ Dialog * dialog = find(name);
+ if (!dialog)
+ return;
+
+ dialog->show();
+}
+
+
void Dialogs::show(string const & name, string const & data, InsetBase * inset)
{
Dialog * dialog = find(name);
Put into some sort of alphabetical order */
//@{
///
- void showAboutlyx();
- ///
void showCharacter();
/// connected to the character dialog also
void setUserFreeFont();
void showVCLogFile();
//@}
+ ///name == "about" etc
+ void show(string const & name);
/** name == "bibtex", "citation" etc
data is generated by the Inset::write method, to be read by the
Inset::read method in the frontends.
+2003-03-09 Angus Leeming <leeming@lyx.org>
+
+ * ControlAboutlyx.[Ch]: rewrite to use the Dialog-based scheme.
+
2003-03-09 Angus Leeming <leeming@lyx.org>
* ControlTabularCreate.[Ch]: rewrite to use the Dialog-based scheme.
extern string user_lyxdir;
-ControlAboutlyx::ControlAboutlyx(LyXView & lv, Dialogs & d)
- : ControlDialogBI(lv, d)
+ControlAboutlyx::ControlAboutlyx(Dialog & parent)
+ : Dialog::Controller(parent)
{}
#ifndef CONTROLABOUTLYX_H
#define CONTROLABOUTLYX_H
-
-#include "ControlDialog_impl.h"
-#include "LString.h"
-
+#include "Dialog.h"
#include <iosfwd>
/** A controller for the About LyX dialogs.
*/
-class ControlAboutlyx : public ControlDialogBI {
+class ControlAboutlyx : public Dialog::Controller {
public:
///
- ControlAboutlyx(LyXView &, Dialogs &);
+ ControlAboutlyx(Dialog &);
+ ///
+ virtual void initialiseParams(string const &) {}
+ ///
+ virtual void clearParams() {}
+ ///
+ virtual void dispatchParams() {}
+ ///
+ virtual bool isBufferDependent() const { return false; }
///
void getCredits(std::ostream &) const;
-
///
string const getCopyright() const;
-
///
string const getLicense() const;
-
///
string const getDisclaimer() const;
-
///
string const getVersion() const;
-private:
- /// not needed.
- virtual void apply() {}
};
#endif // CONTROLABOUTLYX_H
d->show(name, data, 0);
}
-void gui_ShowAboutlyx(Dialogs & d)
-{
- d.showAboutlyx();
-}
-
-
void gui_ShowCharacter(Dialogs & d)
{
d.showCharacter();
void gui_show_dialog(Dialogs *, char const * name, char const * data);
-void gui_ShowAboutlyx(Dialogs &);
void gui_ShowCharacter(Dialogs &);
void gui_SetUserFreeFont(Dialogs &);
void gui_ShowDocument(Dialogs &);
+2003-03-09 Angus Leeming <leeming@lyx.org>
+
+ * Dialogs.C:
+ * Dialogs2.C:
+ * Dialogs_impl.h: remove aboutlyx dialog.
+
+ * Dialogs3.C: add aboutlyx dialog.
+
+ * QAbout.[Ch]: changes to use the new Dialog-based scheme.
+
2003-03-09 Angus Leeming <leeming@lyx.org>
* Dialogs.C:
Dialogs::Impl::Impl(LyXView & lv, Dialogs & d)
- : aboutlyx(lv, d),
- changes(lv, d),
+ : changes(lv, d),
character(lv, d),
document(lv, d),
file(lv, d),
#include "Dialogs_impl.h"
-void Dialogs::showAboutlyx()
-{
- pimpl_->aboutlyx.controller().show();
-}
-
-
void Dialogs::showMergeChanges()
{
pimpl_->changes.controller().show();
#include "Dialogs.h"
#include "Dialog.h"
+#include "ControlAboutlyx.h"
#include "ControlBibtex.h"
#include "ControlCitation.h"
#include "ControlError.h"
#include "ControlToc.h"
#include "ControlWrap.h"
+#include "QAbout.h"
+#include "QAboutDialog.h"
#include "QBibitem.h"
#include "QBibitemDialog.h"
#include "QBibtex.h"
namespace {
-char const * const dialognames[] = { "bibitem", "bibtex", "citation",
+char const * const dialognames[] = { "about", "bibitem", "bibtex", "citation",
"error", "ert", "external", "float",
"graphics", "include", "index", "label",
"minipage", "ref", "tabular",
Dialog * dialog = new Dialog(lyxview_, name);
- if (name == "bibitem") {
+ if (name == "about") {
+ dialog->setController(new ControlAboutlyx(*dialog));
+ dialog->setView(new QAbout(*dialog));
+ dialog->setButtonController(new OkCancelBC);
+ } else if (name == "bibitem") {
dialog->setController(new ControlCommand(*dialog, name));
dialog->setView(new QBibitem(*dialog));
dialog->setButtonController(new OkCancelReadOnlyBC);
#include "Dialogs.h"
#include "controllers/GUI.h"
-#include "ControlAboutlyx.h"
#include "ControlChanges.h"
#include "ControlCharacter.h"
#include "ControlDocument.h"
#include "ControlTexinfo.h"
#include "ControlVCLog.h"
-#include "QAbout.h"
-#include "QAboutDialog.h"
#include "QChanges.h"
#include "QChangesDialog.h"
#include "QCharacter.h"
-typedef GUI<ControlAboutlyx, QAbout, OkCancelPolicy, Qt2BC>
-AboutlyxDialog;
-
typedef GUI<ControlChanges, QChanges, NoRepeatedApplyReadOnlyPolicy, Qt2BC>
ChangesDialog;
struct Dialogs::Impl {
Impl(LyXView & lv, Dialogs & d);
- AboutlyxDialog aboutlyx;
ChangesDialog changes;
CharacterDialog character;
DocumentDialog document;
using std::getline;
-typedef Qt2CB<ControlAboutlyx, Qt2DB<QAboutDialog> > base_class;
+typedef QController<ControlAboutlyx, QView<QAboutDialog> > base_class;
-QAbout::QAbout()
- : base_class(qt_("About LyX"))
+QAbout::QAbout(Dialog & parent)
+ : base_class(parent, qt_("About LyX"))
{
}
#define FORMABOUT_H
-#include "Qt2Base.h"
+#include "QDialogView.h"
+
class QAboutDialog;
class ControlAboutlyx;
class QAbout
- : public Qt2CB<ControlAboutlyx, Qt2DB<QAboutDialog> >
+ : public QController<ControlAboutlyx, QView<QAboutDialog> >
{
public:
- QAbout();
+ QAbout(Dialog &);
private:
/// not needed
virtual void apply() {}
+2003-03-09 Angus Leeming <leeming@lyx.org>
+
+ * Dialogs.C:
+ * Dialogs2.C:
+ * Dialogs_impl.h: remove aboutlyx dialog.
+
+ * Dialogs3.C: add aboutlyx dialog.
+
+ * FormAboutlyx.[Ch]:
+ * forms/form_aboutlyx.fd: changes to use the new Dialog-based scheme.
+
2003-03-09 Angus Leeming <leeming@lyx.org>
* Dialogs.C:
Dialogs::Impl::Impl(LyXView & lv, Dialogs & d)
- : aboutlyx(lv, d),
- changes(lv, d),
+ : changes(lv, d),
character(lv, d),
document(lv, d),
file(lv, d),
#include "Dialogs_impl.h"
-void Dialogs::showAboutlyx()
-{
- pimpl_->aboutlyx.controller().show();
-}
-
-
void Dialogs::showMergeChanges()
{
pimpl_->changes.controller().show();
#include "Tooltips.h"
+#include "ControlAboutlyx.h"
#include "ControlBibtex.h"
#include "ControlCitation.h"
#include "ControlCommand.h"
#include "ControlToc.h"
#include "ControlWrap.h"
+#include "FormAboutlyx.h"
+#include "forms/form_aboutlyx.h"
#include "FormBibitem.h"
#include "forms/form_bibitem.h"
#include "FormBibtex.h"
namespace {
-char const * const dialognames[] = { "bibitem", "bibtex", "citation",
+char const * const dialognames[] = { "about", "bibitem", "bibtex", "citation",
"error", "ert", "external", "float",
"graphics", "include", "index", "label",
"minipage", "ref", "tabular",
Dialog * dialog = new Dialog(lyxview_, name);
- if (name == "bibitem") {
+ if (name == "about") {
+ dialog->setController(new ControlAboutlyx(*dialog));
+ dialog->setView(new FormAboutlyx(*dialog));
+ dialog->setButtonController(new OkCancelBC);
+ } else if (name == "bibitem") {
dialog->setController(new ControlCommand(*dialog, name));
dialog->setView(new FormBibitem(*dialog));
dialog->setButtonController(new OkCancelReadOnlyBC);
#include "xformsBC.h"
#include "combox.h"
-#include "ControlAboutlyx.h"
-#include "FormAboutlyx.h"
-#include "forms/form_aboutlyx.h"
-
#include "FormBrowser.h"
#include "forms/form_browser.h"
#include "ControlVCLog.h"
#include "FormVCLog.h"
-typedef GUI<ControlAboutlyx, FormAboutlyx, OkCancelPolicy, xformsBC>
-AboutlyxDialog;
-
typedef GUI<ControlChanges, FormChanges, NoRepeatedApplyReadOnlyPolicy, xformsBC>
ChangesDialog;
struct Dialogs::Impl {
Impl(LyXView & lv, Dialogs & d);
- AboutlyxDialog aboutlyx;
ChangesDialog changes;
CharacterDialog character;
DocumentDialog document;
#include FORMS_H_LOCATION
-typedef FormCB<ControlAboutlyx, FormDB<FD_aboutlyx> > base_class;
+typedef FormController<ControlAboutlyx, FormView<FD_aboutlyx> > base_class;
-FormAboutlyx::FormAboutlyx()
- : base_class(_("About LyX"), false)
+FormAboutlyx::FormAboutlyx(Dialog & parent)
+ : base_class(parent, _("About LyX"), false)
{}
#define FORMABOUTLYX_H
-#include "FormBase.h"
+#include "FormDialogView.h"
#include <boost/scoped_ptr.hpp>
/** This class provides an XForms implementation of the FormAboutlyx Dialog.
*/
-class FormAboutlyx : public FormCB<ControlAboutlyx, FormDB<FD_aboutlyx> > {
+class FormAboutlyx
+ : public FormController<ControlAboutlyx, FormView<FD_aboutlyx> > {
public:
///
- FormAboutlyx();
+ FormAboutlyx(Dialog &);
private:
/// not needed.
resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast
name: button_close
-callback: C_FormBaseCancelCB
+callback: C_FormDialogView_CancelCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NorthWest FL_SouthEast
name: browser_version
-callback: C_FormBaseInputCB
-argument: 0
+callback:
+argument:
=============== FORM ===============
Name: form_aboutlyx_credits
resize: FL_RESIZE_ALL
gravity: FL_NorthWest FL_SouthEast
name: browser_credits
-callback: C_FormBaseInputCB
-argument: 0
+callback:
+argument:
=============== FORM ===============
Name: form_aboutlyx_license
resize: FL_RESIZE_ALL
gravity: FL_NorthWest FL_SouthEast
name: browser_license
-callback: C_FormBaseInputCB
-argument: 0
+callback:
+argument:
==============================
create_the_forms
#endif
#endif
case LFUN_HELP_ABOUTLYX:
- owner->getDialogs().showAboutlyx();
+ owner->getDialogs().show("about");
break;
case LFUN_HELP_TEXINFO: