add fit-content and improve place

This commit is contained in:
Jinhao
2017-02-05 08:37:16 +08:00
parent 2fd3aa5030
commit 2bd1cf715f
10 changed files with 1228 additions and 118 deletions

View File

@@ -210,6 +210,14 @@ namespace API
return (restrict::wd_manager().available(iwd) ? iwd->annex.scheme : nullptr);
}
void set_measurer(window wd, ::nana::dev::widget_content_measurer_interface* measurer)
{
auto iwd = reinterpret_cast<basic_window*>(wd);
internal_scope_guard lock;
if (restrict::wd_manager().available(iwd))
iwd->annex.content_measurer = measurer;
}
void attach_drawer(widget& wd, drawer_trigger& dr)
{
const auto iwd = reinterpret_cast<basic_window*>(wd.handle());
@@ -1009,6 +1017,8 @@ namespace API
else
return;
//modal has to guarantee that does not lock the mutex of window_manager before invokeing the pump_event,
//otherwise, the modal will prevent the other thread access the window.
restrict::bedrock.pump_event(wd, true);
}