SOMOUSEBUTTONEVENT(3iv)

πŸ’– SoMouseButtonEvent β€” like, the whole vibe πŸ’–

okay bestie, welcome to SoMouseButtonEvent(3IV) β€” yes that's section 3 of the Inventor manual, we're deep in the library pages now and honestly? iconic. this is the page about mouse button press and release events. grab a strawberry, sit down, let's go πŸ“


🌸 NAME 🌸

SoMouseButtonEvent β€” mouse button press and release events


πŸ¦‹ INHERITS FROM πŸ¦‹

SoEvent > SoButtonEvent > SoMouseButtonEvent

(yes it's a whole lineage, we love a family tree πŸ‘‘)


✨ SYNOPSIS ✨

#include <Inventor/events/SoMouseButtonEvent.h>

#define SO_MOUSE_PRESS_EVENT(EVENT,BUTTON)
    (SoMouseButtonEvent::isButtonPressEvent(EVENT,SoMouseButtonEvent::BUTTON))
#define SO_MOUSE_RELEASE_EVENT(EVENT,BUTTON)
    (SoMouseButtonEvent::isButtonReleaseEvent(EVENT,SoMouseButtonEvent::BUTTON))
enum Button {
     SoMouseButtonEvent::ANY      Any button
     SoMouseButtonEvent::BUTTON1  First mouse button
     SoMouseButtonEvent::BUTTON2  Second mouse button
     SoMouseButtonEvent::BUTTON3  Third mouse button
}

Methods from class SoMouseButtonEvent:

                              SoMouseButtonEvent()
static SoType               getClassTypeId()
void                        setButton(SoMouseButtonEvent::Button b)
SoMouseButtonEvent::Button  getButton() const
static SbBool               isButtonPressEvent(const SoEvent *e,
                                   SoMouseButtonEvent::Button whichButton)
static SbBool               isButtonReleaseEvent(const SoEvent *e,
                                   SoMouseButtonEvent::Button whichButton)

Methods from class SoButtonEvent:

void                  setState(SoButtonEvent::State s)
SoButtonEvent::State  getState() const

Methods from class SoEvent:

virtual SoType      getTypeId() const
SbBool              isOfType(SoType type) const
void                setTime(SbTime t)
SbTime              getTime() const
void                setPosition(const SbVec2s &p)
const SbVec2s &     getPosition() const
const SbVec2s &     getPosition(const SbViewportRegion &vpRgn) const
const SbVec2f &     getNormalizedPosition(const SbViewportRegion &vpRgn)
                         const
void                setShiftDown(SbBool isDown)
void                setCtrlDown(SbBool isDown)
void                setAltDown(SbBool isDown)
SbBool              wasShiftDown() const
SbBool              wasCtrlDown() const
SbBool              wasAltDown() const

πŸ’… DESCRIPTION πŸ’…

SoMouseButtonEvent represents mouse button press and release events in the Inventor event model.

that's it. that's the whole thing. it's the little guy that carries "bestie clicked" through the Inventor event pipeline πŸ–±οΈβœ¨


πŸŽ€ METHODS πŸŽ€

  • SoMouseButtonEvent() β€” the constructor. it makes the thing. that's the job 🫢
  • static SoType getClassTypeId() β€” hands you the type id for the SoMouseButtonEvent class. the class's little ID card, if you will πŸ’³
  • void setButton(SoMouseButtonEvent::Button b) and SoMouseButtonEvent::Button getButton() const β€” these set and get which mouse button generated the event. so like, was it button one, two, or three? the drama of it all 😭
  • static SbBool isButtonPressEvent(const SoEvent *e, SoMouseButtonEvent::Button whichButton) and static SbBool isButtonReleaseEvent(const SoEvent *e, SoMouseButtonEvent::Button whichButton) β€” these return whether the event you passed in is a mouse button press or release event of the button you passed in. and here's the slay: when you pass SoMouseButtonEvent::ANY, it returns TRUE if the event represents a button press or release of any mouse button. one check, every button, periodt πŸ’…

🌈 SEE ALSO 🌈

SoEvent, SoButtonEvent, SoKeyboardEvent, SoLocation2Event, SoMotion3Event, SoSpaceballButtonEvent, SoHandleEventAction, SoEventCallback, SoSelection, SoInteraction, SoXtDevice

like, go read those too, they're all in the same friend group iykyk 🧚


and that's the page!! it's SoMouseButtonEvent(3IV)() from the SoMouseButtonEvent(3IV)() manual, and yeah the footer literally just says the same thing twice β€” the source/version line and the date line both just echo the page name back at you like a mirror. cute of them honestly. mwah, go click something πŸ’–πŸŽ€βœ¨