NXWidgets  1.19
Public Member Functions | Protected Attributes | List of all members
NXWidgets::CWidgetEventHandlerList Class Reference

#include <cwidgeteventhandlerlist.hxx>

Public Member Functions

 CWidgetEventHandlerList (CNxWidget *widget)
 
 ~CWidgetEventHandlerList (void)
 
bool isEnabled (void) const
 
CWidgetEventHandlerat (int index) const
 
int size (void) const
 
void addWidgetEventHandler (CWidgetEventHandler *eventHandler)
 
void removeWidgetEventHandler (CWidgetEventHandler *eventHandler)
 
void enable (void)
 
void disable (void)
 
void raiseClickEvent (nxgl_coord_t x, nxgl_coord_t y)
 
void raiseDoubleClickEvent (nxgl_coord_t x, nxgl_coord_t y)
 
void raiseReleaseEvent (nxgl_coord_t x, nxgl_coord_t y)
 
void raiseReleaseOutsideEvent (nxgl_coord_t x, nxgl_coord_t y)
 
void raiseDragEvent (nxgl_coord_t x, nxgl_coord_t y, nxgl_coord_t vX, nxgl_coord_t vY)
 
void raiseDropEvent (nxgl_coord_t x, nxgl_coord_t y)
 
void raiseKeyPressEvent (nxwidget_char_t key)
 
void raiseCursorControlEvent (ECursorControl cursorControl)
 
void raiseFocusEvent (void)
 
void raiseBlurEvent (void)
 
void raiseCloseEvent (void)
 
void raiseHideEvent (void)
 
void raiseShowEvent (void)
 
void raiseEnableEvent (void)
 
void raiseDisableEvent (void)
 
void raiseValueChangeEvent (void)
 
void raiseResizeEvent (nxgl_coord_t width, nxgl_coord_t height)
 
void raiseMoveEvent (nxgl_coord_t x, nxgl_coord_t y, nxgl_coord_t vX, nxgl_coord_t vY)
 
void raiseActionEvent (void)
 
void raiseScrollEvent (nxgl_coord_t vX, nxgl_coord_t vY)
 

Protected Attributes

TNxArray< CWidgetEventHandler * > m_widgetEventHandlers
 
CNxWidgetm_widget
 
bool m_isEnabled
 

Detailed Description

List of widget event handlers.

Definition at line 105 of file cwidgeteventhandlerlist.hxx.

Constructor & Destructor Documentation

◆ CWidgetEventHandlerList()

CWidgetEventHandlerList::CWidgetEventHandlerList ( CNxWidget widget)

Constructor.

Parameters
widgetThe owning widget.

Definition at line 101 of file cwidgeteventhandlerlist.cxx.

◆ ~CWidgetEventHandlerList()

NXWidgets::CWidgetEventHandlerList::~CWidgetEventHandlerList ( void  )
inline

Destructor.

Definition at line 126 of file cwidgeteventhandlerlist.hxx.

Member Function Documentation

◆ addWidgetEventHandler()

void CWidgetEventHandlerList::addWidgetEventHandler ( CWidgetEventHandler eventHandler)

Adds a widget event handler. The event handler will receive all events raised by this object.

Parameters
eventHandlerA pointer to the event handler.

Definition at line 124 of file cwidgeteventhandlerlist.cxx.

◆ at()

CWidgetEventHandler* NXWidgets::CWidgetEventHandlerList::at ( int  index) const
inline

Get the event handler at the specified index.

Parameters
indexThe index of the event handler.
Returns
The event handler at the specified index.

Definition at line 143 of file cwidgeteventhandlerlist.hxx.

◆ disable()

void NXWidgets::CWidgetEventHandlerList::disable ( void  )
inline

Disables event raising.

Definition at line 188 of file cwidgeteventhandlerlist.hxx.

◆ enable()

void NXWidgets::CWidgetEventHandlerList::enable ( void  )
inline

Enables event raising.

Definition at line 179 of file cwidgeteventhandlerlist.hxx.

