#include "Buffer.h"
#include "BufferParams.h"
#include "BufferView.h"
-#include "LCursor.h"
+#include "Cursor.h"
#include "CoordCache.h"
#include "gettext.h"
#include "Language.h"
-#include "LColor.h"
-#include "LyXLex.h"
+#include "Color.h"
+#include "Lexer.h"
#include "Row.h"
#include "Paragraph.h"
#include "ParagraphParameters.h"
#include "ParIterator.h"
-#include "frontends/Alert.h"
+#include "frontends/alert.h"
#include "insets/InsetCommand.h"
#include "insets/InsetText.h"
// Set data using font and toggle
// If successful, returns true
-bool font2string(LyXFont const & font, bool const toggle, string & data)
+bool font2string(Font const & font, bool const toggle, string & data)
{
string lang = "ignore";
if (font.language())
// Set font and toggle using data
// If successful, returns true
-bool string2font(string const & data, LyXFont & font, bool & toggle)
+bool string2font(string const & data, Font & font, bool & toggle)
{
istringstream is(data);
- LyXLex lex(0,0);
+ Lexer lex(0,0);
lex.setStream(is);
int nset = 0;
if (token == "family") {
int const next = lex.getInteger();
- font.setFamily(LyXFont::FONT_FAMILY(next));
+ font.setFamily(Font::FONT_FAMILY(next));
} else if (token == "series") {
int const next = lex.getInteger();
- font.setSeries(LyXFont::FONT_SERIES(next));
+ font.setSeries(Font::FONT_SERIES(next));
} else if (token == "shape") {
int const next = lex.getInteger();
- font.setShape(LyXFont::FONT_SHAPE(next));
+ font.setShape(Font::FONT_SHAPE(next));
} else if (token == "size") {
int const next = lex.getInteger();
- font.setSize(LyXFont::FONT_SIZE(next));
+ font.setSize(Font::FONT_SIZE(next));
} else if (token == "emph" || token == "underbar" ||
token == "noun" || token == "number") {
int const next = lex.getInteger();
- LyXFont::FONT_MISC_STATE const misc =
- LyXFont::FONT_MISC_STATE(next);
+ Font::FONT_MISC_STATE const misc =
+ Font::FONT_MISC_STATE(next);
if (token == "emph")
font.setEmph(misc);
} else if (token == "color") {
int const next = lex.getInteger();
- font.setColor(LColor::color(next));
+ font.setColor(Color::color(next));
} else if (token == "language") {
string const next = lex.getString();
sl.inset().cursorPos(bv, sl, boundary && ((i+1) == dit.depth()), xx, yy);
x += xx;
y += yy;
- //lyxerr << "LCursor::getPos, i: "
+ //lyxerr << "Cursor::getPos, i: "
// << i << " x: " << xx << " y: " << y << endl;
}
namespace {
bool findNextInset(DocIterator & dit,
- vector<InsetBase_code> const & codes,
+ vector<Inset_code> const & codes,
string const & contents)
{
DocIterator tmpdit = dit;
while (tmpdit) {
- InsetBase const * inset = tmpdit.nextInset();
+ Inset const * inset = tmpdit.nextInset();
if (inset
&& find(codes.begin(), codes.end(), inset->lyxCode()) != codes.end()
&& (contents.empty() ||
} // namespace anon
-bool findInset(DocIterator & dit, vector<InsetBase_code> const & codes,
+bool findInset(DocIterator & dit, vector<Inset_code> const & codes,
bool same_content)
{
string contents;
return false;
if (same_content) {
- InsetBase const * inset = tmpdit.nextInset();
+ Inset const * inset = tmpdit.nextInset();
if (inset
&& find(codes.begin(), codes.end(), inset->lyxCode()) != codes.end()) {
contents = static_cast<InsetCommand const *>(inset)->getContents();
}
-void findInset(DocIterator & dit, InsetBase_code code, bool same_content)
+void findInset(DocIterator & dit, Inset_code code, bool same_content)
{
- findInset(dit, vector<InsetBase_code>(1, code), same_content);
+ findInset(dit, vector<Inset_code>(1, code), same_content);
}
-void gotoInset(BufferView * bv, vector<InsetBase_code> const & codes,
+void gotoInset(BufferView * bv, vector<Inset_code> const & codes,
bool same_content)
{
- LCursor tmpcur = bv->cursor();
+ Cursor tmpcur = bv->cursor();
if (!findInset(tmpcur, codes, same_content)) {
bv->cursor().message(_("No more insets"));
return;
}
-void gotoInset(BufferView * bv, InsetBase_code code, bool same_content)
+void gotoInset(BufferView * bv, Inset_code code, bool same_content)
{
- gotoInset(bv, vector<InsetBase_code>(1, code), same_content);
+ gotoInset(bv, vector<Inset_code>(1, code), same_content);
}