ManaPlus
Public Member Functions | Protected Member Functions
KeyListener Class Reference

#include <keylistener.h>

Inheritance diagram for KeyListener:
Button CharCreateDialog CharSelectDialog ChatWindow CheckBox DropDown EditServerDialog GuiTable InventoryWindow ItemAmountWindow ItemContainer ListBox LoginDialog QuitDialog RadioButton RegisterDialog ServerDialog Setup_Video Slider TabbedArea TextBox TextField UpdaterWindow WorldSelectDialog

Public Member Functions

virtual ~KeyListener ()
 
virtual void keyPressed (KeyEvent &event)
 
virtual void keyReleased (KeyEvent &event)
 

Protected Member Functions

 KeyListener ()
 

Detailed Description

Interface for listening for key events from widgets.

See also
Widget::addKeyListener, Widget::removeKeyListener

Definition at line 79 of file keylistener.h.

Constructor & Destructor Documentation

◆ ~KeyListener()

virtual KeyListener::~KeyListener ( )
inlinevirtual

Destructor.

Definition at line 87 of file keylistener.h.

88  { }

◆ KeyListener()

KeyListener::KeyListener ( )
inlineprotected

Constructor.

You should not be able to make an instance of KeyListener, therefore its constructor is protected.

Definition at line 115 of file keylistener.h.

116  { }

Member Function Documentation

◆ keyPressed()

virtual void KeyListener::keyPressed ( KeyEvent event)
inlinevirtual

Called if a key is pressed when the widget has keyboard focus. If a key is held down the widget will generate multiple key presses.

Parameters
eventDiscribes the event.

Reimplemented in WorldSelectDialog, UpdaterWindow, ServerDialog, RegisterDialog, QuitDialog, LoginDialog, InventoryWindow, EditServerDialog, ChatWindow, CharSelectDialog, CharCreateDialog, TextField, TextBox, TabbedArea, Slider, RadioButton, ListBox, ItemContainer, IntTextField, GuiTable, DropDown, CheckBox, and Button.

Definition at line 97 of file keylistener.h.

98  { }

◆ keyReleased()

virtual void KeyListener::keyReleased ( KeyEvent event)
inlinevirtual

Called if a key is released when the widget has keyboard focus.

Parameters
eventDiscribes the event.

Reimplemented in ItemAmountWindow, InventoryWindow, ItemContainer, and Button.

Definition at line 105 of file keylistener.h.

106  { }

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