+2004-01-25 Angus Leeming <leeming@lyx.org>
+
+ * lyxfunc.C (dispatch): Dialogs::showSearch is no more.
+
2004-01-19 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* LaTeXFeatures.h: add nice_ and nice() const
+2004-01-25 Angus Leeming <leeming@lyx.org>
+
+ * Dialogs.h (showSearch):
+ * guiapi.[Ch] (gui_ShowSearch): removed.
+
2004-01-08 Angus Leeming <leeming@lyx.org>
* FileDialog.h (open, save): the file filter mask is now passed
///
void showPrint();
///
- void showSearch();
- ///
void showSendto();
/// bring up the spellchecker
void showSpellchecker();
+2004-01-25 Angus Leeming <leeming@lyx.org>
+
+ * ControlSearch.[Ch]: derive from Dialog::Controller rather than
+ the deprecated ControlDialogBD.
+
2004-01-08 Alfredo Braunstein <abraunst@lyx.org>
* Dialog.C (hide): disconnect dialog/inset on hide (partial fix
virtual bool initialiseParams(std::string const & data);
/// clean-up on hide.
virtual void clearParams();
- /// clean-up on hide.
+ ///
virtual void dispatchParams();
///
virtual bool isBufferDependent() const { return true; }
#include "funcrequest.h"
#include "lyxfind.h"
-#include "frontends/LyXView.h"
-
using std::string;
-/* The ControlSeach class is now in a fit state to derive from
- Dialog::Controller
-*/
-ControlSearch::ControlSearch(LyXView & lv, Dialogs & d)
- : ControlDialogBD(lv, d)
+ControlSearch::ControlSearch(Dialog & parent)
+ : Dialog::Controller(parent)
{}
-void ControlSearch::find(string const & search,
- bool casesensitive, bool matchword, bool forward)
+void ControlSearch::find(string const & search, bool casesensitive,
+ bool matchword, bool forward)
{
- string const data =
- lyx::find::find2string(search,
- casesensitive, matchword, forward);
- lv_.dispatch(FuncRequest(LFUN_WORD_FIND, data));
+ string const data = lyx::find::find2string(search, casesensitive,
+ matchword, forward);
+ kernel().dispatch(FuncRequest(LFUN_WORD_FIND, data));
}
void ControlSearch::replace(string const & search, string const & replace,
- bool casesensitive, bool matchword, bool forward, bool all)
+ bool casesensitive, bool matchword,
+ bool forward, bool all)
{
string const data =
- lyx::find::replace2string(search, replace,
- casesensitive, matchword, all, forward);
- lv_.dispatch(FuncRequest(LFUN_WORD_REPLACE, data));
+ lyx::find::replace2string(search, replace, casesensitive,
+ matchword, all, forward);
+ kernel().dispatch(FuncRequest(LFUN_WORD_REPLACE, data));
}
#ifndef CONTROLSEARCH_H
#define CONTROLSEARCH_H
+#include "Dialog.h"
-#include "ControlDialog_impl.h"
/** A controller for Search dialogs.
*/
-class ControlSearch : public ControlDialogBD {
+class ControlSearch : public Dialog::Controller {
public:
- ///
- ControlSearch(LyXView &, Dialogs &);
+ ControlSearch(Dialog &);
+
+ virtual bool initialiseParams(std::string const &) { return true; }
+ virtual void clearParams() {}
+ virtual void dispatchParams() {}
+ virtual bool isBufferDependent() const { return true; }
/// Searches occurence of string
void find(std::string const & search,
void replace(std::string const & search, std::string const & replace,
bool casesensitive, bool matchword,
bool forward, bool all);
-private:
- /// not needed.
- virtual void apply() {}
};
#endif // CONTROLSEARCH_H
}
-void gui_ShowSearch(Dialogs & d)
-{
- d.showSearch();
-}
-
-
void gui_ShowSendto(Dialogs & d)
{
d.showSendto();
void gui_ShowPreamble(Dialogs &);
void gui_ShowPreferences(Dialogs &);
void gui_ShowPrint(Dialogs &);
-void gui_ShowSearch(Dialogs &);
void gui_ShowSendto(Dialogs &);
void gui_ShowSpellchecker(Dialogs &);
+2004-01-25 Angus Leeming <leeming@lyx.org>
+
+ * Dialog.C (build): add the "findreplace" dialog.
+ * Dialogs2.C (showSearch): removed.
+
+ * QSearch.[Ch]: derive from QDialogView rather than from Qt2Base.
+
2004-01-15 Ronald Florence <ron@18james.com>
* Menubar_pimpl.C: change Q_WS_MAC conditional define to
#include "ControlNote.h"
#include "ControlParagraph.h"
#include "ControlRef.h"
+#include "ControlSearch.h"
#include "ControlShowFile.h"
#include "ControlTabular.h"
#include "ControlTabularCreate.h"
#include "QNote.h"
#include "QParagraph.h"
#include "QRef.h"
+#include "QSearch.h"
#include "QShowFile.h"
#include "QTabular.h"
#include "QTabularCreate.h"
namespace {
-char const * const dialognames[] = { "aboutlyx", "bibitem", "bibtex", "box",
-"branch", "changes", "character", "citation", "error", "errorlist", "ert", "external",
-"file", "float", "graphics", "include", "index", "label", "log",
-"mathpanel", "mathdelimiter", "mathmatrix",
+char const * const dialognames[] = {
+"aboutlyx", "bibitem", "bibtex", "box", "branch", "changes", "character",
+"citation", "error", "errorlist", "ert", "external", "file", "findreplace",
+"float", "graphics", "include", "index", "label", "log", "mathpanel",
+"mathdelimiter", "mathmatrix",
"note", "paragraph", "ref", "tabular", "tabularcreate", "texinfo",
#ifdef HAVE_LIBAIKSAURUS
dialog->setController(new ControlShowFile(*dialog));
dialog->setView(new QShowFile(*dialog));
dialog->bc().bp(new OkCancelPolicy);
+ } else if (name == "findreplace") {
+ dialog->setController(new ControlSearch(*dialog));
+ dialog->setView(new QSearch(*dialog));
+ dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
} else if (name == "float") {
dialog->setController(new ControlFloat(*dialog));
dialog->setView(new QFloat(*dialog));
#include "ControlDocument.h"
#include "ControlPrint.h"
-#include "ControlSearch.h"
#include "ControlSendto.h"
#include "ControlSpellchecker.h"
#include "QPrefsDialog.h"
#include "QPrint.h"
#include "QLPrintDialog.h"
-#include "QSearch.h"
-#include "QSearchDialog.h"
#include "QSendto.h"
#include "QSendtoDialog.h"
#include "QSpellchecker.h"
typedef GUI<ControlPrint, QPrint, OkApplyCancelPolicy, Qt2BC>
PrintDialog;
-typedef GUI<ControlSearch, QSearch, NoRepeatedApplyReadOnlyPolicy, Qt2BC>
-SearchDialog;
-
typedef GUI<ControlSendto, QSendto, OkApplyCancelPolicy, Qt2BC>
SendtoDialog;
DocumentDialog document;
PrefsDialog prefs;
PrintDialog print;
- SearchDialog search;
SendtoDialog sendto;
SpellcheckerDialog spellchecker;
};
: document(lv, d),
prefs(lv, d),
print(lv, d),
- search(lv, d),
sendto(lv, d),
spellchecker(lv, d)
{}
}
-void Dialogs::showSearch()
-{
- pimpl_->search.controller().show();
-}
-
-
void Dialogs::showSendto()
{
pimpl_->sendto.controller().show();
using std::string;
-typedef Qt2CB<ControlSearch, Qt2DB<QSearchDialog> > base_class;
+typedef QController<ControlSearch, QView<QSearchDialog> > base_class;
-QSearch::QSearch()
- : base_class(_("LyX: Find and Replace"))
+QSearch::QSearch(Dialog & parent)
+ : base_class(parent, _("LyX: Find and Replace"))
{
}
#ifndef QSEARCH_H
#define QSEARCH_H
-
-#include "Qt2Base.h"
+#include "QDialogView.h"
class ControlSearch;
class QSearchDialog;
///
class QSearch
- : public Qt2CB<ControlSearch, Qt2DB<QSearchDialog> >
+ : public QController<ControlSearch, QView<QSearchDialog> >
{
public:
///
friend class QSearchDialog;
///
- QSearch();
+ QSearch(Dialog &);
private:
/// Apply changes
virtual void apply() {}
+2004-01-25 Angus Leeming <leeming@lyx.org>
+
+ * Dialog.C (build): add the "findreplace" dialog.
+ * Dialogs2.C (showSearch): removed.
+
+ * FormSearch.[Ch]: derive from FormDialogView rather than from FormBase.
+
2004-01-08 Angus Leeming <leeming@lyx.org>
* FileDialog.C (open, save):
#include "ControlNote.h"
#include "ControlParagraph.h"
#include "ControlRef.h"
+#include "ControlSearch.h"
#include "ControlShowFile.h"
#include "ControlTabular.h"
#include "ControlTabularCreate.h"
#include "FormRef.h"
#include "FormTabular.h"
#include "FormTexinfo.h"
+#include "FormSearch.h"
#include "FormShowFile.h"
#include "FormTabularCreate.h"
#include "FormText.h"
char const * const dialognames[] = {
-"aboutlyx", "bibitem", "bibtex", "branch", "box", "changes",
-"character", "citation", "error", "errorlist" , "ert", "external", "file",
+"aboutlyx", "bibitem", "bibtex", "branch", "box", "changes", "character",
+"citation", "error", "errorlist" , "ert", "external", "file", "findreplace",
"float", "graphics", "include", "index", "label", "log", "mathpanel",
-"mathaccents", "matharrows", "mathoperators", "mathrelations", "mathgreek",
-"mathmisc", "mathdots", "mathbigoperators", "mathamsmisc",
-"mathamsarrows", "mathamsrelations", "mathamsnegatedrelations", "mathamsoperators",
-"mathdelimiter", "mathmatrix", "mathspace", "mathstyle",
+"mathaccents", "matharrows", "mathoperators", "mathrelations",
+"mathgreek", "mathmisc", "mathdots", "mathbigoperators", "mathamsmisc",
+"mathamsarrows", "mathamsrelations", "mathamsnegatedrelations",
+"mathamsoperators", "mathdelimiter", "mathmatrix", "mathspace", "mathstyle",
"note", "paragraph", "ref", "tabular", "tabularcreate", "texinfo",
#ifdef HAVE_LIBAIKSAURUS
dialog->setController(new ControlShowFile(*dialog));
dialog->setView(new FormShowFile(*dialog));
dialog->bc().bp(new OkCancelPolicy);
+ } else if (name == "findreplace") {
+ dialog->setController(new ControlSearch(*dialog));
+ dialog->setView(new FormSearch(*dialog));
+ dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
} else if (name == "float") {
dialog->setController(new ControlFloat(*dialog));
dialog->setView(new FormFloat(*dialog));
#include "FormPrint.h"
#include "forms/form_print.h"
-#include "ControlSearch.h"
-#include "FormSearch.h"
-#include "forms/form_search.h"
-
#include "ControlSendto.h"
#include "FormSendto.h"
#include "forms/form_sendto.h"
typedef GUI<ControlPrint, FormPrint, OkApplyCancelPolicy, xformsBC>
PrintDialog;
-typedef GUI<ControlSearch, FormSearch, NoRepeatedApplyReadOnlyPolicy, xformsBC>
-SearchDialog;
-
typedef GUI<ControlSendto, FormSendto, OkApplyCancelPolicy, xformsBC>
SendtoDialog;
PreambleDialog preamble;
PreferencesDialog preferences;
PrintDialog print;
- SearchDialog search;
SendtoDialog sendto;
SpellcheckerDialog spellchecker;
};
preamble(lv, d),
preferences(lv, d),
print(lv, d),
- search(lv, d),
sendto(lv, d),
spellchecker(lv, d)
{}
}
-void Dialogs::showSearch()
-{
- pimpl_->search.controller().show();
-}
-
-
void Dialogs::showSendto()
{
pimpl_->sendto.controller().show();
using std::string;
-typedef FormCB<ControlSearch, FormDB<FD_search> > base_class;
+typedef FormController<ControlSearch, FormView<FD_search> > base_class;
-FormSearch::FormSearch()
- : base_class(_("Find and Replace"))
+FormSearch::FormSearch(Dialog & parent)
+ : base_class(parent, _("Find and Replace"))
{}
#ifndef FORMSEARCH_H
#define FORMSEARCH_H
-
-#include "FormBase.h"
+#include "FormDialogView.h"
class ControlSearch;
struct FD_search;
/** This class provides an XForms implementation of the FormSearch Dialog.
*/
-class FormSearch : public FormCB<ControlSearch, FormDB<FD_search> > {
+class FormSearch
+ : public FormController<ControlSearch, FormView<FD_search> > {
public:
///
- FormSearch();
+ FormSearch(Dialog &);
private:
/// not needed.
virtual void apply() {}
}
else if (name == "document")
owner->getDialogs().showDocument();
- else if (name == "findreplace")
- owner->getDialogs().showSearch();
else if (name == "forks")
owner->getDialogs().showForks();
else if (name == "preamble")