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.

126 lines
4.6 KiB

  1. //
  2. // WRKSPOBJ.HPP
  3. // Drawing objects: point, openpolyline, closepolyline, ellipse
  4. //
  5. // Copyright Microsoft 1998-
  6. //
  7. #ifndef __WRKSPOBJ_HPP_
  8. #define __WRKSPOBJ_HPP_
  9. #include "mcshelp.h"
  10. void AddNewWorkspace(WorkspaceObj * pWorkspaceObj, BOOL bForcedResend = FALSE);
  11. WorkspaceObj* RemoveWorkspace(WorkspaceObj * pWorkspaceObj);
  12. void RemoveObjectFromRequestHandleList(T126Obj * pObjRequest);
  13. BOOL RemoveObjectFromResendList(T126Obj * pObjRequest);
  14. void RemoveRemotePointer(MEMBER_ID nMemberID);
  15. void ResendAllObjects(void);
  16. BOOL IsThereAnythingInAnyWorkspace(void);
  17. BOOL IsWorkspaceListed(T126Obj * pWorkspaceObj);
  18. void SendWorkspaceRefreshPDU(BOOL bImtheRefresher);
  19. void TogleLockInAllWorkspaces(BOOL bLock, BOOL bResend = FALSE);
  20. class BitmapObj;
  21. class WorkspaceObj : public T126Obj
  22. {
  23. public:
  24. WorkspaceObj ( void );
  25. WorkspaceObj (WorkspaceCreatePDU * pworkspaceCreatePDU, BOOL bForcedResend);
  26. ~WorkspaceObj( void );
  27. void WorkspaceEditObj ( WorkspaceEditPDU * pworkspaceEditPDU );
  28. BOOL m_bWorkspaceReady;
  29. void CreateWorkspaceCreatePDU(WorkspaceCreatePDU *);
  30. void CreateWorkspaceDeletePDU(WorkspaceDeletePDU *);
  31. void CreateWorkspaceEditPDU(WorkspaceEditPDU *);
  32. static UINT GetWorkspaceIdentifier(WorkspaceIdentifier *workspaceIdentifier);
  33. void GetWorkSpaceViewEditParam(PWorkspaceEditPDU_viewEdits pViewEdits);
  34. void GetWorkSpaceViewParam(PWorkspaceCreatePDU_viewParameters_Set_viewAttributes pViewAttributes);
  35. //
  36. // Workspace object list management
  37. //
  38. void AddTail(T126Obj * pObj);
  39. void AddHead(T126Obj * pObj){pObj->SetMyWorkspace(this); pObj->SetMyPosition(m_T126ObjectsInWorkspace.AddHead(pObj));}
  40. WBPOSITION GetTailPosition(void){return m_T126ObjectsInWorkspace.GetTailPosition();}
  41. WBPOSITION GetHeadPosition(void){return m_T126ObjectsInWorkspace.GetHeadPosition();}
  42. T126Obj* GetHead(void){return (T126Obj*)m_T126ObjectsInWorkspace.GetHead();}
  43. T126Obj* GetTail(void){return (T126Obj*)m_T126ObjectsInWorkspace.GetTail();}
  44. T126Obj* GetNextObject(WBPOSITION& pos){return (T126Obj*)m_T126ObjectsInWorkspace.GetNext(pos);}
  45. T126Obj* GetPreviousObject(WBPOSITION& pos){return (T126Obj*)m_T126ObjectsInWorkspace.GetPrevious(pos);}
  46. T126Obj* RemoveAt(WBPOSITION& pos){return (T126Obj*)m_T126ObjectsInWorkspace.RemoveAt(pos);}
  47. void RemoveT126Object(T126Obj *pObj);
  48. T126Obj* FindObjectInWorkspace(UINT objectHandle);
  49. BOOL IsObjectInWorkspace(T126Obj* pObjToFind);
  50. UINT EnumerateObjectsInWorkspace(void);
  51. BitmapObj * RectHitRemotePointer(LPRECT rect, int, WBPOSITION pos);
  52. void SetBackGroundColor(COLORREF rgb);
  53. //
  54. // Base class overwrite
  55. //
  56. void Draw(HDC hDC = NULL, BOOL bForcedDraw = FALSE, BOOL bPrinting = FALSE){};
  57. void UnDraw(){};
  58. BOOL CheckReallyHit(LPCRECT pRectHit){return TRUE;};
  59. BOOL HasFillColor(void){return FALSE;}
  60. void SetFillColor(COLORREF cr, BOOL isPresent){}
  61. BOOL GetFillColor(COLORREF * pcr) {return FALSE;}
  62. BOOL GetFillColor(RGBTRIPLE* prgb) {return FALSE;}
  63. void SetPenColor(COLORREF cr, BOOL isPresent){}
  64. BOOL GetPenColor(COLORREF * pcr) {return FALSE;}
  65. BOOL GetPenColor(RGBTRIPLE * prgb) {return FALSE;}
  66. void ChangedAnchorPoint(void){};
  67. BOOL HasAnchorPointChanged(void){return FALSE;}
  68. void ChangedZOrder(void){};
  69. BOOL HasZOrderChanged(void){return FALSE;}
  70. void ChangedViewState(void){m_dwChangedAttrib |= 0x00000001;}
  71. void ChangedUpatesEnabledState(void){m_dwChangedAttrib |= 0x00000002;}
  72. BOOL HasViewStateChanged(void){return (m_dwChangedAttrib & 0x00000001);}
  73. BOOL HasUpatesEnabledStateChanged(void){return (m_dwChangedAttrib & 0x00000002);}
  74. void ResetAttrib(void){m_dwChangedAttrib = 0;}
  75. void SetAllAttribs(void){m_dwChangedAttrib = 0x00000003;};
  76. void ChangedPenThickness(void){};
  77. BOOL GetUpdatesEnabled(void){return m_bUpdatesEnabled;}
  78. void SetUpdatesEnabled(BOOL bUpdatesEnabled){m_bUpdatesEnabled = bUpdatesEnabled; ChangedUpatesEnabledState();}
  79. void SetViewActionChoice(UINT action){m_viewActionChoice = action;}
  80. void SetViewHandle(UINT viewHandle){m_viewHandle = viewHandle;}
  81. void OnObjectEdit(void);
  82. void OnObjectDelete(void);
  83. void SendNewObjectToT126Apps(void);
  84. void GetEncodedCreatePDU(ASN1_BUF *pBuf);
  85. protected:
  86. DWORD m_dwChangedAttrib;
  87. CWBOBLIST m_T126ObjectsInWorkspace;
  88. UINT m_appRosterInstance;
  89. BOOL m_bsynchronized;
  90. POINT m_workspaceSize;
  91. BOOL m_acceptKeyboardEvents;
  92. BOOL m_acceptPointingDeviceEvents;
  93. BOOL m_bUpdatesEnabled;
  94. ULONG m_viewHandle;
  95. RECT m_viewRegion;
  96. UINT m_viewActionChoice;
  97. COBLIST m_protectedPlaneAccessList;
  98. #ifdef _DEBUG
  99. RGBTRIPLE m_backgroundColor;
  100. BOOL m_bPreserve;
  101. void GetWorkSpaceAttrib(PWorkspaceCreatePDU_workspaceAttributes pWorkspaceAttributes);
  102. void GetWorkSpacePlaneParam(PWorkspaceCreatePDU_planeParameters pPlaneParameters);
  103. #endif // 0
  104. };
  105. #endif // __WRKSPOBJ_HPP_