int countInsetsInSelection(InsetCode const & inset) const;
/// access to normalized selection anchor
+ // FIXME: this should return a full DocIterator
CursorSlice normalAnchor() const;
/// access to real selection anchor
DocIterator const & realAnchor() const { return anchor_; }
void setTargetX();
/// clear targetX, i.e. set it to -1
void clearTargetX();
+ /// return x position of latest mouse press or -1 if unset
+ int xClickPos() const { return x_clickpos_; }
+ /// return y position of latest mouse press or -1 if unset
+ int yClickPos() const { return y_clickpos_; }
+ /// register mouse press coordinates
+ void setClickPos(int x, int y);
/// set offset to actual position - targetX
void updateTextTargetOffset();
/// distance between actual and targeted position during last up/down in text
int x_target_;
/// if a x_target cannot be hit exactly in a text, put the difference here
int textTargetOffset_;
+ /// Exact position of mouse click
+ int x_clickpos_;
+ int y_clickpos_;
/// position before dispatch started
DocIterator beforeDispatchCursor_;
/// cursor screen coordinates before dispatch started
/// return true if fullscreen update is needed
bool down();
/// move up/down in a text inset, called for LFUN_UP/DOWN,
- /// return true if successful, updateNeeded set to true if fullscreen
- /// update is needed, otherwise it's not touched
- bool upDownInText(bool up, bool & updateNeeded);
+ /// return true if fullscreen update is needed
+ bool upDownInText(bool up);
/// move up/down in math or any non text inset, call for LFUN_UP/DOWN
/// return true if successful
bool upDownInMath(bool up);