Hello,
I don't think there would be any objection to this patch but I'll wait
till the end of the day before committing. After this patch the
BufferView.h and BufferView_pimpl.h headers are pretty similar. So,
unless there is a strong objection I will put the cursor handling out of
the pimpl and then merge the two classes when I get some free time.
Abdel.
Index: BufferView.C
===================================================================
--- BufferView.C (revision 14252)
+++ BufferView.C (working copy)
@@ -214,7 +214,7 @@
string const BufferView::getClipboard() const
{
- return pimpl_->clipboard().get();
+ return pimpl_->gui().clipboard().get();
}
@@ -340,7 +340,7 @@
void BufferView::haveSelection(bool sel)
{
- pimpl_->clipboard().haveSelection(sel);
+ pimpl_->gui().clipboard().haveSelection(sel);
}
Index: BufferView_pimpl.C
===================================================================
--- BufferView_pimpl.C (revision 14252)
+++ BufferView_pimpl.C (working copy)
@@ -319,18 +319,6 @@
}
-lyx::frontend::WorkArea & BufferView::Pimpl::workarea() const
-{
- return *workArea_;
-}
-
-
-lyx::frontend::Clipboard & BufferView::Pimpl::clipboard() const
-{
- return owner_->gui().clipboard();
-}
-
-
lyx::frontend::Painter & BufferView::Pimpl::painter() const
{
return workArea_->getPainter();
@@ -638,7 +626,7 @@
xsel_cache_.set = cur.selection();
sel = cur.selectionAsString(false);
if (!sel.empty())
- clipboard().put(sel);
+ owner_->gui().clipboard().put(sel);
}
}
@@ -886,7 +874,7 @@
void BufferView::Pimpl::stuffClipboard(string const & content) const
{
- clipboard().put(content);
+ owner_->gui().clipboard().put(content);
}
Index: BufferView_pimpl.h
===================================================================
--- BufferView_pimpl.h (revision 14252)
+++ BufferView_pimpl.h (working copy)
@@ -22,20 +22,14 @@
#include "cursor.h"
#include "errorlist.h"
-#include "insets/inset.h"
-
-#include "frontends/key_state.h"
#include "frontends/LyXKeySym.h"
#include "frontends/Timeout.h"
#include "support/types.h"
-#include <boost/scoped_ptr.hpp>
-#include <boost/shared_ptr.hpp>
#include <boost/signals/trackable.hpp>
class Change;
-class LyXKeySym;
class LyXView;
class FuncRequest;
@@ -46,9 +40,7 @@
namespace frontend {
class Gui;
class WorkArea;
-class Clipboard;
class Painter;
-class GuiCursor;
}
}
@@ -121,10 +113,6 @@
/// the frontend
lyx::frontend::Gui & gui() const;
- /// our workarea
- lyx::frontend::WorkArea & workarea() const;
- /// the clipboard
- lyx::frontend::Clipboard & clipboard() const;
/// Width and height of the BufferView in Pixels
/**