home *** CD-ROM | disk | FTP | other *** search
- #ifndef _IKEYEVT_
- #define _IKEYEVT_
- /*******************************************************************************
- * FILE NAME: ikeyevt.hpp *
- * *
- * DESCRIPTION: *
- * Declaration of the class(es): *
- * IKeyboardEvent - the keyboard action information class *
- * *
- * 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. *
- * *
- *$Log: R:/IBMCLASS/IBASEAPP/VCS/IKEYEVT.HPV $ *
- //
- // Rev 1.4 25 Oct 1992 18:00:16 nunn
- // Brad Broyles changes for external beta
-
- Rev 1.1 01 Jan 1989 12:00:00 LM & KKL
- Initiate code
- Rev 1.2 01 May 1991 12:00:00 KKL
- Combine all events into 1 file - modified for better performance
- Rev 1.3 01 Oct 1991 12:00:00 KKL
- Update per R2.0 spec.
- Rev 1.4 09 Aug 1992 12:00:00 KKL
- Mod. for handlers
- Rev 1.5 21 Oct 1992 16:45:00 WBB
- Amended to match skeleton.hpp
- *******************************************************************************/
-
- // Forward declarations for other classes:
- class IKeyboardEvent;
- class IString;
- #if !defined( _IEVENT_ ) && !defined( I_NO_RELATED_HPP )
- #include <ievent.hpp>
- #endif
-
- class IKeyboardEvent : public IEvent {
- /*******************************************************************************
- * The IKeyboardEvent class provides all the keyboard action event information *
- *******************************************************************************/
- typedef IEvent Inherited;
- public:
- /*------------------------ CONSTRUCTORS/DESTRUCTORS ----------------------------
- | There is one way to construct instances of this class: |
- | 1. from an instance of the IEvent class |
- ------------------------------------------------------------------------------*/
- IKeyboardEvent(IEvent& evt);
-
- /*-------------------------------- ACCESSORS -----------------------------------
- | These function provide means of getting and setting the accessible |
- | attributes of instances of this class: |
- | charCode - return the event's SBCS char value |
- | dbcsChar - return the event's DBCS char string |
- | repeatCount - return the number of times the character was repeated |
- | scanCode - return the keyboard raw scan code (user should verify the value |
- | with isKeyCode (scanCodeIsValid) |
- ------------------------------------------------------------------------------*/
- char
- charCode() const;
- IString
- dbcsChar() const;
- unsigned long
- repeatCount() const;
- unsigned char
- scanCode() const;
-
- /*-------------------------------- FUNCTIONS -----------------------------------
- | isKeyCode - is the key code condition true? |
- | virtualKey - get the virtual key value of the key event from the virtual key |
- | code table (user should verify whether this value is valid with isKeyCode |
- | code table (user should verify whether this value is valid with |
- | isKeyCode (virtualKeyIsValid) ) |
- ------------------------------------------------------------------------------*/
- enum KeyCode { charCodeIsValid, scanCodeIsValid, virtualKeyIsValid,
- keyTransitionIsUp, keyIsRepeated, charCodeIsDeadKey,
- charCodeIsComposite, charCodeIsInvalidComposite,
- loneKeyAction, shiftKeyIsDown, altKeyIsDown,
- ctrlKeyIsDown };
-
- Boolean
- isKeyCode(KeyCode kc) const;
-
- enum VirtualKey
- { button1, button2, button3, breakKey, backSpace, tab,
- backTab, newLine, shift, ctrl, alt, altGraf, pause,
- capsLock, esc, space, pageUp, pageDown, end, home,
- left, up, right, down, printScreen, insert,
- deleteKey, scrollLock, numLock, enter, sysRq,
- f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13,
- f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24,
- endDrag, dbcsFirst, dbcsLast, userFirst, userLast };
-
- VirtualKey
- virtualKey() const;
- }; // IKeyboardEvent
-
- /*--------------------------------- INLINES ----------------------------------*/
- #ifndef I_NO_INLINES
- #include <ikeyevt.inl>
- #endif
-
- #endif /* _IKEYEVT_ */