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.

110 lines
3.0 KiB

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