init dragdrop

contains a new class simple_dragdrop and changes of listbox for dragdrop
This commit is contained in:
Jinhao
2018-10-09 03:56:50 +08:00
parent 95ccc3cb7e
commit 943a9e444d
17 changed files with 812 additions and 19 deletions

View File

@@ -411,6 +411,26 @@ namespace API
}
}
void window_draggable(window wd, bool enabled)
{
auto real_wd = reinterpret_cast<basic_window*>(wd);
internal_scope_guard lock;
if (restrict::wd_manager().available(real_wd))
real_wd->flags.draggable = enabled;
}
bool window_draggable(window wd)
{
auto real_wd = reinterpret_cast<basic_window*>(wd);
internal_scope_guard lock;
if (restrict::wd_manager().available(real_wd))
return real_wd->flags.draggable;
return false;
}
}//end namespace dev
widget* get_widget(window wd)
@@ -1518,5 +1538,16 @@ namespace API
{
return ::nana::platform_abstraction::screen_dpi(x_requested);
}
dragdrop_status window_dragdrop_status(::nana::window wd)
{
auto real_wd = reinterpret_cast<basic_window*>(wd);
internal_scope_guard lock;
if (restrict::wd_manager().available(real_wd))
return real_wd->other.dnd_state;
return dragdrop_status::not_ready;
}
}//end namespace API
}//end namespace nana