From: Abdelrazak Younes Date: Thu, 12 Oct 2006 14:58:57 +0000 (+0000) Subject: preliminar support for multiple LyXView. X-Git-Tag: 1.6.10~12405 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=6b256d52c46a1b19bbced97371a20de62bc5d042;p=features.git preliminar support for multiple LyXView. * LyXFunc: new setLyXView() method * LyXView::dispatch(): call LyXFunc::setLyXView() before lyx::dispatch() What remains to be done is to ensure that every call to lyx::dispatch that is LyXView dependant is replaced with LyXView::dispatch(). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15308 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/LyXView.C b/src/frontends/LyXView.C index 5199a14f0f..aa259905b6 100644 --- a/src/frontends/LyXView.C +++ b/src/frontends/LyXView.C @@ -367,6 +367,7 @@ void LyXView::updateWindowTitle() void LyXView::dispatch(FuncRequest const & cmd) { + theLyXFunc().setLyXView(this); lyx::dispatch(cmd); } diff --git a/src/lyxfunc.C b/src/lyxfunc.C index 798cb199b6..5e09adac34 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -215,6 +215,11 @@ LyXFunc::LyXFunc(LyXView * lv) } +void LyXFunc::setLyXView(LyXView * lv) +{ + owner = lv; +} + void LyXFunc::handleKeyFunc(kb_action action) { char c = encoded_last_key; diff --git a/src/lyxfunc.h b/src/lyxfunc.h index f557e7787a..399d0739d2 100644 --- a/src/lyxfunc.h +++ b/src/lyxfunc.h @@ -46,6 +46,9 @@ public: /// LyX dispatcher, executes lyx actions. void dispatch(FuncRequest const &); + /// + void setLyXView(LyXView * lv); + /// return the status bar state string std::string const viewStatusMessage();