#include "insets/insetcommand.h" // ChangeRefs
#include "insets/inseterror.h"
+#include "insets/updatableinset.h"
#include "support/FileInfo.h"
#include "support/filetools.h"
#include "InsetList.h"
#include "debug.h"
-#include "insets/inset.h"
+#include "insets/updatableinset.h"
#include <algorithm>
/// used by lower_bound and upper_bound
inline
int operator()(InsetList::InsetTable const & a,
- InsetList::InsetTable const & b) const {
+ InsetList::InsetTable const & b) const
+ {
return a.pos < b.pos;
}
};
#include <config.h>
#include "bufferview_funcs.h"
-#include "frontends/LyXView.h"
#include "BufferView.h"
#include "paragraph.h"
#include "lyxfont.h"
#include "author.h"
#include "changes.h"
+#include "frontends/LyXView.h"
#include "frontends/Alert.h"
#include "support/lstrings.h"
+#include "insets/updatableinset.h"
+
#include "BoostFormat.h"
void emph(BufferView * bv)
// Returns the current font and depth as a message.
string const currentState(BufferView * bv)
{
- ostringstream state;
-
if (!bv->available())
return string();
+ ostringstream state;
+
LyXText * text = bv->getLyXText();
Buffer * buffer = bv->buffer();
LyXCursor const & c(text->cursor);
insettoc.C \
insettoc.h \
inseturl.C \
- inseturl.h
+ inseturl.h \
+ updatableinset.C \
+ updatableinset.h
# insetlist.C \
# insetlist.h \
# insetsection.h \
#include "inset.h"
#include "BufferView.h"
-#include "debug.h"
#include "funcrequest.h"
#include "gettext.h"
-#include "lyxcursor.h"
#include "lyxfont.h"
#include "lyxtext.h"
-#include "WordLangTuple.h"
#include "frontends/Painter.h"
#include "frontends/mouse_state.h"
-#include "support/lstrings.h"
#include "support/lstrings.h"
using std::endl;
return bv->workWidth();
}
-// some stuff for inset locking
-
-UpdatableInset::UpdatableInset()
- : Inset(), cursor_visible_(false), block_drawing_(false)
-{}
-
-
-UpdatableInset::UpdatableInset(UpdatableInset const & in, bool same_id)
- : Inset(in, same_id), cursor_visible_(false), block_drawing_(false)
-{}
-
-
-void UpdatableInset::insetUnlock(BufferView *)
-{
- lyxerr[Debug::INFO] << "Inset Unlock" << endl;
-}
-
-
-// An updatable inset is highly editable by definition
-Inset::EDITABLE UpdatableInset::editable() const
-{
- return HIGHLY_EDITABLE;
-}
-
-
-void UpdatableInset::toggleInsetCursor(BufferView *)
-{}
-
-
-void UpdatableInset::showInsetCursor(BufferView *, bool)
-{}
-
-
-void UpdatableInset::hideInsetCursor(BufferView *)
-{}
-
-
-void UpdatableInset::fitInsetCursor(BufferView *) const
-{}
-
-
-void UpdatableInset::edit(BufferView *, int, int, mouse_button::state)
-{}
-
-
-void UpdatableInset::edit(BufferView *, bool)
-{}
-
-
-void UpdatableInset::draw(BufferView *, LyXFont const &,
- int /* baseline */, float & x,
- bool/*cleared*/) const
-{
- x += float(scx);
- // ATTENTION: don't do the following here!!!
- // top_x = int(x);
- // top_baseline = baseline;
-}
-
-
-void UpdatableInset::scroll(BufferView * bv, float s) const
-{
- LyXFont font;
-
- if (!s) {
- scx = 0;
- return;
- }
-
- int const workW = bv->workWidth();
- int const tmp_top_x = top_x - scx;
-
- if (tmp_top_x > 0 &&
- (tmp_top_x + width(bv, font)) < workW)
- return;
- if (s > 0 && top_x > 0)
- return;
-
- // int mx_scx=abs((width(bv,font) - bv->workWidth())/2);
- //int const save_scx = scx;
-
- scx = int(s * workW / 2);
- // if (!display())
- // scx += 20;
-
- if ((tmp_top_x + scx + width(bv, font)) < (workW / 2)) {
- scx += (workW / 2) - (tmp_top_x + scx + width(bv, font));
- }
-
- // bv->updateInset(const_cast<UpdatableInset *>(this), false);
-}
-
-void UpdatableInset::scroll(BufferView * bv, int offset) const
-{
- if (offset > 0) {
- if (!scx && top_x >= 20)
- return;
- if ((top_x + offset) > 20)
- scx = 0;
- // scx += offset - (top_x - scx + offset - 20);
- else
- scx += offset;
- } else {
- LyXFont const font;
- if (!scx && (top_x + width(bv, font)) < (bv->workWidth() - 20))
- return;
- if ((top_x - scx + offset + width(bv, font)) < (bv->workWidth() - 20)) {
- scx = bv->workWidth() - width(bv, font) - top_x + scx - 20;
- } else {
- scx += offset;
- }
- }
-// bv->updateInset(const_cast<UpdatableInset *>(this), false);
-}
-
-
-/// An updatable inset could handle lyx editing commands
-Inset::RESULT UpdatableInset::localDispatch(FuncRequest const & ev)
-{
- if (ev.action == LFUN_MOUSE_RELEASE)
- return (editable() == IS_EDITABLE) ? DISPATCHED : UNDISPATCHED;
-
- if (!ev.argument.empty() && ev.action == LFUN_SCROLL_INSET) {
- if (ev.argument.find('.') != ev.argument.npos) {
- float const xx = static_cast<float>(strToDbl(ev.argument));
- scroll(ev.view(), xx);
- } else {
- int const xx = strToInt(ev.argument);
- scroll(ev.view(), xx);
- }
- ev.view()->updateInset(this, false);
-
- return DISPATCHED;
- }
- return UNDISPATCHED;
-}
-
-
-int UpdatableInset::getMaxWidth(BufferView * bv, UpdatableInset const *) const
-{
- int w;
- if (owner()) {
- w = static_cast<UpdatableInset*>
- (owner())->getMaxWidth(bv, this);
- } else {
- w = bv->text->workWidth(bv, const_cast<UpdatableInset *>(this));
- }
- if (w < 0) {
- return -1;
- }
- // check for margins left/right and extra right margin "const 5"
- if ((w - ((2 * TEXT_TO_INSET_OFFSET) + 5)) >= 0)
- w -= (2 * TEXT_TO_INSET_OFFSET) + 5;
- if (topx_set && owner()) {
- w -= top_x;
- w += owner()->x();
- } else if (owner()) {
- // this is needed as otherwise we might have a too large inset if
- // its top_x afterwards changes to LeftMargin so we try to put at
- // least the default margin as top_x
- w -= 20;
- }
- if (w < 10) {
- w = 10;
- }
- return w;
-}
-
-
-LyXCursor const & Inset::cursor(BufferView * bv) const
-{
- if (owner())
- return owner()->getLyXText(bv, false)->cursor;
- return bv->text->cursor;
-}
-
-
-WordLangTuple const
-UpdatableInset::selectNextWordToSpellcheck(BufferView *bv, float & value) const
-{
- // we have to unlock ourself in this function by default!
- bv->unlockInset(const_cast<UpdatableInset *>(this));
- value = 0;
- return WordLangTuple();
-}
-
-
-bool UpdatableInset::nextChange(BufferView * bv, lyx::pos_type &)
-{
- // we have to unlock ourself in this function by default!
- bv->unlockInset(const_cast<UpdatableInset *>(this));
- return false;
-}
-
-
-bool UpdatableInset::searchForward(BufferView * bv, string const &,
- bool, bool)
-{
- // we have to unlock ourself in this function by default!
- bv->unlockInset(const_cast<UpdatableInset *>(this));
- return false;
-}
-
-
-bool UpdatableInset::searchBackward(BufferView * bv, string const &,
- bool, bool)
-{
- // we have to unlock ourself in this function by default!
- bv->unlockInset(const_cast<UpdatableInset *>(this));
- return false;
-}
return false;
}
-// Updatable Insets. These insets can be locked and receive
-// directly user interaction. Currently used only for mathed.
-// Note that all pure methods from Inset class are pure here too.
-// [Alejandro 080596]
-
-/** Extracted from Matthias notes:
- *
- * An inset can simple call LockInset in it's edit call and *ONLY*
- * in it's edit call.
- *
- * Unlocking is either done by LyX or the inset itself with a
- * UnlockInset-call
- *
- * During the lock, all button and keyboard events will be modified
- * and send to the inset through the following inset-features. Note that
- * Inset::insetUnlock will be called from inside UnlockInset. It is meant
- * to contain the code for restoring the menus and things like this.
- *
- * If a inset wishes any redraw and/or update it just has to call
- * updateInset(this).
- *
- * It's is completly irrelevant, where the inset is. UpdateInset will
- * find it in any paragraph in any buffer.
- * Of course the_locking_inset and the insets in the current paragraph/buffer
- * are checked first, so no performance problem should occur.
- */
-class UpdatableInset : public Inset {
-public:
- ///
- UpdatableInset();
- ///
- UpdatableInset(UpdatableInset const & in, bool same_id = false);
-
- /// check if the font of the char we want inserting is correct
- /// and modify it if it is not.
- virtual bool checkInsertChar(LyXFont &);
- ///
- virtual EDITABLE editable() const;
-
- ///
- virtual void toggleInsetCursor(BufferView *);
- ///
- virtual void showInsetCursor(BufferView *, bool show = true);
- ///
- virtual void hideInsetCursor(BufferView *);
- ///
- virtual void fitInsetCursor(BufferView *) const;
- ///
- virtual void getCursorPos(BufferView *, int &, int &) const {}
- ///
- virtual void insetUnlock(BufferView *);
- ///
- virtual void edit(BufferView *, int x, int y, mouse_button::state button);
- ///
- virtual void edit(BufferView *, bool front = true);
- ///
- virtual void draw(BufferView *, LyXFont const &,
- int baseline, float & x, bool cleared) const;
- ///
- virtual bool insertInset(BufferView *, Inset *) { return false; }
- ///
- virtual UpdatableInset * getLockingInset() const {
- return const_cast<UpdatableInset *>(this);
- }
- ///
- virtual UpdatableInset * getFirstLockingInsetOfType(Inset::Code c)
- { return (c == lyxCode()) ? this : 0; }
- ///
- virtual int insetInInsetY() const { return 0; }
- ///
- virtual bool updateInsetInInset(BufferView *, Inset *)
- { return false; }
- ///
- virtual bool lockInsetInInset(BufferView *, UpdatableInset *)
- { return false; }
- ///
- virtual bool unlockInsetInInset(BufferView *, UpdatableInset *,
- bool /*lr*/ = false)
- { return false; }
- /// An updatable inset could handle lyx editing commands
- virtual RESULT localDispatch(FuncRequest const & cmd);
- ///
- bool isCursorVisible() const { return cursor_visible_; }
- ///
- virtual int getMaxWidth(BufferView * bv, UpdatableInset const *) const;
- ///
- int scroll(bool recursive = true) const {
- // We need this method to not clobber the real method in Inset
- return Inset::scroll(recursive);
- }
- ///
- virtual bool showInsetDialog(BufferView *) const { return false; }
- ///
- virtual void nodraw(bool b) const {
- block_drawing_ = b;
- }
- ///
- virtual bool nodraw() const {
- return block_drawing_;
- }
- ///
- // needed for spellchecking text
- ///
- virtual bool allowSpellcheck() const { return false; }
- ///
- virtual WordLangTuple const
- selectNextWordToSpellcheck(BufferView *, float & value) const;
- ///
- virtual void selectSelectedWord(BufferView *) {}
- ///
- virtual void toggleSelection(BufferView *, bool /*kill_selection*/) {}
-
- /// find the next change in the inset
- virtual bool nextChange(BufferView * bv, lyx::pos_type & length);
-
- ///
- // needed for search/replace functionality
- ///
- virtual bool searchForward(BufferView *, string const &,
- bool = true, bool = false);
- ///
- virtual bool searchBackward(BufferView *, string const &,
- bool = true, bool = false);
-
-
-protected:
- ///
- void toggleCursorVisible() const {
- cursor_visible_ = !cursor_visible_;
- }
- ///
- void setCursorVisible(bool b) const {
- cursor_visible_ = b;
- }
- /// scrolls to absolute position in bufferview-workwidth * sx units
- void scroll(BufferView *, float sx) const;
- /// scrolls offset pixels
- void scroll(BufferView *, int offset) const;
-
-private:
- ///
- mutable bool cursor_visible_;
- ///
- mutable bool block_drawing_;
-};
-
-inline
-bool UpdatableInset::checkInsertChar(LyXFont &)
-{
- return true;
-}
-
/**
* returns true if pointer argument is valid
* and points to an editable inset
#define INSETTEXT_H
-#include "inset.h"
+#include "updatableinset.h"
#include "LString.h"
#include "LColor.h"
#include "ParagraphList.h"
--- /dev/null
+
+#include "updatableinset.h"
+#include "BufferView.h"
+#include "funcrequest.h"
+#include "debug.h"
+#include "lyxfont.h"
+#include "WordLangTuple.h"
+#include "lyxtext.h"
+#include "support/lstrings.h"
+
+
+// some stuff for inset locking
+
+UpdatableInset::UpdatableInset()
+ : Inset(), cursor_visible_(false), block_drawing_(false)
+{}
+
+
+UpdatableInset::UpdatableInset(UpdatableInset const & in, bool same_id)
+ : Inset(in, same_id), cursor_visible_(false), block_drawing_(false)
+{}
+
+
+void UpdatableInset::insetUnlock(BufferView *)
+{
+ lyxerr[Debug::INFO] << "Inset Unlock" << endl;
+}
+
+
+// An updatable inset is highly editable by definition
+Inset::EDITABLE UpdatableInset::editable() const
+{
+ return HIGHLY_EDITABLE;
+}
+
+
+void UpdatableInset::toggleInsetCursor(BufferView *)
+{}
+
+
+void UpdatableInset::showInsetCursor(BufferView *, bool)
+{}
+
+
+void UpdatableInset::hideInsetCursor(BufferView *)
+{}
+
+
+void UpdatableInset::fitInsetCursor(BufferView *) const
+{}
+
+
+void UpdatableInset::edit(BufferView *, int, int, mouse_button::state)
+{}
+
+
+void UpdatableInset::edit(BufferView *, bool)
+{}
+
+
+void UpdatableInset::draw(BufferView *, LyXFont const &,
+ int /* baseline */, float & x,
+ bool/*cleared*/) const
+{
+ x += float(scx);
+ // ATTENTION: don't do the following here!!!
+ // top_x = int(x);
+ // top_baseline = baseline;
+}
+
+
+void UpdatableInset::scroll(BufferView * bv, float s) const
+{
+ LyXFont font;
+
+ if (!s) {
+ scx = 0;
+ return;
+ }
+
+ int const workW = bv->workWidth();
+ int const tmp_top_x = top_x - scx;
+
+ if (tmp_top_x > 0 &&
+ (tmp_top_x + width(bv, font)) < workW)
+ return;
+ if (s > 0 && top_x > 0)
+ return;
+
+ // int mx_scx=abs((width(bv,font) - bv->workWidth())/2);
+ //int const save_scx = scx;
+
+ scx = int(s * workW / 2);
+ // if (!display())
+ // scx += 20;
+
+ if ((tmp_top_x + scx + width(bv, font)) < (workW / 2)) {
+ scx += (workW / 2) - (tmp_top_x + scx + width(bv, font));
+ }
+
+ // bv->updateInset(const_cast<UpdatableInset *>(this), false);
+}
+
+void UpdatableInset::scroll(BufferView * bv, int offset) const
+{
+ if (offset > 0) {
+ if (!scx && top_x >= 20)
+ return;
+ if ((top_x + offset) > 20)
+ scx = 0;
+ // scx += offset - (top_x - scx + offset - 20);
+ else
+ scx += offset;
+ } else {
+ LyXFont const font;
+ if (!scx && (top_x + width(bv, font)) < (bv->workWidth() - 20))
+ return;
+ if ((top_x - scx + offset + width(bv, font)) < (bv->workWidth() - 20)) {
+ scx = bv->workWidth() - width(bv, font) - top_x + scx - 20;
+ } else {
+ scx += offset;
+ }
+ }
+// bv->updateInset(const_cast<UpdatableInset *>(this), false);
+}
+
+
+/// An updatable inset could handle lyx editing commands
+Inset::RESULT UpdatableInset::localDispatch(FuncRequest const & ev)
+{
+ if (ev.action == LFUN_MOUSE_RELEASE)
+ return (editable() == IS_EDITABLE) ? DISPATCHED : UNDISPATCHED;
+
+ if (!ev.argument.empty() && ev.action == LFUN_SCROLL_INSET) {
+ if (ev.argument.find('.') != ev.argument.npos) {
+ float const xx = static_cast<float>(strToDbl(ev.argument));
+ scroll(ev.view(), xx);
+ } else {
+ int const xx = strToInt(ev.argument);
+ scroll(ev.view(), xx);
+ }
+ ev.view()->updateInset(this, false);
+
+ return DISPATCHED;
+ }
+ return UNDISPATCHED;
+}
+
+
+int UpdatableInset::getMaxWidth(BufferView * bv, UpdatableInset const *) const
+{
+ int w;
+ if (owner()) {
+ w = static_cast<UpdatableInset*>
+ (owner())->getMaxWidth(bv, this);
+ } else {
+ w = bv->text->workWidth(bv, const_cast<UpdatableInset *>(this));
+ }
+ if (w < 0) {
+ return -1;
+ }
+ // check for margins left/right and extra right margin "const 5"
+ if ((w - ((2 * TEXT_TO_INSET_OFFSET) + 5)) >= 0)
+ w -= (2 * TEXT_TO_INSET_OFFSET) + 5;
+ if (topx_set && owner()) {
+ w -= top_x;
+ w += owner()->x();
+ } else if (owner()) {
+ // this is needed as otherwise we might have a too large inset if
+ // its top_x afterwards changes to LeftMargin so we try to put at
+ // least the default margin as top_x
+ w -= 20;
+ }
+ if (w < 10) {
+ w = 10;
+ }
+ return w;
+}
+
+
+LyXCursor const & Inset::cursor(BufferView * bv) const
+{
+ if (owner())
+ return owner()->getLyXText(bv, false)->cursor;
+ return bv->text->cursor;
+}
+
+
+WordLangTuple const
+UpdatableInset::selectNextWordToSpellcheck(BufferView *bv, float & value) const
+{
+ // we have to unlock ourself in this function by default!
+ bv->unlockInset(const_cast<UpdatableInset *>(this));
+ value = 0;
+ return WordLangTuple();
+}
+
+
+bool UpdatableInset::nextChange(BufferView * bv, lyx::pos_type &)
+{
+ // we have to unlock ourself in this function by default!
+ bv->unlockInset(const_cast<UpdatableInset *>(this));
+ return false;
+}
+
+
+bool UpdatableInset::searchForward(BufferView * bv, string const &,
+ bool, bool)
+{
+ // we have to unlock ourself in this function by default!
+ bv->unlockInset(const_cast<UpdatableInset *>(this));
+ return false;
+}
+
+
+bool UpdatableInset::searchBackward(BufferView * bv, string const &,
+ bool, bool)
+{
+ // we have to unlock ourself in this function by default!
+ bv->unlockInset(const_cast<UpdatableInset *>(this));
+ return false;
+}
--- /dev/null
+// -*- C++ -*-
+/**
+ * \file insetupdatable.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author Alejandro Aguilar Sierra
+ * \author Jürgen Vigna
+ * \author Lars Gullik Bjønnes
+ * \author Matthias Ettrich
+ *
+ * Full author contact details are available in file CREDITS
+ */
+
+#ifndef UPDATABLEINSET_H
+#define UPDATABLEINSET_H
+
+// Updatable Insets. These insets can be locked and receive
+// directly user interaction. Currently used only for mathed.
+// Note that all pure methods from Inset class are pure here too.
+// [Alejandro 080596]
+
+#include "inset.h"
+
+
+/** Extracted from Matthias notes:
+ *
+ * An inset can simple call LockInset in it's edit call and *ONLY*
+ * in it's edit call.
+ *
+ * Unlocking is either done by LyX or the inset itself with a
+ * UnlockInset-call
+ *
+ * During the lock, all button and keyboard events will be modified
+ * and send to the inset through the following inset-features. Note that
+ * Inset::insetUnlock will be called from inside UnlockInset. It is meant
+ * to contain the code for restoring the menus and things like this.
+ *
+ * If a inset wishes any redraw and/or update it just has to call
+ * updateInset(this).
+ *
+ * It's is completly irrelevant, where the inset is. UpdateInset will
+ * find it in any paragraph in any buffer.
+ * Of course the_locking_inset and the insets in the current paragraph/buffer
+ * are checked first, so no performance problem should occur.
+ */
+class UpdatableInset : public Inset {
+public:
+ ///
+ UpdatableInset();
+ ///
+ UpdatableInset(UpdatableInset const & in, bool same_id = false);
+
+ /// check if the font of the char we want inserting is correct
+ /// and modify it if it is not.
+ virtual bool checkInsertChar(LyXFont &);
+ ///
+ virtual EDITABLE editable() const;
+
+ ///
+ virtual void toggleInsetCursor(BufferView *);
+ ///
+ virtual void showInsetCursor(BufferView *, bool show = true);
+ ///
+ virtual void hideInsetCursor(BufferView *);
+ ///
+ virtual void fitInsetCursor(BufferView *) const;
+ ///
+ virtual void getCursorPos(BufferView *, int &, int &) const {}
+ ///
+ virtual void insetUnlock(BufferView *);
+ ///
+ virtual void edit(BufferView *, int x, int y, mouse_button::state button);
+ ///
+ virtual void edit(BufferView *, bool front = true);
+ ///
+ virtual void draw(BufferView *, LyXFont const &,
+ int baseline, float & x, bool cleared) const;
+ ///
+ virtual bool insertInset(BufferView *, Inset *) { return false; }
+ ///
+ virtual UpdatableInset * getLockingInset() const {
+ return const_cast<UpdatableInset *>(this);
+ }
+ ///
+ virtual UpdatableInset * getFirstLockingInsetOfType(Inset::Code c)
+ { return (c == lyxCode()) ? this : 0; }
+ ///
+ virtual int insetInInsetY() const { return 0; }
+ ///
+ virtual bool updateInsetInInset(BufferView *, Inset *)
+ { return false; }
+ ///
+ virtual bool lockInsetInInset(BufferView *, UpdatableInset *)
+ { return false; }
+ ///
+ virtual bool unlockInsetInInset(BufferView *, UpdatableInset *,
+ bool /*lr*/ = false)
+ { return false; }
+ /// An updatable inset could handle lyx editing commands
+ virtual RESULT localDispatch(FuncRequest const & cmd);
+ ///
+ bool isCursorVisible() const { return cursor_visible_; }
+ ///
+ virtual int getMaxWidth(BufferView * bv, UpdatableInset const *) const;
+ ///
+ int scroll(bool recursive = true) const {
+ // We need this method to not clobber the real method in Inset
+ return Inset::scroll(recursive);
+ }
+ ///
+ virtual bool showInsetDialog(BufferView *) const { return false; }
+ ///
+ virtual void nodraw(bool b) const {
+ block_drawing_ = b;
+ }
+ ///
+ virtual bool nodraw() const {
+ return block_drawing_;
+ }
+ ///
+ // needed for spellchecking text
+ ///
+ virtual bool allowSpellcheck() const { return false; }
+ ///
+ virtual WordLangTuple const
+ selectNextWordToSpellcheck(BufferView *, float & value) const;
+ ///
+ virtual void selectSelectedWord(BufferView *) {}
+ ///
+ virtual void toggleSelection(BufferView *, bool /*kill_selection*/) {}
+
+ /// find the next change in the inset
+ virtual bool nextChange(BufferView * bv, lyx::pos_type & length);
+
+ ///
+ // needed for search/replace functionality
+ ///
+ virtual bool searchForward(BufferView *, string const &,
+ bool = true, bool = false);
+ ///
+ virtual bool searchBackward(BufferView *, string const &,
+ bool = true, bool = false);
+
+
+ ///
+ BufferView * view() const;
+ ///
+ void setView(BufferView * bv) const;
+
+protected:
+ ///
+ void toggleCursorVisible() const {
+ cursor_visible_ = !cursor_visible_;
+ }
+ ///
+ void setCursorVisible(bool b) const {
+ cursor_visible_ = b;
+ }
+ /// scrolls to absolute position in bufferview-workwidth * sx units
+ void scroll(BufferView *, float sx) const;
+ /// scrolls offset pixels
+ void scroll(BufferView *, int offset) const;
+
+private:
+ ///
+ mutable bool cursor_visible_;
+ ///
+ mutable bool block_drawing_;
+};
+
+inline
+bool UpdatableInset::checkInsertChar(LyXFont &)
+{
+ return true;
+}
+
+#endif
#define INSET_FORMULABASE_H
-#include "insets/inset.h"
+#include "insets/updatableinset.h"
#include "frontends/mouse_state.h"
#include "lyxfont.h"
#include "lyxtext.h"
#include "BufferView.h"
#include "buffer.h"
-#include "insets/inset.h"
+#include "insets/updatableinset.h"
#include "debug.h"
#include "support/LAssert.h"