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

CMouseManager

Methods Index

Heritage
Description
Usage
Protected Data Members
Overrides
Public Methods
Constructor, Destructor, and Initializer Methods
Registration Methods
Mouse Event Methods
Parent Chaining Methods

CMouseManager


Heritage

Superclass: None

Subclass: None


Description

The purpose of CMouseManager is to provide management capabilities for CMouseHandlers.


Usage

CMouseManager is used to propagate mouse events to its CMouseHandlers. Events are propagated to all CMouseHandlers in the order in which they are registered with the manager.

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.

The most direct usage of CMouseManager is from within a CWindow object. Each CWindow automatically creates a CMouseManager and delegates each of its DoMouse*() methods to the appropriate CMouseManager interfaces. This allows you to register mouse handlers with a window without having to create a manager directly:

CWindow* aWindow = ...;
CMouseHandler* aHandler = ...;
... aWindow->GetMouseManager()->
RegisterMouseHandler(aHandler);
MouseManagers can be chained in a hierarchy, in effect allowing a manager to inherit the handlers of "parent" managers. For instance, the managers created for each CWindow are normally chained with the manager of the application's TaskWindow. This has the effect of making all handlers attached to the TaskWindow available globally to all windows in the application. For more information, see the SetParent() method.


Protected Data Members

RWGSlist(CMouseHandler) itsMouseHandlers; List of registered handlers
CMouseManager* itsParent Used to chain managers


Overrides

You may override the manager's Mouse*() methods to define different ways of delegating events to registered handlers.


Public Methods

Constructor, Destructor, and Initializer Methods

CMouseManager(CMouseManager* the Parent = NULL);
CMouseManager(const CMouseManager& theMouseManager);
CMouseManager& operator=(const CMouseManager& theMouseManager);
virtual ~CMouseManager();

Registration Methods

void RegisterMouseHandler(
CMouseHandler *theMouseHandler,
BOOLEAN isInFront = FALSE);
void UnRegisterMouseHandler(CMouseHandler *theMouseHandler);

Mouse Event Methods

virtual BOOLEAN DoDown(
const CWindow *theWindow,
CPoint& theLocation,
short& theButton,
BOOLEAN& isShiftKey,
BOOLEAN& isControlKey);
virtual BOOLEAN DoUp(
const CWindow *theWindow,
CPoint& theLocation,
short& theButton,
BOOLEAN& isShiftKey,
BOOLEAN& isControlKey);
virtual BOOLEAN DoDouble(
const CWindow *theWindow,
CPoint& theLocation,
short& theButton,
BOOLEAN& isShiftKey,
BOOLEAN& isControlKey);
virtual BOOLEAN DoMove(
const CWindow *theWindow,
CPoint& theLocation,
short& theButton,
BOOLEAN& isShiftKey,
BOOLEAN& isControlKey);
virtual BOOLEAN DoScroll(
const CWindow *theWindow,
CPoint& theLocation,
short& theButton,
BOOLEAN& isShiftKey,
BOOLEAN& isControlKey,
XVT_INT32& theScrollX,
XVT_INT32& theScrollY);

Parent Chaining Methods

CMouseManager* GetParent(void) const;
void SetParent(CMouseManager* theParent);


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

support@xvt.com


Visit our online help desk for tech support

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