home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / winfe / compfile.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  3.0 KB  |  102 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 __COMPFILE_H
  20. #define __COMPFILE_H
  21.  
  22. #include "msgcom.h"
  23. #include "winproto.h"
  24.  
  25. class CNSAttachDropTarget;
  26.  
  27. class CNSAttachmentList  :   public  CListBox
  28. {
  29. public:
  30.     HFONT m_cfTextFont;
  31.     CNSAttachmentList(MSG_Pane * pPane = NULL);
  32.     ~CNSAttachmentList();
  33.     
  34.     CNSAttachDropTarget * m_pDropTarget;
  35.     MSG_Pane * m_pPane;
  36.     MSG_Pane * GetMsgPane() { return m_pPane; }
  37.     
  38.     void AttachFile();
  39.     void AttachUrl(char * pUrl = NULL);
  40.     void RemoveAttachment();
  41.     void UpdateAttachments();
  42.     char * GetAttachmentName(
  43.         char * prompt, int type = ALL, XP_Bool bMustExist = TRUE, BOOL * pOpenIntoEditor = NULL);
  44.     void Cleanup();
  45.     void AddAttachment(char * pName);
  46.     BOOL Create(CWnd * pWnd, UINT id);
  47.     BOOL ProcessDropTarget(COleDataObject * pDataObject);
  48.  
  49.      virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
  50.      virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct);
  51.      virtual void DeleteItem(LPDELETEITEMSTRUCT lpDeleteItemStruct);
  52.  
  53.     afx_msg void    OnDropFiles( HDROP hDropInfo );
  54. protected:
  55.      UINT    ItemFromPoint(CPoint pt, BOOL& bOutside) const;        
  56.     
  57.     afx_msg int     OnCreate( LPCREATESTRUCT lpCreateStruct );
  58.     afx_msg void    OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) ;
  59.     afx_msg void    OnLButtonDown(UINT nFlags, CPoint point);
  60.     afx_msg void    OnDelete();
  61.     afx_msg void    OnDestroy();
  62.     afx_msg void OnUpdateDelete(CCmdUI * pCmdUI);
  63.     
  64.      DECLARE_MESSAGE_MAP()
  65. };
  66.  
  67. /////////////////////////////////////////////////////////////////////////////
  68. // CLocationDlg dialog
  69.  
  70. class CLocationDlg : public CDialog
  71. {
  72. // Construction
  73. public:
  74.     CLocationDlg(char * pUrl = NULL, CWnd* pParent = NULL);   // standard constructor
  75.  
  76.     char * m_pUrl;
  77. // Dialog Data
  78.     //{{AFX_DATA(CLocationDlg)
  79.     enum { IDD = IDD_ATTACHLOCATION };
  80.     CEdit    m_LocationBox;
  81.     CString    m_Location;
  82.     //}}AFX_DATA
  83.  
  84.  
  85. // Overrides
  86.     // ClassWizard generated virtual function overrides
  87.     //{{AFX_VIRTUAL(CLocationDlg)
  88.     protected:
  89.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  90.     //}}AFX_VIRTUAL
  91.  
  92. // Implementation
  93. protected:
  94.  
  95.     // Generated message map functions
  96.     //{{AFX_MSG(CLocationDlg)
  97.     virtual BOOL OnInitDialog();
  98.     //}}AFX_MSG
  99.     DECLARE_MESSAGE_MAP()
  100. };
  101. #endif
  102.