Btk
Btk::DragEvent Struct Reference

A event about mouse drag. More...

#include <event.hpp>

Inheritance diagram for Btk::DragEvent:
Collaboration diagram for Btk::DragEvent:

Public Member Functions

 DragEvent (Event::Type type, int x, int y, int xrel, int yrel)
 Construct a new Drag Event object. More...
 
 DragEvent (Event::Type type, const MotionEvent &motion)
 Construct a new Drag Event object from MotionEvent. More...
 
 DragEvent (const DragEvent &)=default
 
- 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

int x
 
int y
 
int xrel
 
int yrel
 

Additional Inherited Members

- 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
}
 
- Static Public Member Functions inherited from Btk::Event
static Type Register ()
 Register a event type. More...
 

Detailed Description

A event about mouse drag.

Constructor & Destructor Documentation

◆ DragEvent() [1/2]

Btk::DragEvent::DragEvent ( Event::Type  type,
int  x,
int  y,
int  xrel,
int  yrel 
)
inline

Construct a new Drag Event object.

Parameters
typeThe DragEvent type(It can be Drag DragBegin DragEnd)
xThe x which relative to window
yThe y which relative to window
xrelThe x relative to direction
yrelThe y relative to direction

◆ DragEvent() [2/2]

Btk::DragEvent::DragEvent ( Event::Type  type,
const MotionEvent motion 
)
inline

Construct a new Drag Event object from MotionEvent.

Parameters
typeThe DragEvent type(It can be Drag DragBegin DragEnd)
motionThe motion event which you want to get its motion data

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