ManaPlus
Public Member Functions | Protected Attributes
InputGuiEvent Class Reference

#include <inputguievent.h>

Inheritance diagram for InputGuiEvent:
Event KeyEvent MouseEvent

Public Member Functions

 InputGuiEvent (Widget *const source)
 
void consume ()
 
bool isConsumed () const
 
- Public Member Functions inherited from Event
 Event (Widget *const source)
 
virtual ~Event ()
 
WidgetgetSource () const
 

Protected Attributes

bool mIsConsumed
 
- Protected Attributes inherited from Event
WidgetmSource
 

Detailed Description

Base class for all events concerning input.

Author
Olof Naessén

Definition at line 75 of file inputguievent.h.

Constructor & Destructor Documentation

◆ InputGuiEvent()

InputGuiEvent::InputGuiEvent ( Widget *const  source)
inlineexplicit

Constructor.

Parameters
sourceThe source widget of the event.

Definition at line 83 of file inputguievent.h.

83  :
84  Event(source),
85  mIsConsumed(false)
86  { }
Event(Widget *const source)
Definition: event.h:86

Member Function Documentation

◆ consume()

void InputGuiEvent::consume ( )
inline

Marks the event as consumed. Input event listeners may discard consumed input or act on consumed input. An example of a widget that discards consumed input is the ScrollArea widget that discards consumed mouse wheel events so the ScrollArea will not scroll if for instance a Slider's value inside the ScrollArea was changed with the mouse wheel.

See also
isConsumed

Definition at line 100 of file inputguievent.h.

101  { mIsConsumed = true; }

References mIsConsumed.

◆ isConsumed()

bool InputGuiEvent::isConsumed ( ) const
inline

Field Documentation

◆ mIsConsumed

bool InputGuiEvent::mIsConsumed
protected

True if the input event is consumed, false otherwise.

Definition at line 118 of file inputguievent.h.

Referenced by consume(), and isConsumed().


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