示例#1
0
void NUIRenderHandler::OnPaint(CefRefPtr<CefBrowser> browser, PaintElementType type, const RectList& dirtyRects, const void* buffer, int width, int height)
{
	// OnPaint shouldn't be reached anymore
	//assert(!"NUIRenderHandler::OnPaint");

	return;

	if (m_owner->GetWindowValid())
	{
		// lock the window lock
		auto& lock = m_owner->GetWindowLock();
		lock.lock();

		// paint the buffer
		if (type == PET_VIEW)
		{
			PaintView(dirtyRects, buffer, width, height);
		}
		else if (type == PET_POPUP)
		{
			PaintPopup(buffer, width, height);
		}

		// invalidate and paint the popup
		UpdatePopup();

		// mark the render buffer as dirty
		m_owner->GetWindow()->MarkRenderBufferDirty();

		// unlock the lock
		lock.unlock();
	}
}
示例#2
0
void MenuEditorItem::Paint(CDC& dc, CRect& rect)
{
	switch( m_type)
	{
	case 0 : // menu
		PaintMenu(dc,rect);
		break;
	case 1: // popup
		PaintPopup(dc,rect);
		break; 
	case 2 : // separator
		PaintSeparator(dc,rect);
		break;		
	}
}