SoButtonEvent(3)
π NAME π
SoButtonEvent β it's giving "the base class for all button events," and honestly? Mother. This is from the Coin manual, and she's iconic. π
β¨ SYNOPSIS β¨
#include <Inventor/events/SoButtonEvent.h>
Bestie, real quick, the family tree: this class Inherits SoEvent. And Inherited by SoKeyboardEvent, SoMouseButtonEvent, and SoSpaceballButtonEvent β yeah, she's got kids. π
π Public Types π
enum State { UP, DOWN, UNKNOWN }β the three moods of a button, no cap.
π«Ά Public Member Functions π«Ά
virtual SoType getTypeId (void) constβ tells you what type this actually is at runtime.SoButtonEvent (void)β constructor, hello.virtual ~SoButtonEvent ()β destructor, bye.void setState (State state)β set the state, slay.State getState (void) constβ read the state back out.
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)β the class-level type id, periodt.static void initClass (void)β sets everything up.static SbBool enumToString (State enumval, SbString &stringrep)β enum to string, so handy.
Static Public Member Functions inherited from SoEvent
static SoType getClassTypeId (void)static void initClass (void)
πΈ Detailed Description πΈ
So like, the SoButtonEvent class is the base class for all button events. That's the whole vibe.
Every event class that pops off when a user pushes buttons on some device β keyboard, mouse, or spaceball β inherits from this one. So if you're picturing the family reunion, they're all there. π§ The SoButtonEvent class is the one holding the methods for setting and getting the state of the button(s).
See also
SoEvent,SoKeyboardEvent,SoMouseButtonEvent,SoSpaceballButtonEventSoEventCallback,SoHandleEventAction
π¦ Member Enumeration Documentation π¦
enum SoButtonEvent::State
This is literally the actual state of the button. Like, what is she doing right now. π
UPβ Button has been released. She's free, she's at peace. ποΈDOWNβ Button has been pressed down. Committed. Pressed. Down. πUNKNOWNβ The state of the button is unknown. We do not know her. π€·ββοΈ
π Constructor & Destructor Documentation π
SoButtonEvent::SoButtonEvent (void )
Constructor. Baby's first button event. π
SoButtonEvent::~SoButtonEvent () [virtual]
Destructor. She's leaving the group chat. π
β Member Function Documentation β
SoType SoButtonEvent::getClassTypeId (void ) [static]
This static method returns the SoType object associated with objects of this class. No cap.
SoType SoButtonEvent::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. Bestie, it's the vibe check for types. π
Reimplemented from SoEvent.
Reimplemented in SoKeyboardEvent, SoMouseButtonEvent, and SoSpaceballButtonEvent.
void SoButtonEvent::initClass (void ) [static]
Initialize the type information data. Just do it, fr fr. β¨
void SoButtonEvent::setState (SoButtonEvent::State state)
Set the state 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. So it's the translator of the whole operation, lowkey essential.
See also
getState()
SoButtonEvent::State SoButtonEvent::getState (void ) const
Returns the state of the button which is the cause of the event, i.e. whether it was pushed down or released. She's the one who did this. π₯
See also
wasShiftDown(),wasCtrlDown(),wasAltDown(),getPosition(),getTime()
SbBool SoButtonEvent::enumToString (State enumval, SbString & stringrep) [static]
Converts from an enum value of type SoButtonEvent::State to a string containing the enum symbol. Translating enum energy into text energy, we love to see it. π«Ά
This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API.
Heads up bestie β this one is Coin-only. The original SGI Open Inventor v2.1 API does not have it. Don't go looking for it there. π
Since
- Coin 3.0
π Author π
Generated automatically by Doxygen for Coin from the source code. Not a human author, just a very productive robot. π€π
Okay so that's the whole page, and here's the cute lil sign-off: this is Version 4.0.10, dated Thu Jun 25 2026 00:00:00, and it lives in the manual as SoButtonEvent(3). Byeee, go press some buttons. π
πβ¨
π¦ 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