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.

108 lines
3.2 KiB

  1. //-----------------------------------------------------------------------------
  2. //
  3. // File: _locstr.h
  4. // Copyright (C) 1994-1997 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. //
  8. //
  9. //-----------------------------------------------------------------------------
  10. #ifndef ESPUTIL__LOCSTR_H
  11. #define ESPUTIL__LOCSTR_H
  12. #pragma warning(disable: 4275) // non dll-interface class 'foo' used
  13. // as base for dll-interface class 'bar'
  14. class LTAPIENTRY CLocTranslationArray : public CArray<CLocTranslation, CLocTranslation &>
  15. {
  16. public:
  17. protected:
  18. NOTHROW void SwapElements(UINT, UINT);
  19. };
  20. #pragma warning(disable : 4251) // class 'foo' needs to have dll-interface to be
  21. // used by clients of class 'bar'
  22. class LTAPIENTRY CLocCrackedString : public CObject
  23. {
  24. public:
  25. CLocCrackedString();
  26. void AssertValid(void) const;
  27. const CLocCrackedString &operator=(const CLocCrackedString &);
  28. NOTHROW int operator==(const CLocCrackedString &) const;
  29. NOTHROW int operator!=(const CLocCrackedString &) const;
  30. NOTHROW void CrackLocString(const CLocString &, BOOL fAsSource);
  31. NOTHROW UINT GetRanking(const CLocCrackedString &) const;
  32. NOTHROW BOOL HasExtension(void) const;
  33. NOTHROW BOOL HasControl(void) const;
  34. NOTHROW BOOL HasHotKey() const;
  35. NOTHROW const CPascalString & GetBaseString(void) const;
  36. NOTHROW const CPascalString & GetExtension(void) const;
  37. NOTHROW const CPascalString & GetControl(void) const;
  38. NOTHROW WCHAR GetHotKeyChar(void) const;
  39. NOTHROW UINT GetHotKeyPos(void) const;
  40. NOTHROW CST::StringType GetStringType(void) const;
  41. void SetBaseString(const CPascalString &pasBaseString);
  42. void SetHotKey(WCHAR cHotKeyChar, UINT uiHotKeyPos);
  43. void MergeCrackedStrings(const CLocCrackedString &, LangId,
  44. BOOL fMergeAccel);
  45. NOTHROW void ConvertToLocString(CLocString &) const;
  46. static void SetModifiers(const CPasStringList &);
  47. static void SetKeyNames(const CPasStringList &);
  48. static WCHAR m_cKeyNameSeparator;
  49. ~CLocCrackedString();
  50. private:
  51. CLocCrackedString(const CLocCrackedString &);
  52. NOTHROW BOOL Compare(const CLocCrackedString &) const;
  53. NOTHROW void ClearCrackedString(void);
  54. NOTHROW static BOOL IsControl(const CPascalString &, BOOL fAsSource);
  55. NOTHROW static void TranslateControl(CPascalString &);
  56. void SetDefaultModifierNames();
  57. void SetDefaultKeyNames();
  58. NOTHROW static BOOL IsTerminator(const CPascalString &);
  59. static CPasStringArray m_psaModifiersSource;
  60. static CPasStringArray m_psaKeyNamesSource;
  61. static CPasStringArray m_psaModifiersTarget;
  62. static CPasStringArray m_psaKeyNamesTarget;
  63. static BOOL m_fModifiersInitialized;
  64. static BOOL m_fKeyNamesInitialized;
  65. CPascalString m_pstrBaseString;
  66. CPascalString m_pstrExtension;
  67. CPascalString m_pstrControl;
  68. WCHAR m_cControlLeader;
  69. WCHAR m_cHotKeyChar;
  70. UINT m_uiHotKeyPos;
  71. CST::StringType m_stStringType;
  72. };
  73. #pragma warning(default : 4275)
  74. #pragma warning(default : 4251)
  75. LTAPIENTRY const CValidationOptions & GetValidationOptions(void);
  76. LTAPIENTRY void SetValidationOptions(const CValidationOptions &);
  77. #if !defined(_DEBUG) || defined(IMPLEMENT)
  78. #include "_locstr.inl"
  79. #endif
  80. #endif