Source code of Windows XP (NT5)
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.

87 lines
1.9 KiB

  1. //-----------------------------------------------------------------------------
  2. //
  3. // File: location.h
  4. // Copyright (C) 1994-1997 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. //
  8. //
  9. //-----------------------------------------------------------------------------
  10. #ifndef ESPUTIL_LOCATION_H
  11. #define ESPUTIL_LOCATION_H
  12. typedef CWnd *TabId;
  13. const TabId NullTabId = 0;
  14. enum View
  15. {
  16. vNone,
  17. vTransTab,
  18. vVisualEditor,
  19. vProjWindow
  20. };
  21. enum Component
  22. {
  23. cmpNone,
  24. cmpSource,
  25. cmpTarget,
  26. cmpSourceAndTarget
  27. };
  28. #pragma warning(disable: 4275) // non dll-interface class 'foo' used
  29. // as base for dll-interface class 'bar'
  30. class LTAPIENTRY CLocation : public CObject
  31. {
  32. public:
  33. NOTHROW CLocation();
  34. NOTHROW CLocation(const CLocation &);
  35. NOTHROW CLocation(const CGlobalId &, View, TabId = NullTabId, Component = cmpNone);
  36. NOTHROW CLocation(const DBID &, ObjectType, View, TabId = NullTabId, Component = cmpNone);
  37. #ifdef _DEBUG
  38. virtual void AssertValid(void) const;
  39. #endif
  40. NOTHROW const CLocation & operator=(const CLocation &);
  41. NOTHROW int operator==(const CLocation &) const;
  42. NOTHROW int operator!=(const CLocation &) const;
  43. NOTHROW const CGlobalId & GetGlobalId(void) const;
  44. NOTHROW TabId GetTabId(void) const;
  45. NOTHROW View GetView(void) const;
  46. NOTHROW Component GetComponent(void) const;
  47. NOTHROW BOOL IsVisual(void) const;
  48. NOTHROW void SetGlobalId(const CGlobalId &);
  49. NOTHROW void SetTabId(const TabId);
  50. NOTHROW void SetView(View);
  51. NOTHROW void SetComponent(Component);
  52. NOTHROW ~CLocation() {};
  53. protected:
  54. NOTHROW void AssignFrom(const CLocation &);
  55. private:
  56. NOTHROW BOOL Compare(const CLocation &) const;
  57. CGlobalId m_giId;
  58. TabId m_TabId;
  59. View m_View;
  60. Component m_Component;
  61. };
  62. #pragma warning(default: 4275)
  63. const extern LTAPIENTRY CLocation g_locNull;
  64. #if !defined(_DEBUG) || defined(IMPLEMENT)
  65. #include "location.inl"
  66. #endif
  67. #endif