void BufferView::showDialog(std::string const & name)
{
if (d->gui_)
- d->gui_->showDialog(name);
+ d->gui_->showDialog(name, string());
}
-void BufferView::showDialogWithData(std::string const & name,
- std::string const & data)
-{
- if (d->gui_)
- d->gui_->showDialogWithData(name, data);
-}
-
-
-void BufferView::showInsetDialog(std::string const & name,
+void BufferView::showDialog(std::string const & name,
std::string const & data, Inset * inset)
{
if (d->gui_)
- d->gui_->showInsetDialog(name, data, inset);
+ d->gui_->showDialog(name, data, inset);
}
/// This signal is emitted when some dialog needs to be shown with
/// some data.
- void showDialogWithData(std::string const & name, std::string const & data);
-
- /// This signal is emitted when some inset dialogs needs to be shown.
- void showInsetDialog(std::string const & name, std::string const & data,
- Inset * inset);
+ void showDialog(std::string const & name, std::string const & data,
+ Inset * inset = 0);
/// This signal is emitted when some dialogs needs to be updated.
void updateDialog(std::string const & name, std::string const & data);
case LFUN_BUFFER_EXPORT:
BOOST_ASSERT(lyx_view_ && lyx_view_->buffer());
if (argument == "custom")
- lyx_view_->showDialog("sendto");
+ lyx_view_->showDialog("sendto", string());
else
lyx_view_->buffer()->doExport(argument, false);
break;
if (name == "character") {
data = freefont2string();
if (!data.empty())
- lyx_view_->showDialogWithData("character", data);
+ lyx_view_->showDialog("character", data);
} else if (name == "latexlog") {
Buffer::LogType type;
string const logfile = lyx_view_->buffer()->logName(&type);
break;
}
data += Lexer::quoteString(logfile);
- lyx_view_->showDialogWithData("log", data);
+ lyx_view_->showDialog("log", data);
} else if (name == "vclog") {
string const data = "vc " +
Lexer::quoteString(lyx_view_->buffer()->lyxvc().getLogFile());
- lyx_view_->showDialogWithData("log", data);
+ lyx_view_->showDialog("log", data);
} else
- lyx_view_->showDialogWithData(name, data);
+ lyx_view_->showDialog(name, data);
break;
}
content : cmd.argument();
string const data = InsetCommandMailer::params2string("href", p);
if (p["target"].empty()) {
- bv->showInsetDialog("href", data, 0);
+ bv->showDialog("href", data);
} else {
FuncRequest fr(LFUN_INSET_INSERT, data);
dispatch(cur, fr);
string const data = InsetCommandMailer::params2string("label", p);
if (cmd.argument().empty()) {
- bv->showInsetDialog("label", data, 0);
+ bv->showDialog("label", data);
} else {
FuncRequest fr(LFUN_INSET_INSERT, data);
dispatch(cur, fr);
string data;
params2string(cur.paragraph(), data);
data = "show\n" + data;
- bv->showDialogWithData("paragraph", data);
+ bv->showDialog("paragraph", data);
break;
}
arg = cur.selectionAsString(false);
}
}
- bv->showDialogWithData("thesaurus", to_utf8(arg));
+ bv->showDialog("thesaurus", to_utf8(arg));
break;
}
/// This function is called when some message shows up.
virtual void message(docstring const & msg) = 0;
- /// This function is called when some dialog needs to be shown.
- virtual void showDialog(std::string const & name) = 0;
-
- /// This function is called when some dialog needs to be shown with
- /// some data.
- virtual void showDialogWithData(std::string const & name,
- std::string const & data) = 0;
-
/// This function is called when some inset dialogs needs to be shown.
- virtual void showInsetDialog(std::string const & name,
- std::string const & data, Inset * inset) = 0;
+ virtual void showDialog(std::string const & name,
+ std::string const & data, Inset * inset = 0) = 0;
/// This function is called when some dialogs needs to be updated.
virtual void updateDialog(std::string const & name,
NoModifier = 0, //< no modifiers held
ControlModifier = 1, //< control button held
AltModifier = 2, //< alt/meta key held
- ShiftModifier = 4 //< shift key held
+ ShiftModifier = 4 //< shift key held
};
#include "frontends/Delegates.h"
#include "support/strfwd.h"
-#include <string>
-
namespace lyx {
namespace support { class FileName; }
the current cursor position or modify an existing, 'open' inset?
*/
virtual void showDialog(std::string const & name,
- std::string const & data = std::string(), Inset * inset = 0) = 0;
+ std::string const & data, Inset * inset = 0) = 0;
/** \param name == "citation", "bibtex" etc; an identifier used
to update the contents of a particular dialog with \param data.
}
-void GuiView::showDialog(std::string const & name)
-{
- showDialog(name, string());
-}
-
-void GuiView::showDialogWithData(string const & name, string const & data)
-{
- showDialog(name, data);
-}
-
-
-void GuiView::showInsetDialog(string const & name, string const & data,
- Inset * inset)
-{
- showDialog(name, data, inset);
-}
-
-
void GuiView::updateDialog(string const & name, string const & data)
{
if (!isDialogVisible(name))
void structureChanged() { updateToc(); }
///@}
- ////
- void showDialog(std::string const & name);
- void showDialogWithData(std::string const & name,
- std::string const & data);
- void showInsetDialog(std::string const & name,
- std::string const & data, Inset * inset);
/// called on timeout
void autoSave();
the current cursor position or modify an existing, 'open' inset?
*/
void showDialog(std::string const & name,
- std::string const & data = std::string(), Inset * inset = 0);
+ std::string const & data, Inset * inset = 0);
/** \param name == "citation", "bibtex" etc; an identifier used
to update the contents of a particular dialog with \param data.
void MailInset::showDialog(BufferView * bv) const
{
BOOST_ASSERT(bv);
- bv->showInsetDialog(name(), inset2string(bv->buffer()), &inset());
+ bv->showDialog(name(), inset2string(bv->buffer()), &inset());
}
std::string const data = InsetCommandMailer::params2string("label", p);
if (cmd.argument().empty())
- cur.bv().showInsetDialog("label", data, 0);
+ cur.bv().showDialog("label", data);
else {
FuncRequest fr(LFUN_INSET_INSERT, data);
dispatch(cur, fr);
InsetMathRef tmp(name);
data = tmp.createDialogStr(to_utf8(name));
}
- cur.bv().showInsetDialog(to_utf8(name), data, 0);
+ cur.bv().showDialog(to_utf8(name), data);
break;
}
if (cmd.button() == mouse_button::button1) {
// Eventually trigger dialog with button 3, not 1
string const data = createDialogStr("ref");
- cur.bv().showInsetDialog("ref", data, this);
+ cur.bv().showDialog("ref", data, this);
break;
}
cur.undispatched();