Om  1.0.0
A universal framework for multimedia simulation
Public Types | Public Member Functions | Static Public Member Functions | List of all members
om::gui::objects::Cursor Class Reference

A class that represents a mouse cursor. More...

#include <omGUICursor.h>

Inheritance diagram for om::gui::objects::Cursor:
om::gui::objects::GUIObject

Public Types

enum  Type {
  UNDEFINED, ARROW, I_BEAM, CROSS,
  HAND_OPEN, HAND_CLOSED, HAND_POINTING, RESIZE_X,
  RESIZE_Y, NOT_ALLOWED
}
 An enum that specifies standard cursor types. More...
 

Public Member Functions

 Cursor (Type newType)
 Create a new cursor that has the specified standard cursor type. More...
 
 ~Cursor ()
 Destroy a cursor and release its internal resources. More...
 
Type getType () const
 Return an enum that indicates the type of this cursor, or UNDEFINED if it has none. More...
 
virtual void * getInternalPointer () const
 Return a pointer to this cursor's platform-specific internal representation. More...
 
- Public Member Functions inherited from om::gui::objects::GUIObject
virtual ~GUIObject ()
 Destroy a GUI element and release all resources associated with it. More...
 

Static Public Member Functions

static const Cursorget ()
 Return a pointer to the current cursor. More...
 
static Bool push (const Cursor *cursor)
 Make the specified cursor the current cursor on top of the cursor stack. More...
 
static Bool push (Type type)
 Make the specified standard cursor the current cursor on top of the cursor stack. More...
 
static Bool pop ()
 Remove the previous cursor from the cursor stack, restoring the cursor beneath it. More...
 
static Bool getIsVisible ()
 Return whether or not the current global system cursor is visible. More...
 
static Bool setIsVisible (Bool newIsVisible)
 Set whether or not the current global system cursor is visible. More...
 

Detailed Description

A class that represents a mouse cursor.

Member Enumeration Documentation

An enum that specifies standard cursor types.

Enumerator
UNDEFINED 

An undefined cursor type. Defaults to the standard cursor.

ARROW 

The standard arrow cursor.

I_BEAM 

The vertical I-beam cursor for indicating text insertion points for horizontal layouts.

CROSS 

A crosshair cursor.

HAND_OPEN 

A cursor that looks like an open hand.

HAND_CLOSED 

A cursor that looks like a closed hand.

HAND_POINTING 

A cursor that looks like a pointing hand.

RESIZE_X 

A cursor with two horizontal arrows for resizing left and right.

RESIZE_Y 

A cursor with two vertical arrows for resizing up and down.

NOT_ALLOWED 

A cursor that indicates that an operation is not allowed.

Constructor & Destructor Documentation

om::gui::objects::Cursor::Cursor ( Type  newType)

Create a new cursor that has the specified standard cursor type.

om::gui::objects::Cursor::~Cursor ( )

Destroy a cursor and release its internal resources.

Member Function Documentation

Type om::gui::objects::Cursor::getType ( ) const
inline

Return an enum that indicates the type of this cursor, or UNDEFINED if it has none.

virtual void* om::gui::objects::Cursor::getInternalPointer ( ) const
virtual

Return a pointer to this cursor's platform-specific internal representation.

On Mac OS X, this method returns a pointer to a NSCursor object.

On Windows, this method returns an HCURSOR indicating a handle to the cursor.

Implements om::gui::objects::GUIObject.

static const Cursor* om::gui::objects::Cursor::get ( )
static

Return a pointer to the current cursor.

static Bool om::gui::objects::Cursor::push ( const Cursor cursor)
static

Make the specified cursor the current cursor on top of the cursor stack.

The method returns whether or not the operation was successful.

static Bool om::gui::objects::Cursor::push ( Type  type)
static

Make the specified standard cursor the current cursor on top of the cursor stack.

The method returns whether or not the operation was successful.

static Bool om::gui::objects::Cursor::pop ( )
static

Remove the previous cursor from the cursor stack, restoring the cursor beneath it.

The method returns whether or not the operation was successful.

static Bool om::gui::objects::Cursor::getIsVisible ( )
static

Return whether or not the current global system cursor is visible.

static Bool om::gui::objects::Cursor::setIsVisible ( Bool  newIsVisible)
static

Set whether or not the current global system cursor is visible.

This method attempts to set the global system cursor to be either visible or hidden based on the specified boolean value. If the visibility change operation is successful, TRUE is returned. Otherwise, false is returned and no visiblity is changed.


The documentation for this class was generated from the following file: