void setSelection(DocIterator const & where, int n);
///
void clearSelection();
+ /// check whether selection contains specific type of inset
+ /// returns 0 if no selection was made
+ bool insetInSelection(InsetCode const & inset);
+ /// count occurences of specific inset type in the selection
+ /// returns 0 if no selection was made
+ int countInsetsInSelection(InsetCode const & inset);
/// access to normalized selection anchor
CursorSlice normalAnchor() const;
/// Repopulate the slices insets from bottom to top. Useful
/// for stable iterators or Undo data.
void sanitize();
- ///
- bool isInside(Inset const *) const;
- /// make sure we are outside of given inset
- void leaveInset(Inset const & inset);
///
- bool textUndo();
+ bool undoAction();
///
- bool textRedo();
+ bool redoAction();
/// makes sure the next operation will be stored
void finishUndo() const;
// FIXME: make them private
public:
- /// the current font settings
+ /// The current font settings. This holds the settings for output.
Font current_font;
- /// the current font
+ /// The current display font. This holds the settings of the text
+ /// in the workarea.
Font real_current_font;
};
void push(Inset & inset);
/// add a new cursor slice, place cursor at front (move backwards)
void pushBackward(Inset & inset);
+ /// try to put cursor in inset before it in entry cell, or next one
+ /// if it is not empty, or exit the slice if there is no next one.
+ void editInsertedInset();
+
/// pop one level off the cursor
void pop();
/// pop one slice off the cursor stack and go backwards
void undispatched() const;
/// the event was already dispatched
void dispatched() const;
- /// Set which screen update should be done
+
+ /// Describe the screen update that should be done
void screenUpdateFlags(Update::flags f) const;
- /// Forces an updateBuffer() call
- void forceBufferUpdate() const;
- /// Removes any pending updateBuffer() call
- void clearBufferUpdate() const;
- /// Do we need to call updateBuffer()?
- bool needBufferUpdate() const;
/**
- * don't call update() when done
+ * Reset update flags to Update::None.
*
* Should only be called by an inset's doDispatch() method. It means:
* I handled that request and I can reassure you that the screen does
*/
void noScreenUpdate() const;
+ /// Forces an updateBuffer() call
+ void forceBufferUpdate() const;
+ /// Removes any pending updateBuffer() call
+ void clearBufferUpdate() const;
+ /// Do we need to call updateBuffer()?
+ bool needBufferUpdate() const;
+
/// Repopulate the slices insets from bottom to top. Useful
/// for stable iterators or Undo data.
void sanitize();
/// the name of the macro we are currently inputting
docstring macroName();
-
/// replace selected stuff with at, placing the former
// selection in entry cell of atom
void handleNest(MathAtom const & at);
- /// replace selected stuff with at, placing the former
- // selection in given cell of atom
- void handleNest(MathAtom const & at, int cell);
/// make sure cursor position is valid
/// FIXME: It does a subset of fixIfBroken. Maybe merge them?