Merge branch 'feature-draw-through' into develop

This commit is contained in:
cnjinhao
2015-02-02 19:17:44 +08:00
10 changed files with 101 additions and 10 deletions

View File

@@ -1286,6 +1286,15 @@ namespace detail
brock.event_move(msgwnd, (int)(short) LOWORD(lParam), (int)(short) HIWORD(lParam));
break;
case WM_PAINT:
if (msgwnd->is_draw_through())
{
msgwnd->other.attribute.root->draw_through();
::PAINTSTRUCT ps;
::BeginPaint(root_window, &ps);
::EndPaint(root_window, &ps);
}
else
{
::PAINTSTRUCT ps;
::HDC dc = ::BeginPaint(root_window, &ps);
@@ -1602,6 +1611,26 @@ namespace detail
return impl_->estore;
}
void bedrock::map_through_widgets(core_window_t* wd, native_drawable_type drawable)
{
#if defined(NANA_WINDOWS)
auto graph_context = reinterpret_cast<HDC>(wd->root_graph->handle()->context);
for (auto child : wd->children)
{
if (!child->visible) continue;
if (::nana::category::flags::widget == child->other.category)
{
::BitBlt(reinterpret_cast<HDC>(drawable), child->pos_root.x, child->pos_root.y, static_cast<int>(child->dimension.width), static_cast<int>(child->dimension.height),
graph_context, child->pos_root.x, child->pos_root.y, SRCCOPY);
}
else if (::nana::category::flags::lite_widget == child->other.category)
map_through_widgets(child, drawable);
}
#endif
}
bool bedrock::emit(event_code evt_code, core_window_t* wd, const arg_mouse& arg, bool ask_update, thread_context* thrd)
{
if (evt_code != arg.evt_code)