wxShapeFramework  1.13.0 beta
EventSink Class Reference

Auxiliary class used by wxSFControlShape. All events generated by a GUI control (widget) managed by parent control shape are redirected to this event sink which invokes a default event handler or send a copy of the event to shape canvas if requested. More...

#include <ControlShape.h>

Inheritance diagram for EventSink:
Collaboration diagram for EventSink:

Public Member Functions

 EventSink ()
 Default constructor. More...
 
 EventSink (wxSFControlShape *parent)
 User constructor. More...
 
virtual ~EventSink ()
 Destructor. More...
 
void _OnMouseButton (wxMouseEvent &event)
 Event handler used for delayed processing of a mouse button events. The handler creates new key event instance and sends it to a shape canvas for further processing. More...
 
void _OnMouseMove (wxMouseEvent &event)
 Event handler used for delayed processing of a mouse event (mouse movement). The handler creates new key event instance and sends it to a shape canvas for further processing. More...
 
void _OnKeyDown (wxKeyEvent &event)
 Event handler used for delayed processing of a key event. The handler creates new key event instance and sends it to a shape canvas for further processing. More...
 
void _OnSize (wxSizeEvent &event)
 Event handler used for adjusting the parent shape's size in accordance to size of managed GUI control. More...
 

Protected Member Functions

void SendEvent (wxEvent &event)
 Send copy of incomming event to a shape canvas. More...
 
void UpdateMouseEvent (wxMouseEvent &event)
 Modify given mouse event (recalculate the event's position in accordance to parent control shape's position. More...
 

Protected Attributes

wxSFControlShapem_pParentShape
 Poineter to parent contol shape. More...
 

Detailed Description

Auxiliary class used by wxSFControlShape. All events generated by a GUI control (widget) managed by parent control shape are redirected to this event sink which invokes a default event handler or send a copy of the event to shape canvas if requested.

Constructor & Destructor Documentation

◆ EventSink() [1/2]

EventSink::EventSink ( )

Default constructor.

◆ EventSink() [2/2]

EventSink::EventSink ( wxSFControlShape parent)

User constructor.

Parameters
parentPointer to parent control shape

◆ ~EventSink()

virtual EventSink::~EventSink ( )
virtual

Destructor.

Member Function Documentation

◆ _OnKeyDown()

void EventSink::_OnKeyDown ( wxKeyEvent &  event)

Event handler used for delayed processing of a key event. The handler creates new key event instance and sends it to a shape canvas for further processing.

Parameters
eventKeyboard event

◆ _OnMouseButton()

void EventSink::_OnMouseButton ( wxMouseEvent &  event)

Event handler used for delayed processing of a mouse button events. The handler creates new key event instance and sends it to a shape canvas for further processing.

Parameters
eventMouse event

◆ _OnMouseMove()

void EventSink::_OnMouseMove ( wxMouseEvent &  event)

Event handler used for delayed processing of a mouse event (mouse movement). The handler creates new key event instance and sends it to a shape canvas for further processing.

Parameters
eventMouse event

◆ _OnSize()

void EventSink::_OnSize ( wxSizeEvent &  event)

Event handler used for adjusting the parent shape's size in accordance to size of managed GUI control.

◆ SendEvent()

void EventSink::SendEvent ( wxEvent &  event)
protected

Send copy of incomming event to a shape canvas.

Parameters
eventEvent to be send

◆ UpdateMouseEvent()

void EventSink::UpdateMouseEvent ( wxMouseEvent &  event)
protected

Modify given mouse event (recalculate the event's position in accordance to parent control shape's position.

Parameters
eventMouse event to be updated;

Member Data Documentation

◆ m_pParentShape

wxSFControlShape* EventSink::m_pParentShape
protected

Poineter to parent contol shape.


The documentation for this class was generated from the following file: