Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

105 lines
2.7 KiB

  1. #ifdef INCL_KEY_MACROS
  2. #if !defined (EMU_KEY_MACRO_LIST_H)
  3. #define EMU_KEY_MACRO_LIST_H
  4. #pragma once
  5. //******************************************************************************
  6. // File: \wacker\tdll\Keymlist.h Created: 6/2/98 By: Dwayne M. Newsome
  7. //
  8. // Copyright 1998 by Hilgraeve Inc. --- Monroe, MI
  9. // All rights reserved
  10. //
  11. // Description:
  12. // This class manages the list of user defines key macros
  13. //
  14. // $Revision: 1 $
  15. // $Date: 10/05/98 12:42p $
  16. // $Id: keymlist.h 1.1 1998/06/11 12:02:47 dmn Exp $
  17. //
  18. //******************************************************************************
  19. #include <iostream.h>
  20. #include "keymacro.h"
  21. //
  22. // Emu_Key_Macro_List
  23. //
  24. //------------------------------------------------------------------------------
  25. class Emu_Key_Macro_List
  26. {
  27. friend istream & operator>>( istream & theStream, Emu_Key_Macro_List & aMacro );
  28. friend ostream & operator<<( ostream & theStream, const Emu_Key_Macro_List & aMacro );
  29. public:
  30. enum
  31. {
  32. eMaxKeys = 100
  33. };
  34. //
  35. // constructor / destructor
  36. //
  37. //--------------------------------------------------------------------------
  38. Emu_Key_Macro_List( void );
  39. ~Emu_Key_Macro_List( void );
  40. //
  41. // list managerment
  42. //
  43. // operator[]
  44. // Returns the ith macro in the list
  45. //
  46. // addMacro
  47. // Adds new macro to the list.
  48. //
  49. // find
  50. // Returns the index of the key or macro definition in the list.
  51. //
  52. // numberOfMacros
  53. // returns the number of macros in the list
  54. //
  55. // removeMacro
  56. // Removes the specified key from the macro list
  57. //
  58. //--------------------------------------------------------------------------
  59. Emu_Key_Macro & operator[]( int aIndex );
  60. int addMacro( const Emu_Key_Macro & aMacro );
  61. int find( const KEYDEF & aKey ) const;
  62. int find( const Emu_Key_Macro & aMacro ) const;
  63. int numberOfMacros( void ) const;
  64. int removeMacro( const KEYDEF & aKey );
  65. //
  66. // persistence methods
  67. //
  68. // load
  69. // Loads the list from persistant storage
  70. //
  71. // save
  72. // Saves the list to persistant storage
  73. //
  74. //--------------------------------------------------------------------------
  75. int load( const HSESSION hSession );
  76. int save( const HSESSION hSession );
  77. private:
  78. int mMacroCount;
  79. Emu_Key_Macro mMacroList[eMaxKeys+1];
  80. Emu_Key_Macro_List( const Emu_Key_Macro_List & aMacroList );
  81. Emu_Key_Macro_List & operator=( const Emu_Key_Macro_List & aMacroList );
  82. };
  83. extern Emu_Key_Macro_List gMacroManager;
  84. #endif
  85. #endif