SoButtonEvent(3)

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

πŸ’– SoButtonEvent πŸ’–

okay bestie, welcome to SoButtonEvent(3) from the Library Functions Manual β€” this is the glow-up guide to the base class of every button event in Coin. buckle up πŸŽ€


✨ NAME ✨

SoButtonEvent β€” the base class for all button events. yes, ALL of them. she's the mother. πŸ‘‘


🌸 SYNOPSIS 🌸

#include <Inventor/events/SoButtonEvent.h>

Inherits SoEvent.

Inherited by SoKeyboardEvent, SoMouseButtonEvent, and SoSpaceballButtonEvent. it's giving family tree, fr fr 🌳

πŸ’« Public Types

  • enum State { UP, DOWN, UNKNOWN }

πŸ’« Public Member Functions

  • virtual SoType getTypeId (void) const
  • SoButtonEvent (void)
  • virtual ~SoButtonEvent ()
  • void setState (SoButtonEvent::State state)
  • SoButtonEvent::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 Public Member Functions inherited from SoEvent

  • static SoType getClassTypeId (void)
  • static void initClass (void)

πŸ¦‹ Detailed Description πŸ¦‹

The SoButtonEvent class is the base class for all button events. periodt.

The event classes which results from the user pushing buttons on some device β€” keyboard, mouse or spaceball β€” all inherit this class. so like, whenever a human physically presses a thing, this is the blueprint underneath. πŸ’… The SoButtonEvent class contains methods for setting and getting the state of the button(s). set and get. the whole vibe. ✨

See also

  • SoEvent, SoKeyboardEvent, SoMouseButtonEvent, SoSpaceballButtonEvent
  • SoEventCallback, SoHandleEventAction

πŸŽ€ Member Enumeration Documentation πŸŽ€

enum SoButtonEvent::State

This gives the actual state of the button. the vibe check of the button, if you will.

Enumerator

  • UP β€” Button has been released. she's free, she's out, she left πŸ•ŠοΈ
  • DOWN β€” Button has been pressed down. she's committed. she's in it. πŸ‘‡
  • UNKNOWN β€” The state of the button is unknown. mystery era, we simply do not know 😭

πŸ’œ Constructor & Destructor Documentation πŸ’œ

SoButtonEvent::SoButtonEvent (void )

Constructor. the birth of a button event, iconic.

References UNKNOWN.

Referenced by getTypeId(), initClass(), SoKeyboardEvent::initClass(), SoMouseButtonEvent::initClass(), SoSpaceballButtonEvent::initClass(), SoSpaceballButtonEvent::isButtonPressEvent(), SoSpaceballButtonEvent::isButtonReleaseEvent(), SoKeyboardEvent::isKeyPressEvent(), and SoKeyboardEvent::isKeyReleaseEvent().

SoButtonEvent::~SoButtonEvent () [virtual]

Destructor. rest in peace, bestie 🫢


⭐ Member Function Documentation ⭐

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

Returns the actual type id of an instantiated object. she knows exactly who she is. no identity crisis here. πŸ‘‘

Reimplemented from SoEvent.

Reimplemented in SoKeyboardEvent, SoMouseButtonEvent, and SoSpaceballButtonEvent.

References SoButtonEvent().

void SoButtonEvent::setState (SoButtonEvent::State state)

Set the state of the button which the user interacted with. you're literally telling the event how it's feeling today.

This method is used from the window specific device classes when translating events to the generic Coin library. iykyk πŸ”₯

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 main character AND she's telling you exactly what happened. πŸ’…

See also

  • wasShiftDown(), wasCtrlDown(), wasAltDown(), getPosition(), getTime()

Referenced by SoMouseButtonEvent::isButtonPressEvent(), and SoMouseButtonEvent::isButtonReleaseEvent().

void SoButtonEvent::initClass (void ) [static]

Initialize the type information data. gotta set up the lore before anyone shows up, no cap.

References SoButtonEvent(), and SoEvent::SoEvent().


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for Coin from the source code. yeah, the docs wrote themselves. slay. πŸ€–βœ¨


and that's the whole page, bestie!! this was Coin, Version 2.5.0 πŸͺ™πŸ’– thanks for reading all the way to the bottom, you're genuinely the realest β€” go forth and handle those events, queen πŸŒˆπŸ¦‹πŸŽ€

πŸ“¦ where this page comes from