ParagraphList::iterator par = inset.paragraphs.begin();
ParagraphList::iterator end = inset.paragraphs.end();
for (; par != end; ++par) {
- os << "\n\\layout " << layout << "\n";
+ os << "\n\\begin_layout " << layout << "\n";
pos_type siz = par->size();
for (pos_type i = 0; i < siz; ++i) {
Paragraph::value_type c = par->getChar(i);
switch (c) {
case Paragraph::META_INSET:
- if (par->getInset(i)->lyxCode() != Inset::NEWLINE_CODE) {
+ if (par->getInset(i)->lyxCode() != InsetOld::NEWLINE_CODE) {
lyxerr << "Element is not allowed in insertERT"
<< endl;
} else {
break;
}
}
+ os << "\n\\end_layout\n";
}
}
}
-bool InsetERT::insertInset(BufferView *, Inset *)
+bool InsetERT::insertInset(BufferView *, InsetOld *)
{
return false;
}
}
-Inset::EDITABLE InsetERT::editable() const
+InsetOld::EDITABLE InsetERT::editable() const
{
if (status_ == Collapsed)
return IS_EDITABLE;
return true;
}
- if (status_ != Inlined && (cmd.x >= 0) && (cmd.x < button_length) &&
- (cmd.y >= button_top_y) && (cmd.y <= button_bottom_y)) {
+ if (status_ != Inlined && hitButton(cmd)) {
updateStatus(bv, true);
} else {
FuncRequest cmd1 = cmd;
cmd1.y = ascent() + cmd.y - inset.ascent();
// inlined is special - the text appears above
- // button_bottom_y
+ // button_dim.y2
if (status_ == Inlined)
inset.localDispatch(cmd1);
- else if (!collapsed_ && (cmd.y > button_bottom_y)) {
+ else if (!collapsed_ && (cmd.y > button_dim.y2)) {
cmd1.y -= height_collapsed();
inset.localDispatch(cmd1);
}
}
-Inset::RESULT InsetERT::localDispatch(FuncRequest const & cmd)
+InsetOld::RESULT InsetERT::localDispatch(FuncRequest const & cmd)
{
- Inset::RESULT result = UNDISPATCHED;
+ InsetOld::RESULT result = UNDISPATCHED;
BufferView * bv = cmd.view();
if (inset.paragraphs.begin()->empty()) {