◆ isEnabled()

bool CWidgetEventHandlerList::isEnabled ( void  ) const

Check if the object raises events or not.

Returns
True if events are enabled.

Definition at line 113 of file cwidgeteventhandlerlist.cxx.

◆ raiseActionEvent()

void CWidgetEventHandlerList::raiseActionEvent ( void  )

Raise an action event to the event handler. This should be called when a widget's purpose has been fulfilled. For example, in the case of a button, this event is raised when the button is released within its boundaries. The button has produced a valid click, and thus fulfilled its purpose, so it needs to raise an "action" event.

Definition at line 507 of file cwidgeteventhandlerlist.cxx.

◆ raiseBlurEvent()

void CWidgetEventHandlerList::raiseBlurEvent ( void  )

Raise a blur event to the event handler.

Definition at line 341 of file cwidgeteventhandlerlist.cxx.

◆ raiseClickEvent()

void CWidgetEventHandlerList::raiseClickEvent ( nxgl_coord_t  x,
nxgl_coord_t  y 
)

Raise a click event to the event handler.

Parameters
xThe x coordinate of the click.
yThe y coordinate of the click.

Definition at line 166 of file cwidgeteventhandlerlist.cxx.

◆ raiseCloseEvent()

void CWidgetEventHandlerList::raiseCloseEvent ( void  )

Raise a close event to the event handler.

Definition at line 358 of file cwidgeteventhandlerlist.cxx.

◆ raiseCursorControlEvent()

void CWidgetEventHandlerList::raiseCursorControlEvent ( ECursorControl  cursorControl)

Raise a cursor control event to the event handler.

Parameters
cursorControlThe cursor control code that caused the event.

Definition at line 307 of file cwidgeteventhandlerlist.cxx.

◆ raiseDisableEvent()

void CWidgetEventHandlerList::raiseDisableEvent ( void  )

Raise a disable event to the event handler.

Definition at line 426 of file cwidgeteventhandlerlist.cxx.

◆ raiseDoubleClickEvent()

void CWidgetEventHandlerList::raiseDoubleClickEvent ( nxgl_coord_t  x,
nxgl_coord_t  y 
)

Raise a double-click event to the event handler.

Parameters
xThe x coordinate of the click.
yThe y coordinate of the click.

Definition at line 186 of file cwidgeteventhandlerlist.cxx.

◆ raiseDragEvent()

void CWidgetEventHandlerList::raiseDragEvent ( nxgl_coord_t  x,
nxgl_coord_t  y,
nxgl_coord_t  vX,
nxgl_coord_t  vY 
)

Raise a mouse drag event to the event handler.

Parameters
xThe x coordinate of the mouse when the drag started.
yThe y coordinate of the mouse when the drag started.
vXThe horizontal distance dragged.
vYThe vertical distance dragged.

Definition at line 248 of file cwidgeteventhandlerlist.cxx.

◆ raiseDropEvent()

void CWidgetEventHandlerList::raiseDropEvent ( nxgl_coord_t  x,
nxgl_coord_t  y 
)

Raise a widget drop event to the event handler.

Parameters
xThe x coordinate of the mouse when the drop occurred.
yThe y coordinate of the mouse when the drop occurred.

Definition at line 269 of file cwidgeteventhandlerlist.cxx.

◆ raiseEnableEvent()

void CWidgetEventHandlerList::raiseEnableEvent ( void  )

Raise an enable event to the event handler.

Definition at line 409 of file cwidgeteventhandlerlist.cxx.

◆ raiseFocusEvent()

void CWidgetEventHandlerList::raiseFocusEvent ( void  )

Raise a focus event to the event handler.

Definition at line 324 of file cwidgeteventhandlerlist.cxx.

◆ raiseHideEvent()

void CWidgetEventHandlerList::raiseHideEvent ( void  )

Raise a hide event to the event handler.

Definition at line 375 of file cwidgeteventhandlerlist.cxx.

◆ raiseKeyPressEvent()

