зеркало из https://github.com/mozilla/pjs.git
Added SetCursor() override so that we will change the cursor when layout tells us.
This commit is contained in:
Родитель
f526dd542d
Коммит
23e3504554
|
@ -348,6 +348,38 @@ nsIMenuBar* nsWindow::GetMenuBar()
|
|||
return mMenuBar;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// SetCursor
|
||||
//
|
||||
// Override to set the cursor on the mac
|
||||
//
|
||||
NS_METHOD nsWindow::SetCursor(nsCursor aCursor)
|
||||
{
|
||||
nsBaseWidget::SetCursor(aCursor);
|
||||
|
||||
// mac specific cursor manipulation
|
||||
switch ( aCursor ) {
|
||||
case eCursor_standard:
|
||||
::InitCursor();
|
||||
break;
|
||||
case eCursor_wait:
|
||||
::SetCursor(*(::GetCursor(watchCursor)));
|
||||
break;
|
||||
case eCursor_select:
|
||||
::SetCursor(*(::GetCursor(iBeamCursor)));
|
||||
break;
|
||||
case eCursor_hyperlink:
|
||||
//¥¥¥ For now. We need a way to get non-os cursors here.
|
||||
::SetCursor(*(::GetCursor(plusCursor)));
|
||||
break;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
||||
} // nsWindow :: SetCursor
|
||||
|
||||
|
||||
#pragma mark -
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
|
|
|
@ -128,6 +128,8 @@ public:
|
|||
virtual nsIMenuBar* GetMenuBar();
|
||||
NS_IMETHOD GetPreferredSize(PRInt32& aWidth, PRInt32& aHeight);
|
||||
NS_IMETHOD SetPreferredSize(PRInt32 aWidth, PRInt32 aHeight);
|
||||
|
||||
NS_IMETHOD SetCursor(nsCursor aCursor);
|
||||
|
||||
// Mac specific methods
|
||||
void nsRectToMacRect(const nsRect& aRect, Rect& aMacRect) const;
|
||||
|
|
Загрузка…
Ссылка в новой задаче