Wt::KeyEvent Class Reference

#include <event.h>

Inheritance diagram for Wt::KeyEvent:

Inheritance graph
[legend]
Collaboration diagram for Wt::KeyEvent:

Collaboration graph
[legend]
List of all members.

Public Types

 Nope
 Timer
 MouseButtonPress
 MouseButtonRelease
 MouseButtonDblClick
 MouseMove
 KeyPress
 KeyRelease
 FocusIn
 FocusOut
 Enter
 Leave
 Paint
 Move
 Resize
 Wheel
 ChildInserted
 ChildRemoved
 LayoutHint
 Show
 Hide
 Close
 User
 MaxEvent
enum  Type {
  Nope, Timer, MouseButtonPress, MouseButtonRelease,
  MouseButtonDblClick, MouseMove, KeyPress, KeyRelease,
  FocusIn, FocusOut, Enter, Leave,
  Paint, Move, Resize, Wheel,
  ChildInserted, ChildRemoved, LayoutHint, Show,
  Hide, Close, User, MaxEvent
}
 events that are delivered per widget More...

Public Member Functions

 KeyEvent (int type, int key, int state)
int key () const
int ascii () const
int text () const
bool isAutoRepeat () const
 so it's not possible to distinguish it
int count () const
 one char per event
ButtonState state () const
ButtonState stateAfter () const
bool isAccepted () const
void accept ()
void ignore ()
int type () const

Private Attributes

int key_

Detailed Description

Definition at line 297 of file event.h.


Member Enumeration Documentation

enum Wt::Event::Type [inherited]

events that are delivered per widget

Enumerator:
Nope 
Timer 
MouseButtonPress 
MouseButtonRelease 
MouseButtonDblClick 
MouseMove 
KeyPress 
KeyRelease 
FocusIn 
FocusOut 
Enter 
Leave 
Paint 
Move 
Resize 
Wheel 
ChildInserted 
ChildRemoved 
LayoutHint 
Show 
Hide 
Close 
User 
MaxEvent 

Definition at line 34 of file event.h.

00034                  {
00035         Nope,
00036         Timer,
00037         MouseButtonPress,
00038         MouseButtonRelease,
00039         MouseButtonDblClick,
00040         MouseMove,
00041         KeyPress,   //6
00042         KeyRelease,
00043         FocusIn,
00044         FocusOut,
00045         Enter,
00046         Leave,      //11
00047         Paint,
00048         Move,
00049         Resize,     //14
00050         Wheel,
00051         ChildInserted,  //16
00052         ChildRemoved,
00053         LayoutHint, //18
00054         Show,
00055         Hide,
00056         Close,
00057         User,
00058         MaxEvent
00059     } Type;


Constructor & Destructor Documentation

Wt::KeyEvent::KeyEvent ( int  type,
int  key,
int  state 
) [inline]

Definition at line 299 of file event.h.

00299                                            :
00300             InputEvent(type, state),
00301     key_(key) {}


Member Function Documentation

void Wt::InputEvent::accept (  )  [inline, inherited]

Definition at line 226 of file event.h.

References Wt::InputEvent::accepted_.

Referenced by Wt::Window::Frame::mouseMoveEvent(), Wt::Window::Frame::mousePressEvent(), Wt::Widget::mousePressEvent(), Wt::Window::Frame::mouseReleaseEvent(), and Wt::Widget::wheelEvent().

00226                   {
00227         accepted_ = true;
00228     }

int Wt::KeyEvent::ascii (  )  const [inline]

Todo:
ascii chars

Definition at line 308 of file event.h.

00308                       {
00309         return 0;
00310     }

int Wt::KeyEvent::count (  )  const [inline]

one char per event

Definition at line 324 of file event.h.

00324                       {
00325         return 1;
00326     }

void Wt::InputEvent::ignore (  )  [inline, inherited]

Definition at line 229 of file event.h.

References Wt::InputEvent::accepted_.

00229                   {
00230         accepted_ = false;
00231     }

bool Wt::InputEvent::isAccepted (  )  const [inline, inherited]

Definition at line 223 of file event.h.

References Wt::InputEvent::accepted_.

Referenced by Wt::Widget::event().

00223                             {
00224         return accepted_;
00225     }

bool Wt::KeyEvent::isAutoRepeat (  )  const [inline]

so it's not possible to distinguish it

Definition at line 319 of file event.h.

00319                               {
00320         return false;
00321     }

int Wt::KeyEvent::key (  )  const [inline]

Definition at line 303 of file event.h.

References key_.

Referenced by Wt::Widget::event(), Wt::Button::keyPressEvent(), and Wt::Button::keyReleaseEvent().

00303                     {
00304         return key_;
00305     };

ButtonState Wt::InputEvent::state (  )  const [inline, inherited]

Definition at line 216 of file event.h.

References Wt::InputEvent::state_.

Referenced by Wt::Widget::event().

00216                               {
00217         return state_;
00218     }

ButtonState Wt::InputEvent::stateAfter (  )  const [inline, inherited]

Todo:
fix stateAfter()

Definition at line 220 of file event.h.

References Wt::InputEvent::state_.

00220                                    {
00221         return state_;
00222     }

int Wt::KeyEvent::text (  )  const [inline]

Todo:
unicode chars

Definition at line 313 of file event.h.

00313                      {
00314         return 0;
00315     }

int Wt::Event::type (  )  const [inline, inherited]

Definition at line 71 of file event.h.

References Wt::Event::type_.

Referenced by Wt::Window::Frame::childEvent(), Wt::Object::event(), Wt::Layout::eventFilter(), Wt::FocusEvent::gotFocus(), Wt::FocusEvent::lostFocus(), Wt::operator<<(), and Wt::Application::EventQueueItem::operator==().

00071                      {
00072         return type_;
00073     }


Member Data Documentation

int Wt::KeyEvent::key_ [private]

Definition at line 329 of file event.h.

Referenced by key().


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

Generated Fri Jul 28 19:28:32 2006.
Copyright © 1998-2003 by the respective authors.

This document is licensed under the terms of the GNU Free Documentation License and may be freely distributed under the conditions given by this license.