Exemplo n.º 1
0
const Cursor& zoomOutCursor()
{
    static const Cursor c = loadCursorByName("zoomOutCursor", 7, 7);
    return c;
}
Exemplo n.º 2
0
void Cursor::ensurePlatformCursor() const
{
    if (m_platformCursor)
        return;

    switch (m_type) {
    case Cursor::Pointer:
    case Cursor::Cell:
    case Cursor::ContextMenu:
    case Cursor::Alias:
    case Cursor::Copy:
    case Cursor::None:
    case Cursor::Grab:
    case Cursor::Grabbing:
        m_platformCursor = loadSharedCursor(0, IDC_ARROW);
        break;
    case Cursor::Cross:
        m_platformCursor = loadSharedCursor(0, IDC_CROSS);
        break;
    case Cursor::Hand:
        m_platformCursor = loadSharedCursor(0, IDC_HAND);
        break;
    case Cursor::IBeam:
        m_platformCursor = loadSharedCursor(0, IDC_IBEAM);
        break;
    case Cursor::Wait:
        m_platformCursor = loadSharedCursor(0, IDC_WAIT);
        break;
    case Cursor::Help:
        m_platformCursor = loadSharedCursor(0, IDC_HELP);
        break;
    case Cursor::Move:
        m_platformCursor = loadSharedCursor(0, IDC_SIZEALL);
        break;
    case Cursor::MiddlePanning:
        m_platformCursor = loadCursorByName("panIcon", 8, 8);
        break;
    case Cursor::EastResize:
        m_platformCursor = loadSharedCursor(0, IDC_SIZEWE);
        break;
    case Cursor::EastPanning:
        m_platformCursor = loadCursorByName("panEastCursor", 7, 7);
        break;
    case Cursor::NorthResize:
        m_platformCursor = loadSharedCursor(0, IDC_SIZENS);
        break;
    case Cursor::NorthPanning:
        m_platformCursor = loadCursorByName("panNorthCursor", 7, 7);
        break;
    case Cursor::NorthEastResize:
        m_platformCursor = loadSharedCursor(0, IDC_SIZENESW);
        break;
    case Cursor::NorthEastPanning:
        m_platformCursor = loadCursorByName("panNorthEastCursor", 7, 7);
        break;
    case Cursor::NorthWestResize:
        m_platformCursor = loadSharedCursor(0, IDC_SIZENWSE);
        break;
    case Cursor::NorthWestPanning:
        m_platformCursor = loadCursorByName("panNorthWestCursor", 7, 7);
        break;
    case Cursor::SouthResize:
        m_platformCursor = loadSharedCursor(0, IDC_SIZENS);
        break;
    case Cursor::SouthPanning:
        m_platformCursor = loadCursorByName("panSouthCursor", 7, 7);
        break;
    case Cursor::SouthEastResize:
        m_platformCursor = loadSharedCursor(0, IDC_SIZENWSE);
        break;
    case Cursor::SouthEastPanning:
        m_platformCursor = loadCursorByName("panSouthEastCursor", 7, 7);
        break;
    case Cursor::SouthWestResize:
        m_platformCursor = loadSharedCursor(0, IDC_SIZENESW);
        break;
    case Cursor::SouthWestPanning:
        m_platformCursor = loadCursorByName("panSouthWestCursor", 7, 7);
        break;
    case Cursor::WestResize:
        m_platformCursor = loadSharedCursor(0, IDC_SIZEWE);
        break;
    case Cursor::NorthSouthResize:
        m_platformCursor = loadSharedCursor(0, IDC_SIZENS);
        break;
    case Cursor::EastWestResize:
        m_platformCursor = loadSharedCursor(0, IDC_SIZEWE);
        break;
    case Cursor::WestPanning:
        m_platformCursor = loadCursorByName("panWestCursor", 7, 7);
        break;
    case Cursor::NorthEastSouthWestResize:
        m_platformCursor = loadSharedCursor(0, IDC_SIZENESW);
        break;
    case Cursor::NorthWestSouthEastResize:
        m_platformCursor = loadSharedCursor(0, IDC_SIZENWSE);
        break;
    case Cursor::ColumnResize:
        // FIXME: Windows does not have a standard column resize cursor <rdar://problem/5018591>
        m_platformCursor = loadSharedCursor(0, IDC_SIZEWE);
        break;
    case Cursor::RowResize:
        // FIXME: Windows does not have a standard row resize cursor <rdar://problem/5018591>
        m_platformCursor = loadSharedCursor(0, IDC_SIZENS);
        break;
    case Cursor::VerticalText:
        m_platformCursor = loadCursorByName("verticalTextCursor", 7, 7);
        break;
    case Cursor::Progress:
        m_platformCursor = loadSharedCursor(0, IDC_APPSTARTING);
        break;
    case Cursor::NoDrop:
    case Cursor::NotAllowed:
        m_platformCursor = loadSharedCursor(0, IDC_NO);
        break;
    case Cursor::ZoomIn:
        m_platformCursor = loadCursorByName("zoomInCursor", 7, 7);
        break;
    case Cursor::ZoomOut:
        m_platformCursor = loadCursorByName("zoomOutCursor", 7, 7);
        break;
    case Cursor::Custom:
        m_platformCursor = createSharedCursor(m_image.get(), m_hotSpot);
        break;
    default:
        ASSERT_NOT_REACHED();
        m_platformCursor = loadSharedCursor(0, IDC_ARROW);
        break;
    }
}
Exemplo n.º 3
0
const Cursor& verticalTextCursor()
{
    static const Cursor c = loadCursorByName("verticalTextCursor", 7, 7);
    return c;
}