/// is there a change within the given range ?
bool isChanged(pos_type start, pos_type end) const;
+ /// is there an insertion at the given pos ?
+ bool isInserted(pos_type pos) const {
+ return lookupChange(pos).type == Change::INSERTED;
+ }
/// is there a deletion at the given pos ?
bool isDeleted(pos_type pos) const {
return lookupChange(pos).type == Change::DELETED;
///
void applyLayout(LyXLayout_ptr const & new_layout);
- /// erase the char at the given position
+ /// (logically) erase the char at pos; return true if it was actually erased
bool eraseChar(pos_type pos, bool trackChanges);
- /// erase the given range. Returns the number of chars actually erased
- int erase(pos_type start, pos_type end, bool trackChanges);
+ /// (logically) erase the given range; return the number of chars actually erased
+ int eraseChars(pos_type start, pos_type end, bool trackChanges);
/** Get uninstantiated font setting. Returns the difference
between the characters font and the layoutfont.
LyXFont_size highestFontInRange(pos_type startpos,
pos_type endpos, LyXFont_size def_size) const;
///
- void insert(pos_type pos, std::string const & str,
+ void insert(pos_type pos, docstring const & str,
LyXFont const & font, Change const & change);
///
void insertChar(pos_type pos, value_type c, bool trackChanges);