void drawer::resized(graph_reference graph, const arg_resized& arg) { _m_text_area(arg.width, arg.height); refresh(graph); editor_->reset_caret(); API::lazy_refresh(); }
void drawer::attached(widget_reference wdg, graph_reference graph) { auto wd = wdg.handle(); widget_ = &wdg; evt_agent_.reset(new event_agent(static_cast<::nana::textbox&>(wdg), editor_->text_position())); auto scheme = API::dev::get_scheme(wdg); editor_ = new text_editor(wd, graph, dynamic_cast<::nana::widgets::skeletons::text_editor_scheme*>(scheme)); editor_->textbase().set_event_agent(evt_agent_.get()); editor_->set_event(evt_agent_.get()); _m_text_area(graph.width(), graph.height()); API::tabstop(wd); API::eat_tabstop(wd, true); API::effects_edge_nimbus(wd, effects::edge_nimbus::active); API::effects_edge_nimbus(wd, effects::edge_nimbus::over); }
void drawer::resize(graph_reference graph, const eventinfo& ei) { _m_text_area(ei.size.width, ei.size.height); refresh(graph); API::lazy_refresh(); }