[Classes] [Prev] [Next] [Methods]

CMouseHandler

Methods Index

Heritage
Description
Usage
Friends
Protected Data Members
Public Methods
Operator and Destructor Methods
Mouse Event Methods:

CMouseHandler


Heritage

Superclass: None

Subclasses: CDragSource


Description

The purpose of CMouseHandler is to provide a generic interface for mouse behavior clients.


Usage

CMouseHandler is an abstract class and must be used through a subclass. Derived class instances should be registered with a mouse manager which delegates mouse events for the handler to process.

CMouseManager and CMouseHandler have a many-to-many association: a manager can manage zero or more handlers, and a handler can be registered with zero or more managers.

DoDown, DoUp, DoMove, DoDouble, and DoScroll are called on mouse down, up, move, double-click, and scroll events, respectively. These functions return TRUE if they have consumed the event (it no longer needs processing by the object which owns the mouse manager), FALSE if the event has not been consumed (it needs further processing by the object that owns the mouse manager). Note that the default CMouseManager behavior allows all registered mouse handlers an opportunity to consume events (i.e., events can be consumed by more than one handler).

When a CMouseHandler is deleted, it automatically removes itself from any CMouseManagers is it registered with.

Friends

friend class CMouseManager


Protected Data Members

RWGSlist
(CMouseManager)
itsMouseManagers; List of managers where handler is registered


Public Methods

Operator and Destructor Methods

CMouseHandler& operator=(const CMouseHandler& theMouseHandler);
virtual ~CMouseHandler();

Mouse Event Methods:

virtual BOOLEAN DoDown(
CPoint& theLocation,
short& theButton,
BOOLEAN& isShiftKey,
BOOLEAN& isControlKey) = 0;
virtual BOOLEAN DoUp(
CPoint& theLocation,
short& theButton,
BOOLEAN& isShiftKey,
BOOLEAN& isControlKey) = 0;
virtual BOOLEAN DoDouble(
CPoint& theLocation,
short& theButton,
BOOLEAN& isShiftKey,
BOOLEAN& isControlKey) = 0;
virtual BOOLEAN DoMove(
CPoint& theLocation,
short& theButton,
BOOLEAN& isShiftKey,
BOOLEAN& isControlKey) = 0;
virtual BOOLEAN DoScroll(
CPoint& theLocation,
short& theButton,
BOOLEAN& isShiftKey,
BOOLEAN& isControlKey,
XVT_INT32& theScrollX,
XVT_INT32& theScrollY);
virtual BOOLEAN UsesGlobalCoords(void) = 0;


[Classes] [Prev] [Next] [Methods]

support@xvt.com


Visit our online help desk for tech support

Copyright © 2009, Providence Software Solutions Inc. All rights reserved.