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 theSoMouseButtonEventclass. the class's little ID card, if you will π³void setButton(SoMouseButtonEvent::Button b)andSoMouseButtonEvent::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)andstatic 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 passSoMouseButtonEvent::ANY, it returnsTRUEif 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 ππβ¨
π¦ where this page comes from
- debian bookworm: inventor-doc 2.1.5-10+dfsg-2 Β· LGPL-2.0-or-later
- debian trixie: inventor-doc 2.1.6+ds-2 Β· LGPL-2.0-or-later
- ubuntu jammy: inventor-doc 2.1.5-10-24
- ubuntu noble: inventor-doc 2.1.5-10+dfsg-2.1build2 Β· LGPL-2.0-or-later
- ubuntu questing: inventor-doc 2.1.6+ds-2
- ubuntu resolute: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- ubuntu stonking: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms