merge beru's changes
This commit is contained in:
@@ -628,7 +628,7 @@ namespace nana
|
||||
nana::string target; //It indicates which target is tracing.
|
||||
nana::string url;
|
||||
|
||||
widget * buddy {nullptr};
|
||||
window for_associated_wd{ nullptr };
|
||||
|
||||
void add_listener(std::function<void(command, const nana::string&)>&& fn)
|
||||
{
|
||||
@@ -743,9 +743,7 @@ namespace nana
|
||||
|
||||
system::open_url(url);
|
||||
|
||||
if (impl_->buddy) {
|
||||
impl_->buddy->focus();
|
||||
}
|
||||
API::focus_window(impl_->for_associated_wd);
|
||||
}
|
||||
|
||||
void trigger::refresh(graph_reference graph)
|
||||
@@ -827,9 +825,9 @@ namespace nana
|
||||
return *this;
|
||||
}
|
||||
|
||||
void label::relate(widget& w)
|
||||
void label::click_for(window associated_window)
|
||||
{
|
||||
get_drawer_trigger().impl()->buddy = &w;
|
||||
get_drawer_trigger().impl()->for_associated_wd = associated_window;
|
||||
}
|
||||
|
||||
nana::size label::measure(unsigned limited) const
|
||||
|
||||
@@ -55,7 +55,6 @@ namespace nana{ namespace widgets
|
||||
|
||||
virtual bool merge(const undoable_command_interface<EnumCommand>& rhs) override
|
||||
{
|
||||
//Implement later
|
||||
return false;
|
||||
}
|
||||
protected:
|
||||
@@ -1620,7 +1619,7 @@ namespace nana{ namespace widgets
|
||||
text_area_.captured = true;
|
||||
|
||||
//Set caret pos by screen point and get the caret pos.
|
||||
auto pos = mouse_caret(scrpos);
|
||||
mouse_caret(scrpos);
|
||||
if(!select(false))
|
||||
{
|
||||
select_.a = points_.caret; //Set begin caret
|
||||
@@ -2315,7 +2314,7 @@ namespace nana{ namespace widgets
|
||||
}
|
||||
break;
|
||||
case keyboard::os_pageup:
|
||||
if (caret.y >= (int)screen_lines() && points_.offset.y >= (int)screen_lines()) {
|
||||
if (caret.y >= screen_lines() && points_.offset.y >= static_cast<int>(screen_lines())) {
|
||||
points_.offset.y -= screen_lines();
|
||||
caret.y -= screen_lines();
|
||||
changed = true;
|
||||
@@ -2967,7 +2966,7 @@ namespace nana{ namespace widgets
|
||||
if (if_mask && mask_char_)
|
||||
mask_str.reset(new nana::string(str.size(), mask_char_));
|
||||
|
||||
bool focused = API::is_focus_ready(window_); // do this many times is not efficient...
|
||||
bool focused = API::is_focus_ready(window_);
|
||||
|
||||
auto & linestr = (if_mask && mask_char_ ? *mask_str : str);
|
||||
|
||||
|
||||
@@ -94,14 +94,8 @@ namespace drawerbase {
|
||||
refresh(graph);
|
||||
if (!editor_->attr().multi_lines && arg.getting)
|
||||
{
|
||||
static auto& brock = detail::bedrock::instance();
|
||||
auto native_window = reinterpret_cast<native_window_type>(arg.receiver);
|
||||
auto* root_runtime = brock.wd_manager.root_runtime(native_window);
|
||||
if (root_runtime && root_runtime->condition.tabstop_focus_changed)
|
||||
{
|
||||
editor_->select(true);
|
||||
editor_->move_caret_end();
|
||||
}
|
||||
editor_->select(true);
|
||||
editor_->move_caret_end();
|
||||
}
|
||||
editor_->show_caret(arg.getting);
|
||||
editor_->reset_caret();
|
||||
|
||||
Reference in New Issue
Block a user