mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-18 14:56:07 +00:00
Added SetCursor() override so that we will change the cursor when layout tells us.
This commit is contained in:
parent
6a9df623cb
commit
feabe7080f
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user