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
This commit is contained in:
Abdelrazak Younes 2006-10-12 14:58:57 +00:00
parent 7f93cfe8e9
commit 6b256d52c4
3 changed files with 9 additions and 0 deletions

View File

@ -367,6 +367,7 @@ void LyXView::updateWindowTitle()
void LyXView::dispatch(FuncRequest const & cmd) void LyXView::dispatch(FuncRequest const & cmd)
{ {
theLyXFunc().setLyXView(this);
lyx::dispatch(cmd); lyx::dispatch(cmd);
} }

View File

@ -215,6 +215,11 @@ LyXFunc::LyXFunc(LyXView * lv)
} }
void LyXFunc::setLyXView(LyXView * lv)
{
owner = lv;
}
void LyXFunc::handleKeyFunc(kb_action action) void LyXFunc::handleKeyFunc(kb_action action)
{ {
char c = encoded_last_key; char c = encoded_last_key;

View File

@ -46,6 +46,9 @@ public:
/// LyX dispatcher, executes lyx actions. /// LyX dispatcher, executes lyx actions.
void dispatch(FuncRequest const &); void dispatch(FuncRequest const &);
///
void setLyXView(LyXView * lv);
/// return the status bar state string /// return the status bar state string
std::string const viewStatusMessage(); std::string const viewStatusMessage();