home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / winfe / edhref.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.6 KB  |  103 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. // edhref.h : header file
  20. //
  21. #ifdef EDITOR
  22. #ifndef _EDHREF_H
  23. #define _EDHREF_H
  24.  
  25. enum ED_AnchorType{
  26.     ED_ANCHOR_TEXT,
  27.     ED_ANCHOR_IMAGE
  28. };
  29.  
  30. /////////////////////////////////////////////////////////////////////////////
  31. // CHrefDlg dialog
  32.  
  33. class CHrefDlg : public CDialog
  34. {
  35. // Construction
  36. public:
  37.     CHrefDlg(CWnd* pParent = NULL,
  38.              MWContext * pMWContext = NULL,
  39.              BOOL bAutoAdjustLinks = TRUE );
  40.  
  41. // Dialog Data
  42.     //{{AFX_DATA(CHrefDlg)
  43.     enum { IDD = IDD_MAKE_LINK };
  44.     CString    m_csHref;
  45.     CString    m_csAnchorEdit;
  46.     CString    m_csAnchor;
  47.     //}}AFX_DATA
  48.  
  49. private:
  50.     CString    m_csLastValidHref;
  51.  
  52.     int        m_nAnchorType;
  53.     BOOL    m_bNewAnchorText;
  54.     BOOL    m_bAutoAdjustLinks;
  55.     
  56.     EDT_ImageData *m_pImageData;
  57.  
  58.     // This is simply the URL for the current document 
  59.     //  (from History entry)
  60.     char    *m_szBaseDocument;
  61.  
  62. // Overrides
  63.     // ClassWizard generated virtual function overrides
  64.     //{{AFX_VIRTUAL(CHrefDlg)
  65.     protected:
  66.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  67.     //}}AFX_VIRTUAL
  68.  
  69.        XP_List *    m_pTargetList;
  70.  
  71.     UINT m_nTargetCount;
  72.     
  73. // Implementation
  74. protected:
  75.     MWContext * m_pMWContext;
  76.     CListBox  * m_pListBox;
  77.     CEdit     * m_pHrefEdit;
  78.     CWnd      * m_pUnlinkButton;
  79.     CWnd      * m_pAnchor;
  80.     CEdit     * m_pAnchorEdit;
  81.     void FillTargetList();
  82.     CNetscapeView* m_pView;
  83.     BOOL        m_bHrefChanged;
  84.     BOOL        m_bValidHref;
  85.     void        ValidateHref();
  86.  
  87.     // Generated message map functions
  88.     //{{AFX_MSG(CHrefDlg)
  89.     virtual BOOL OnInitDialog();
  90.     virtual void OnOK();
  91.     afx_msg void OnHrefFile();
  92.     afx_msg void OnHrefUnlink();
  93.     afx_msg void OnSelchangeTargetList();
  94.     afx_msg void OnChangeHrefUrl();
  95.     afx_msg void OnKillfocusHrefUrl();
  96.     //}}AFX_MSG
  97.     DECLARE_MESSAGE_MAP()
  98. };
  99.  
  100.  
  101. #endif // _ED_HREF_H
  102. #endif // EDITOR
  103.