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.

99 lines
2.8 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1994.
  5. //
  6. // File: winsplit.hxx
  7. //
  8. // Contents:
  9. //
  10. // Classes: CTableWindowSplit
  11. //
  12. // Functions:
  13. //
  14. // History: 1-08-95 srikants Created
  15. //
  16. //----------------------------------------------------------------------------
  17. #pragma once
  18. #include <bigtable.hxx>
  19. #include "tblwindo.hxx"
  20. class CSortSet;
  21. //+---------------------------------------------------------------------------
  22. //
  23. // Class: CTableWindowSplit
  24. //
  25. // Purpose: The class which drives splitting a CTableWindow into two
  26. // windows.
  27. //
  28. // History: 2-07-95 srikants Created
  29. //
  30. // Notes:
  31. //
  32. //----------------------------------------------------------------------------
  33. class CTableWindowSplit
  34. {
  35. public:
  36. CTableWindowSplit( CTableWindow & srcWindow,
  37. ULONG iSplitQueryRowIndex,
  38. ULONG segIdLeft, ULONG segIdRight,
  39. BOOL fIsLastSegment );
  40. ~CTableWindowSplit();
  41. void CreateTargetWindows();
  42. void DoSplit();
  43. void TransferTargetWindows( CTableWindow ** ppLeft,
  44. CTableWindow ** ppRight );
  45. private:
  46. CTableWindow & _srcWindow; // Source window to split.
  47. CSortSet * _pSortSet; // Pointer to the sort set.
  48. CTableWindow * _pLeftWindow; // Target left window.
  49. CTableWindow * _pRightWindow; // Target right window.
  50. CRowIndex & _srcQueryRowIndex; // RowIndex used by query to add
  51. // rows.
  52. CRowIndex & _srcClientRowIndex; // RowIndex used by the client to
  53. // to retrieve rows.
  54. ULONG _iSplitQueryRowIndex; // Split offset in the query row
  55. // index.
  56. LONG _iSplitClientRowIndex; // Split offset in the source
  57. // visible row index.
  58. ULONG _segIdLeft; // Segment Id of the left window
  59. ULONG _segIdRight; // Segment Id of the right window
  60. BOOL _fIsLastSegment; // Is the source window the last
  61. // segment in the table.
  62. void _SimpleSplit();
  63. void _CopyWithoutNotifications( CTableWindow & destWindow, CRowIndex & srcRowIndex,
  64. ULONG iStartRowIndex, ULONG iEndRowIndex );
  65. void _CopyWithNotifications( CTableWindow & destWindow,
  66. ULONG iStartQueryRowIndex, ULONG iEndQueryRowIndex,
  67. LONG iStartClientRowIndex, LONG iEndClientRowIndex );
  68. void _CopyWatchRegions();
  69. inline BOOL _IsOffsetInLeftWindow( long iOffset );
  70. };