Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | Related Pages

wftk::Mouse Class Reference

software mouse pointer. More...

#include <mouse.h>

List of all members.

Public Types

enum  Button {
  LEFT = SDL_BUTTON(SDL_BUTTON_LEFT), RIGHT = SDL_BUTTON(SDL_BUTTON_RIGHT), MIDDLE = SDL_BUTTON(SDL_BUTTON_MIDDLE), WHEEL_UP = SDL_BUTTON(4),
  WHEEL_DOWN = SDL_BUTTON(5)
}
 Available masks for buttons. More...

Public Member Functions

 Mouse ()
 Default ctor.
 ~Mouse ()
 Default dtor.
void warp (const Point &p)
 move the mouse pointer to a new screen position
const Pointposition () const
 get the current mouse pointer location
Button buttons () const
 returns a mask indicating which buttons are pressed
bool hidden () const
 hidden flag accessor
void setPointer (const Surface &, const Point &hotspot)
 Only available with software pointer.
void setPointer (Pointer::Resource *)
 Only available with software pointer.
void setPointer (const std::string &name)
 Only available with software pointer.
const PointergetPointer () const
 Only available with software pointer.
void hidePointer ()
 remove pointer from screen, and update
void showPointer ()
 paint pointer on screen
bool handleEvent (const SDL_Event *)
 called by wftk mainloop

Static Public Member Functions

bool isInit ()
 Check if we have initialized the singleton.
Mouseinstance ()
 Singleton class - one and only one mouse pointer.

Public Attributes

SigC::Signal3< bool, const
Point &, const Point &, Button,
BoolMarshal
mouseMove
 absolute and relative position, button state mask
SigC::Signal3< bool, Button,
bool, const Point &, BoolMarshal
mouseClick
 button, pressed (true) or release (false), position
SigC::Signal0< bool, BoolMarshallostMouse
 application has lost mouse focus (signalled by window manager)
SigC::Signal0< bool, BoolMarshalgotMouse
 application has gained mouse focus (signalled by window manager)


Detailed Description

software mouse pointer.

it allows setting special mousepointers for specified areas of the screen.


Member Enumeration Documentation

enum wftk::Mouse::Button
 

Available masks for buttons.

Enumeration values:
LEFT 
RIGHT 
MIDDLE 
WHEEL_UP 
WHEEL_DOWN 


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

Generated Tue Oct 26 19:02:12 2004.
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.