Properties | |
typedef colourBitmap | colorBitmap |
HANDLE | handle () |
The Windows handle of this cursor or icon. | |
ICONINFO | info () |
The specification of this icon as a Windows ICONINFO structure. | |
Bitmap | maskBitmap () |
The bitmask of the cursor or icon. | |
Bitmap | colourBitmap () |
The colour image of the cursor or icon. | |
RectDim | dim () |
The dimensions of the cursor or icon. | |
int | width () |
The width of the cursor or icon. | |
int | height () |
The width of the cursor or icon. | |
Point | hotspot () |
The coordinates of the cursor's hotspot. | |
abstract CursorOrIcon | dup () |
Creates a copy of the cursor or icon. | |
abstract CursorOrIcon | resize (int width, int height, bool monochrome=false, bool fromResource=true) |
Creates a resized image of the cursor or icon. | |
abstract CursorOrIcon | resize (RectDim dim, bool monochrome=false, bool fromResource=true) |
Creates a resized image of the cursor or icon. | |
Operators | |
final override intBool | opEquals (Object o) |
Determines whether this CursorOrIcon is equal to another object. | |
final bool | opEquals (CursorOrIcon c) |
Determines whether this CursorOrIcon is equal to another CursorOrIcon. | |
this (HANDLE h, bool autoDelete, bool fromResource, uint imageType) | |
Constructs a CursorOrIcon to wrap the given handle. | |
this (inout ICONINFO info, bool autoDelete, uint imageType) | |
Constructs a CursorOrIcon from the given specification. | |
this (CursorOrIcon orig, int width, int height, uint flags) |
Because mouse cursors and icons are very similar in the way Windows handles them, this base class exists to encapsulate operations that are common to both.
typedef colourBitmap smjg.libs.sdwf.cursor_icon.CursorOrIcon.colorBitmap |
smjg.libs.sdwf.cursor_icon.CursorOrIcon.this | ( | HANDLE | h, | |
bool | autoDelete, | |||
bool | fromResource, | |||
uint | imageType | |||
) | [protected] |
Constructs a CursorOrIcon to wrap the given handle.
h | Windows handle of the cursor or icon to be wrapped. | |
autoDelete | whether the Windows handle should be automatically deleted when the SDWF object is garbage collected. This will generally be true for application-created objects and false for stock objects. | |
imageType | 1 if it's an icon; 2 if it's a cursor |
smjg.libs.sdwf.cursor_icon.CursorOrIcon.this | ( | inout ICONINFO | info, | |
bool | autoDelete, | |||
uint | imageType | |||
) | [protected] |
Constructs a CursorOrIcon from the given specification.
info | a structure specifying the characteristics and image of the cursor or icon. | |
autoDelete | whether the Windows handle should be be automatically deleted when the SDWF object is garbage collected. This will generally be true for application-created objects and false for stock objects and those loaded from resources. | |
imageType | 1 if it's an icon; 2 if it's a cursor. |
smjg.libs.sdwf.cursor_icon.CursorOrIcon.this | ( | CursorOrIcon | orig, | |
int | width, | |||
int | height, | |||
uint | flags | |||
) | [protected] |
HANDLE smjg.libs.sdwf.cursor_icon.CursorOrIcon.handle | ( | ) |
The Windows handle of this cursor or icon.
ICONINFO smjg.libs.sdwf.cursor_icon.CursorOrIcon.info | ( | ) |
The specification of this icon as a Windows ICONINFO
structure.
Bitmap smjg.libs.sdwf.cursor_icon.CursorOrIcon.maskBitmap | ( | ) |
The bitmask of the cursor or icon.
For a monochrome image, the upper half is the AND bitmask and the lower half is the XOR bitmask.
AND bit XOR bit Resulting colour 0 0 Black 0 1 White 1 0 Transparent 1 1 Inverse
For a colour image, this bitmap is only the AND bitmask, and the colourBitmap property gives the XOR bitmask.
Bitmap smjg.libs.sdwf.cursor_icon.CursorOrIcon.colourBitmap | ( | ) |
The colour image of the cursor or icon.
This is the XOR bitmask of a colour cursor or icon. In layperson's terms, it's the image on a black background.
For a monochrome cursor or icon, this member will be null.
RectDim smjg.libs.sdwf.cursor_icon.CursorOrIcon.dim | ( | ) |
The dimensions of the cursor or icon.
Usually this will be equal to the system icon or cursor size.
int smjg.libs.sdwf.cursor_icon.CursorOrIcon.width | ( | ) |
The width of the cursor or icon.
int smjg.libs.sdwf.cursor_icon.CursorOrIcon.height | ( | ) |
The width of the cursor or icon.
Point smjg.libs.sdwf.cursor_icon.CursorOrIcon.hotspot | ( | ) |
abstract CursorOrIcon smjg.libs.sdwf.cursor_icon.CursorOrIcon.dup | ( | ) | [pure virtual] |
Creates a copy of the cursor or icon.
Implemented in smjg.libs.sdwf.cursor_icon.MouseCursor, and smjg.libs.sdwf.cursor_icon.Icon.
abstract CursorOrIcon smjg.libs.sdwf.cursor_icon.CursorOrIcon.resize | ( | int | width, | |
int | height, | |||
bool | monochrome = false , |
|||
bool | fromResource = true | |||
) | [pure virtual] |
Creates a resized image of the cursor or icon.
width | the new width in pixels. | |
height | the new height in pixels. | |
monochrome | whether to convert the image to monochrome. | |
fromResource | whether to reload the resource (if applicable) and look for an image of the desired size. |
Implemented in smjg.libs.sdwf.cursor_icon.MouseCursor, and smjg.libs.sdwf.cursor_icon.Icon.
abstract CursorOrIcon smjg.libs.sdwf.cursor_icon.CursorOrIcon.resize | ( | RectDim | dim, | |
bool | monochrome = false , |
|||
bool | fromResource = true | |||
) | [pure virtual] |
Creates a resized image of the cursor or icon.
dim | the new dimensions in pixels. | |
monochrome | whether to convert the image to monochrome. | |
fromResource | whether to reload the resource (if applicable) and look for an image of the desired size. |
Implemented in smjg.libs.sdwf.cursor_icon.MouseCursor, and smjg.libs.sdwf.cursor_icon.Icon.
final override intBool smjg.libs.sdwf.cursor_icon.CursorOrIcon.opEquals | ( | Object | o | ) |
Determines whether this CursorOrIcon is equal to another object.
final bool smjg.libs.sdwf.cursor_icon.CursorOrIcon.opEquals | ( | CursorOrIcon | c | ) |
Determines whether this CursorOrIcon is equal to another CursorOrIcon.
Two CursorOrIcon objects are equal iff they have the same handle, i.e. they represent a single copy of a cursor or icon.