X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0004982c831f56c65c390fb617711ff52595c2f3..ed0dd9c1f0e9a79b5110d59b903a5f1fd9ee6c42:/interface/wx/cursor.h diff --git a/interface/wx/cursor.h b/interface/wx/cursor.h index 5a6f9997fc..194db591aa 100644 --- a/interface/wx/cursor.h +++ b/interface/wx/cursor.h @@ -80,7 +80,7 @@ @see wxBitmap, wxIcon, wxWindow::SetCursor(), wxSetCursor(), ::wxStockCursor */ -class wxCursor : public wxBitmap +class wxCursor : public wxGDIObject { public: /** @@ -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,32 @@ 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. + - 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,