Package autodesk_toxik :: Module ui :: Class CursorGuard
[frames] | no frames]

Class CursorGuard

 object --+    
          |    
Boost.Python.instance --+
              |
             CursorGuard

Cursor guard to change the current cursor to an alternate cursor, automatically reverting to previous cursor when going out of scope.

Example:

   def longFunc():
       # Change to a busy cursor, this will take long.
       cg = ui.CursorGuard( ui.Cursor.BUSY )
       doSomethingThatTakesALongTime()

   def popSomeUi():
       # While the message box is up, make sure we have a normal cursor.
       cg = ui.CursorGuard( ui.Cursor.NORMAL )
       ui.showMessage( 'demo', 'This is a demo' )
Instance Methods
 
__init__(...)
CursorGuard constructor.
 
__reduce__(...)
helper for pickle

Inherited from Boost.Python.instance: __new__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  __instance_size__ = 24
Properties

Inherited from object: __class__

Method Details

__init__(...)
(Constructor)

 

CursorGuard constructor.

Parameters:
Overrides: object.__init__

__reduce__(...)

 

helper for pickle

Overrides: object.__reduce__
(inherited documentation)