* de.po: sync with branch.
[lyx.git] / src / frontends / LyXView.h
blob6813d759bd6f6bc7b2158241cb9ee7f8e9436c39
1 // -*- C++ -*-
2 /**
3 * \file LyXView.h
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
8 * \author John Levon
10 * Full author contact details are available in file CREDITS.
13 #ifndef LYXVIEW_H
14 #define LYXVIEW_H
16 #include "support/strfwd.h"
18 namespace lyx {
20 namespace support { class FileName; }
22 class Buffer;
23 class BufferView;
24 class Cursor;
25 class FuncStatus;
26 class FuncRequest;
27 class Inset;
29 namespace frontend {
31 /**
32 * LyXView - main LyX window
34 * This class represents the main LyX window and provides
35 * accessor functions to its content.
37 * The eventual intention is that LyX will support a number
38 * of containing LyXViews. Currently a lot of code still
39 * relies on there being a single top-level view.
41 * Additionally we would like to support multiple views
42 * in a single LyXView.
44 class LyXView
46 public:
47 ///
48 virtual ~LyXView() {}
50 //@{ generic accessor functions
52 /// \return the currently selected buffer view.
53 virtual BufferView * currentBufferView() = 0;
54 virtual BufferView const * currentBufferView() const = 0;
55 /// \return the current document buffer view.
56 virtual BufferView * documentBufferView() = 0;
57 virtual BufferView const * documentBufferView() const = 0;
58 //@}
60 /// display a message in the view
61 virtual void message(docstring const &) = 0;
63 ///
64 virtual bool getStatus(FuncRequest const & cmd, FuncStatus & flag) = 0;
65 /// dispatch command.
66 /// \return true if the \c FuncRequest has been dispatched.
67 virtual bool dispatch(FuncRequest const & cmd) = 0;
69 ///
70 virtual void restartCursor() = 0;
72 /// Update the completion popup and the inline completion state.
73 /// If \c start is true, then a new completion might be started.
74 /// If \c keep is true, an active completion will be kept active
75 /// even though the cursor moved. The update flags of \c cur might
76 /// be changed.
77 virtual void updateCompletion(Cursor & cur, bool start, bool keep) = 0;
80 } // namespace frontend
81 } // namespace lyx
83 #endif // LYXVIEW_H