From 42990b867005b8395e170873406ba3d4c706e63a Mon Sep 17 00:00:00 2001 From: Jinhao Date: Sun, 17 Apr 2016 17:46:19 +0800 Subject: [PATCH] move lazy_refresh() from namespace API to API::dev --- include/nana/gui/programming_interface.hpp | 31 ++++++++++++---------- include/nana/gui/widgets/scroll.hpp | 14 +++++----- source/gui/place_parts.hpp | 8 +++--- source/gui/programming_interface.cpp | 12 ++++----- source/gui/widgets/button.cpp | 8 +++--- source/gui/widgets/categorize.cpp | 8 +++--- source/gui/widgets/checkbox.cpp | 8 +++--- source/gui/widgets/combox.cpp | 16 +++++------ source/gui/widgets/date_chooser.cpp | 8 +++--- source/gui/widgets/float_listbox.cpp | 2 +- source/gui/widgets/listbox.cpp | 20 +++++++------- source/gui/widgets/menu.cpp | 2 +- source/gui/widgets/menubar.cpp | 16 +++++------ source/gui/widgets/slider.cpp | 10 +++---- source/gui/widgets/spinbox.cpp | 18 ++++++------- source/gui/widgets/tabbar.cpp | 14 +++++----- source/gui/widgets/textbox.cpp | 20 +++++++------- source/gui/widgets/toolbar.cpp | 8 +++--- source/gui/widgets/treebox.cpp | 18 ++++++------- 19 files changed, 121 insertions(+), 120 deletions(-) diff --git a/include/nana/gui/programming_interface.hpp b/include/nana/gui/programming_interface.hpp index 85196997..195b430b 100644 --- a/include/nana/gui/programming_interface.hpp +++ b/include/nana/gui/programming_interface.hpp @@ -88,10 +88,20 @@ namespace API void set_menubar(window wd, bool attach); void enable_space_click(window, bool enable); + + /// Refreshs a widget surface + /* + * This function will copy the drawer surface into system window after the event process finished. + */ + void lazy_refresh(); }//end namespace dev - - widget* get_widget(window); + /// Returns the widget pointer of the specified window. + /* + * @param window_handle A handle to a window owning the widget. + * @return A widget pointer. + */ + widget* get_widget(window window_handle); namespace detail { @@ -258,17 +268,6 @@ namespace API void window_enabled(window, bool); bool window_enabled(window); - /** @brief A widget drawer draws the widget surface in answering an event. - * - * This function will tell the drawer to copy the graphics into window after event answering. - * Tells Nana.GUI to copy the buffer of event window to screen after the event is processed. - * This function only works for a drawer_trigger, when a drawer_trigger receives an event, - * after drawing, a drawer_trigger should call lazy_refresh to tell the Nana.GUI to refresh - * the window to the screen after the event process finished. - */ - void lazy_refresh(); - - /// Refresh the window and display it immediately calling the refresh function of its drawer_trigger. /* * The drawer::refresh() will be called. If the currently state is lazy_refrsh, the window is delayed to update the graphics until an event is finished. @@ -296,6 +295,7 @@ namespace API /// Sets the keyboard focus for a specified window. void focus_window(window); + /// Returns a window which has grabbed the mouse input. window capture_window(); /// Enables a window to grab the mouse input. @@ -311,7 +311,10 @@ namespace API */ void release_capture(window window_handle); - void modal_window(window); ///< Blocks the routine til the specified window is closed. + /// Blocks the execution and other windows' messages until the specified window is closed. + void modal_window(window); + + /// Blocks the execution until the specified window is closesd. void wait_for(window); color fgcolor(window); diff --git a/include/nana/gui/widgets/scroll.hpp b/include/nana/gui/widgets/scroll.hpp index 00107b5f..3a260c85 100644 --- a/include/nana/gui/widgets/scroll.hpp +++ b/include/nana/gui/widgets/scroll.hpp @@ -205,14 +205,14 @@ namespace nana void resized(graph_reference graph, const ::nana::arg_resized&) override { drawer_.draw(graph, metrics_.what); - API::lazy_refresh(); + API::dev::lazy_refresh(); } void mouse_enter(graph_reference graph, const ::nana::arg_mouse& arg) override { metrics_.what = drawer_.what(graph, arg.pos); drawer_.draw(graph, metrics_.what); - API::lazy_refresh(); + API::dev::lazy_refresh(); } void mouse_move(graph_reference graph, const ::nana::arg_mouse& arg) override @@ -238,7 +238,7 @@ namespace nana if (redraw) { drawer_.draw(graph, metrics_.what); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } @@ -278,7 +278,7 @@ namespace nana break; } drawer_.draw(graph, metrics_.what); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } @@ -291,7 +291,7 @@ namespace nana metrics_.pressed = false; metrics_.what = drawer_.what(graph, arg.pos); drawer_.draw(graph, metrics_.what); - API::lazy_refresh(); + API::dev::lazy_refresh(); } void mouse_leave(graph_reference graph, const arg_mouse&) override @@ -300,7 +300,7 @@ namespace nana metrics_.what = buttons::none; drawer_.draw(graph, buttons::none); - API::lazy_refresh(); + API::dev::lazy_refresh(); } void mouse_wheel(graph_reference graph, const arg_wheel& arg) override @@ -308,7 +308,7 @@ namespace nana if (make_step(arg.upwards == false, 3)) { drawer_.draw(graph, metrics_.what); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } private: diff --git a/source/gui/place_parts.hpp b/source/gui/place_parts.hpp index 8cd0e418..6d8843fc 100644 --- a/source/gui/place_parts.hpp +++ b/source/gui/place_parts.hpp @@ -109,14 +109,14 @@ namespace nana x_pointed_ = _m_button_area().is_hit(arg.pos); refresh(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); } void mouse_leave(graph_reference graph, const arg_mouse&) override { x_pointed_ = false; refresh(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); } void mouse_down(graph_reference graph, const arg_mouse&) override @@ -127,7 +127,7 @@ namespace nana x_state_ = ::nana::mouse_action::pressed; refresh(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); } void mouse_up(graph_reference graph, const arg_mouse&) override @@ -137,7 +137,7 @@ namespace nana x_state_ = ::nana::mouse_action::over; refresh(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); close_fn_(); } diff --git a/source/gui/programming_interface.cpp b/source/gui/programming_interface.cpp index 75f34ebe..8e9e8edb 100644 --- a/source/gui/programming_interface.cpp +++ b/source/gui/programming_interface.cpp @@ -314,6 +314,11 @@ namespace API if (restrict::wd_manager().available(iwd)) iwd->flags.space_click_enabled = enable; } + + void lazy_refresh() + { + restrict::bedrock.thread_context_lazy_refresh(); + } }//end namespace dev @@ -824,13 +829,6 @@ namespace API return (restrict::wd_manager().available(iwd) ? iwd->flags.enabled : false); } - //lazy_refresh: - //@brief: A widget drawer draws the widget surface in answering an event. This function will tell the drawer to copy the graphics into window after event answering. - void lazy_refresh() - { - restrict::bedrock.thread_context_lazy_refresh(); - } - //refresh_window //@brief: Refresh the window and display it immediately. void refresh_window(window wd) diff --git a/source/gui/widgets/button.cpp b/source/gui/widgets/button.cpp index ec0b6e85..ac50d47d 100644 --- a/source/gui/widgets/button.cpp +++ b/source/gui/widgets/button.cpp @@ -134,7 +134,7 @@ namespace nana{ namespace drawerbase { attr_.e_state = (attr_.pushed || attr_.keep_pressed ? element_state::pressed : element_state::hovered); refresh(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); } void trigger::mouse_leave(graph_reference graph, const arg_mouse&) @@ -144,7 +144,7 @@ namespace nana{ namespace drawerbase attr_.e_state = element_state::normal; refresh(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); } void trigger::mouse_down(graph_reference graph, const arg_mouse& arg) @@ -185,7 +185,7 @@ namespace nana{ namespace drawerbase { attr_.focused = arg.getting; refresh(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); } void trigger::_m_draw_title(graph_reference graph, bool enabled) @@ -343,7 +343,7 @@ namespace nana{ namespace drawerbase } refresh(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); } void trigger::emit_click() diff --git a/source/gui/widgets/categorize.cpp b/source/gui/widgets/categorize.cpp index 230369c8..a79073d4 100644 --- a/source/gui/widgets/categorize.cpp +++ b/source/gui/widgets/categorize.cpp @@ -881,7 +881,7 @@ namespace nana { scheme_->mouse_pressed(); scheme_->draw(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } } @@ -894,7 +894,7 @@ namespace nana { scheme_->mouse_release(); scheme_->draw(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } } @@ -904,7 +904,7 @@ namespace nana if(scheme_->locate(arg.pos.x, arg.pos.y) && API::window_enabled(scheme_->window_handle())) { scheme_->draw(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } @@ -913,7 +913,7 @@ namespace nana if(API::window_enabled(scheme_->window_handle()) && (scheme_->is_list_shown() == false) && scheme_->erase_locate()) { scheme_->draw(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } //end class trigger diff --git a/source/gui/widgets/checkbox.cpp b/source/gui/widgets/checkbox.cpp index a99d02f4..7e567044 100644 --- a/source/gui/widgets/checkbox.cpp +++ b/source/gui/widgets/checkbox.cpp @@ -85,7 +85,7 @@ namespace nana{ namespace drawerbase void drawer::mouse_down(graph_reference graph, const arg_mouse&) { refresh(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); } void drawer::mouse_up(graph_reference graph, const arg_mouse&) @@ -97,19 +97,19 @@ namespace nana{ namespace drawerbase API::events(impl_->widget_ptr->handle()).checked.emit(arg, impl_->widget_ptr->handle()); } refresh(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); } void drawer::mouse_enter(graph_reference graph, const arg_mouse&) { refresh(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); } void drawer::mouse_leave(graph_reference graph, const arg_mouse&) { refresh(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); } drawer::implement * drawer::impl() const diff --git a/source/gui/widgets/combox.cpp b/source/gui/widgets/combox.cpp index ed39ba8e..dfa911d0 100644 --- a/source/gui/widgets/combox.cpp +++ b/source/gui/widgets/combox.cpp @@ -586,7 +586,7 @@ namespace nana { drawer_->draw(); drawer_->editor()->reset_caret(); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } @@ -596,7 +596,7 @@ namespace nana if(drawer_->widget_ptr()->enabled()) { drawer_->draw(); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } @@ -607,7 +607,7 @@ namespace nana if(drawer_->widget_ptr()->enabled()) { drawer_->draw(); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } @@ -625,7 +625,7 @@ namespace nana if(editor->attr().editable) editor->reset_caret(); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } @@ -636,7 +636,7 @@ namespace nana drawer_->editor()->mouse_pressed(arg); drawer_->set_button_state(element_state::hovered, false); drawer_->draw(); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } @@ -651,7 +651,7 @@ namespace nana { drawer_->draw(); drawer_->editor()->reset_caret(); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } } @@ -711,13 +711,13 @@ namespace nana if (call_other_keys) drawer_->editor()->respond_key(arg); - API::lazy_refresh(); + API::dev::lazy_refresh(); } void trigger::key_char(graph_reference graph, const arg_keyboard& arg) { if (drawer_->editor()->respond_char(arg)) - API::lazy_refresh(); + API::dev::lazy_refresh(); } //end class trigger diff --git a/source/gui/widgets/date_chooser.cpp b/source/gui/widgets/date_chooser.cpp index 42b3de72..0085f30b 100644 --- a/source/gui/widgets/date_chooser.cpp +++ b/source/gui/widgets/date_chooser.cpp @@ -797,7 +797,7 @@ namespace nana if (model_->set_where(pos) || (model::where::textarea == pos)) { model_->render(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } @@ -806,7 +806,7 @@ namespace nana if (model_->set_where(model::where::none)) { model_->render(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } @@ -882,7 +882,7 @@ namespace nana if (!transformed) model_->render(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } @@ -894,7 +894,7 @@ namespace nana if (!redrawn) refresh(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } //end class trigger diff --git a/source/gui/widgets/float_listbox.cpp b/source/gui/widgets/float_listbox.cpp index c51c8342..34c5a03f 100644 --- a/source/gui/widgets/float_listbox.cpp +++ b/source/gui/widgets/float_listbox.cpp @@ -443,7 +443,7 @@ namespace nana if(drawer_->set_mouse(graph, arg.pos.x, arg.pos.y)) { drawer_->draw(); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } diff --git a/source/gui/widgets/listbox.cpp b/source/gui/widgets/listbox.cpp index 030283ad..88bfe21f 100644 --- a/source/gui/widgets/listbox.cpp +++ b/source/gui/widgets/listbox.cpp @@ -3392,7 +3392,7 @@ namespace nana if (2 == update) refresh(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } @@ -3409,7 +3409,7 @@ namespace nana } refresh(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } @@ -3504,7 +3504,7 @@ namespace nana if(update) { _m_draw_border(); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } @@ -3525,7 +3525,7 @@ namespace nana { essence_->trace_item_dpl({0,0}); refresh(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } } @@ -3535,7 +3535,7 @@ namespace nana essence_->widget_to_header(pos); drawer_header_->grab(pos, false); refresh(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); essence_->lister.wd_ptr()->release_capture(); } } @@ -3546,7 +3546,7 @@ namespace nana { refresh(graph); essence_->adjust_scroll_value(); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } @@ -3588,7 +3588,7 @@ namespace nana } essence_->adjust_scroll_life(); refresh(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } } @@ -3597,7 +3597,7 @@ namespace nana { essence_->adjust_scroll_life(); refresh(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); } void trigger::key_press(graph_reference graph, const arg_keyboard& arg) @@ -3670,7 +3670,7 @@ namespace nana return; } refresh(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); } void trigger::key_char(graph_reference graph, const arg_keyboard& arg) @@ -3688,7 +3688,7 @@ namespace nana case keyboard::select_all : essence_->lister.select_for_all(true); refresh(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); break; default: diff --git a/source/gui/widgets/menu.cpp b/source/gui/widgets/menu.cpp index 53930ae4..02a5b551 100644 --- a/source/gui/widgets/menu.cpp +++ b/source/gui/widgets/menu.cpp @@ -350,7 +350,7 @@ namespace nana if(track_mouse(arg.pos)) { refresh(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } diff --git a/source/gui/widgets/menubar.cpp b/source/gui/widgets/menubar.cpp index 459b61fb..65a08292 100644 --- a/source/gui/widgets/menubar.cpp +++ b/source/gui/widgets/menubar.cpp @@ -253,7 +253,7 @@ namespace nana { _m_popup_menu(); refresh(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); } state_.mouse_pos = arg.pos; @@ -281,7 +281,7 @@ namespace nana _m_total_close(); refresh(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); } void trigger::mouse_up(graph_reference graph, const arg_mouse&) @@ -298,7 +298,7 @@ namespace nana state_.behavior = state_.behavior_none; _m_total_close(); refresh(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } @@ -312,7 +312,7 @@ namespace nana _m_close_menu(); state_.active = npos; refresh(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } @@ -407,7 +407,7 @@ namespace nana } refresh(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); } void trigger::key_release(graph_reference graph, const arg_keyboard& arg) @@ -429,7 +429,7 @@ namespace nana state_.menu_active = false; refresh(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } @@ -449,7 +449,7 @@ namespace nana state_.menu->goto_next(true); refresh(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); state_.behavior = state_.behavior_menu; } } @@ -477,7 +477,7 @@ namespace nana { state_.active = index; refresh(*graph_); - API::lazy_refresh(); + API::dev::lazy_refresh(); if(_m_popup_menu()) state_.menu->goto_next(true); diff --git a/source/gui/widgets/slider.cpp b/source/gui/widgets/slider.cpp index 38ba84e7..abb7dfe8 100644 --- a/source/gui/widgets/slider.cpp +++ b/source/gui/widgets/slider.cpp @@ -626,7 +626,7 @@ namespace nana if(mkdir) { impl_->draw(); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } } @@ -637,7 +637,7 @@ namespace nana if(mkdraw) { impl_->draw(); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } @@ -660,7 +660,7 @@ namespace nana if(mkdraw) { impl_->draw(); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } @@ -669,7 +669,7 @@ namespace nana if(impl_->reset_adorn()) { impl_->draw(); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } @@ -677,7 +677,7 @@ namespace nana { impl_->resize(); impl_->draw(); - API::lazy_refresh(); + API::dev::lazy_refresh(); } //end class trigger }//end namespace slider diff --git a/source/gui/widgets/spinbox.cpp b/source/gui/widgets/spinbox.cpp index 427dc47d..477b1bd1 100644 --- a/source/gui/widgets/spinbox.cpp +++ b/source/gui/widgets/spinbox.cpp @@ -524,38 +524,38 @@ namespace nana impl_->reset_text(); impl_->render(); impl_->editor()->reset_caret(); - API::lazy_refresh(); + API::dev::lazy_refresh(); } void drawer::mouse_wheel(graph_reference, const arg_wheel& arg) { impl_->mouse_wheel(arg.upwards); impl_->editor()->reset_caret(); - API::lazy_refresh(); + API::dev::lazy_refresh(); } void drawer::mouse_down(graph_reference, const arg_mouse& arg) { if (impl_->mouse_button(arg, true)) - API::lazy_refresh(); + API::dev::lazy_refresh(); } void drawer::mouse_up(graph_reference, const arg_mouse& arg) { if (impl_->mouse_button(arg, false)) - API::lazy_refresh(); + API::dev::lazy_refresh(); } void drawer::mouse_move(graph_reference, const arg_mouse& arg) { if (impl_->mouse_move(arg.left_button, arg.pos)) - API::lazy_refresh(); + API::dev::lazy_refresh(); } void drawer::mouse_leave(graph_reference, const arg_mouse&) { impl_->render(); - API::lazy_refresh(); + API::dev::lazy_refresh(); } void drawer::key_press(graph_reference, const arg_keyboard& arg) @@ -564,7 +564,7 @@ namespace nana { impl_->editor()->reset_caret(); impl_->draw_spins(); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } @@ -575,7 +575,7 @@ namespace nana if (!impl_->value(to_utf8(impl_->editor()->text()))) impl_->draw_spins(); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } @@ -584,7 +584,7 @@ namespace nana impl_->reset_text_area(); impl_->render(); impl_->editor()->reset_caret(); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } }//end namespace drawerbase diff --git a/source/gui/widgets/tabbar.cpp b/source/gui/widgets/tabbar.cpp index 796fe2af..a8e0cc5b 100644 --- a/source/gui/widgets/tabbar.cpp +++ b/source/gui/widgets/tabbar.cpp @@ -1255,7 +1255,7 @@ namespace nana if(false == layouter_->active_by_trace()) layouter_->toolbox_answer(arg); layouter_->render(); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } @@ -1266,7 +1266,7 @@ namespace nana if(rd) { layouter_->render(); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } @@ -1275,7 +1275,7 @@ namespace nana if(layouter_->trace(arg.pos.x, arg.pos.y)) { layouter_->render(); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } @@ -1284,7 +1284,7 @@ namespace nana if(layouter_->leave()) { layouter_->render(); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } //end class trigger @@ -1535,7 +1535,7 @@ namespace nana return; refresh(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); } void driver::mouse_leave(graph_reference graph, const arg_mouse&) @@ -1544,7 +1544,7 @@ namespace nana return; refresh(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); } void driver::mouse_down(graph_reference graph, const arg_mouse&) @@ -1559,7 +1559,7 @@ namespace nana model_->show_attached_window(); refresh(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); event_arg arg; model_->widget_ptr()->events().selected.emit(arg, model_->widget_ptr()->handle()); diff --git a/source/gui/widgets/textbox.cpp b/source/gui/widgets/textbox.cpp index f2a168ef..4b5da90f 100644 --- a/source/gui/widgets/textbox.cpp +++ b/source/gui/widgets/textbox.cpp @@ -97,7 +97,7 @@ namespace drawerbase { if (!editor_->focus_changed(arg)) refresh(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); } void drawer::mouse_down(graph_reference, const arg_mouse& arg) @@ -105,20 +105,20 @@ namespace drawerbase { if (editor_->mouse_pressed(arg)) { editor_->render(true); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } void drawer::mouse_move(graph_reference, const arg_mouse& arg) { if(editor_->mouse_move(arg.left_button, arg.pos)) - API::lazy_refresh(); + API::dev::lazy_refresh(); } void drawer::mouse_up(graph_reference graph, const arg_mouse& arg) { if(editor_->mouse_pressed(arg)) - API::lazy_refresh(); + API::dev::lazy_refresh(); } void drawer::mouse_wheel(graph_reference, const arg_wheel& arg) @@ -126,20 +126,20 @@ namespace drawerbase { if(editor_->scroll(arg.upwards, true)) { editor_->reset_caret(); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } void drawer::mouse_enter(graph_reference, const arg_mouse&) { if(editor_->mouse_enter(true)) - API::lazy_refresh(); + API::dev::lazy_refresh(); } void drawer::mouse_leave(graph_reference, const arg_mouse&) { if(editor_->mouse_enter(false)) - API::lazy_refresh(); + API::dev::lazy_refresh(); } void drawer::key_press(graph_reference, const arg_keyboard& arg) @@ -147,14 +147,14 @@ namespace drawerbase { if(editor_->respond_key(arg)) { editor_->reset_caret(); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } void drawer::key_char(graph_reference, const arg_keyboard& arg) { if (editor_->respond_char(arg)) - API::lazy_refresh(); + API::dev::lazy_refresh(); } void drawer::resized(graph_reference graph, const arg_resized& arg) @@ -162,7 +162,7 @@ namespace drawerbase { _m_text_area(arg.width, arg.height); refresh(graph); editor_->reset_caret(); - API::lazy_refresh(); + API::dev::lazy_refresh(); } void drawer::typeface_changed(graph_reference graph) diff --git a/source/gui/widgets/toolbar.cpp b/source/gui/widgets/toolbar.cpp index 728e5f2f..94b5f888 100644 --- a/source/gui/widgets/toolbar.cpp +++ b/source/gui/widgets/toolbar.cpp @@ -317,7 +317,7 @@ namespace nana impl_->state = item_renderer::state_t::highlighted; refresh(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); if (impl_->state == item_renderer::state_t::highlighted) { @@ -341,7 +341,7 @@ namespace nana impl_->which = npos; refresh(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); if (which != npos && impl_->items.at(which)->enable) { @@ -359,7 +359,7 @@ namespace nana { impl_->state = item_renderer::state_t::selected; refresh(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } @@ -382,7 +382,7 @@ namespace nana } refresh(graph); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } diff --git a/source/gui/widgets/treebox.cpp b/source/gui/widgets/treebox.cpp index 3f3b55ee..11b4508f 100644 --- a/source/gui/widgets/treebox.cpp +++ b/source/gui/widgets/treebox.cpp @@ -1879,7 +1879,7 @@ namespace nana impl_->node_state.event_node = nl.node(); impl_->set_expanded(impl_->node_state.event_node, !impl_->node_state.event_node->value.second.expanded); impl_->draw(true); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } @@ -1927,7 +1927,7 @@ namespace nana if(has_redraw) { impl_->draw(true); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } @@ -1960,7 +1960,7 @@ namespace nana return; //Do not refresh impl_->draw(true); - API::lazy_refresh(); + API::dev::lazy_refresh(); } void trigger::mouse_move(graph_reference, const arg_mouse& arg) @@ -1968,7 +1968,7 @@ namespace nana if(impl_->track_mouse(arg.pos.x, arg.pos.y)) { impl_->draw(false); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } @@ -1986,7 +1986,7 @@ namespace nana impl_->track_mouse(arg.pos.x, arg.pos.y); impl_->draw(false); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } @@ -1998,14 +1998,14 @@ namespace nana impl_->data.widget_ptr->events().hovered.emit(::nana::arg_treebox{ *impl_->data.widget_ptr, iprx, false }, impl_->data.widget_ptr->handle()); impl_->node_state.pointed = nullptr; impl_->draw(false); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } void trigger::resized(graph_reference, const arg_resized&) { impl_->draw(false); - API::lazy_refresh(); + API::dev::lazy_refresh(); impl_->show_scroll(); if(!impl_->shape.scroll.empty()) { @@ -2120,7 +2120,7 @@ namespace nana if(redraw) { impl_->draw(scroll); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } @@ -2150,7 +2150,7 @@ namespace nana if (do_refresh) { impl_->draw(do_refresh & 1); - API::lazy_refresh(); + API::dev::lazy_refresh(); } } //end class trigger