SOBUTTONEVENT(3iv)

πŸ’– SoButtonEvent(3IV) πŸ’–

okay bestie, we're doing the SoButtonEvent manual page, from the 3IV manual, and honestly? it's giving "quiet foundational icon that everyone depends on." let's get into it 🫢


✨ NAME ✨

SoButtonEvent β€” the base class for, like, all button events. every button event you've ever met? yeah, this is their mom.


🌸 INHERITS FROM 🌸

SoEvent > SoButtonEvent

so the family tree is: SoEvent is the parent, and SoButtonEvent is the extremely competent eldest child. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <Inventor/events/SoButtonEvent.h>

enum State {
     SoButtonEvent::UP       Button up event
     SoButtonEvent::DOWN     Button down event
     SoButtonEvent::UNKNOWN  Button in unknown state
}

Methods from class SoButtonEvent:

                  SoButtonEvent()
static SoType         getClassTypeId()
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 πŸ¦‹

so SoButtonEvent represents the generic button press and release events in the Inventor event model. it's the base class for all the device-specific button events, bestie β€” namely SoKeyboardEvent, SoMouseButtonEvent, and SoSpaceballButtonEvent. no cap. 🎯

and what does this class actually store? the down/up state of the button at the exact moment the event happened. that's its whole thing. simple, iconic, essential. πŸ‘‘


πŸ’… METHODS πŸ’…

  • SoButtonEvent() β€” the constructor, obviously. it's the "hi bestie, welcome to existence" moment. ✨
  • static SoType getClassTypeId() β€” returns the type id for the SoButtonEvent class. that's it, that's the whole job. 🫢
  • void setState(SoButtonEvent::State s)
  • SoButtonEvent::State getState() const

set and get the state of the button. one does the setting, one does the getting. a duo. a dynamic. main character energy fr. πŸ’–


🌈 SEE ALSO 🌈

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

like, the whole friend group. go read them next, i promise it's worth it. 🧚


ok and for the cute sign-off: this was the SoButtonEvent(3IV) page, living in the 3IV manual, and the date field down there at the bottom is literally blank β€” an empty string, a vibe, a mystery. we love a low-effort footer. πŸ’€πŸŒΈ