3 * \file updatableinset.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Alejandro Aguilar Sierra
9 * \author Lars Gullik Bjønnes
10 * \author Matthias Ettrich
12 * Full author contact details are available in file CREDITS.
15 #ifndef UPDATABLEINSET_H
16 #define UPDATABLEINSET_H
18 // Updatable Insets. These insets can receive directly user interaction.
19 // Note that all pure methods from Inset class are pure here too.
24 class UpdatableInset : public InsetOld {
27 virtual EDITABLE editable() const;
29 /// return the cursor pos, relative to the inset pos
30 virtual void getCursorPos(int &, int &) const {}
31 /// return the cursor dim
32 virtual void getCursorDim(int &, int &) const;
33 // We need this method to not clobber the real method in Inset
34 int scroll(bool recursive = true) const
35 { return InsetOld::scroll(recursive); }
37 virtual bool showInsetDialog(BufferView *) const { return false; }
39 virtual void toggleSelection(BufferView *, bool /*kill_selection*/) {}
42 /// An updatable inset could handle lyx editing commands
45 priv_dispatch(FuncRequest const & cmd, idx_type &, pos_type &);
46 /// scrolls to absolute position in bufferview-workwidth * sx units
47 void scroll(BufferView *, float sx) const;
48 /// scrolls offset pixels
49 void scroll(BufferView *, int offset) const;