home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / winfe / navcontv.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.7 KB  |  66 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 NAVCONTV_H
  20. #define NAVCONTV_H
  21. #include "htrdf.h"
  22. #define WM_NAVCENTER_BASE 999
  23. #define WM_NAVCENTER_QUERYPOSITION (WM_USER + WM_NAVCENTER_BASE + 1) /* return zero if you process */
  24. struct NAVCENTPOS   {
  25.     int m_iYDisposition;    /* INT_MIN is top, 0 middle, INT_MAX bottom
  26.                              * You must provide a unique value, so do some grepping
  27.                              */
  28.     int m_iYVector;         /* This number is how large the child window would
  29.                              *  like to be in the Y direction.
  30.                              * It is relative to all other child windows.
  31.                              * You must provide this value, or the window will be
  32.                              *  disproportionate, do some grepping to figure the
  33.                              *  scale it should be on.
  34.                              */
  35.     HWND m_hChild;
  36. };
  37.  
  38. class CContentView : public CView
  39. {
  40.     DECLARE_DYNAMIC(CContentView)
  41.     CContentView();
  42.     virtual ~CContentView();
  43.     virtual void OnDraw(CDC* pDC);  // overridden to draw this view
  44. private:
  45.     XP_List *m_pChildSizeInfo;
  46. public:
  47.     void CalcChildSizes();
  48.     void AddChildSizeInfo(NAVCENTPOS *pPreference);
  49.  
  50.     // drag and drop operation for the nav center content view.  If there is a child window
  51.     // that has ID == NC_IDW_OUTLINER.  The drag and drop message will get pass onto
  52.     // this child.  If not, the drag and drop message will get pass onto the parent window.
  53.  
  54. protected:
  55.     virtual void OnActivateView( BOOL bActivate, CView* pActivateView, CView* pDeactiveView );
  56.     //{{AFX_MSG(CMainFrame)
  57.     afx_msg void OnSize( UINT nType, int cx, int cy );
  58.     afx_msg void OnSetFocus(CWnd* pWnd);
  59.     afx_msg void OnMouseMove( UINT nFlags, CPoint point );
  60.     afx_msg LRESULT OnNavCenterQueryPosition(WPARAM wParam, LPARAM lParam);
  61.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  62.     //}}AFX_MSG
  63.     DECLARE_MESSAGE_MAP()
  64. };
  65. #endif
  66.