void BufferView::Pimpl::toggleSelection(bool b)
{
- if (bv_->theLockingInset())
- bv_->theLockingInset()->toggleSelection(bv_, b);
screen().toggleSelection(bv_->text, bv_, b);
}
+
+2003-07-31 André Pönitz <poenitz@gmx.net>
+
+ * insetcollapsable.h:
+ * insettabular.[Ch]:
+ * insettext.[Ch]: remove toggleSelection
+
2003-07-30 Martin Vermeer <martin.vermeer@hut.fi>
(with help from Juergen Spitzmueller)
void selectSelectedWord(BufferView * bv) {
inset.selectSelectedWord(bv);
}
- ///
- void toggleSelection(BufferView * bv, bool kill_selection) {
- inset.toggleSelection(bv, kill_selection);
- }
void markErased();
}
-void InsetTabular::toggleSelection(BufferView * bv, bool kill_selection)
-{
- if (the_locking_inset)
- the_locking_inset->toggleSelection(bv, kill_selection);
-}
-
-
void InsetTabular::markErased()
{
for (int cell = 0; cell < tabular.getNumberOfCells(); ++cell)
selectNextWordToSpellcheck(BufferView *, float & value) const;
///
void selectSelectedWord(BufferView *);
- ///
- void toggleSelection(BufferView *, bool kill_selection);
void markErased();
}
-void InsetText::toggleSelection(BufferView * bv, bool kill_selection)
-{
- if (the_locking_inset)
- the_locking_inset->toggleSelection(bv, kill_selection);
-
- int x = top_x + TEXT_TO_INSET_OFFSET;
-
- RowList::iterator rit = text_.rows().begin();
- RowList::iterator end = text_.rows().end();
- int y_offset = top_baseline - rit->ascent_of_text();
- int y = y_offset;
- while (rit != end && y + rit->height() <= 0) {
- y += rit->height();
- ++rit;
- }
- if (y_offset < 0)
- y_offset = y;
-
- if (need_update & SELECTION)
- need_update = NONE;
- bv->screen().toggleSelection(&text_, bv, kill_selection, y_offset, x);
-}
-
-
bool InsetText::nextChange(BufferView * bv, lyx::pos_type & length)
{
if (the_locking_inset) {
selectNextWordToSpellcheck(BufferView *, float & value) const;
///
void selectSelectedWord(BufferView *);
- ///
- void toggleSelection(BufferView *, bool kill_selection);
/// mark as erased for change tracking
void markErased() { clear(true); };
if (!isInInset() && bv->theLockingInset())
break;
if (cmd.button() == mouse_button::button1) {
- if (!isInInset()) {
+ if (!isInInset())
bv->screen().toggleSelection(this, bv);
- }
cursorHome();
selection.cursor = cursor;
cursorEnd();