wx.Cursor Class Reference

Inheritance diagram for wx.Cursor:

wx.GDIObject wx.Object wx.ICanBeMadeReadonly

List of all members.

Public Member Functions

 Cursor (Cursor cursor)
 Cursor (Image image)
 Cursor (StockCursor id)
 Cursor (IntPtr wxObject)
bool Ok ()

Static Public Member Functions

static void SetCursor (Cursor cursor)


Detailed Description

A cursor is a small bitmap usually used for denoting where the mouse pointer is, with a picture that might indicate the interpretation of a mouse click. As with icons, cursors in X and MS Windows are created in a different manner. Therefore, separate cursors will be created for the different environments. Platform-specific methods for creating a wxCursor object are catered for, and this is an occasion where conditional compilation will probably be required (see wxIcon for an example).

A single cursor object may be used in many windows (any subwindow type). The wx.NET convention is to set the cursor for a window, as in X, rather than to set it globally as in MS Windows.


Constructor & Destructor Documentation

wx.Cursor.Cursor ( IntPtr  wxObject  ) 

wx.Cursor.Cursor ( StockCursor  id  ) 

wx.Cursor.Cursor ( Image  image  ) 

Constructs a cursor from a wxImage. If the cursor is monochrome on the current platform, colors with the RGB elements all greater than 127 will be foreground, colors less than this will be background. The mask (if any) will be used to specify the transparent area.

In wxMSW the foreground will be white and the background black. If the cursor is larger than 32x32 it is resized.

In wxGTK, colour cursors and alpha channel are supported (starting from GTK+ 2.2). Otherwise the two most frequent colors will be used for foreground and background. In any case, the cursor will be displayed at the size of the image.

In wxMac, if the cursor is larger than 16x16 it is resized and currently only shown as black/white (mask respected).

Parameters:
image The image that will be displayed as a mouse cursor.

wx.Cursor.Cursor ( Cursor  cursor  ) 


Member Function Documentation

bool wx.Cursor.Ok (  ) 

static void wx.Cursor.SetCursor ( Cursor  cursor  )  [static]


Manual of the wx.NET   (c) 2003-2011 the wx.NET project at   Get wx.NET at SourceForge.net. Fast, secure and Free Open Source software downloads