X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/956f3da353dbdb932fb71b1ad769d03adb8bf045..3399af21d10d3f8ce4f39dfb29df5546ab265ef6:/interface/wx/cursor.h diff --git a/interface/wx/cursor.h b/interface/wx/cursor.h index b4c398cdbd..1a823893ce 100644 --- a/interface/wx/cursor.h +++ b/interface/wx/cursor.h @@ -3,7 +3,7 @@ // Purpose: interface of wxCursor // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// /** @@ -104,13 +104,17 @@ public: @param height Cursor height. @param hotSpotX - Hotspot x coordinate. + Hotspot x coordinate (relative to the top left of the image). @param hotSpotY - Hotspot y coordinate. + Hotspot y coordinate (relative to the top left of the image). @param maskBits Bits for a mask bitmap. @onlyfor{wxgtk,wxmotif} + + @beginWxPerlOnly + In wxPerl use Wx::Cursor->newData(bits, width, height, hotSpotX = -1, hotSpotY = -1, maskBits = 0). + @endWxPerlOnly */ wxCursor(const char bits[], int width, int height, int hotSpotX = -1, int hotSpotY = -1, @@ -119,39 +123,34 @@ public: /** Constructs a cursor by passing a string resource name or filename. - @note - On MacOS when specifying a string resource name, first the color - cursors 'crsr' and then the black/white cursors 'CURS' in the resource - chain are scanned through. - - @a hotSpotX and @a hotSpotY are currently only used under Windows when - loading from an icon file, to specify the cursor hotspot relative to - the top left of the image. + The arguments @a hotSpotX and @a hotSpotY are only used when there's no + hotspot info in the resource/image-file to load (e.g. when using + @c wxBITMAP_TYPE_ICO under wxMSW or @c wxBITMAP_TYPE_XPM under wxGTK). @param cursorName The name of the resource or the image file to load. @param type - Icon type to load. It defaults to wxCURSOR_DEFAULT_TYPE, + Icon type to load. It defaults to @c wxCURSOR_DEFAULT_TYPE, which is a @#define associated to different values on different platforms: - - under Windows, it defaults to wxBITMAP_TYPE_CUR_RESOURCE. - - under MacOS, it defaults to wxBITMAP_TYPE_MACCURSOR_RESOURCE. - - under GTK, it defaults to wxBITMAP_TYPE_XPM. - - under X11, it defaults to wxBITMAP_TYPE_XPM. - - under Motif, type defaults to wxBITMAP_TYPE_XBM. - Under Windows, the permitted types are: - - wxBITMAP_TYPE_CUR - Load a cursor from a .cur cursor file (only - if USE_RESOURCE_LOADING_IN_MSW is enabled in - setup.h). - - wxBITMAP_TYPE_CUR_RESOURCE - Load a Windows resource - (as specified in the .rc file). - - wxBITMAP_TYPE_ICO - Load a cursor from a .ico icon file (only if - USE_RESOURCE_LOADING_IN_MSW is enabled in - setup.h). Specify @a hotSpotX and @a hotSpotY. + - under Windows, it defaults to @c wxBITMAP_TYPE_CUR_RESOURCE. + Other permitted types under Windows are @c wxBITMAP_TYPE_CUR + (to load a cursor from a .cur cursor file) and @c wxBITMAP_TYPE_ICO + (to load a cursor from a .ico icon file). + - under MacOS, it defaults to @c wxBITMAP_TYPE_MACCURSOR_RESOURCE; + when specifying a string resource name, first the color cursors 'crsr' + and then the black/white cursors 'CURS' in the resource chain are scanned + through. Note that resource forks are deprecated on OS X so this + is only available for legacy reasons and should not be used in + new code. + - under GTK, it defaults to @c wxBITMAP_TYPE_XPM. + See the wxCursor(const wxImage& image) ctor for more info. + - under X11, it defaults to @c wxBITMAP_TYPE_XPM. + - under Motif, it defaults to @c wxBITMAP_TYPE_XBM. @param hotSpotX - Hotspot x coordinate. + Hotspot x coordinate (relative to the top left of the image). @param hotSpotY - Hotspot y coordinate. + Hotspot y coordinate (relative to the top left of the image). */ wxCursor(const wxString& cursorName, wxBitmapType type = wxCURSOR_DEFAULT_TYPE,