Wt::MouseEvent Class Reference

#include <event.h>

Inheritance diagram for Wt::MouseEvent:

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

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

 MouseEvent (int type, const Point &pos, int button, int state)
 MouseEvent (int type, const Point &pos, const Point &global_pos, int button, int state)
const Pointpos () const
const PointglobalPos () const
int x () const
int y () const
int globalX () const
int globalY () const
ButtonState button () const
ButtonState state () const
ButtonState stateAfter () const
bool isAccepted () const
void accept ()
void ignore ()
int type () const

Private Attributes

Point pos_
Point global_pos_
ButtonState button_

Detailed Description

Definition at line 238 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::MouseEvent::MouseEvent ( int  type,
const Point pos,
int  button,
int  state 
) [inline]

Definition at line 240 of file event.h.

00240                                                                   :
00241             InputEvent(type, state),
00242             pos_(pos),
00243     button_(static_cast<ButtonState>(button)) {}
    MouseEvent(int type, const Point& pos,

Wt::MouseEvent::MouseEvent ( int  type,
const Point pos,
const Point global_pos,
int  button,
int  state 
) [inline]

Definition at line 244 of file event.h.

00245                                                                :
00246             InputEvent(type, state),
00247             pos_(pos),
00248             global_pos_(global_pos),
00249     button_(static_cast<ButtonState>(button)) {}


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     }

ButtonState Wt::MouseEvent::button (  )  const [inline]

Definition at line 269 of file event.h.

References button_.

Referenced by Wt::Window::Frame::mousePressEvent(), Wt::Button::mousePressEvent(), Wt::Window::Frame::mouseReleaseEvent(), and Wt::Button::mouseReleaseEvent().

00269                                {
00270         return button_;
00271     }

const Point& Wt::MouseEvent::globalPos (  )  const [inline]

Definition at line 254 of file event.h.

References global_pos_.

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

00254                                    {
00255         return global_pos_;
00256     }

int Wt::MouseEvent::globalX (  )  const [inline]

Definition at line 263 of file event.h.

References global_pos_, and Wt::Point::x().

00263                         {
00264         return global_pos_.x();
00265     }

Here is the call graph for this function:

int Wt::MouseEvent::globalY (  )  const [inline]

Definition at line 266 of file event.h.

References global_pos_, and Wt::Point::y().

00266                         {
00267         return global_pos_.y();
00268     }

Here is the call graph for this function:

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     }

const Point& Wt::MouseEvent::pos (  )  const [inline]

Definition at line 251 of file event.h.

References pos_.

Referenced by Wt::Widget::event(), Wt::Window::Frame::mousePressEvent(), Wt::Button::mousePressEvent(), and Wt::Button::mouseReleaseEvent().

00251                              {
00252         return pos_;
00253     }

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::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     }

int Wt::MouseEvent::x (  )  const [inline]

Definition at line 257 of file event.h.

References pos_, and Wt::Point::x().

00257                   {
00258         return pos_.x();
00259     }

Here is the call graph for this function:

int Wt::MouseEvent::y (  )  const [inline]

Definition at line 260 of file event.h.

References pos_, and Wt::Point::y().

00260                   {
00261         return pos_.y();
00262     }

Here is the call graph for this function:


Member Data Documentation

ButtonState Wt::MouseEvent::button_ [private]

Definition at line 276 of file event.h.

Referenced by button().

Point Wt::MouseEvent::global_pos_ [private]

Definition at line 275 of file event.h.

Referenced by globalPos(), globalX(), and globalY().

Point Wt::MouseEvent::pos_ [private]

Definition at line 274 of file event.h.

Referenced by pos(), x(), and y().


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

Generated Fri Jul 28 19:28:30 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.