4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Angus Leeming
9 * Full author contact details are available in file CREDITS.
24 /** \c Kernel is a wrapper making the LyX kernel available to the dialog.
25 * (Ie, it provides an interface to the Model part of the Model-Controller-
27 * In an ideal world, it will shrink as more info is passed to the
28 * Dialog::show() and Dialog::update() methods.
32 /// \param lv is the access point for the dialog to the LyX kernel.
35 /** This method is the primary puypose of the class. It provides
36 * the "gateway" by which the dialog can send a request (of a
37 * change in the data, for more information) to the kernel.
38 * \param fr is the encoding of the request.
39 * \param verbose is set to true if the completed action should
40 * be displayed in the minibuffer.
42 void dispatch(FuncRequest const & fr, bool verbose = false) const;
44 /** The dialog has received a request from the user
45 * (who pressed the "Restore" buuton) to update contents.
46 * It must, therefore, ask the kernel to provide this information.
47 * \param name is used to identify the dialog to the kernel.
49 void updateDialog(std::string const & name) const;
51 /** A request from the Controller that future changes to the data
52 * stored by the dialog are not applied to the inset currently
53 * connected to the dialog. Instead, they will be used to generate
54 * a new inset at the cursor position.
55 * \param name is used to identify the dialog to the kernel.
57 void disconnect(std::string const & name) const;
59 /** \name Kernel Wrappers
60 * Simple wrapper functions to Buffer methods.
63 bool isBufferAvailable() const;
64 bool isBufferReadonly() const;
65 std::string const bufferFilepath() const;
68 /** \enum DocTypes used to flag the different kinds of buffer
69 * without making the kernel header files available to the
70 * dialog's Controller or View.
78 /// The type of the current buffer.
79 DocTypes docType() const;
82 /** \name Kernel Nasties
83 * Unpleasantly public internals of the LyX kernel.
84 * We should aim to reduce/remove these from the interface.
87 LyXView & lyxview() { return lyxview_; }
88 LyXView const & lyxview() const { return lyxview_; }
91 Buffer const & buffer() const;
93 BufferView * bufferview();
94 BufferView const * bufferview() const;