class FuncRequest;
namespace lyx {
-
namespace frontend {
class Gui;
-} // namespace frontend
-
-namespace frontend {
+class WorkArea;
class ControlCommandBuffer;
} // namespace frontend
class LyXView : public boost::signals::trackable, boost::noncopyable {
public:
- LyXView();
+ LyXView(lyx::frontend::Gui & owner);
virtual ~LyXView();
+ void setWorkArea(lyx::frontend::WorkArea * work_area);
/**
* This is called after the concrete view has been created.
* We have to have the toolbar and the other stuff created
Returned as a shared_ptr so that anything wanting to cache the
buffer view can do so safely using a boost::weak_ptr.
*/
- boost::shared_ptr<BufferView> const & view() const;
+ BufferView * view() const;
/// return the buffer currently shown in this window
Buffer * buffer() const;
*/
Buffer const * const updateInset(InsetBase const *) const;
- // returns true if this view has the focus.
+ /// returns true if this view has the focus.
virtual bool hasFocus() const = 0;
- virtual lyx::frontend::Gui & gui() = 0;
+ ///
+ virtual lyx::frontend::Gui & gui();
+
+ lyx::frontend::WorkArea * workArea() const { return work_area_; }
+ /// Temporary method used by the kernel to redraw the work area.
+ virtual void redrawWorkArea();
protected:
- /// view of a buffer. Eventually there will be several.
- boost::shared_ptr<BufferView> bufferview_;
+ /// current work area (screen view of a BufferView).
+ /**
+ \todo FIXME: there is only one workArea per LyXView for now.
+ */
+ lyx::frontend::WorkArea * work_area_;
/// view's menubar
boost::scoped_ptr<Menubar> menubar_;
private:
+ lyx::frontend::Gui & owner_;
/**
* setWindowTitle - set title of window
* @param t main window title