Ejemplo n.º 1
0
void Widget::setCursor(const Cursor& cursor)
{
    ScrollView* view = root();
    if (!view)
        return;
    view->hostWindow()->setCursor(cursor);
}
Ejemplo n.º 2
0
bool ScrollbarThemeWx::paint(Scrollbar* scrollbar, GraphicsContext* context, const IntRect& rect)
{
    wxOrientation orientation = (scrollbar->orientation() == HorizontalScrollbar) ? wxHORIZONTAL : wxVERTICAL;
    int flags = 0;
    if (scrollbar->client()->isActive())
        flags |= wxCONTROL_FOCUSED;
    
    if (!scrollbar->enabled())
        flags |= wxCONTROL_DISABLED;
    
    wxDC* dc = static_cast<wxDC*>(context->platformContext());
    
    context->save();
    ScrollView* root = scrollbar->root();
    ASSERT(root);
    if (!root)
        return false;
    
    wxWindow* webview = root->hostWindow()->platformPageClient(); 
    
    wxRenderer_DrawScrollbar(webview, *dc, scrollbar->frameRect(), orientation, scrollbar->currentPos(), static_cast<wxScrollbarPart>(scrollbar->pressedPart()),    
                     static_cast<wxScrollbarPart>(scrollbar->hoveredPart()), scrollbar->maximum(), scrollbar->pageStep(), flags);

    context->restore();
    return true;
}
void Widget::setCursor(Cursor const& cursor)
{
    ScrollView* theRoot = root();
    if (!theRoot)
        return;
    PlatformPageClient pageClient = theRoot->hostWindow()->platformPageClient();

    if (pageClient)
        pageClient->setCursor(cursor.impl());
}
Ejemplo n.º 4
0
static PlatformPageClient toPlatformPageClient(Widget* widget)
{
    if (!widget)
        return 0;
    ScrollView* root = widget->root();
    if (!root)
        return 0;
    HostWindow* hostWindow = root->hostWindow();
    if (!hostWindow)
        return 0;
    return hostWindow->platformPageClient();
}
Ejemplo n.º 5
0
void Widget::setCursor(const Cursor& cursor)
{
    // This is set by PluginViewWin so it can ignore the setCursor call made by
    // EventHandler.cpp.
    if (ignoreNextSetCursor) {
        ignoreNextSetCursor = false;
        return;
    }

    ScrollView* view = root();
    if (!view)
        return;
    view->hostWindow()->setCursor(cursor);
}