#include "outputparams.h"
#include "sgml.h"
-#include "frontends/LyXView.h"
-#include "frontends/Dialogs.h"
+using lyx::docstring;
using std::string;
using std::auto_ptr;
using std::endl;
-
RefInset::RefInset()
: CommandInset("ref")
{}
case LFUN_INSET_DIALOG_UPDATE: {
string const data = createDialogStr("ref");
- if (cur.bv().owner()->getDialogs().visible("ref"))
- cur.bv().owner()->getDialogs().update("ref", data);
+ cur.bv().updateDialog("ref", data);
break;
}
if (cmd.button() == mouse_button::button1) {
// Eventually trigger dialog with button 3, not 1
string const data = createDialogStr("ref");
- cur.bv().owner()->getDialogs().show("ref", data, this);
+ cur.bv().showInsetDialog("ref", data, this);
break;
}
cur.undispatched();
}
-string const RefInset::screenLabel() const
+docstring const RefInset::screenLabel() const
{
- string str;
+ docstring str;
for (int i = 0; !types[i].latex_name.empty(); ++i)
if (commandname() == types[i].latex_name) {
- // FIXME UNICODE
- str = lyx::to_utf8(_(types[i].short_gui_name));
+ str = _(types[i].short_gui_name);
break;
}
- str += asString(cell(0));
+ // FIXME UNICODE
+ str += lyx::from_utf8(asString(cell(0)));
//if (/* !isLatex && */ !cell(0).empty()) {
// str += "||";
}
-int RefInset::plaintext(std::ostream & os, OutputParams const &) const
+int RefInset::plaintext(lyx::odocstream & os, OutputParams const &) const
{
- os << '[' << asString(cell(0)) << ']';
+ // FIXME UNICODE
+ os << '[' << lyx::from_utf8(asString(cell(0))) << ']';
return 0;
}