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.

83 lines
3.0 KiB

  1. //---------------------------------------------------------------------------------------
  2. // File : Pager.h
  3. // Description :
  4. // This is the header file for the pager control
  5. //---------------------------------------------------------------------------------------
  6. #include "ccontrol.h"
  7. #define PGMP_RECALCSIZE 200
  8. //---------------------------------------------------------------------------------------
  9. class CPager : public CControl
  10. {
  11. public:
  12. //Function Memebers
  13. virtual LRESULT v_WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  14. static LRESULT PagerWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  15. static LRESULT PagerDragCallback(HWND hwnd, UINT code, WPARAM wp, LPARAM lp);
  16. protected:
  17. CPager();
  18. //Function Members
  19. DWORD _PGFToPGNDirection(DWORD dwDir);
  20. void _Scroll(DWORD dwDirection);
  21. void _SetChildPos(RECT * prcChild, UINT uFlags);
  22. void _NeedScrollbars(RECT rc);
  23. int _GetPage(DWORD dwDirection);
  24. void _OnSetChild(HWND hwnd, HWND hwndChild);
  25. void _OnSetPos(int iPos);
  26. int _OnGetPos();
  27. int _OnSetBorder(int iBorder);
  28. int _OnSetButtonSize(int iSize);
  29. void _OnReCalcSize();
  30. void _OnLButtonChange(UINT uMsg,LPARAM lParam);
  31. void _OnMouseMove(WPARAM wParam,LPARAM lParam);
  32. void _DrawButton(HDC hdc,int button);
  33. void _DrawBlank(HDC hdc,int button);
  34. BOOL _OnPrint(HDC hdc,UINT uFlags);
  35. int _HitTest(int x , int y);
  36. int _HitTestScreen(LPPOINT ppt);
  37. int _HitTestCursor();
  38. void _GetChildSize();
  39. RECT _GetButtonRect(int iButton);
  40. void _OnMouseLeave();
  41. inline _GetButtonSize();
  42. DWORD _GetButtonState(int iButton);
  43. void _OnTimer(UINT id);
  44. LRESULT _DragCallback(HWND hwnd, UINT code, WPARAM wp, LPARAM lp);
  45. void _KillTimer();
  46. virtual void v_OnPaint(HDC hdc);
  47. virtual LRESULT v_OnCreate();
  48. virtual void v_OnSize(int x, int y);
  49. virtual void v_OnNCPaint();
  50. virtual LRESULT v_OnCommand(WPARAM wParam, LPARAM lParam);
  51. virtual LRESULT v_OnNotify(WPARAM wParam, LPARAM lParam);
  52. virtual DWORD v_OnStyleChanged(WPARAM wParam, LPARAM lParam);
  53. virtual BOOL v_OnNCCalcSize(WPARAM wParam, LPARAM lParam, LRESULT *plres);
  54. //Data Members
  55. HWND _hwndChild;
  56. POINT _ptPos;
  57. POINT _ptLastMove;
  58. BITBOOL _fReCalcSend:1;
  59. BITBOOL _fForwardMouseMsgs:1;
  60. BITBOOL _fBkColorSet:1;
  61. BITBOOL _fTimerSet :1;
  62. BITBOOL _fOwnsButtonDown :1;
  63. int _iButtonTrack;
  64. RECT _rcDefClient; // this is our "natural" client rect if we didn't mess with nccalc
  65. DWORD _dwState[2]; // State of the two scroll buttons
  66. RECT _rcChildIdeal; // our child's ideal size
  67. int _iButtonSize;
  68. HDRAGPROXY _hDragProxy;
  69. COLORREF _clrBk;
  70. int _iBorder;
  71. UINT _cLinesPerTimeout;
  72. UINT _cPixelsPerLine;
  73. UINT _cTimeout;
  74. };
  75. //---------------------------------------------------------------------------------------