#include "InsetNote.h"
+#include "Buffer.h"
#include "BufferView.h"
-#include "LCursor.h"
+#include "Cursor.h"
#include "debug.h"
#include "DispatchResult.h"
#include "Exporter.h"
#include "FuncStatus.h"
#include "gettext.h"
#include "LaTeXFeatures.h"
-#include "LColor.h"
-#include "LyXLex.h"
+#include "Color.h"
+#include "Lexer.h"
#include "MetricsInfo.h"
#include "OutputParams.h"
#include "Paragraph.h"
#include "support/lyxalgo.h"
-#include "support/translator.h"
+#include "support/Translator.h"
#include <sstream>
}
-void InsetNoteParams::read(LyXLex & lex)
+void InsetNoteParams::read(Lexer & lex)
{
string label;
lex >> label;
void InsetNote::init()
{
- setInsetName(from_ascii("Note"));
setButtonLabel();
}
}
-auto_ptr<InsetBase> InsetNote::doClone() const
+auto_ptr<Inset> InsetNote::doClone() const
{
- return auto_ptr<InsetBase>(new InsetNote(*this));
+ return auto_ptr<Inset>(new InsetNote(*this));
}
}
-void InsetNote::read(Buffer const & buf, LyXLex & lex)
+void InsetNote::read(Buffer const & buf, Lexer & lex)
{
params_.read(lex);
InsetCollapsable::read(buf, lex);
docstring const label = notetranslator_loc().find(params_.type);
setLabel(label);
- LyXFont font(LyXFont::ALL_SANE);
+ Font font(Font::ALL_SANE);
font.decSize();
font.decSize();
switch (params_.type) {
case InsetNoteParams::Note:
- font.setColor(LColor::note);
- setBackgroundColor(LColor::notebg);
+ font.setColor(Color::note);
+ setBackgroundColor(Color::notebg);
break;
case InsetNoteParams::Comment:
- font.setColor(LColor::comment);
- setBackgroundColor(LColor::commentbg);
+ font.setColor(Color::comment);
+ setBackgroundColor(Color::commentbg);
break;
case InsetNoteParams::Greyedout:
- font.setColor(LColor::greyedout);
- setBackgroundColor(LColor::greyedoutbg);
+ font.setColor(Color::greyedout);
+ setBackgroundColor(Color::greyedoutbg);
break;
case InsetNoteParams::Framed:
- font.setColor(LColor::greyedout);
- setBackgroundColor(LColor::greyedoutbg);
+ font.setColor(Color::greyedout);
+ setBackgroundColor(Color::greyedoutbg);
break;
case InsetNoteParams::Shaded:
- font.setColor(LColor::greyedout);
- setBackgroundColor(LColor::shadedbg);
+ font.setColor(Color::greyedout);
+ setBackgroundColor(Color::shadedbg);
break;
}
setLabelFont(font);
}
-void InsetNote::doDispatch(LCursor & cur, FuncRequest & cmd)
+void InsetNote::doDispatch(Cursor & cur, FuncRequest & cmd)
{
switch (cmd.action) {
}
-bool InsetNote::getStatus(LCursor & cur, FuncRequest const & cmd,
+bool InsetNote::getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & flag) const
{
switch (cmd.action) {
// Ignore files that are exported inside a comment
runparams.exportdata.reset(new ExportData);
}
- os << '[' << _("note") << ":\n";
+ os << '[' << buf.B_("note") << ":\n";
InsetText::plaintext(buf, os, runparams);
os << "\n]";
return;
istringstream data(in);
- LyXLex lex(0,0);
+ Lexer lex(0,0);
lex.setStream(data);
string name;
return print_mailer_error("InsetNoteMailer", in, 1, name_);
// This is part of the inset proper that is usually swallowed
- // by LyXText::readInset
+ // by Text::readInset
string id;
lex >> id;
if (!lex || id != "Note")