OpenCMISS-Zinc C++ API Documentation
Public Types | Public Member Functions | Protected Attributes | List of all members
OpenCMISS::Zinc::Sceneviewerinput Class Reference

Describes a mouse event for processing by the sceneviewer. More...

#include <sceneviewerinput.hpp>

Public Types

enum  ButtonType {
  BUTTON_TYPE_INVALID = CMZN_SCENEVIEWERINPUT_BUTTON_TYPE_INVALID, BUTTON_TYPE_LEFT = CMZN_SCENEVIEWERINPUT_BUTTON_TYPE_LEFT, BUTTON_TYPE_MIDDLE = CMZN_SCENEVIEWERINPUT_BUTTON_TYPE_MIDDLE, BUTTON_TYPE_RIGHT = CMZN_SCENEVIEWERINPUT_BUTTON_TYPE_RIGHT,
  BUTTON_TYPE_SCROLL_DOWN = CMZN_SCENEVIEWERINPUT_BUTTON_TYPE_SCROLL_DOWN, BUTTON_TYPE_SCROLL_UP = CMZN_SCENEVIEWERINPUT_BUTTON_TYPE_SCROLL_UP
}
 
enum  EventType {
  EVENT_TYPE_INVALID = CMZN_SCENEVIEWERINPUT_EVENT_TYPE_INVALID, EVENT_TYPE_MOTION_NOTIFY = CMZN_SCENEVIEWERINPUT_EVENT_TYPE_MOTION_NOTIFY, EVENT_TYPE_BUTTON_PRESS = CMZN_SCENEVIEWERINPUT_EVENT_TYPE_BUTTON_PRESS, EVENT_TYPE_BUTTON_RELEASE = CMZN_SCENEVIEWERINPUT_EVENT_TYPE_BUTTON_RELEASE,
  EVENT_TYPE_KEY_PRESS = CMZN_SCENEVIEWERINPUT_EVENT_TYPE_KEY_PRESS, EVENT_TYPE_KEY_RELEASE = CMZN_SCENEVIEWERINPUT_EVENT_TYPE_KEY_RELEASE
}
 
enum  ModifierFlag {
  MODIFIER_FLAG_NONE = CMZN_SCENEVIEWERINPUT_MODIFIER_FLAG_NONE, MODIFIER_FLAG_SHIFT = CMZN_SCENEVIEWERINPUT_MODIFIER_FLAG_SHIFT, MODIFIER_FLAG_CONTROL = CMZN_SCENEVIEWERINPUT_MODIFIER_FLAG_CONTROL, MODIFIER_FLAG_ALT = CMZN_SCENEVIEWERINPUT_MODIFIER_FLAG_ALT,
  MODIFIER_FLAG_BUTTON1 = CMZN_SCENEVIEWERINPUT_MODIFIER_FLAG_BUTTON1
}
 
typedef int ModifierFlags
 

Public Member Functions

 Sceneviewerinput (cmzn_sceneviewerinput_id in_sceneviewerinput_id)
 
 Sceneviewerinput (const Sceneviewerinput &sceneviewerinput)
 
Sceneviewerinputoperator= (const Sceneviewerinput &sceneviewerinput)
 
bool isValid () const
 
cmzn_sceneviewerinput_id getId () const
 
int setPosition (int x, int y)
 
int setButtonType (ButtonType buttonType)
 
int setEventType (EventType eventType)
 
int setModifierFlags (ModifierFlags modifierFlags)
 

Protected Attributes

cmzn_sceneviewerinput_id id
 

Detailed Description

Describes a mouse event for processing by the sceneviewer.

Describes a mouse event for processing by the sceneviewer to produce viewer transformations: tumble, pan, zoom.

See also
Sceneviewer::processSceneviewerinput

Member Typedef Documentation

Type for passing logical OR of ModifierFlag

See also
setModifierFlags

Member Enumeration Documentation

The type of scene viewer input button. It describes the type of mouse buttons interaction to be processed on scene viewer.

Enumerator
BUTTON_TYPE_INVALID 

Unspecified scene viewer input button type.

BUTTON_TYPE_LEFT 

Indicates left mouse click event.

BUTTON_TYPE_MIDDLE 

Indicates middle mouse click event.

BUTTON_TYPE_RIGHT 

Indicates right mouse click event.

BUTTON_TYPE_SCROLL_DOWN 

Indicates scroll down event.

BUTTON_TYPE_SCROLL_UP 

Indicates scroll up event.

Specifies the scene viewer input event type.

Enumerator
EVENT_TYPE_INVALID 

Unspecified scene viewer input event type.

EVENT_TYPE_MOTION_NOTIFY 

indicates the cursor has moved.

EVENT_TYPE_BUTTON_PRESS 

indicates a button on the mouse has been pressed.

EVENT_TYPE_BUTTON_RELEASE 

indicates a button on the mouse has been released.

EVENT_TYPE_KEY_PRESS 

indicates a button on the keyboard has been pressed.

EVENT_TYPE_KEY_RELEASE 

indicates a button on the mouse has been released.

Specifies the scene viewer input modifier flags.

Enumerator
MODIFIER_FLAG_NONE 

Unspecified scene viewer modifier type.

MODIFIER_FLAG_SHIFT 

indicates shift on keyboard has been pressed.

MODIFIER_FLAG_CONTROL 

indicates control on keyboard has been pressed.

MODIFIER_FLAG_ALT 

indicates alt on keyboard has been pressed.

MODIFIER_FLAG_BUTTON1 

indicates button1 on keyboard has been pressed.

Member Function Documentation

cmzn_sceneviewerinput_id OpenCMISS::Zinc::Sceneviewerinput::getId ( ) const
inline

Return the C handle of the Sceneviewerinput object.

Returns
C handle of Sceneviewerinput if this objects is valid, 0 otherwise.
bool OpenCMISS::Zinc::Sceneviewerinput::isValid ( ) const
inline

Check if this is a valid Sceneviewerinput object.

Returns
Status True if object is valid, false otherwise.
int OpenCMISS::Zinc::Sceneviewerinput::setButtonType ( ButtonType  buttonType)
inline

Set the button for the scene viewer input.

Parameters
buttonTypezinc scene viewer input button enumeration value.
Returns
OpenCMISS::Zinc::OK on success, any other value on failure.
int OpenCMISS::Zinc::Sceneviewerinput::setEventType ( EventType  eventType)
inline

Set the scene viewer input event type: button press, motion, etc.

Parameters
eventTypeEnumerator for the input event type.
Returns
OpenCMISS::Zinc::OK if successful, any other value on failure.
int OpenCMISS::Zinc::Sceneviewerinput::setModifierFlags ( ModifierFlags  modifierFlags)
inline

Set modifier flags for the input, e.g. shift, ctrl, alt.

Parameters
modifierFlagsThe input modifier flags to set: logical OR of enum cmzn_sceneviewerinput_modifier_flag.
Returns
OpenCMISS::Zinc::OK if successful, any other value on failure.
int OpenCMISS::Zinc::Sceneviewerinput::setPosition ( int  x,
int  y 
)
inline

Set the position of the input.

Parameters
xThe x-coordinate of the input position.
yThe y-coordinate of the input position.
Returns
OpenCMISS::Zinc::OK if successful, any other value on failure.

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