class LyXView
{
public:
- ///
- LyXView() {}
///
virtual ~LyXView() {}
- ///
- virtual int id() const = 0;
-
- /// show busy cursor
- virtual void setBusy(bool) = 0;
//@{ generic accessor functions
- /// \return the current buffer view.
- virtual BufferView * view() = 0;
-
- /// \return the buffer currently shown in this window
- virtual Buffer * buffer() = 0;
- virtual Buffer const * buffer() const = 0;
- /// set a buffer to the current workarea.
- virtual void setBuffer(Buffer * b) = 0; ///< \c Buffer to set.
- ///
- virtual bool closeBuffer() = 0;
- ///
- virtual bool closeBufferAll(bool tolastopened = false) = 0;
- ///
- virtual bool hasFocus() const = 0;
-
- /// load a document into the current workarea.
- virtual Buffer * loadDocument(
- support::FileName const & name, ///< File to load.
- bool tolastfiles = true ///< append to the "Open recent" menu?
- ) = 0;
- ///
- virtual void newDocument(std::string const & filename,
- bool fromTemplate) = 0;
-
+ /// \return the currently selected buffer view.
+ virtual BufferView * currentBufferView() = 0;
+ virtual BufferView const * currentBufferView() const = 0;
+ /// \return the current document buffer view.
+ virtual BufferView * documentBufferView() = 0;
+ virtual BufferView const * documentBufferView() const = 0;
//@}
/// display a message in the view
/// even though the cursor moved. The update flags of \c cur might
/// be changed.
virtual void updateCompletion(Cursor & cur, bool start, bool keep) = 0;
-
-private:
- /// noncopyable
- LyXView(LyXView const &);
- void operator=(LyXView const &);
};
} // namespace frontend