iCursor Struct Reference
This interface is used to access the custom cursor plugin, which handles processing for displaying pixmaps as cursors. More...
#include <custcursor.h>
Inheritance diagram for iCursor:

Public Methods | |
virtual bool | Setup (iGraphics3D *, bool forceEmulation=false)=0 |
Must be called before custom cursors will be displayed. | |
virtual bool | ParseConfigFile (const char *iFile)=0 |
Load cursor settings from a config file in VFS. | |
virtual void | SetCursor (const char *name, iImage *image, csRGBcolor keycolor, csPoint hotspot=csPoint(0, 0), uint8 alpha=0, csRGBcolor fg=csRGBcolor(255, 255, 255), csRGBcolor bg=csRGBcolor(0, 0, 0))=0 |
Adds or replaces a cursor called name. | |
virtual void | SetHotspot (const char *name, csPoint hotspot)=0 |
Sets the hotspot (center) of the specified cursor on the pixmap. | |
virtual void | SetAlpha (const char *name, uint8 alpha)=0 |
Sets the alpha transparency of the specified cursor. | |
virtual void | SetKeyColor (const char *name, csRGBcolor col)=0 |
Set key colour of the specified cursor. | |
virtual void | SetColor (const char *name, csRGBcolor fg, csRGBcolor bg)=0 |
Set the foreground and background colors of the cursor. | |
virtual const csRef< iImage > | GetCursorImage (const char *name) const=0 |
Get cursor image of the specified cursor Returns a reference to NULL if there is no cursor with this name. | |
virtual csPoint | GetHotspot (const char *name) const=0 |
Get the hotspot (center) of the specified cursor on the pixmap. | |
virtual uint8 | GetAlpha (const char *name) const=0 |
Get the alpha transparency of the specified cursor. | |
virtual csRGBcolor | GetKeyColor (const char *name) const=0 |
Get key colour of the specified cursor. | |
virtual csRGBcolor | GetFGColor (const char *name) const=0 |
Get the foreground color of the cursor. | |
virtual csRGBcolor | GetBGColor (const char *name) const=0 |
Get the background color of the cursor. | |
virtual bool | RemoveCursor (const char *name)=0 |
Completely remove a cursor. | |
virtual void | RemoveAllCursors ()=0 |
Remove all cursors. | |
virtual bool | SwitchCursor (const char *name)=0 |
Switches the current cursor displayed to the specified cursor. |
Detailed Description
This interface is used to access the custom cursor plugin, which handles processing for displaying pixmaps as cursors.Any number of cursors can be set, indexed by key strings, along with hotspots, and alpha transparency. Supports both static csSimplePixmap cursors and csAnimatedPixmap cursors.
Definition at line 38 of file custcursor.h.
Member Function Documentation
|
Get the alpha transparency of the specified cursor. Returns default 0 if there is no cursor with this name |
|
Get the background color of the cursor. These will only be used when in OS mode on systems which only support monochrome cursors Returns default 0,0,0 if there is no cursor with this name |
|
Get cursor image of the specified cursor Returns a reference to NULL if there is no cursor with this name. This getter safely can be used to check if a cursor is defined or not without switching |
|
Get the foreground color of the cursor. These will only be used when in OS mode on systems which only support monochrome cursors Returns default 255,255,255 if there is no cursor with this name |
|
Get the hotspot (center) of the specified cursor on the pixmap. Returns default 0,0 if there is no cursor with this name |
|
Get key colour of the specified cursor. Returns default 0,0,0 if there is no cursor with this name |
|
Load cursor settings from a config file in VFS.
|
|
Remove all cursors.
|
|
Completely remove a cursor.
|
|
Sets the alpha transparency of the specified cursor. This will only work if the OS supports this, or you are in emulation mode |
|
Set the foreground and background colors of the cursor. These will only be used when in OS mode on systems which only support monochrome cursors |
|
Adds or replaces a cursor called name. Currently you can only register an iImage - a simple pixmap will then be created for use in emulation mode |
|
Sets the hotspot (center) of the specified cursor on the pixmap.
|
|
Set key colour of the specified cursor.
|
|
Must be called before custom cursors will be displayed. If you want to use software emulation mode on all platforms, set the forceEmulation argument to true. |
|
Switches the current cursor displayed to the specified cursor. Disables automatic switching of cursors on mouse events; The system defaults to CSCURSOR_Default. In this mode, it will also automatically switch to CSCURSOR_MouseDown when the mouse is pressed |
The documentation for this struct was generated from the following file:
- ivideo/custcursor.h
Generated for Crystal Space by doxygen 1.2.18