proc getHotspot(self: wCursor): wPoint {...}{.raises: [], tags: [].}
-
Returns the coordinates of the cursor hotspot.
proc getSize(self: wCursor): wSize {...}{.raises: [], tags: [].}
-
Returns the size of the cursor.
proc getWidth(self: wCursor): int {...}{.inline, raises: [], tags: [].}
-
Gets the width of the cursor in pixels.
proc getHeight(self: wCursor): int {...}{.inline, raises: [], tags: [].}
-
Gets the height of the cursor in pixels.
proc init(self: wCursor; hCursor: HCURSOR; copy = true; shared = false;
hotspot = wDefaultPoint) {...}{.raises: [wCursorError], tags: [].}
-
Initializes a cursor from system cursor handle. If copy is false, the function only wrap the handle to wCursor object. If shared is false, the handle will be destroyed together with wCursor object by the GC. Otherwise, the caller is responsible for destroying it. Hotspot can be changed if needed.
proc Cursor(hCursor: HCURSOR; copy = true; shared = false; hotspot = wDefaultPoint): wCursor {...}{.
inline, discardable, raises: [wCursorError], tags: [].}
-
Constructor.
proc init(self: wCursor; id: wStockCursor) {...}{.raises: [wCursorError], tags: [].}
-
Initializes a cursor using a cursor identifier.
proc Cursor(id: wStockCursor): wCursor {...}{.inline, discardable, raises: [wCursorError],
tags: [].}
-
Constructor.
proc init(self: wCursor; iconImage: wIconImage; size = wDefaultSize;
hotspot = wDefaultPoint) {...}{.raises: [wNilAccess, wNilAccess, Exception,
wCursorError], tags: [RootEffect].}
-
Initializes a cursor from an icon image. If hotspot is wDefaultPoint, it use the hotspot stored in wIconImage object. If it is wDefaultPoint too, the creation failed.
proc Cursor(iconImage: wIconImage; size = wDefaultSize; hotspot = wDefaultPoint): wCursor {...}{.
inline, discardable, raises: [wNilAccess, Exception, wCursorError],
tags: [RootEffect].}
-
Constructor.
proc init(self: wCursor; icon: wIcon; hotspot: wPoint) {...}{.inline,
raises: [wNilAccess, wCursorError], tags: [].}
-
Initializes a cursor from the given wIcon object and hotspot.
proc Cursor(icon: wIcon; hotspot: wPoint): wCursor {...}{.inline, discardable,
raises: [wNilAccess, wCursorError], tags: [].}
-
Constructor.
proc init(self: wCursor; image: wImage; hotspot: wPoint) {...}{.inline,
raises: [wNilAccess, wNilAccess, Exception, wCursorError], tags: [RootEffect].}
-
Initializes a cursor from the given wImage object and hotspot.
proc Cursor(image: wImage; hotspot: wPoint): wCursor {...}{.inline, discardable,
raises: [wNilAccess, Exception, wCursorError], tags: [RootEffect].}
-
Constructor.
proc init(self: wCursor; bmp: wBitmap; hotspot: wPoint) {...}{.inline,
raises: [wNilAccess, wNilAccess, Exception, wCursorError], tags: [RootEffect].}
-
Initializes a cursor from the given wBitmap object and hotspot.
proc Cursor(bmp: wBitmap; hotspot: wPoint): wCursor {...}{.inline, discardable,
raises: [wNilAccess, Exception, wCursorError], tags: [RootEffect].}
-
Constructor.
proc init(self: wCursor; cursor: wCursor; hotspot = wDefaultPoint) {...}{.inline,
raises: [wNilAccess, wCursorError], tags: [].}
-
Initializes a cursor by wCursor object, aka. copy. Hotspot can be changed if needed.
proc Cursor(cursor: wCursor; hotspot = wDefaultPoint): wCursor {...}{.inline, discardable,
raises: [wNilAccess, wCursorError], tags: [].}
-
Constructor.
proc init(self: wCursor; data: pointer; length: int; size = wDefaultSize;
hotspot = wDefaultPoint) {...}{.raises: [wNilAccess, wNilAccess, Exception,
wCursorError], tags: [RootEffect].}
-
Initializes a cursor from binary data of .ico, .cur, or .ani file.
proc Cursor(data: pointer; length: int; size = wDefaultSize; hotspot = wDefaultPoint): wCursor {...}{.
inline, discardable, raises: [wNilAccess, Exception, wCursorError],
tags: [RootEffect].}
-
Constructor.
proc init(self: wCursor; str: string; size = wDefaultSize; hotspot = wDefaultPoint) {...}{.
raises: [wNilAccess, Exception, wCursorError], tags: [RootEffect, ReadIOEffect].}
-
Initializes a cursor from a file. The file should be in format of .ico, .cur, .ani, or Windows PE file (.exe or .dll, etc). If str is not a valid file path, it will be regarded as the binary data of .ico, .cur, or .ani file.
For Windows PE file (.exe or .dll), it allows string like "shell32.dll,-10" to specifies the icon index or "shell32.dll:-1001" to to specifies the cursor index. Use zero-based index to specified the resource position, and negative value to specified the resource identifier. Empty filename (e.g. ",-1") to specified the current executable file.
proc Cursor(str: string; size = wDefaultSize; hotspot = wDefaultPoint): wCursor {...}{.inline,
discardable, raises: [wNilAccess, Exception, wCursorError],
tags: [RootEffect, ReadIOEffect].}
-
Constructor.