home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
cset21v1.zip
/
IBMCPP
/
IBMCLASS
/
IMCEVT.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1993-10-22
|
6KB
|
98 lines
#ifndef _IMCEVT_
#define _IMCEVT_
/*******************************************************************************
* FILE NAME: imcevt.hpp *
* *
* DESCRIPTION: *
* Declaration of the class(es): *
* IMouseClickEvent - represents a mouse button event *
* *
* COPYRIGHT: *
* Licensed Materials - Property of IBM *
* (C) Copyright IBM Corporation 1992, 1993 *
* All Rights Reserved *
* US Government Users Restricted Rights - Use, duplication, or disclosure *
* restricted by GSA ADP Schedule Contract with IBM Corp. *
* *
*******************************************************************************/
#ifndef _IEVENT_
#include <ievent.hpp>
#endif
/*----------------------------------------------------------------------------*/
/* Align classes on four byte boundary. */
/*----------------------------------------------------------------------------*/
#pragma pack(4)
// Forward declarations for other classes:
class IPoint;
class IWindowHandle;
class IMouseClickEvent : public IEvent {
typedef IEvent
Inherited;
/*******************************************************************************
* The IMouseClickEvent class represents a mouse click event. An *
* IMouseClickEvent is created by a mouse click handler when the user presses, *
* releases, clicks, or double-clicks the mouse button. *
* *
* Mouse click events are first dispatched to the window that the mouse *
* pointer is positioned on. If that window does not process the mouse click *
* event, the event is dispatched to its owner window. The event continues to *
* be dispatched to the next owner window until a handler stops the processing *
* or a window processes the mouse click event itself. *
*******************************************************************************/
public:
/*------------------------ Constructor/Destructor ------------------------------
| The only way to construct instances of this class is from an instance of |
| the IEvent class. |
------------------------------------------------------------------------------*/
IMouseClickEvent ( IEvent& event );
virtual
~IMouseClickEvent ( );
/*-------------------------------- Accessors -----------------------------------
| These functions provide a means of querying values from instances of this |
| class: |
| mousePosition - Returns the mouse pointer position relative to the window |
| returned by the IEvent::window function. |
| handleOnTop - Returns the handle of the window the mouse pointer is |
| over. |
| MouseNumber - Enumeration that defines the values that the mouseNumber |
| function can return. The valid values are: |
| button1 - Mouse button 1. |
| button2 - Mouse button 2. |
| button3 - Mouse button 3. |
| button12 - Mouse buttons 1 and 2, pressed together. |
| mouseNumber - Returns the mouse button that was used. |
| MouseAction - Enumeration that defines the values that the mouseAction |
| function can return. The valid values are: |
| click - A mouse button was pressed and released. |
| doubleClick - A mouse button was pressed and released |
| twice in succession. |
| down - A mouse button was pressed. |
| up - A mouse button was released. |
| mouseAction - Returns the action taken on the mouse. |
------------------------------------------------------------------------------*/
IPoint
mousePosition ( ) const;
IWindowHandle
handleOnTop ( ) const;
enum MouseNumber { button1, button2, button3, button12 };
MouseNumber
mouseNumber ( ) const;
enum MouseAction { click, doubleClick, down, up };
MouseAction
mouseAction ( ) const;
}; // IMouseClickEvent
/*----------------------------------------------------------------------------*/
/* Resume compiler default packing. */
/*----------------------------------------------------------------------------*/
#pragma pack()
#endif /* _IMCEVT_ */