// Revision: 80 1.6.1.4 source/ui/baseapp/ikeyevt.hpp, userinput, ioc.v400, 980918 
#ifndef _IKEYEVT_
  #define _IKEYEVT_
/*******************************************************************************
* FILE NAME: ikeyevt.hpp                                                       *
*                                                                              *
* DESCRIPTION:                                                                 *
*   Declaration of the classes:                                                *
*     IKeyboardEvent                                                           *
*                                                                              *
* COPYRIGHT:                                                                   *
*   IBM Open Class Library                                                     *
*   (C) Copyright International Business Machines Corporation 1992, 1997       *
*   Licensed Material - Program-Property of IBM - All Rights Reserved.         *
*                                                                              *
*******************************************************************************/
#include <ievent.hpp>

#if __IBMCPP__ >= 400
#pragma namemangling(compat)
#endif

class IString;
class IKeyboardEventData;
class IKeyboardHandler;

#pragma enum(4)
#pragma pack(push,4)

class IKeyboardEvent : public IEvent {
typedef IEvent
  Inherited;
public:
/*------------------------------ Constructors --------------------------------*/
  IKeyboardEvent ( const IEvent&         event );
  IKeyboardEvent ( const IKeyboardEvent& event );
IKeyboardEvent
 &operator=      ( const IKeyboardEvent& event );
virtual
 ~IKeyboardEvent ( );

/*--------------------------------- Testing ----------------------------------*/
virtual bool
  isCharacter        ( ) const,
  isScanCode         ( ) const,
  isVirtual          ( ) const,
  isUpTransition     ( ) const,
  isRepeat           ( ) const,
  isShiftDown        ( ) const,
  isCtrlDown         ( ) const,
  isAltDown          ( ) const,
  isForComposite     ( ) const,
  isComposite        ( ) const,
  isInvalidComposite ( ) const;
#ifndef IC_WIN_FLAGNOP
virtual bool
  isUncombined       ( ) const;
#endif

/*-------------------------------- Accessors ---------------------------------*/
virtual char
  character          ( ) const;
virtual IString
  mixedCharacter     ( ) const;
virtual unsigned long
  scanCode           ( ) const;

enum VirtualKey
{
  esc, tab, backTab, space, backSpace, enter, newLine,
  shift, ctrl, altGraf, insert, deleteKey, home, end,
  pageUp, pageDown, left, right, up, down,
  capsLock, numLock, scrollLock, pause,
#ifndef IC_WIN_FLAGNOP
  sysRq,
#endif
  breakKey,
  f2, f3, f4, f5, f6, f7, f8, f9, f11, f12,
  f13, f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24,
  button1, button2, button3, other
#ifndef IC_WIN
  , endDrag, firstDBCS, lastDBCS, firstUser, lastUser
#endif
#ifdef IC_MOTIF
  , f1, f10,
  f25, f26, f27, f28, f29, f30, f31, f32, f33, f34, f35,
  pf1, pf2, pf3, pf4,
  clear, select, print, execute, undo, redo, menu, find,
  cancel, help, modeSwitch, alt,
  shiftLock, begin, meta, super, hyper, multiKey,
  kanji, muhenkan, henkanMode, romaji, hiragana,
  katakana, hiraganaKatakana, zenkaku, hankaku, zenkakuHankaku,
  touroku, massyo, kanaLock, kanaShift, eisuShift,
  eisuToggle
#endif
#ifdef IC_WIN
  , f1, f10
#endif
};

virtual VirtualKey
  virtualKey         ( ) const;

virtual unsigned long
  repeatCount        ( ) const;

private:
#ifdef IC_WIN
friend class IKeyboardHandler;
bool
  fValidComposite,
  fInvalidComposite;
#endif
IKeyboardEventData
 *fData;

/*----------------------- Obsolete Data and Functions ------------------------*/
#if (IC_OBSOLETE <= IC_OBSOLETE_3)
public:
#ifdef IC_MOTIF
static unsigned long
  IC_IMPORTU ulShiftMask,
  IC_IMPORTU ulAltMask,
  IC_IMPORTU ulCtrlMask;
#endif
protected:
static const unsigned long
#ifndef IC_WIN_FLAGNOP
  IC_IMPORTU ulCharacterFlag,
  IC_IMPORTU ulScanCodeFlag,
  IC_IMPORTU ulVirtualFlag,
  IC_IMPORTU ulRepeatFlag,
  IC_IMPORTU ulUncombinedFlag,
  IC_IMPORTU ulShiftFlag,
  IC_IMPORTU ulCtrlFlag,
  IC_IMPORTU ulForCompositeFlag,
  IC_IMPORTU ulCompositeFlag,
  IC_IMPORTU ulInvalidCompositeFlag,
#endif
  IC_IMPORTU ulUpTransitionFlag,
  IC_IMPORTU ulAltFlag;
#endif // IC_OBSOLETE
}; // IKeyboardEvent

#pragma pack(pop)
#pragma enum(pop)

#if __IBMCPP__ >= 400
#pragma namemangling()
#endif

#endif /* _IKEYEVT_ */
