#include "Buffer.h"
#include "BufferParams.h"
#include "BufferView.h"
-#include "LCursor.h"
+#include "Cursor.h"
#include "debug.h"
#include "DispatchResult.h"
#include "Floating.h"
#include "FuncStatus.h"
#include "gettext.h"
#include "LaTeXFeatures.h"
-#include "LColor.h"
-#include "LyXLex.h"
+#include "Color.h"
+#include "Lexer.h"
#include "OutputParams.h"
#include "Paragraph.h"
#include "TocBackend.h"
InsetWrap::InsetWrap(BufferParams const & bp, string const & type)
- : InsetCollapsable(bp)
+ : InsetCollapsable(bp), name_(from_utf8(type))
{
setLabel(_("wrap: ") + floatName(type, bp));
- LyXFont font(LyXFont::ALL_SANE);
+ Font font(Font::ALL_SANE);
font.decSize();
font.decSize();
- font.setColor(LColor::collapsable);
+ font.setColor(Color::collapsable);
setLabelFont(font);
params_.type = type;
- params_.width = LyXLength(50, LyXLength::PCW);
- setInsetName(from_utf8(type));
+ params_.width = Length(50, Length::PCW);
}
}
-void InsetWrap::doDispatch(LCursor & cur, FuncRequest & cmd)
+void InsetWrap::doDispatch(Cursor & cur, FuncRequest & cmd)
{
switch (cmd.action) {
case LFUN_INSET_MODIFY: {
}
-bool InsetWrap::getStatus(LCursor & cur, FuncRequest const & cmd,
+bool InsetWrap::getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & flag) const
{
switch (cmd.action) {
}
-void InsetWrapParams::read(LyXLex & lex)
+void InsetWrapParams::read(Lexer & lex)
{
string token;
lex >> token;
lex >> token;
if (token == "width") {
lex.next();
- width = LyXLength(lex.getString());
+ width = Length(lex.getString());
} else {
lyxerr << "InsetWrap::Read:: Missing 'width'-tag!"
<< endl;
}
-void InsetWrap::read(Buffer const & buf, LyXLex & lex)
+void InsetWrap::read(Buffer const & buf, Lexer & lex)
{
params_.read(lex);
InsetCollapsable::read(buf, lex);
}
-auto_ptr<InsetBase> InsetWrap::doClone() const
+auto_ptr<Inset> InsetWrap::doClone() const
{
- return auto_ptr<InsetBase>(new InsetWrap(*this));
+ return auto_ptr<Inset>(new InsetWrap(*this));
}
int InsetWrap::plaintext(Buffer const & buf, odocstream & os,
OutputParams const & runparams) const
{
- os << '[' << _("wrap") << ' ' << floatName(params_.type, buf.params()) << ":\n";
+ os << '[' << buf.B_("wrap") << ' ' << floatName(params_.type, buf.params()) << ":\n";
InsetText::plaintext(buf, os, runparams);
os << "\n]";
}
-bool InsetWrap::insetAllowed(InsetBase::Code code) const
+bool InsetWrap::insetAllowed(Inset::Code code) const
{
switch(code) {
case FLOAT_CODE:
return;
istringstream data(in);
- LyXLex lex(0,0);
+ Lexer lex(0,0);
lex.setStream(data);
string name;
return print_mailer_error("InsetWrapMailer", 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 != "Wrap")