home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / winfe / gridedge.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.1 KB  |  77 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18.  
  19. #ifndef __GridEdges_H
  20. #define __GridEdges_H
  21. // gridedge.h : header file
  22. //
  23.  
  24. /////////////////////////////////////////////////////////////////////////////
  25. // CGridEdge window
  26.  
  27. class CGridEdge : public CWnd
  28. {
  29. // Construction
  30. public:
  31.     CGridEdge(LO_EdgeStruct *pEdge, CWinCX *pOwnerCX);
  32.  
  33. // Our context and grid edge.
  34. private:
  35.     CWinCX *m_pCX;
  36.     LO_EdgeStruct *m_pEdge;
  37.  
  38. //    Whether or not we are currently tracking.
  39. private:
  40.     BOOL m_bTracking;
  41.     CRect m_crTracker;
  42.     CRect m_crOriginalTracker;
  43.     CPoint m_cpLBDown;
  44.         BOOL m_bParentClipChildren;
  45.     void InvertTracker();
  46.  
  47. // Operations
  48. public:
  49.     void UpdateEdge(LO_EdgeStruct *pEdge);
  50.     BOOL CanResize() const    {
  51.         BOOL bRetval = FALSE;
  52.         if(m_pEdge != NULL && m_pEdge->movable == TRUE)    {
  53.             bRetval = TRUE;
  54.         }
  55.         return(bRetval);
  56.     }
  57.  
  58. // Implementation
  59. public:
  60.     virtual ~CGridEdge();
  61.  
  62.     // Generated message map functions
  63. protected:
  64.     //{{AFX_MSG(CGridEdge)
  65.     afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  66.     afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  67.     afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  68.     afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
  69.     afx_msg void OnPaint();
  70.     afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
  71.     //}}AFX_MSG
  72.     DECLARE_MESSAGE_MAP()
  73. };
  74.  
  75. /////////////////////////////////////////////////////////////////////////////
  76. #endif // __GridEdges_H
  77.