checkInsertChar() return values changes

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3058 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Allan Rae 2001-11-22 07:29:54 +00:00
parent a0a3586e88
commit 2cdf2dfc38
3 changed files with 16 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2001-11-22 Allan Rae <rae@lyx.org>
* insetcollapsable.h:
* inset.h: Changes to checkInsertChar() behaviour.
Now return value indicates whether chars can be inserted.
2001-11-11 Michael A. Koziarski <michael@koziarski.org>
* various: updated to use the new LaTeXFeatures

View File

@ -335,7 +335,7 @@ bool Inset::insetAllowed(Inset * in) const
inline
bool Inset::checkInsertChar(LyXFont &)
{
return true;
return false;
}
// Updatable Insets. These insets can be locked and receive
@ -405,6 +405,9 @@ public:
///
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;
@ -520,6 +523,12 @@ private:
mutable bool block_drawing_;
};
inline
bool UpdatableInset::checkInsertChar(LyXFont &)
{
return true;
}
/**
* returns true if pointer argument is valid
* and points to an editable inset

View File

@ -189,9 +189,6 @@ public:
bool const & cs = true, bool const & mw = false);
bool searchBackward(BufferView * bv, string const & str,
bool const & cs = true, bool const & mw = false);
/// check if the font of the char we want inserting is correct
/// and modify it if it is not.
virtual bool checkInsertChar(LyXFont &) { return false; }
protected:
///