4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Lars Gullik Bjønnes
10 * Full author contact details are available in file CREDITS.
16 #include "support/strfwd.h"
20 namespace support { class FileName; }
33 * LyXView - main LyX window
35 * This class represents the main LyX window and provides
36 * accessor functions to its content.
38 * The eventual intention is that LyX will support a number
39 * of containing LyXViews. Currently a lot of code still
40 * relies on there being a single top-level view.
42 * Additionally we would like to support multiple views
43 * in a single LyXView.
51 /// \name Generic accessor functions
53 /// The current BufferView refers to the BufferView that has the focus,
54 /// including for example the one that is created when you use the
55 /// advanced search and replace pane.
56 /// \return the currently selected buffer view.
57 virtual BufferView * currentBufferView() = 0;
58 virtual BufferView const * currentBufferView() const = 0;
60 /// The document BufferView always refers to the view's main document
61 /// BufferView. So, even if the BufferView in e.g., the advanced
62 /// search and replace pane has the focus.
63 /// \return the current document buffer view.
64 virtual BufferView * documentBufferView() = 0;
65 virtual BufferView const * documentBufferView() const = 0;
68 /// display a message in the view
69 virtual void message(docstring const &) = 0;
72 virtual bool getStatus(FuncRequest const & cmd, FuncStatus & flag) = 0;
74 /// \return true if the \c FuncRequest has been dispatched.
75 virtual void dispatch(FuncRequest const & cmd, DispatchResult & dr) = 0;
78 virtual void restartCursor() = 0;
80 /// Update the completion popup and the inline completion state.
81 /// If \c start is true, then a new completion might be started.
82 /// If \c keep is true, an active completion will be kept active
83 /// even though the cursor moved. The update flags of \c cur might
85 virtual void updateCompletion(Cursor & cur, bool start, bool keep) = 0;
88 } // namespace frontend