int MunkHtmlDCRenderer::Render(int x, int y, wxArrayInt& known_pagebreaks, int from, int dont_render, int to) { int pbreak, hght; if (m_Cells == NULL || m_DC == NULL) return 0; pbreak = (int)(from + m_Height); while (m_Cells->AdjustPagebreak(&pbreak, m_Height, known_pagebreaks)) {} hght = pbreak - from; if(to < hght) hght = to; if (!dont_render) { MunkHtmlRenderingInfo rinfo(wxNullColour); MunkDefaultHtmlRenderingStyle rstyle; rinfo.SetStyle(&rstyle); m_DC->SetBrush(*wxWHITE_BRUSH); m_DC->SetClippingRegion(x, y, m_Width, hght); m_Cells->Draw(*m_DC, x, (y - from), y, y + hght, rinfo); m_DC->DestroyClippingRegion(); } if (pbreak < m_Cells->GetHeight()) return pbreak; else return GetTotalHeight(); }
int KRootPixmap::currentDesktop() const { #ifdef Q_WS_X11 NETRootInfo rinfo(qt_xdisplay(), NET::CurrentDesktop); rinfo.activate(); return rinfo.currentDesktop(); #else // OK? return QApplication::desktop()->screenNumber(m_pWidget); #endif }