Btk
Btk::MouseEvent Struct Reference

A event about mouse click. More...

#include <event.hpp>

Inheritance diagram for Btk::MouseEvent:
Collaboration diagram for Btk::MouseEvent:

Public Types

enum  { Pressed, Released }
 Mouse state. More...
 
- Public Types inherited from Btk::Event
enum  Type : Uint32 {
  SetRect = 0, KeyBoard = 1, Enter = 2, Leave = 3,
  Motion = 4, Click = 5, DragBegin = 6, Drag = 7,
  DragEnd = 8, TextInput = 9, TakeFocus = 10, LostFocus = 11,
  Enable = 12, Disable = 13, Wheel = 14, User = 1000,
  UserMax = UINT32_MAX - 1, Error = UINT32_MAX
}
 

Public Member Functions

 MouseEvent ()
 Construct a new Mouse Event object. More...
 
 MouseEvent (const MouseEvent &)=default
 
bool is_pressed () const noexcept
 
bool is_released () const noexcept
 
bool is_up () const noexcept
 
bool is_down () const noexcept
 
Vec2 position () const noexcept
 
- Public Member Functions inherited from Btk::Event
Type type () const noexcept
 
 Event (Type t)
 
 Event (const Event &ev)
 
bool is_accepted () const noexcept
 is accepted More...
 
void accept () noexcept
 
void reject () noexcept
 
void set_type (Type t) noexcept
 Chaneg the event type. More...
 

Public Attributes

enum Btk::MouseEvent:: { ... }  state
 Mouse state. More...
 
struct {
   Uint8   value
 
button
 Which button? More...
 
Uint8 clicks
 Clicks count. More...
 
int x
 Mouse position. More...
 
int y
 

Additional Inherited Members

- Static Public Member Functions inherited from Btk::Event
static Type Register ()
 Register a event type. More...
 

Detailed Description

A event about mouse click.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Mouse state.

Constructor & Destructor Documentation

◆ MouseEvent()

Btk::MouseEvent::MouseEvent ( )
inline

Construct a new Mouse Event object.

Parameters
eventmust be MouseButtonEvent

Member Data Documentation

◆ button

struct { ... } Btk::MouseEvent::button

Which button?

◆ clicks

Uint8 Btk::MouseEvent::clicks

Clicks count.

◆ state

enum { ... } Btk::MouseEvent::state

Mouse state.

◆ x

int Btk::MouseEvent::x

Mouse position.


The documentation for this struct was generated from the following files: