.TH "SoMouseButtonEvent" 3 "Fri Sep 6 2024 15:32:06" "Version 4.0.3" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoMouseButtonEvent \- The \fBSoMouseButtonEvent\fP class contains information about mouse button interaction\&. .SH SYNOPSIS .br .PP .PP \fR#include \fP .PP Inherits \fBSoButtonEvent\fP\&. .SS "Public Types" .in +1c .ti -1c .RI "enum \fBButton\fP { \fBANY\fP, \fBBUTTON1\fP, \fBBUTTON2\fP, \fBBUTTON3\fP, \fBBUTTON4\fP, \fBBUTTON5\fP }" .br .in -1c Public Types inherited from \fBSoButtonEvent\fP .in +1c .ti -1c .RI "enum \fBState\fP { \fBUP\fP, \fBDOWN\fP, \fBUNKNOWN\fP }" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "virtual \fBSoType\fP \fBgetTypeId\fP (void) const" .br .ti -1c .RI "\fBSoMouseButtonEvent\fP (void)" .br .ti -1c .RI "virtual \fB~SoMouseButtonEvent\fP ()" .br .ti -1c .RI "void \fBsetButton\fP (\fBButton\fP button)" .br .ti -1c .RI "\fBButton\fP \fBgetButton\fP (void) const" .br .in -1c Public Member Functions inherited from \fBSoButtonEvent\fP .in +1c .ti -1c .RI "\fBSoButtonEvent\fP (void)" .br .ti -1c .RI "virtual \fB~SoButtonEvent\fP ()" .br .ti -1c .RI "void \fBsetState\fP (\fBState\fP state)" .br .ti -1c .RI "\fBState\fP \fBgetState\fP (void) const" .br .in -1c Public Member Functions inherited from \fBSoEvent\fP .in +1c .ti -1c .RI "\fBSoEvent\fP (void)" .br .ti -1c .RI "virtual \fB~SoEvent\fP ()" .br .ti -1c .RI "SbBool \fBisOfType\fP (\fBSoType\fP type) const" .br .ti -1c .RI "void \fBsetTime\fP (const \fBSbTime\fP t)" .br .ti -1c .RI "\fBSbTime\fP \fBgetTime\fP (void) const" .br .ti -1c .RI "void \fBsetPosition\fP (const \fBSbVec2s\fP &p)" .br .ti -1c .RI "const \fBSbVec2s\fP & \fBgetPosition\fP (void) const" .br .ti -1c .RI "const \fBSbVec2s\fP & \fBgetPosition\fP (const \fBSbViewportRegion\fP &vpRgn) const" .br .ti -1c .RI "const \fBSbVec2f\fP & \fBgetNormalizedPosition\fP (const \fBSbViewportRegion\fP &vpRgn) const" .br .ti -1c .RI "void \fBsetShiftDown\fP (SbBool isDown)" .br .ti -1c .RI "SbBool \fBwasShiftDown\fP (void) const" .br .ti -1c .RI "void \fBsetCtrlDown\fP (SbBool isDown)" .br .ti -1c .RI "SbBool \fBwasCtrlDown\fP (void) const" .br .ti -1c .RI "void \fBsetAltDown\fP (SbBool isDown)" .br .ti -1c .RI "SbBool \fBwasAltDown\fP (void) const" .br .in -1c .SS "Static Public Member Functions" .in +1c .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .ti -1c .RI "static void \fBinitClass\fP (void)" .br .ti -1c .RI "static SbBool \fBisButtonPressEvent\fP (const \fBSoEvent\fP *e, \fBButton\fP whichButton)" .br .ti -1c .RI "static SbBool \fBisButtonReleaseEvent\fP (const \fBSoEvent\fP *e, \fBButton\fP whichButton)" .br .ti -1c .RI "static SbBool \fBenumToString\fP (\fBButton\fP enumval, \fBSbString\fP &stringrep)" .br .in -1c Static Public Member Functions inherited from \fBSoButtonEvent\fP .in +1c .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .ti -1c .RI "static void \fBinitClass\fP (void)" .br .ti -1c .RI "static SbBool \fBenumToString\fP (\fBState\fP enumval, \fBSbString\fP &stringrep)" .br .in -1c Static Public Member Functions inherited from \fBSoEvent\fP .in +1c .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .ti -1c .RI "static void \fBinitClass\fP (void)" .br .in -1c .SH "Detailed Description" .PP The \fBSoMouseButtonEvent\fP class contains information about mouse button interaction\&. When the user presses any buttons on the mouse, these will be translated from a system specific event into a Coin event and sent to the scene graph by using instances of this class\&. .PP \fBSee also\fP .RS 4 \fBSoEvent\fP, \fBSoButtonEvent\fP, \fBSoSpaceballButtonEvent\fP, \fBSoKeyboardEvent\fP .PP \fBSoEventCallback\fP, \fBSoHandleEventAction\fP .RE .PP .SH "Member Enumeration Documentation" .PP .SS "enum \fBSoMouseButtonEvent::Button\fP" This enum contains all mouse buttons detected by Coin\&. .PP \fBEnumerator\fP .in +1c .TP \f(BIANY \fP Unknown button\&. .TP \f(BIBUTTON1 \fP First mouse button (usually the leftmost button)\&. .TP \f(BIBUTTON2 \fP Second mouse button (usually the middle button)\&. .TP \f(BIBUTTON3 \fP Third mouse button (usually the rightmost button)\&. .TP \f(BIBUTTON4 \fP Fourth mouse button (typically from a wheel mouse)\&. This is \fInot\fP part of the original Open Inventor API\&. .TP \f(BIBUTTON5 \fP Fifth mouse button (typically from a wheel mouse)\&. This is \fInot\fP part of the original Open Inventor API\&. .SH "Constructor & Destructor Documentation" .PP .SS "SoMouseButtonEvent::SoMouseButtonEvent (void )" Constructor\&. .SS "SoMouseButtonEvent::~SoMouseButtonEvent ()\fR [virtual]\fP" Destructor\&. .SH "Member Function Documentation" .PP .SS "\fBSoType\fP SoMouseButtonEvent::getClassTypeId (void )\fR [static]\fP" This static method returns the \fBSoType\fP object associated with objects of this class\&. .br .SS "\fBSoType\fP SoMouseButtonEvent::getTypeId (void ) const\fR [virtual]\fP" Returns the type identification of an object derived from a class inheriting \fBSoEvent\fP\&. This is used for runtime type checking and 'downward' casting\&. .br .PP Reimplemented from \fBSoButtonEvent\fP\&. .SS "void SoMouseButtonEvent::initClass (void )\fR [static]\fP" Initialize the type information data\&. .SS "void SoMouseButtonEvent::setButton (\fBSoMouseButtonEvent::Button\fP buttonarg)" Set the value of the button which the user interacted with\&. .PP This method is used from the window specific device classes when translating events to the generic Coin library\&. .PP \fBSee also\fP .RS 4 \fBgetButton()\fP .RE .PP .SS "\fBSoMouseButtonEvent::Button\fP SoMouseButtonEvent::getButton (void ) const" Returns the value of the button which was pressed or released\&. .PP \fBSee also\fP .RS 4 \fBgetState()\fP .PP \fBwasShiftDown()\fP, \fBwasCtrlDown()\fP, \fBwasAltDown()\fP, \fBgetPosition()\fP, \fBgetTime()\fP .RE .PP .SS "SbBool SoMouseButtonEvent::isButtonPressEvent (const \fBSoEvent\fP * e, \fBSoMouseButtonEvent::Button\fP whichButton)\fR [static]\fP" Convenience method for quickly checking if the given event is a press on the given button, \fIwhichButton\fP\&. .PP \fBSee also\fP .RS 4 \fBisButtonReleaseEvent()\fP, \fBisOfType()\fP, \fBgetButton()\fP, \fBgetState()\fP .RE .PP .SS "SbBool SoMouseButtonEvent::isButtonReleaseEvent (const \fBSoEvent\fP * e, \fBSoMouseButtonEvent::Button\fP whichButton)\fR [static]\fP" Convenience method for quickly checking if the given event is a release of the given button, \fIwhichButton\fP\&. .PP \fBSee also\fP .RS 4 \fBisButtonPressEvent()\fP, \fBisOfType()\fP, \fBgetButton()\fP, \fBgetState()\fP .RE .PP .SS "SbBool SoMouseButtonEvent::enumToString (\fBButton\fP enumval, \fBSbString\fP & stringrep)\fR [static]\fP" Converts from an enum value of type \fBSoMouseButtonEvent::Button\fP to a string containing the enum symbol\&. .PP This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2\&.1 API\&. .br \fBSince\fP .RS 4 Coin 3\&.0 .RE .PP .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.