void CWidgetEventHandlerList::raiseKeyPressEvent ( nxwidget_char_t  key)

Raise a key press event to the event handler.

Parameters
keyThe character code of the key that caused the event.

Raise a key press event to the event handler.

Parameters
keyThe code of the key that caused the event.

Definition at line 288 of file cwidgeteventhandlerlist.cxx.

◆ raiseMoveEvent()

void CWidgetEventHandlerList::raiseMoveEvent ( nxgl_coord_t  x,
nxgl_coord_t  y,
nxgl_coord_t  vX,
nxgl_coord_t  vY 
)

Raise a move event to the event handler.

Parameters
xThe new x coordinate of the widget.
yThe new y coordinate of the widget.
vXThe horizontal distance moved.
vYThe vertical distance moved.

Definition at line 485 of file cwidgeteventhandlerlist.cxx.

◆ raiseReleaseEvent()

void CWidgetEventHandlerList::raiseReleaseEvent ( nxgl_coord_t  x,
nxgl_coord_t  y 
)

Raise a mouse release event to the event handler.

Parameters
xThe x coordinate of the release.
yThe y coordinate of the release.

Definition at line 206 of file cwidgeteventhandlerlist.cxx.

◆ raiseReleaseOutsideEvent()

void CWidgetEventHandlerList::raiseReleaseOutsideEvent ( nxgl_coord_t  x,
nxgl_coord_t  y 
)

Raise a mouse release-outside event to the event handler.

Parameters
xThe x coordinate of the release.
yThe y coordinate of the release.

Definition at line 226 of file cwidgeteventhandlerlist.cxx.

◆ raiseResizeEvent()

void CWidgetEventHandlerList::raiseResizeEvent ( nxgl_coord_t  width,
nxgl_coord_t  height 
)

Raise a resize event to the event handler.

Parameters
widthThe new width of the widget.
heightThe new height of the widget.

Definition at line 463 of file cwidgeteventhandlerlist.cxx.

◆ raiseScrollEvent()

void CWidgetEventHandlerList::raiseScrollEvent ( nxgl_coord_t  vX,
nxgl_coord_t  vY 
)

Raises a scroll event. Fired when the panel scrolls.

Parameters
vXHorizontal distance scrolled.
vYVertical distance scrolled.

Definition at line 527 of file cwidgeteventhandlerlist.cxx.

◆ raiseShowEvent()

void CWidgetEventHandlerList::raiseShowEvent ( void  )

Raise a show event to the event handler.

Definition at line 392 of file cwidgeteventhandlerlist.cxx.

◆ raiseValueChangeEvent()

void CWidgetEventHandlerList::raiseValueChangeEvent ( void  )

Raise a value change event to the event handler.

Definition at line 443 of file cwidgeteventhandlerlist.cxx.

◆ removeWidgetEventHandler()

void CWidgetEventHandlerList::removeWidgetEventHandler ( CWidgetEventHandler eventHandler)

Remove a widget event handler.

Parameters
eventHandlerA pointer to the event handler to remove.

Definition at line 147 of file cwidgeteventhandlerlist.cxx.

◆ size()

int NXWidgets::CWidgetEventHandlerList::size ( void  ) const
inline

Get the size of the array.

Returns
The size of the array.

Definition at line 154 of file cwidgeteventhandlerlist.hxx.

Member Data Documentation

◆ m_isEnabled

bool NXWidgets::CWidgetEventHandlerList::m_isEnabled
protected

Indicates if events are active

Definition at line 110 of file cwidgeteventhandlerlist.hxx.

◆ m_widget

CNxWidget* NXWidgets::CWidgetEventHandlerList::m_widget
protected

Owning widget

Definition at line 109 of file cwidgeteventhandlerlist.hxx.

◆ m_widgetEventHandlers

TNxArray<CWidgetEventHandler*> NXWidgets::CWidgetEventHandlerList::m_widgetEventHandlers
protected

List of event handlers

Definition at line 108 of file cwidgeteventhandlerlist.hxx.


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