Implement CSS2 resize cursors on Windows (bug 1916)

This commit is contained in:
michael.lowe%bigfoot.com 2000-04-30 15:29:32 +00:00
Родитель 2d4c0ff91a
Коммит e406b651c3
5 изменённых файлов: 38 добавлений и 6 удалений

Просмотреть файл

@ -1135,12 +1135,17 @@ nsEventStateManager::SetCursor(PRInt32 aCursor, nsIWidget* aWidget, PRBool aLock
case NS_STYLE_CURSOR_E_RESIZE:
c = eCursor_sizeWE;
break;
//We don't have cursors defined for these in nsIWidget. Need them to fix this.
case NS_STYLE_CURSOR_NE_RESIZE:
case NS_STYLE_CURSOR_NW_RESIZE:
c = eCursor_sizeNW;
break;
case NS_STYLE_CURSOR_SE_RESIZE:
c = eCursor_sizeSE;
break;
case NS_STYLE_CURSOR_NE_RESIZE:
c = eCursor_sizeNE;
break;
case NS_STYLE_CURSOR_SW_RESIZE:
c = eCursor_select;
c = eCursor_sizeSW;
break;
}

Просмотреть файл

@ -1135,12 +1135,17 @@ nsEventStateManager::SetCursor(PRInt32 aCursor, nsIWidget* aWidget, PRBool aLock
case NS_STYLE_CURSOR_E_RESIZE:
c = eCursor_sizeWE;
break;
//We don't have cursors defined for these in nsIWidget. Need them to fix this.
case NS_STYLE_CURSOR_NE_RESIZE:
case NS_STYLE_CURSOR_NW_RESIZE:
c = eCursor_sizeNW;
break;
case NS_STYLE_CURSOR_SE_RESIZE:
c = eCursor_sizeSE;
break;
case NS_STYLE_CURSOR_NE_RESIZE:
c = eCursor_sizeNE;
break;
case NS_STYLE_CURSOR_SW_RESIZE:
c = eCursor_select;
c = eCursor_sizeSW;
break;
}

Просмотреть файл

@ -148,6 +148,11 @@ enum nsCursor { ///(normal cursor, usually rendered as an arrow)
eCursor_sizeWE,
///(north/south sizing, usually rendered as sizeWE rotated 90 degrees)
eCursor_sizeNS,
///(corner sizing)
eCursor_sizeNW,
eCursor_sizeSE,
eCursor_sizeNE,
eCursor_sizeSW,
eCursor_arrow_north,
eCursor_arrow_north_plus,
eCursor_arrow_south,

Просмотреть файл

@ -837,6 +837,13 @@ NS_IMETHODIMP nsWidget::SetCursor(nsCursor aCursor)
newCursor = gdk_cursor_new(GDK_TCROSS);
break;
case eCursor_sizeNW:
case eCursor_sizeSE:
case eCursor_sizeNE:
case eCursor_sizeSW:
// XXX: these resize cursors need to be implemented
break;
case eCursor_arrow_south:
case eCursor_arrow_south_plus:
newCursor = gdk_cursor_new(GDK_BOTTOM_SIDE);

Просмотреть файл

@ -1621,6 +1621,16 @@ NS_METHOD nsWindow::SetCursor(nsCursor aCursor)
newCursor = ::LoadCursor(NULL, IDC_SIZENS);
break;
case eCursor_sizeNW:
case eCursor_sizeSE:
newCursor = ::LoadCursor(NULL, IDC_SIZENWSE);
break;
case eCursor_sizeNE:
case eCursor_sizeSW:
newCursor = ::LoadCursor(NULL, IDC_SIZENESW);
break;
case eCursor_arrow_north:
newCursor = ::LoadCursor(nsToolkit::mDllInstance, MAKEINTRESOURCE(IDC_ARROWNORTH));
break;