Ejemplo n.º 1
0
int LineEdit::RemoveRectSelection()
{
	Rect rect = GetRectSelection();
	WString txt;
	for(int i = rect.top; i <= rect.bottom; i++) {
		int l, h;
		CacheLinePos(i);
		GetRectSelection(rect, i, l, h);
		WString s = GetWLine(i);
		s.Remove(l - GetPos(i), h - l);
		txt.Cat(s);
		txt.Cat('\n');
	}
	int l = GetPos(rect.top);
	int h = GetPos(rect.bottom) + GetLineLength(rect.bottom);
	if(h < GetLength())
		h++;
	Remove(l, h - l);
	Insert(l, txt);
	return GetGPos(rect.bottom, rect.left);
}