home *** CD-ROM | disk | FTP | other *** search
/ C/C++ User's Journal & Wi…eveloper's Journal Tools / C-C__Users_Journal_and_Windows_Developers_Journal_Tools_1997.iso / stingray / gridsvw7.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-10-27  |  2.9 KB  |  100 lines

  1. // gridsvw7.h : interface of the CGridSample7View class
  2. //
  3.  
  4. // This is a part of the Objective Grid C++ Library.
  5. // Copyright (C) 1995,1996 ClassWorks, Stefan Hoenig.
  6. // All rights reserved.
  7. //
  8. // This source code is only intended as a supplement to
  9. // the Objective Grid Classes Reference and related
  10. // electronic documentation provided with the library.
  11. // See these sources for detailed information regarding
  12. // the Objective Grid product.
  13. //
  14.  
  15. #ifndef _MYGRIDVW_H_
  16. #include "mygridvw.h"
  17. #endif
  18.  
  19. #ifndef _GXCTRL_H_
  20. #include "gxctrl.h"
  21. #endif
  22.  
  23. /////////////////////////////////////////////////////////////////////////////
  24. // CHeaderButton control
  25.  
  26. class CHeaderButton: public CGXStatic
  27. {
  28.     DECLARE_CONTROL(CHeaderButton)
  29.  
  30. public:
  31.     // Member functions
  32.  
  33.     CHeaderButton(CGXGridCore* pGrid);
  34.     virtual ~CHeaderButton();
  35.  
  36.     virtual void Draw(CDC* pDC, CRect rect, ROWCOL nRow, ROWCOL nCol, const CGXStyle& style, const CGXStyle* pStandardStyle);
  37.     virtual BOOL MouseMove(UINT nFlags, CPoint pt, UINT nHitState);
  38.     virtual BOOL LButtonDown(UINT nFlags, CPoint pt, UINT nHitState);
  39.     virtual BOOL LButtonUp(UINT nFlags, CPoint pt, UINT nHitState);
  40.     virtual BOOL RButtonDown(UINT nFlags, CPoint pt, UINT nHitState);
  41.     virtual BOOL RButtonUp(UINT nFlags, CPoint pt, UINT nHitState);
  42.     virtual BOOL LButtonDblClk(UINT nFlags, CPoint point);
  43.     virtual void OnClickedButton(CGXChild* pChild);
  44.     virtual void InvertBorders(CDC* pDC, const CRect& r);
  45.     virtual BOOL KeyPressed(UINT nMessage, UINT nChar, UINT nRepCnt, UINT flags);
  46.  
  47.     // Attributes:
  48. protected:
  49.     BOOL m_bPressed;
  50.     BOOL m_bMouseDown;
  51. };
  52.  
  53.  
  54. /////////////////////////////////////////////////////////////////////////////
  55. // CGridSample7View view
  56.  
  57. class CGridSample7View : public CMyGridView
  58. {
  59. protected: // create from serialization only
  60.     CGridSample7View();
  61.     DECLARE_DYNCREATE(CGridSample7View)
  62.  
  63. // Attributes
  64. public:
  65.     CGridSampleDoc* GetDocument();
  66.  
  67.     ROWCOL m_nLastDragCol;
  68.  
  69. // Operations
  70.     BOOL ConnectParam();
  71.     void SetupControls();
  72.     void DrawDragLine(ROWCOL nCol, BOOL bCurrent);
  73.  
  74. // Implementation
  75. public:
  76.     virtual ~CGridSample7View();
  77.     virtual void OnInitialUpdate();
  78.     virtual BOOL OnLButtonHitRowCol(ROWCOL nHitRow, ROWCOL nHitCol, ROWCOL nDragRow, ROWCOL nDragCol, CPoint point, UINT flags, WORD nHitState);
  79.     virtual BOOL OnLButtonDblClkRowCol(ROWCOL nRow, ROWCOL nCol, UINT nFlags, CPoint pt);
  80. #ifdef _DEBUG
  81.     virtual void AssertValid() const;
  82.     virtual void Dump(CDumpContext& dc) const;
  83. #endif
  84.  
  85. // Generated message map functions
  86. protected:
  87.     //{{AFX_MSG(CGridSample7View)
  88.     afx_msg void OnViewUseractions();
  89.     afx_msg void OnViewSplitterview();
  90.     //}}AFX_MSG
  91.     DECLARE_MESSAGE_MAP()
  92. };
  93.  
  94. #ifndef _DEBUG  // debug version in gridsvw.cpp
  95. inline CGridSampleDoc* CGridSample7View::GetDocument()
  96.    { return (CGridSampleDoc*) m_pDocument; }
  97. #endif
  98.  
  99. /////////////////////////////////////////////////////////////////////////////
  100.