Added an overload to getline to allow an offset from the beginning of the line.
Added a clear undo method. Added an overload to selected to get the selected bounds.
This commit is contained in:
@@ -1427,7 +1427,8 @@ namespace nana{ namespace widgets
|
||||
_handle_move_key(arg);
|
||||
break;
|
||||
case keyboard::os_del:
|
||||
if (this->attr().editable)
|
||||
// send delete to set_accept function
|
||||
if (this->attr().editable && (!attributes_.pred_acceptive || attributes_.pred_acceptive(key)))
|
||||
del();
|
||||
break;
|
||||
default:
|
||||
@@ -1916,6 +1917,13 @@ namespace nana{ namespace widgets
|
||||
return (select_.a != select_.b);
|
||||
}
|
||||
|
||||
bool text_editor::selected(nana::upoint &a,nana::upoint &b) const
|
||||
{
|
||||
a = select_.a;
|
||||
b = select_.b;
|
||||
return selected();
|
||||
}
|
||||
|
||||
void text_editor::set_end_caret()
|
||||
{
|
||||
bool new_sel_end = (select_.b != points_.caret);
|
||||
|
||||
Reference in New Issue
Block a user