GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Table of Contents
  • wx.CursorBundle
  • Show Source
  • index
  • modules
  • next
  • previous
  • Home
  • Gallery
  • wx

This view

  • Original page
  • New address

GeezerVison is showing docs.wxpython.org — wx.CursorBundle — wxPython 4.3.2 Docs

phoenix_title wx.CursorBundle¶

A cursor bundle is a set of different versions of the same cursor at different sizes.

This class relationship with wx.Cursor is similar to that of wx.BitmapBundle with wx.Bitmap, but it has a simpler interface because cursors are never scaled and always use the closest available size. It is typically used like the following:

Please see wx.BitmapBundle documentation for more information about different ways of creating it.

Added in version 4.3/wxWidgets-3.3.0.


class_hierarchy Class Hierarchy¶

Inheritance diagram for class CursorBundle:

Inheritance diagram of CursorBundle


method_summary Methods Summary¶

__init__

Default constructor constructs an empty bundle.

Clear

Clear the bundle contents.

GetCursorFor

Get the cursor of the size suitable for the given window.

GetCursorForMainWindow

Get the cursor of the default size.

IsOk

Check if cursor bundle is non-empty.

IsSameAs

Check if two objects refer to the same bundle.


property_summary Properties Summary¶

CursorForMainWindow

See GetCursorForMainWindow


api Class API¶

class wx.CursorBundle(object)¶

Possible constructors:

CursorBundle() -> None

CursorBundle(bitmaps, hotSpot) -> None

CursorBundle(bitmaps, hotSpotX=0, hotSpotY=0) -> None

CursorBundle(other) -> None

CursorBundle(cursor) -> None

A cursor bundle is a set of different versions of the same cursor at different sizes.


Methods¶

__init__(self, *args, **kw)¶

overload Overloaded Implementations:



__init__ (self)

Default constructor constructs an empty bundle.

Such bundle represents the absence of any custom cursor but not an empty cursor (CURSOR_BLANK can be used if this is really needed).

You can use the assignment operator to set the bundle contents later.

Return type:

None



__init__ (self, bitmaps, hotSpot)

Create a cursor bundle from the given bitmap bundle.

Parameters:
  • bitmaps (wx.BitmapBundle) – The bitmap bundle to use for the cursor, typically containing bitmap in at least two sizes.

  • hotSpot (wx.Point) – Hotspot coordinates (relative to the top left of the image). The coordinates are relative to the default size of the bitmap bundle and are scaled by wxWidgets for other sizes.

Return type:

None



__init__ (self, bitmaps, hotSpotX=0, hotSpotY=0)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters:
  • bitmaps (wx.BitmapBundle)

  • hotSpotX (int)

  • hotSpotY (int)

Return type:

None



__init__ (self, other)

Copy constructor performs a shallow copy of the bundle.

This operation is cheap as it doesn’t copy any bitmaps.

Parameters:

other (wx.CursorBundle)

Return type:

None



__init__ (self, cursor)

Construct a CursorBundle from a single Cursor.

Return type:

None





Clear(self)¶

Clear the bundle contents.

IsOk will return False after doing this.

Use the assignment operator to set the bundle contents later.

Return type:

None



GetCursorFor(self, window)¶

Get the cursor of the size suitable for the given window.

Parameters:

window (wx.Window)

Return type:

wx.Cursor



GetCursorForMainWindow(self)¶

Get the cursor of the default size.

Prefer to use GetCursorFor instead if there is a suitable window available, this function only exists as last resort.

Return type:

wx.Cursor



IsOk(self)¶

Check if cursor bundle is non-empty.

Return type:

bool



IsSameAs(self, other)¶

Check if two objects refer to the same bundle.

Note that this compares the object identity, i.e. this function returns True only for copies of the same bundle, but False for two bundles created from the same bitmap bundle and same hotspot coordinates.

Parameters:

other (wx.CursorBundle)

Return type:

bool


Properties¶

CursorForMainWindow¶

See GetCursorForMainWindow

© Copyright 2012-2026, The wxPython Team. Created using Sphinx 9.1.0 and the python-docs-theme.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.