add textbox::set_undo_queue_length

a new method for setting the undo queue length
This commit is contained in:
Jinhao
2016-09-22 08:03:30 +08:00
parent 74e113b2cc
commit c916d0ace3
4 changed files with 28 additions and 0 deletions

View File

@@ -2348,6 +2348,11 @@ namespace nana{ namespace widgets
_m_scrollbar();
}
void text_editor::set_undo_queue_length(std::size_t len)
{
undo_.max_steps(len);
}
void text_editor::move_ns(bool to_north)
{
const bool redraw_required = _m_cancel_select(0);

View File

@@ -606,6 +606,14 @@ namespace drawerbase {
editor->select_behavior(move_to_end);
}
void textbox::set_undo_queue_length(std::size_t len)
{
internal_scope_guard lock;
auto editor = get_drawer_trigger().editor();
if (editor)
editor->set_undo_queue_length(len);
}
//Override _m_caption for caption()
auto textbox::_m_caption() const throw() -> native_string_type
{