SoMouseButtonEvent(3)
π SoMouseButtonEvent(3) π
okay bestie, welcome to the SoMouseButtonEvent(3) page of the Coin manual, section 3 β yes the classic "library functions" section, we love her π . This is where the mouse-button gossip lives.
β¨ NAME β¨
SoMouseButtonEvent β the class that's literally holding all the tea about mouse button interaction π±οΈπ
πΈ SYNOPSIS πΈ
#include <Inventor/events/SoMouseButtonEvent.h>
Inherits SoButtonEvent. Yes, she's part of the family tree, keep scrolling for the whole ancestry π§¬β¨
π Public Types π
enum Button { ANY, BUTTON1, BUTTON2, BUTTON3, BUTTON4, BUTTON5 }
Public Types inherited from SoButtonEvent
enum State { UP, DOWN, UNKNOWN }
π Public Member Functions π
virtual SoType getTypeId (void) constSoMouseButtonEvent (void)virtual ~SoMouseButtonEvent ()void setButton (Button button)Button getButton (void) const
Public Member Functions inherited from SoButtonEvent
SoButtonEvent (void)virtual ~SoButtonEvent ()void setState (State state)State getState (void) const
Public Member Functions inherited from SoEvent
SoEvent (void)virtual ~SoEvent ()SbBool isOfType (SoType type) constvoid setTime (const SbTime t)SbTime getTime (void) constvoid setPosition (const SbVec2s &p)const SbVec2s & getPosition (void) constconst SbVec2s & getPosition (const SbViewportRegion &vpRgn) constconst SbVec2f & getNormalizedPosition (const SbViewportRegion &vpRgn) constvoid setShiftDown (SbBool isDown)SbBool wasShiftDown (void) constvoid setCtrlDown (SbBool isDown)SbBool wasCtrlDown (void) constvoid setAltDown (SbBool isDown)SbBool wasAltDown (void) const
π Static Public Member Functions π
static SoType getClassTypeId (void)static void initClass (void)static SbBool isButtonPressEvent (const SoEvent *e, Button whichButton)static SbBool isButtonReleaseEvent (const SoEvent *e, Button whichButton)static SbBool enumToString (Button enumval, SbString &stringrep)
Static Public Member Functions inherited from SoButtonEvent
static SoType getClassTypeId (void)static void initClass (void)static SbBool enumToString (State enumval, SbString &stringrep)
Static Public Member Functions inherited from SoEvent
static SoType getClassTypeId (void)static void initClass (void)
π¦ Detailed Description π¦
The SoMouseButtonEvent class contains information about mouse button interaction. that's the whole job, and she does it flawlessly. π
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. so like, your OS is speaking one language, Coin is speaking another, and this class is the bilingual bestie doing the translating π«Άβ¨
π See also π
SoEvent, SoButtonEvent, SoSpaceballButtonEvent, SoKeyboardEvent
SoEventCallback, SoHandleEventAction
π Member Enumeration Documentation π
π« enum SoMouseButtonEvent::Button π«
This enum contains all mouse buttons detected by Coin. yes, ALL of them, she's thorough.
Enumerator
ANYβ Unknown button. (mystery button, we don't know her π)BUTTON1β First mouse button (usually the leftmost button).BUTTON2β Second mouse button (usually the middle button).BUTTON3β Third mouse button (usually the rightmost button).BUTTON4β Fourth mouse button (typically from a wheel mouse). This is not part of the original Open Inventor API. coin-only behavior, iykyk β¨BUTTON5β Fifth mouse button (typically from a wheel mouse). This is not part of the original Open Inventor API. same energy, coin exclusive β¨
π Constructor & Destructor Documentation π
π SoMouseButtonEvent::SoMouseButtonEvent (void ) π
Constructor. she's born β¨
π SoMouseButtonEvent::~SoMouseButtonEvent () [virtual] π
Destructor. she's gone, RIP queen π«‘
π₯ Member Function Documentation π₯
β SoType SoMouseButtonEvent::getClassTypeId (void ) [static] β
This static method returns the SoType object associated with objects of this class. the class's own little ID card πͺͺ
β SoType SoMouseButtonEvent::getTypeId (void ) const [virtual] β
Returns the type identification of an object derived from a class inheriting SoEvent. This is used for runtime type checking and "downward" casting. downward casting, we love a flexible icon π
Reimplemented from SoButtonEvent.
β void SoMouseButtonEvent::initClass (void ) [static] β
Initialize the type information data. gotta set up the whole type system before the party starts β¨
β void SoMouseButtonEvent::setButton (SoMouseButtonEvent::Button buttonarg) β
Set the value of the button which the user interacted with.
This method is used from the window specific device classes when translating events to the generic Coin library.
See also
getButton()
β SoMouseButtonEvent::Button SoMouseButtonEvent::getButton (void ) const β
Returns the value of the button which was pressed or released.
See also
getState()
wasShiftDown(), wasCtrlDown(), wasAltDown(), getPosition(), getTime()
β SbBool SoMouseButtonEvent::isButtonPressEvent (const SoEvent * e, SoMouseButtonEvent::Button whichButton) [static] β
Convenience method for quickly checking if the given event is a press on the given button, whichButton. quick lil vibe check on a button press, no cap π«Ά
See also
isButtonReleaseEvent(), isOfType(), getButton(), getState()
β SbBool SoMouseButtonEvent::isButtonReleaseEvent (const SoEvent * e, SoMouseButtonEvent::Button whichButton) [static] β
Convenience method for quickly checking if the given event is a release of the given button, whichButton. same energy but for letting go π
See also
isButtonPressEvent(), isOfType(), getButton(), getState()
β SbBool SoMouseButtonEvent::enumToString (Button enumval, SbString & stringrep) [static] β
Converts from an enum value of type SoMouseButtonEvent::Button to a string containing the enum symbol.
This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API.
Since
Coin 3.0
π Author π
Generated automatically by Doxygen for Coin from the source code. (not me writing this by hand, it's the robot's handwriting fr fr π€π )
okay that's the whole page bestie, nothing skipped, every flag, enum, function and see-also survived the makeover πβ¨
and that's a wrap on Version 4.0.10, dated Thu Jun 25 2026 00:00:00 β SoMouseButtonEvent(3) out, slay, periodt ππ¦π
π¦ where this page comes from
- fedora 43: Coin4-devel 4.0.10-1.fc43 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 43: Coin4-devel 4.0.10-1.fc43 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 44: Coin4-devel 4.0.10-1.fc44 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 44: Coin4-devel 4.0.10-1.fc44 Β· BSD-3-Clause AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms