# WoopsiUI::GadgetEventHandlerList Class Reference

`#include <gadgeteventhandlerlist.h>`

List of all members.

## Public Member Functions
| GadgetEventHandlerList (Gadget *gadget)
| ~GadgetEventHandlerList ()
const bool | isEnabled () const
GadgetEventHandler * | at (const s32 index) const
const s32 | size () const
void | addGadgetEventHandler (GadgetEventHandler *eventHandler)
void | removeGadgetEventHandler (GadgetEventHandler *eventHandler)
void | enable ()
void | disable ()
void | raiseClickEvent (s16 x, s16 y)
void | raiseDoubleClickEvent (s16 x, s16 y)
void | raiseShiftClickEvent (s16 x, s16 y)
void | raiseReleaseEvent (s16 x, s16 y)
void | raiseReleaseOutsideEvent (s16 x, s16 y)
void | raiseDragEvent (s16 x, s16 y, s16 vX, s16 vY)
void | raiseDropEvent (s16 x, s16 y)
void | raiseMoveForwardEvent ()
void | raiseMoveBackwardEvent ()
void | raiseKeyPressEvent (KeyCode keyCode)
void | raiseKeyRepeatEvent (KeyCode keyCode)
void | raiseKeyReleaseEvent (KeyCode keyCode)
void | raiseLidCloseEvent ()
void | raiseLidOpenEvent ()
void | raiseFocusEvent ()
void | raiseBlurEvent ()
void | raiseCloseEvent ()
void | raiseHideEvent ()
void | raiseShowEvent ()
void | raiseShelveEvent ()
void | raiseUnshelveEvent ()
void | raiseEnableEvent ()
void | raiseDisableEvent ()
void | raiseValueChangeEvent ()
void | raiseResizeEvent (u16 width, u16 height)
void | raiseMoveEvent (s16 x, s16 y, s16 vX, s16 vY)
void | raiseContextMenuSelectionEvent (const ListDataItem *contextMenuItem)
void | raiseActionEvent ()
void | raiseScrollEvent (s16 vX, s16 vY)
## Protected Attributes
WoopsiArray< GadgetEventHandler * > | _gadgetEventHandlers
Gadget * | _gadget
bool | _isEnabled

## Detailed Description

List of gadget event handlers.

## Constructor & Destructor Documentation

WoopsiUI::GadgetEventHandlerList::GadgetEventHandlerList | ( | Gadget * | gadget | ) |

Constructor.

Parameters:

  | gadget | The owning gadget.

WoopsiUI::GadgetEventHandlerList::~GadgetEventHandlerList | ( |  | ) | `[inline]`

Destructor.

## Member Function Documentation

void WoopsiUI::GadgetEventHandlerList::addGadgetEventHandler | ( | GadgetEventHandler * | eventHandler | ) |

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

Parameters:

  | eventHandler | A pointer to the event handler.

GadgetEventHandler* WoopsiUI::GadgetEventHandlerList::at | ( | const s32 | index | ) | const`[inline]`

Get the event handler at the specified index.

Parameters:

  | index | The index of the event handler.

Returns:
  The event handler at the specified index.

void WoopsiUI::GadgetEventHandlerList::disable | ( |  | ) | `[inline]`

Disables event raising.

void WoopsiUI::GadgetEventHandlerList::enable | ( |  | ) | `[inline]`

Enables event raising.

const bool WoopsiUI::GadgetEventHandlerList::isEnabled | ( |  | ) | const

Check if the object raises events or not.

Returns:
  True if events are enabled.

void WoopsiUI::GadgetEventHandlerList::raiseActionEvent | ( |  | ) |

Raise an action event to the event handler. This should be called when a gadget'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.

void WoopsiUI::GadgetEventHandlerList::raiseBlurEvent | ( |  | ) |

Raise a blur event to the event handler.

void WoopsiUI::GadgetEventHandlerList::raiseClickEvent | ( | s16 | x,
|  | s16 | y |
| ) |  |  |

Raise a click event to the event handler.

Parameters:

  | x | The x co-ordinate of the click.
  | y | The y co-ordinate of the click.

void WoopsiUI::GadgetEventHandlerList::raiseCloseEvent | ( |  | ) |

Raise a close event to the event handler.

void WoopsiUI::GadgetEventHandlerList::raiseContextMenuSelectionEvent | ( | const ListDataItem * | contextMenuItem | ) |

Raise a context menu selection event to the event handler.

Parameters:

  | contextMenuItem | Pointer to the menu item selected.

void WoopsiUI::GadgetEventHandlerList::raiseDisableEvent | ( |  | ) |

Raise a disable event to the event handler.

void WoopsiUI::GadgetEventHandlerList::raiseDoubleClickEvent | ( | s16 | x,
|  | s16 | y |
| ) |  |  |

Raise a double-click event to the event handler.

Parameters:

  | x | The x co-ordinate of the click.
  | y | The y co-ordinate of the click.

void WoopsiUI::GadgetEventHandlerList::raiseDragEvent | ( | s16 | x,
|  | s16 | y,
|  | s16 | vX,
|  | s16 | vY |
| ) |  |  |

Raise a stylus drag event to the event handler.

Parameters:

  | x | The x co-ordinate of the stylus when the drag started.
  | y | The y co-ordinate of the stylus when the drag started.
  | vX | The horizontal distance dragged.
  | vY | The vertical distance dragged.

void WoopsiUI::GadgetEventHandlerList::raiseDropEvent | ( | s16 | x,
|  | s16 | y |
| ) |  |  |

Raise a gadget drop event to the event handler.

Parameters:

  | x | The x co-ordinate of the stylus when the drop occurred.
  | y | The y co-ordinate of the stylus when the drop occurred.

void WoopsiUI::GadgetEventHandlerList::raiseEnableEvent | ( |  | ) |

Raise an enable event to the event handler.

void WoopsiUI::GadgetEventHandlerList::raiseFocusEvent | ( |  | ) |

Raise a focus event to the event handler.

void WoopsiUI::GadgetEventHandlerList::raiseHideEvent | ( |  | ) |

Raise a hide event to the event handler.

void WoopsiUI::GadgetEventHandlerList::raiseKeyPressEvent | ( | KeyCode | keyCode | ) |

Raise a key press event to the event handler.

Parameters:

  | keyCode | The code of the key that caused the event.

void WoopsiUI::GadgetEventHandlerList::raiseKeyReleaseEvent | ( | KeyCode | keyCode | ) |

Raise a key release event to the event handler.

Parameters:

  | keyCode | The code of the key that caused the event.

void WoopsiUI::GadgetEventHandlerList::raiseKeyRepeatEvent | ( | KeyCode | keyCode | ) |

Raise a key repeat event to the event handler.

Parameters:

  | keyCode | The code of the key that caused the event.

void WoopsiUI::GadgetEventHandlerList::raiseLidCloseEvent | ( |  | ) |

Raise a lid closed event to the event handler.

void WoopsiUI::GadgetEventHandlerList::raiseLidOpenEvent | ( |  | ) |

Raise a lid opened event to the event handler.

void WoopsiUI::GadgetEventHandlerList::raiseMoveBackwardEvent | ( |  | ) |

Raise a move backward event to the event handler.

void WoopsiUI::GadgetEventHandlerList::raiseMoveEvent | ( | s16 | x,
|  | s16 | y,
|  | s16 | vX,
|  | s16 | vY |
| ) |  |  |

Raise a move event to the event handler.

Parameters:

  | x | The new x co-ordinate of the gadget.
  | y | The new y co-ordinate of the gadget.
  | vX | The horizontal distance moved.
  | vY | The vertical distance moved.

void WoopsiUI::GadgetEventHandlerList::raiseMoveForwardEvent | ( |  | ) |

Raise a move forward event to the event handler.

void WoopsiUI::GadgetEventHandlerList::raiseReleaseEvent | ( | s16 | x,
|  | s16 | y |
| ) |  |  |

Raise a stylus release event to the event handler.

Parameters:

  | x | The x co-ordinate of the release.
  | y | The y co-ordinate of the release.

void WoopsiUI::GadgetEventHandlerList::raiseReleaseOutsideEvent | ( | s16 | x,
|  | s16 | y |
| ) |  |  |

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

Parameters:

  | x | The x co-ordinate of the release.
  | y | The y co-ordinate of the release.

void WoopsiUI::GadgetEventHandlerList::raiseResizeEvent | ( | u16 | width,
|  | u16 | height |
| ) |  |  |

Raise a resize event to the event handler.

Parameters:

  | width | The new width of the gadget.
  | height | The new height of the gadget.

void WoopsiUI::GadgetEventHandlerList::raiseScrollEvent | ( | s16 | vX,
|  | s16 | vY |
| ) |  |  |

Raises a scroll event. Fired when the panel scrolls.

Parameters:

  | vX | Horizontal distance scrolled.
  | vY | Vertical distance scrolled.

void WoopsiUI::GadgetEventHandlerList::raiseShelveEvent | ( |  | ) |

Raise a shelve event to the event handler.

void WoopsiUI::GadgetEventHandlerList::raiseShiftClickEvent | ( | s16 | x,
|  | s16 | y |
| ) |  |  |

Raise a shift click event to the event handler.

Parameters:

  | x | The x co-ordinate of the click.
  | y | The y co-ordinate of the click.

void WoopsiUI::GadgetEventHandlerList::raiseShowEvent | ( |  | ) |

Raise a show event to the event handler.

void WoopsiUI::GadgetEventHandlerList::raiseUnshelveEvent | ( |  | ) |

Raise a unshelve event to the event handler.

void WoopsiUI::GadgetEventHandlerList::raiseValueChangeEvent | ( |  | ) |

Raise a value change event to the event handler.

void WoopsiUI::GadgetEventHandlerList::removeGadgetEventHandler | ( | GadgetEventHandler * | eventHandler | ) |

Remove a gadget event handler.

Parameters:

  | eventHandler | A pointer to the event handler to remove.

const s32 WoopsiUI::GadgetEventHandlerList::size | ( |  | ) | const`[inline]`

Get the size of the array.

Returns:
  The size of the array.

## Member Data Documentation

Gadget* WoopsiUI::GadgetEventHandlerList::_gadget`[protected]`

Owning gadget

WoopsiArray<GadgetEventHandler*> WoopsiUI::GadgetEventHandlerList::_gadgetEventHandlers`[protected]`

List of event handlers

bool WoopsiUI::GadgetEventHandlerList::_isEnabled`[protected]`

Indicates if events are active

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

- gadgeteventhandlerlist.h