Is the resize mouse cursor used by Preview (e.g. when resizing shapes) a system cursor?
It's not available directly as a method in NSCursor
but then it doesn't look like there's a private resource for the cursor in the Preview app's bundle either..
Are there more system cursors other than the methods defined by the NSCursor
class..?
I think you are particularly interested in these class methods (Preview.app dissasembly).
+[NSCursor resizeAngle45Cursor]; which calls +[NSCursor _windowResizeNorthEastSouthWestCursor];
+[NSCursor resizeAngle135Cursor]; which calls +[NSCursor _windowResizeNorthWestSouthEastCursor];
According to disassembly of AppKit these are private methods of NSCursor.
You can try it in your code e.g.
(void)mouseDown:(NSEvent *)theEvent
{
[[self window] disableCursorRects];
id cursor = [[NSCursor class] performSelector:@selector(_windowResizeNorthEastSouthWestCursor)];
[cursor push];
}
There are more undocumented cursors such as
+[NSCursor _helpCursor];
+[NSCursor _zoomInCursor];
+[NSCursor _zoomOutCursor];
and many many more
来源:https://stackoverflow.com/questions/27242353/cocoa-predefined-resize-mouse-cursor