* ui/default.ui: use 'dialog-show-new-inset "external"' instead
of 'external-insert'.
+ use "dialog-show-new-inset include" instead of "buffer-child-insert".
2003-03-03 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
Item "Tabular Material...|b" "tabular-insert"
Submenu "Floats|a" "insert_floats"
Separator
- Item "Include File...|d" "buffer-child-insert"
+ Item "Include File...|d" "dialog-show-new-inset include"
Submenu "Insert File|e" "insert_file"
Item "External Material...|x" "dialog-show-new-inset external"
End
}
break;
- case LFUN_CHILD_INSERT:
- {
- InsetInclude::Params p;
- if (!ev.argument.empty())
- p.cparams.setFromString(ev.argument);
- p.masterFilename_ = buffer_->fileName();
-
- InsetInclude * inset = new InsetInclude(p);
- if (!insertInset(inset))
- delete inset;
- else {
- updateInset(inset, true);
- bv_->owner()->getDialogs().showInclude(inset);
- }
- }
- break;
-
case LFUN_FLOAT_LIST:
if (tclass.floats().typeExist(ev.argument)) {
Inset * inset = new InsetFloatList(ev.argument);
+2003-03-05 Angus Leeming <leeming@lyx.org>
+
+ * commandtags.h:
+ * LyXAction.C (init):
+ * BufferView_pimpl.C (dispatch):
+ * lyxfunc.C (getStatus):
+ remove LFUN_CHILD_INSERT.
+
+ * factory.C (createInset): add "include" to LFUN_INSET_APPLY.
+
2003-03-05 Angus Leeming <leeming@lyx.org>
* commandtags.h:
N_("Go to beginning of document"), ReadOnly },
{ LFUN_BEGINNINGBUFSEL, "buffer-begin-select",
N_("Select to beginning of document"), ReadOnly },
- { LFUN_CHILD_INSERT, "buffer-child-insert", "", Noop },
{ LFUN_CHILDOPEN, "buffer-child-open", "", ReadOnly },
{ LFUN_RUNCHKTEX, "buffer-chktex", N_("Check TeX"), ReadOnly },
{ LFUN_CLOSEBUFFER, "buffer-close", N_("Close"), ReadOnly },
LFUN_LAYOUT_COPY, // Asger 1997-05-04
LFUN_LAYOUT_PASTE, // Asger 1997-05-04
LFUN_TABINSERT, // 180 // Ale 970515
- LFUN_CHILD_INSERT, // Ale 970521
LFUN_CHILDOPEN, // Ale 970528
LFUN_TOC_INSERT, // Lgb 97-05-27
LFUN_FLOAT_LIST, // Lgb 20010503
#include "insets/insetexternal.h"
#include "insets/insetfloat.h"
#include "insets/insetfoot.h"
+#include "insets/insetinclude.h"
#include "insets/insetindex.h"
#include "insets/insetlabel.h"
#include "insets/insetmarginal.h"
inset->setFromParams(iep);
return inset;
+ } else if (name == "include") {
+ InsetInclude::Params iip;
+ InsetIncludeMailer::string2params(cmd.argument, iip);
+ return new InsetInclude(iip);
+
} else if (name == "index") {
InsetCommandParams icp;
InsetCommandMailer::string2params(cmd.argument, icp);
+2003-03-05 Angus Leeming <leeming@lyx.org>
+
+ * Dialogs.h: remove showInclude.
+ * guiapi.[Ch]: remove gui_ShowInclude.
+
2003-03-05 Angus Leeming <leeming@lyx.org>
* Dialogs.h: remove showExternal.
class InsetFloat;
class InsetWrap;
class InsetGraphics;
-class InsetInclude;
class InsetInfo;
class InsetMinipage;
class Paragraph;
void showForks();
///
void showGraphics(InsetGraphics *);
- /// show the details of a LyX file include inset
- void showInclude(InsetInclude *);
/// show the LaTeX log or build file
void showLogFile();
/// display the top-level maths panel
+2003-03-05 Angus Leeming <leeming@lyx.org>
+
+ * ControlInclude.[Ch]: rewrite to use the Dialog-based scheme.
+
2003-03-05 Angus Leeming <leeming@lyx.org>
* ControlExternal.[Ch]: rewrite to use the Dialog-based scheme.
#include <config.h>
-
#include "ControlInclude.h"
#include "helper_funcs.h"
using std::pair;
-ControlInclude::ControlInclude(LyXView & lv, Dialogs & d)
- : ControlInset<InsetInclude, InsetInclude::Params>(lv, d)
+ControlInclude::ControlInclude(Dialog & parent)
+ : Dialog::Controller(parent)
{}
-void ControlInclude::applyParamsToInset()
+void ControlInclude::initialiseParams(string const & data)
+{
+ InsetInclude::Params params;
+ InsetIncludeMailer::string2params(data, params);
+ inset_.reset(new InsetInclude(params));
+}
+
+
+void ControlInclude::clearParams()
+{
+ inset_.reset();
+}
+
+
+void ControlInclude::dispatchParams()
{
- inset()->set(params());
- bufferview()->updateInset(inset(), true);
+ InsetInclude::Params p = params();
+ string const lfun = InsetIncludeMailer::params2string("include", p);
+ kernel().dispatch(FuncRequest(LFUN_INSET_APPLY, lfun));
}
+void ControlInclude::setParams(InsetInclude::Params const & params)
+{
+ inset_->set(params);
+}
+
string const ControlInclude::Browse(string const & in_name, Type in_type)
{
string const title = _("Select document to include");
void ControlInclude::load(string const & file)
{
- lyxfunc().dispatch(FuncRequest(LFUN_CHILDOPEN, file));
+ kernel().dispatch(FuncRequest(LFUN_CHILDOPEN, file));
}
#define CONTROLINCLUDE_H
-#include "ControlInset.h"
+#include "Dialog.h"
#include "insets/insetinclude.h" // InsetIncludeParams
+
/** A controller for the Include file dialog.
*/
-class ControlInclude
- : public ControlInset<InsetInclude, InsetInclude::Params>
-{
+class ControlInclude : public Dialog::Controller {
public:
///
enum Type {
INCLUDE
};
///
- ControlInclude(LyXView &, Dialogs &);
+ ControlInclude(Dialog &);
+
+ ///
+ virtual void initialiseParams(string const & data);
+ /// clean-up on hide.
+ virtual void clearParams();
+ /// clean-up on hide.
+ virtual void dispatchParams();
+ ///
+ virtual bool isBufferDependent() const { return true; }
+
+ ///
+ InsetInclude::Params const & params() const
+ { return inset_->params(); }
+ ///
+ void setParams(InsetInclude::Params const &);
/// Browse for a file
string const Browse(string const &, Type);
/// test if file exist
bool fileExists(string const & file);
private:
- /// Dispatch the changed parameters to the kernel.
- virtual void applyParamsToInset();
- /// Should be used but currently isn't
- virtual void applyParamsNoInset() {}
- /// get the parameters from the string passed to createInset.
- virtual InsetInclude::Params const getParams(string const &)
- { return InsetInclude::Params(); }
- /// get the parameters from the inset passed to showInset.
- virtual InsetInclude::Params const
- getParams(InsetInclude const & inset) {
- return inset.params();
- }
+ ///
+ boost::scoped_ptr<InsetInclude> inset_;
};
+
#endif // CONTROLINCLUDE_H
}
-void gui_ShowInclude(InsetInclude * ii, Dialogs & d)
-{
- d.showInclude(ii);
-}
-
-
void gui_ShowLogFile(Dialogs & d)
{
d.showLogFile();
class InsetFloat;
class InsetWrap;
class InsetGraphics;
-class InsetInclude;
class InsetMinipage;
class InsetTabular;
void gui_ShowFloat(InsetFloat *, Dialogs &);
void gui_ShowForks(Dialogs &);
void gui_ShowGraphics(InsetGraphics *, Dialogs &);
-void gui_ShowInclude(InsetInclude *, Dialogs &);
void gui_ShowLogFile(Dialogs &);
void gui_ShowMathPanel(Dialogs &);
void gui_ShowMinipage(InsetMinipage *, Dialogs &);
+2003-03-05 Angus Leeming <leeming@lyx.org>
+
+ * QInclude.[Ch]: changes to use the new Dialog-based scheme.
+
+ * Dialogs.C:
+ * Dialogs2.C:
+ * Dialogs_impl.h: remove include dialog.
+
+ * Dialogs3.C: add include dialog.
+
2003-03-05 Angus Leeming <leeming@lyx.org>
* QExternal.[Ch]: changes to use the new Dialog-based scheme.
file(lv, d),
floats(lv, d),
graphics(lv, d),
- include(lv, d),
logfile(lv, d),
minipage(lv, d),
paragraph(lv, d),
#include <config.h>
-
#include "Dialogs_impl.h"
}
-void Dialogs::showInclude(InsetInclude * ii)
-{
- pimpl_->include.controller().showInset(ii);
-}
-
-
void Dialogs::showLogFile()
{
pimpl_->logfile.controller().show();
#include "ControlError.h"
#include "ControlERT.h"
#include "ControlExternal.h"
+#include "ControlInclude.h"
#include "ControlIndex.h"
#include "ControlLabel.h"
#include "ControlRef.h"
// of the Qt headers, those most fucked up of disgusting ratholes.
// But I won't.
#undef signals
+#include "QInclude.h"
+#include "QIncludeDialog.h"
#include "QIndex.h"
#include "QIndexDialog.h"
#include "QRef.h"
typedef ButtonController<NoRepeatedApplyReadOnlyPolicy, Qt2BC>
NoRepeatedApplyReadOnlyBC;
-
namespace {
char const * const dialognames[] = { "bibitem", "bibtex", "citation",
- "error", "ert", "external", "index",
- "label", "ref", "toc", "url" };
+ "error", "ert", "external", "include",
+ "index", "label", "ref", "toc", "url" };
char const * const * const end_dialognames =
dialognames + (sizeof(dialognames) / sizeof(char *));
dialog->setController(new ControlExternal(*dialog));
dialog->setView(new QExternal(*dialog));
dialog->setButtonController(new OkApplyCancelReadOnlyBC);
+ } else if (name == "include") {
+ dialog->setController(new ControlInclude(*dialog));
+ dialog->setView(new QInclude(*dialog));
+ dialog->setButtonController(new OkApplyCancelReadOnlyBC);
} else if (name == "index") {
dialog->setController(new ControlIndex(*dialog));
dialog->setView(new QIndex(*dialog,
#ifndef DIALOGS_IMPL_H
#define DIALOGS_IMP_H
-
#include "Dialogs.h"
#include "controllers/GUI.h"
#include "ControlForks.h"
#include "ControlGraphics.h"
#include "insets/insetgraphicsParams.h"
-#include "ControlInclude.h"
#include "ControlLog.h"
#include "ControlMinipage.h"
#include "ControlParagraph.h"
#undef signals
#include "QGraphics.h"
#include "QGraphicsDialog.h"
-#include "QInclude.h"
-#include "QIncludeDialog.h"
#include "QLog.h"
#include "QLogDialog.h"
#include "QMinipage.h"
typedef GUI<ControlGraphics, QGraphics, NoRepeatedApplyReadOnlyPolicy, Qt2BC>
GraphicsDialog;
-typedef GUI<ControlInclude, QInclude, OkCancelReadOnlyPolicy, Qt2BC>
-IncludeDialog;
-
typedef GUI<ControlLog, QLog, OkCancelPolicy, Qt2BC>
LogFileDialog;
FileDialog file;
FloatDialog floats;
GraphicsDialog graphics;
- IncludeDialog include;
LogFileDialog logfile;
MinipageDialog minipage;
ParagraphDialog paragraph;
#include <qcombobox.h>
-typedef Qt2CB<ControlInclude, Qt2DB<QIncludeDialog> > base_class;
+typedef QController<ControlInclude, QView<QIncludeDialog> > base_class;
-QInclude::QInclude()
- : base_class(qt_("LyX: Include File"))
-{
-}
+QInclude::QInclude(Dialog & parent)
+ : base_class(parent, qt_("LyX: Include File"))
+{}
void QInclude::build_dialog()
void QInclude::apply()
{
- InsetInclude::Params & params = controller().params();
+ InsetInclude::Params params = controller().params();
params.cparams.setContents(fromqstr(dialog_->filenameED->text()));
params.cparams.preview(dialog_->previewCB->isChecked());
else
params.flag = InsetInclude::VERB;
}
+ controller().setParams(params);
}
#define QINCLUDE_H
-#include "Qt2Base.h"
+#include "QDialogView.h"
+
class ControlInclude;
class QIncludeDialog;
///
-class QInclude
- : public Qt2CB<ControlInclude, Qt2DB<QIncludeDialog> >
+class QInclude : public QController<ControlInclude, QView<QIncludeDialog> >
{
public:
///
friend class QIncludeDialog;
///
- QInclude();
+ QInclude(Dialog &);
protected:
virtual bool isValid();
private:
+2003-03-05 Angus Leeming <leeming@lyx.org>
+
+ * FormInclude.[Ch]:
+ * forms/form_include.fd: changes to use the new Dialog-based scheme.
+
+ * Dialogs.C:
+ * Dialogs2.C:
+ * Dialogs_impl.h: remove include dialog.
+
+ * Dialogs3.C: add include dialog.
+
2003-03-05 Angus Leeming <leeming@lyx.org>
* FormExternal.[Ch]:
floats(lv, d),
forks(lv, d),
graphics(lv, d),
- include(lv, d),
logfile(lv, d),
mathpanel(lv, d),
minipage(lv, d),
#include <config.h>
-
#include "Dialogs_impl.h"
}
-void Dialogs::showInclude(InsetInclude * ii)
-{
- pimpl_->include.controller().showInset(ii);
-}
-
-
void Dialogs::showLogFile()
{
pimpl_->logfile.controller().show();
#include "FormExternal.h"
#include "forms/form_external.h"
+#include "ControlInclude.h"
+#include "FormInclude.h"
+#include "forms/form_include.h"
+
#include "ControlIndex.h"
#include "ControlLabel.h"
typedef ButtonController<NoRepeatedApplyReadOnlyPolicy, xformsBC>
NoRepeatedApplyReadOnlyBC;
+
namespace {
// char const * const dialognames[] = { "bibitem", "bibtex", "citation",
// "minipage", "ref", "tabular", "toc",
// "url", "wrap" };
char const * const dialognames[] = { "bibitem", "bibtex", "citation",
- "error", "ert", "external", "index",
- "label", "ref", "toc", "url" };
+ "error", "ert", "external", "include",
+ "index", "label", "ref", "toc", "url" };
char const * const * const end_dialognames =
dialognames + (sizeof(dialognames) / sizeof(char *));
dialog->setController(new ControlExternal(*dialog));
dialog->setView(new FormExternal(*dialog));
dialog->setButtonController(new OkApplyCancelReadOnlyBC);
+ } else if (name == "include") {
+ dialog->setController(new ControlInclude(*dialog));
+ dialog->setView(new FormInclude(*dialog));
+ dialog->setButtonController(new OkApplyCancelReadOnlyBC);
} else if (name == "index") {
dialog->setController(new ControlIndex(*dialog));
dialog->setView(new FormText(*dialog,
#ifndef DIALOGS_IMPL_H
#define DIALOGS_IMP_H
-
#include "Dialogs.h"
#include "controllers/GUI.h"
#include "FormGraphics.h"
#include "forms/form_graphics.h"
-#include "ControlInclude.h"
-#include "FormInclude.h"
-#include "forms/form_include.h"
-
#include "ControlLog.h"
#include "FormLog.h"
typedef GUI<ControlGraphics, FormGraphics, NoRepeatedApplyReadOnlyPolicy, xformsBC>
GraphicsDialog;
-typedef GUI<ControlInclude, FormInclude, OkCancelReadOnlyPolicy, xformsBC>
-IncludeDialog;
-
typedef GUI<ControlLog, FormLog, OkCancelPolicy, xformsBC>
LogFileDialog;
FloatDialog floats;
ForksDialog forks;
GraphicsDialog graphics;
- IncludeDialog include;
LogFileDialog logfile;
MathPanelDialog mathpanel;
MinipageDialog minipage;
#include "support/lstrings.h" // strip
#include FORMS_H_LOCATION
-typedef FormCB<ControlInclude, FormDB<FD_include> > base_class;
+typedef FormController<ControlInclude, FormView<FD_include> > base_class;
-FormInclude::FormInclude()
- : base_class(_("Include file"))
+FormInclude::FormInclude(Dialog & parent)
+ : base_class(parent, _("Include file"))
{}
void FormInclude::apply()
{
- controller().params().cparams
- .preview(fl_get_button(dialog_->check_preview));
+ InsetInclude::Params params = controller().params();
+
+ params.cparams.preview(fl_get_button(dialog_->check_preview));
string const file = fl_get_input(dialog_->input_filename);
if (controller().fileExists(file))
- controller().params().cparams.setContents(file);
+ params.cparams.setContents(file);
else
- controller().params().cparams.setContents("");
+ params.cparams.setContents("");
ControlInclude::Type const type = ControlInclude::Type(type_.get());
if (type == ControlInclude::INPUT)
- controller().params().flag = InsetInclude::INPUT;
+ params.flag = InsetInclude::INPUT;
else if (type == ControlInclude::INCLUDE)
- controller().params().flag = InsetInclude::INCLUDE;
+ params.flag = InsetInclude::INCLUDE;
else if (type == ControlInclude::VERBATIM) {
if (fl_get_button(dialog_->check_visiblespace))
- controller().params().flag = InsetInclude::VERBAST;
+ params.flag = InsetInclude::VERBAST;
else
- controller().params().flag = InsetInclude::VERB;
+ params.flag = InsetInclude::VERB;
}
+
+ controller().setParams(params);
}
} else if (ob == dialog_->button_load) {
string const in_name = fl_get_input(dialog_->input_filename);
if (!rtrim(in_name).empty() && controller().fileExists(in_name)) {
- controller().OKButton();
+ dialog().OKButton();
controller().load(rtrim(in_name));
action = ButtonPolicy::SMI_NOOP;
}
#define FORMINCLUDE_H
-#include "FormBase.h"
+#include "FormDialogView.h"
#include "RadioButtonGroup.h"
+
class ControlInclude;
struct FD_include;
/** This class provides an XForms implementation of the Include Dialog.
*/
-class FormInclude : public FormCB<ControlInclude, FormDB<FD_include> > {
+class FormInclude
+ : public FormController<ControlInclude, FormView<FD_include> > {
public:
///
- FormInclude();
+ FormInclude(Dialog &);
private:
/// Set the Params variable for the Controller.
virtual void apply();
resize: FL_RESIZE_X
gravity: FL_NorthEast FL_NorthEast
name: button_browse
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
argument: 0
--------------------
resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast
name: button_ok
-callback: C_FormBaseOKCB
+callback: C_FormDialogView_OKCB
argument: 0
--------------------
resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast
name: button_close
-callback: C_FormBaseCancelCB
+callback: C_FormDialogView_CancelCB
argument: 0
--------------------
resize: FL_RESIZE_NONE
gravity: FL_NorthWest FL_North
name: button_load
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
argument: 0
--------------------
resize: FL_RESIZE_X
gravity: FL_NorthWest FL_NorthEast
name: input_filename
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
argument: 0
--------------------
resize: FL_RESIZE_NONE
gravity: FL_NorthWest FL_North
name: check_visiblespace
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
argument: 0
--------------------
resize: FL_RESIZE_NONE
gravity: FL_NorthWest FL_NorthWest
name: radio_verbatim
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
argument: 0
--------------------
resize: FL_RESIZE_NONE
gravity: FL_NorthWest FL_NorthWest
name: radio_useinput
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
argument: 0
value: 1
resize: FL_RESIZE_NONE
gravity: FL_NorthWest FL_NorthWest
name: radio_useinclude
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
argument: 0
--------------------
resize: FL_RESIZE_NONE
gravity: FL_NorthWest FL_North
name: check_preview
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
argument: 0
==============================
+2003-03-05 Angus Leeming <leeming@lyx.org>
+
+ * insetcommandparams.[Ch] (getAsString, setFromString): remove.
+
+ * insetinclude.[Ch]: define a new class InsetIncludeMailer and use
+ it to communicate with the frontend dialogs.
+
2003-03-05 Angus Leeming <leeming@lyx.org>
* insetexternal.[Ch]: define a new class InsetExternalMailer and use
{}
-string const InsetCommandParams::getAsString() const
-{
- return cmdname + "|++|" + contents + "|++|" + options;
-}
-
-
-void InsetCommandParams::setFromString(string const & b)
-{
- string::size_type idx = b.find("|++|");
- if (idx == string::npos) {
- cmdname = b;
- contents = "";
- options = "";
- return;
- }
-
- cmdname = b.substr(0, idx);
- string tmp = b.substr(idx+4);
-
- idx = tmp.find("|++|");
- if (idx == string::npos) {
- contents = tmp;
- options = "";
- } else {
- contents = tmp.substr(0, idx);
- options = tmp.substr(idx+4);
- }
-}
-
-
void InsetCommandParams::scanCommand(string const & cmd)
{
string tcmdname, toptions, tcontents;
///
void setContents(string const & c) { contents = c; }
///
- string const getAsString() const;
- ///
- void setFromString(string const &);
- ///
bool preview() const { return preview_; }
///
void preview(bool p) { preview_ = p; }
InsetERT & inset_;
};
-
#endif
#include "bufferlist.h"
#include "BufferView.h"
#include "debug.h"
-#include "lyxrc.h"
-#include "LaTeXFeatures.h"
+#include "funcrequest.h"
#include "gettext.h"
+#include "LaTeXFeatures.h"
+#include "lyxlex.h"
+#include "lyxrc.h"
#include "frontends/Dialogs.h"
#include "frontends/LyXView.h"
InsetInclude::~InsetInclude()
{
- hideDialog();
+ InsetIncludeMailer mailer(*this);
+ mailer.hideDialog();
+}
+
+
+dispatch_result InsetInclude::localDispatch(FuncRequest const & cmd)
+{
+ if (cmd.action != LFUN_INSET_MODIFY)
+ return UNDISPATCHED;
+
+ InsetInclude::Params p;
+ InsetIncludeMailer::string2params(cmd.argument, p);
+ if (p.cparams.getCmdName().empty())
+ return UNDISPATCHED;
+
+ set(p);
+ params_.masterFilename_ = cmd.view()->buffer()->fileName();
+
+ cmd.view()->updateInset(this, true);
+ return DISPATCHED;
}
}
-void InsetInclude::edit(BufferView * bv, int, int, mouse_button::state)
+void InsetInclude::edit(BufferView *, int, int, mouse_button::state)
{
- bv->owner()->getDialogs().showInclude(this);
+ InsetIncludeMailer mailer(*this);
+ mailer.showDialog();
}
view()->updateInset(&parent(), false);
generatePreview();
}
+
+
+InsetIncludeMailer::InsetIncludeMailer(InsetInclude & inset)
+ : name_("include"), inset_(inset)
+{}
+
+
+string const InsetIncludeMailer::inset2string() const
+{
+ return params2string(name(), inset_.params());
+}
+
+
+void InsetIncludeMailer::string2params(string const & in,
+ InsetInclude::Params & params)
+{
+ params = InsetInclude::Params();
+
+ string name;
+ string body = split(in, name, ' ');
+
+ if (name != "include" || body.empty())
+ return;
+
+ // This is part of the inset proper that is usually swallowed
+ // by Buffer::readInset
+ body = split(body, name, ' ');
+ if (name != "Include")
+ return;
+
+ istringstream data(body);
+ LyXLex lex(0,0);
+ lex.setStream(data);
+
+ InsetInclude inset(params);
+ inset.read(0, lex);
+ params = inset.params();
+}
+
+
+string const
+InsetIncludeMailer::params2string(string const & name,
+ InsetInclude::Params const & params)
+{
+ InsetInclude inset(params);
+ inset.set(params);
+ ostringstream data;
+ data << name << ' ';
+ inset.write(0, data);
+ data << "\\end_inset\n";
+
+ return data.str();
+}
+
#include "insetcommand.h"
-#include <boost/signals/signal0.hpp>
#include <boost/scoped_ptr.hpp>
class Buffer;
~InsetInclude();
+ ///
+ virtual dispatch_result localDispatch(FuncRequest const & cmd);
+
/// Override these InsetButton methods if Previewing
int ascent(BufferView *, LyXFont const &) const;
///
///
void addPreview(grfx::PreviewLoader &) const;
- /// hide a dialog if about
- boost::signal0<void> hideDialog;
private:
/// get the text displayed on the button
string const getScreenLabel(Buffer const *) const;
return params_.flag == VERB || params_.flag == VERBAST;
}
+#include "mailinset.h"
+
+class InsetIncludeMailer : public MailInset {
+public:
+ ///
+ InsetIncludeMailer(InsetInclude & inset);
+ ///
+ virtual Inset & inset() const { return inset_; }
+ ///
+ virtual string const & name() const { return name_; }
+ ///
+ virtual string const inset2string() const;
+ ///
+ static void string2params(string const &, InsetInclude::Params &);
+ ///
+ static string const params2string(string const & name,
+ InsetInclude::Params const &);
+private:
+ ///
+ string const name_;
+ ///
+ InsetInclude & inset_;
+};
+
#endif // INSETINCLUDE_H
case LFUN_INDEX_PRINT:
code = Inset::INDEX_PRINT_CODE;
break;
- case LFUN_CHILD_INSERT:
- code = Inset::INCLUDE_CODE;
- break;
case LFUN_TOC_INSERT:
code = Inset::TOC_CODE;
break;