/// return the buffer currently shown in this window
Buffer * buffer() const;
+ /* FIXME: Abdel 22/09/71
+ there is only one lyxFunc() for now but there is maybe a need
+ for more in the feature. Something like that:
+
+ LyXFunc & getLyXFunc() { return theApp->lyxFunc(id_); }
+
+ where id_ would be the this LyXView ID.
+ That's the reason why I didn't remove these methods for now.
+ */
/// return the LyX function handler for this view
LyXFunc & getLyXFunc() { return theApp->lyxFunc(); }
///
if (lyxlayout->is_environment) {
// move everything in a new environment inset
lyxerr[Debug::DEBUG] << "setting layout " << layout << endl;
- bv.owner()->dispatch(FuncRequest(LFUN_LINE_BEGIN));
- bv.owner()->dispatch(FuncRequest(LFUN_LINE_END_SELECT));
- bv.owner()->dispatch(FuncRequest(LFUN_CUT));
+ theApp->lyxFunc().dispatch(FuncRequest(LFUN_LINE_BEGIN));
+ theApp->lyxFunc().dispatch(FuncRequest(LFUN_LINE_END_SELECT));
+ theApp->lyxFunc().dispatch(FuncRequest(LFUN_CUT));
InsetBase * inset = new InsetEnvironment(params, layout);
insertInset(cur, inset);
//inset->edit(cur, true);
- //bv.owner()->dispatch(FuncRequest(LFUN_PASTE));
+ //theApp->lyxFunc().dispatch(FuncRequest(LFUN_PASTE));
return;
}
recordUndo(cur);
bool gotsel = false;
if (cur.selection()) {
- cur.bv().owner()->dispatch(FuncRequest(LFUN_CUT));
+ theApp->lyxFunc().dispatch(FuncRequest(LFUN_CUT));
gotsel = true;
}
text->insertInset(cur, inset);
inset->edit(cur, true);
if (gotsel && pastesel) {
- cur.bv().owner()->dispatch(FuncRequest(LFUN_PASTE));
+ theApp->lyxFunc().dispatch(FuncRequest(LFUN_PASTE));
// reset first par to default
if (cur.lastpit() != 0 || cur.lastpos() != 0) {
LyXLayout_ptr const layout =
cur.posRight();
}
else
- bv->owner()->dispatch(FuncRequest(LFUN_SELF_INSERT, "\""));
+ theApp->lyxFunc().dispatch(FuncRequest(LFUN_SELF_INSERT, "\""));
break;
}
case LFUN_DATE_INSERT:
if (cmd.argument().empty())
- bv->owner()->dispatch(FuncRequest(LFUN_SELF_INSERT,
+ theApp->lyxFunc().dispatch(FuncRequest(LFUN_SELF_INSERT,
lyx::formatted_time(lyx::current_time())));
else
- bv->owner()->dispatch(FuncRequest(LFUN_SELF_INSERT,
+ theApp->lyxFunc().dispatch(FuncRequest(LFUN_SELF_INSERT,
lyx::formatted_time(lyx::current_time(), lyx::to_utf8(cmd.argument()))));
break;
// we have to check this first
bool paste_internally = false;
if (cmd.button() == mouse_button::button2 && cur.selection()) {
- bv->owner()->dispatch(FuncRequest(LFUN_COPY));
+ theApp->lyxFunc().dispatch(FuncRequest(LFUN_COPY));
paste_internally = true;
}
// insert this
if (cmd.button() == mouse_button::button2) {
if (paste_internally)
- bv->owner()->dispatch(FuncRequest(LFUN_PASTE));
+ theApp->lyxFunc().dispatch(FuncRequest(LFUN_PASTE));
else
- bv->owner()->dispatch(FuncRequest(LFUN_PRIMARY_SELECTION_PASTE, "paragraph"));
+ theApp->lyxFunc().dispatch(FuncRequest(LFUN_PRIMARY_SELECTION_PASTE, "paragraph"));
}
break;
case LFUN_ACCENT_HUNGARIAN_UMLAUT:
case LFUN_ACCENT_CIRCLE:
case LFUN_ACCENT_OGONEK:
- bv->owner()->getLyXFunc().handleKeyFunc(cmd.action);
+ theApp->lyxFunc().handleKeyFunc(cmd.action);
if (!cmd.argument().empty())
// FIXME: Are all these characters encoded in one byte in utf8?
bv->getIntl().getTransManager()