#include "FuncCode.h"
+#include "insets/InsetCode.h"
+
#include "support/strfwd.h"
#include <QString>
class Buffer;
class BufferView;
class FuncRequest;
+class Inset;
namespace frontend {
/// \param data is a string encoding of the data to be displayed.
/// It is passed to the Controller to be translated into a useable form.
virtual void showData(std::string const & data);
- virtual void updateData(std::string const & data);
//@}
+ /// \return inset at current cursor location.
+ Inset const * inset(InsetCode code) const;
+
/** Check whether we may apply our data.
*
* The buttons are disabled if not and (re-)enabled if yes.
/// Hide the dialog from sight
void hideView();
- /// Create the dialog if necessary, update it and display it.
+ /// Prepare dialog and display it.
void showView();
+ /// Prepare dialog before view.
+ void prepareView();
+
+ /// Decide wether the dialog should grab thekeyboard focus when shown.
+ /// This method defaults to true, override if a different behaviour
+ /// is wanted.
+ virtual bool wantInitialFocus() const { return true; }
+
/// Update the display of the dialog whilst it is still visible.
virtual void updateView() = 0;
*/
virtual bool disconnectOnApply() const { return false; }
- /** \return true if Dialog::View::show() should not display the dialog
- * after running update. Currently, only ControlSpellchecker
- * makes use of that.
- */
- virtual bool exitEarly() const { return false; }
//@}
/** \c Kernel part: a wrapper making the LyX kernel available to the dialog.
* stored by the dialog are not applied to the inset currently
* connected to the dialog. Instead, they will be used to generate
* a new inset at the cursor position.
- * \param name is used to identify the dialog to the kernel.
*/
void disconnect() const;
* We should aim to reduce/remove these from the interface.
*/
//@{
- GuiView & lyxview() { return *lyxview_; }
GuiView const & lyxview() const { return *lyxview_; }
-
- Buffer & buffer();
Buffer const & buffer() const;
-
- BufferView * bufferview();
BufferView const * bufferview() const;
//@}