SoMouseButtonEvent(3)

πŸ“¦ version 3.1.3, in fedora 43, fedora 44

πŸ’– SoMouseButtonEvent(3) πŸ’–

okay bestie, sit down, we're learning about SoMouseButtonEvent πŸ’… this is a page from the Library Functions Manual and it's literally all about mouse buttons in Coin. yes, that Coin. the Coin 3D library. stay with me 🫢


✨ NAME ✨

SoMouseButtonEvent β€” the class that holds all the tea about mousebutton interaction πŸ–±οΈβœ¨


🌸 SYNOPSIS 🌸

#include <Inventor/events/SoMouseButtonEvent.h>

Inherits SoButtonEvent. yes, it's giving nepo baby but make it useful πŸ’œ

πŸŽ€ 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 πŸ’œ

so the SoMouseButtonEvent class contains information about mousebutton interaction. that's the whole vibe, no cap.

when you press any buttons on the mouse, these get translated from a system specific event into a Coin event, and then they get sent to the scenegraph by using instances of this class. it's giving main character energy for your clicks πŸ”₯

See also 🫢

SoEvent, SoButtonEvent, SoSpaceballButtonEvent, SoKeyboardEvent

SoEventCallback, SoHandleEventAction


πŸ“ Member Enumeration Documentation πŸ“

enum SoMouseButtonEvent::Button

this enum contains all mouse buttons detected by Coin. every single one, we're not leaving anybody out πŸ’…

Enumerator:

  • ANY β€” unknown button. it's a mystery, 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 wheelmouse). heads up bestie: this is not part of the original Open Inventor API πŸ‘€
  • BUTTON5 β€” fifth mouse button (typically from a wheelmouse). again, this is not part of the original Open Inventor API πŸ’€

🧚 Constructor & Destructor Documentation 🧚

SoMouseButtonEvent::SoMouseButtonEvent (void )

constructor. she's born ✨

SoMouseButtonEvent::~SoMouseButtonEvent () [virtual]

destructor. she's leaving, and honestly, slay πŸ’…


🌈 Member Function Documentation 🌈

SoType SoMouseButtonEvent::getTypeId (void ) const [virtual]

returns the actual type id of an instantiated object. like, who is she? now you know πŸ’–

reimplemented from SoButtonEvent.

void SoMouseButtonEvent::initClass (void ) [static]

initialize the type information data. get her set up, periodt.

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. iykyk 🫢

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 your clicks ⭐

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. the letting-go moment 😌

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. enum β†’ string, glow up complete πŸ¦‹

this function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API. so don't go looking for it there bestie πŸ’€ Since: Coin 3.0

πŸ‘‘ Author πŸ‘‘

generated automatically by Doxygen for Coin from the source code. not a human, not a girlie, just a doc generator doing her thing πŸ€–βœ¨


and that's the whole page, no notes πŸ’– this was Coin, Version 3.1.3, SoMouseButtonEvent(3), and the date is whatever Doxygen felt like stamping that day 🌸 mwah, go click something iconic πŸŽ€

πŸ“¦ where this page comes from