SoMouseButtonEvent(3)

πŸ“¦
version 4.0.10 Β· 4 versions
, in fedora 43, fedora 44

πŸ’– 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) const
  • SoMouseButtonEvent (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) const
  • void setTime (const SbTime t)
  • SbTime getTime (void) const
  • void setPosition (const SbVec2s &p)
  • const SbVec2s & getPosition (void) const
  • const SbVec2s & getPosition (const SbViewportRegion &vpRgn) const
  • const SbVec2f & getNormalizedPosition (const SbViewportRegion &vpRgn) const
  • void setShiftDown (SbBool isDown)
  • SbBool wasShiftDown (void) const
  • void setCtrlDown (SbBool isDown)
  • SbBool wasCtrlDown (void) const
  • void 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