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.

78 lines
1.8 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1996 - 1999.
  5. //
  6. // File: lview.hxx
  7. //
  8. // Contents:
  9. //
  10. // History: 15 Aug 1996 DLee Created
  11. //
  12. //--------------------------------------------------------------------------
  13. #pragma once
  14. class CListView
  15. {
  16. public:
  17. CListView ();
  18. HWND Parent() { return _hwndParent; }
  19. void Create (HWND hwndParent, HWND hwnd);
  20. void Size (WPARAM flags, int cx, int cy);
  21. void Paint (PAINTSTRUCT& paint);
  22. void SetFont (HFONT hfont);
  23. void SetFocus ();
  24. void KeyDown (int nKey);
  25. void ButtonUp (int y);
  26. void ButtonDown (int y);
  27. void Vscroll (int action, int pos);
  28. // User messages
  29. void ResetContents ();
  30. void InsertItem ( int iRow );
  31. void DeleteItem ( int iRow );
  32. void InvalidateItem (int iRow);
  33. void SetCountBefore (int cBefore);
  34. void SetTotalCount (int cTotal);
  35. LRESULT ContextMenuHitTest( WPARAM wParam, LPARAM lParam );
  36. LRESULT MouseWheel( HWND hwnd, WPARAM wParam, LPARAM lParam );
  37. private:
  38. // Scrolling
  39. void LineUp ();
  40. void LineDown ();
  41. void PageUp ();
  42. void PageDown ();
  43. void Top ();
  44. void Bottom ();
  45. void ScrollPos (int pos);
  46. void _GoUp( long cToGo );
  47. void _GoDown( long cToGo );
  48. void UpdateHighlight( int oldLine, int newLine );
  49. void SelectUp ();
  50. void SelectDown ();
  51. void RefreshRow (int iRow);
  52. void UpdateScroll();
  53. void InvalidateAndUpdateScroll();
  54. HWND _hwndParent;
  55. HWND _hwnd;
  56. int _cBefore;
  57. int _cTotal;
  58. int _cLines;
  59. int _cx;
  60. int _cy;
  61. int _cyLine;
  62. HFONT _hfont;
  63. int _iWheelRemainder;
  64. };