home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / winfe / eddialog.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  13.1 KB  |  484 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. // eddialog.h : interface of the dialogs used by CNetscapeEditView 
  20. //
  21. /////////////////////////////////////////////////////////////////////////////
  22.  
  23. #ifndef EDDIALOG_H
  24. #define EDDIALOG_H
  25.  
  26. #include "edtrccln.h"
  27.  
  28. /////////////////////////////////////////////////////////////////////////////
  29. // CLoadingImageDlg dialog
  30.  
  31. class CLoadingImageDlg : public CDialog
  32. {
  33. // Construction
  34. public:
  35.     CLoadingImageDlg(CWnd* pParent = NULL,
  36.                      MWContext * pMWContext = NULL);
  37.  
  38. // Dialog Data
  39.     //{{AFX_DATA(CLoadingImageDlg)
  40.     enum { IDD = IDD_LOADING_IMAGES };
  41.         // NOTE: the ClassWizard will add data members here
  42.     //}}AFX_DATA
  43.  
  44.     MWContext     *m_pMWContext;
  45. private:
  46.     // This will change resource hInstance to Editor dll (in constructor)
  47.     CEditorResourceSwitcher m_ResourceSwitcher;
  48.  
  49. // Overrides
  50.     // ClassWizard generated virtual function overrides
  51.     //{{AFX_VIRTUAL(CLoadingImageDlg)
  52.     protected:
  53.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  54.     virtual void PostNcDestroy();
  55.     //}}AFX_VIRTUAL
  56.  
  57. // Implementation
  58. protected:
  59.  
  60.     // Generated message map functions
  61.     //{{AFX_MSG(CLoadingImageDlg)
  62.     virtual void OnCancel();
  63.     //}}AFX_MSG
  64.     DECLARE_MESSAGE_MAP()
  65. };
  66.  
  67. /////////////////////////////////////////////////////////////////////////////
  68. // CSaveFileDlg dialog
  69. // This is active when images are being saved as part of saving remote file
  70. // It allows user to cancel
  71. // NOTE: This dialog is used during HTTP or FTP upload,
  72. //       so resource is in NETSCAPE.RC, not EDITORXX.DLL
  73. //
  74. class CSaveFileDlg : public CDialog
  75. {
  76. // Construction
  77. public:
  78.     CSaveFileDlg(CWnd* pParent = NULL,
  79.                  MWContext * pMWContext = NULL,
  80.                  int  iFileCount = 1,
  81.                  ED_SaveDialogType saveType = ED_SAVE_DLG_SAVE_LOCAL);
  82.  
  83.     // Called at the start of each image saved
  84.     void StartFileSave(char * pFilename);
  85.  
  86. // Dialog Data
  87.     //{{AFX_DATA(CSaveFileDlg)
  88.     enum { IDD = IDD_SAVE_DOCUMENT };
  89.         // NOTE: the ClassWizard will add data members here
  90.     //}}AFX_DATA
  91.     
  92.     // Used to show progress, e.g.: "File 1 of 3"
  93.     int        m_iFileCount;
  94.     int        m_iCurrentFile;
  95.     BOOL       m_bUpload;
  96.  
  97. private:
  98.     MWContext *m_pMWContext;
  99.     CWnd      *m_pParent;
  100.     UINT       m_hTimer;
  101.  
  102. // Overrides
  103.     // ClassWizard generated virtual function overrides
  104.     //{{AFX_VIRTUAL(CSaveFileDlg)
  105.     protected:
  106.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  107.     virtual void PostNcDestroy();
  108.     //}}AFX_VIRTUAL
  109.  
  110. // Implementation
  111. protected:
  112.     
  113.     // Generated message map functions
  114.     //{{AFX_MSG(CSaveFileDlg)
  115.     virtual void OnCancel();
  116.     afx_msg void OnTimer( UINT  nIDEvent );
  117.     afx_msg void OnDestroy();
  118.     //}}AFX_MSG
  119.     DECLARE_MESSAGE_MAP()
  120. };
  121.  
  122.  
  123. /////////////////////////////////////////////////////////////////////////////
  124. // CSaveFileOverwriteDlg dialog
  125. // Called for user feedback when saving remote images
  126. //
  127. class CSaveFileOverwriteDlg : public CDialog
  128. {
  129. // Construction
  130. public:
  131.     CSaveFileOverwriteDlg(CWnd* pParent = NULL,
  132.                           char * pFilename = NULL,
  133.                           CSaveFileDlg * pSaveDlg = NULL);
  134.     char * m_pFilename;
  135.     // Put user's choice here
  136.     ED_SaveOption  m_Result;
  137.     CSaveFileDlg * pSaveDlg;
  138.  
  139. // Dialog Data
  140.     //{{AFX_DATA(CSaveFileOverwriteDlg)
  141.     enum { IDD = IDD_SAVE_IMAGE_OVERWRITE };
  142.         // NOTE: the ClassWizard will add data members here
  143.     //}}AFX_DATA
  144.  
  145. private:
  146.     // Used to cascade this dialog under CSaveFileDlg
  147.     CSaveFileDlg*  m_pSaveFileDlg;    
  148.  
  149.     // This will change resource hInstance to Editor dll (in constructor)
  150.     CEditorResourceSwitcher m_ResourceSwitcher;
  151.  
  152. // Overrides
  153.     // ClassWizard generated virtual function overrides
  154.     //{{AFX_VIRTUAL(CSaveFileOverwriteDlg)
  155.     protected:
  156.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  157.     //}}AFX_VIRTUAL
  158.  
  159. // Implementation
  160. protected:
  161.  
  162.     // Generated message map functions
  163.     //{{AFX_MSG(CSaveFileOverwriteDlg)
  164.     virtual void OnOK();
  165.     afx_msg void OnDontOverwriteAll();
  166.     afx_msg void OnDontOverwriteOne();
  167.     afx_msg void OnOverwriteAll();
  168.     afx_msg void OnOverwriteOne();
  169.     virtual void OnCancel();
  170.     virtual BOOL OnInitDialog();
  171.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  172.     //}}AFX_MSG
  173.     DECLARE_MESSAGE_MAP()
  174. };
  175.  
  176.  
  177. /////////////////////////////////////////////////////////////////////////////
  178. // CSaveNewDlg dialog
  179.  
  180. class CSaveNewDlg : public CDialog
  181. {
  182. // Construction
  183. public:
  184.     CSaveNewDlg(CWnd * pParent = NULL);
  185.                    
  186. // Dialog Data
  187.     //{{AFX_DATA(CSaveNewDlg)
  188.     enum { IDD = IDD_SAVE_NEW_DOCUMENT };
  189.     //}}AFX_DATA
  190.  
  191.  
  192. // Overrides
  193.     // ClassWizard generated virtual function overrides
  194.     //{{AFX_VIRTUAL(CSaveNewDlg)
  195.     protected:
  196.     //}}AFX_VIRTUAL
  197.  
  198. private:
  199.     // This will change resource hInstance to Editor dll (in constructor)
  200.     CEditorResourceSwitcher m_ResourceSwitcher;
  201.  
  202. // Implementation
  203. protected:
  204.  
  205.     // Generated message map functions
  206.     //{{AFX_MSG(CSaveNewDlg)
  207.     virtual BOOL OnInitDialog();
  208.     //}}AFX_MSG
  209.     DECLARE_MESSAGE_MAP()
  210. };
  211.  
  212. /////////////////////////////////////////////////////////////////////////////
  213. // CPublishDlg dialog
  214.  
  215. class CPublishDlg : public CDialog
  216. {
  217. // Construction
  218. public:
  219.     CPublishDlg(CWnd *pParent = NULL,
  220.                 MWContext *pMWContext = NULL,
  221.                 char *pUrl = NULL);
  222.  
  223.     ~CPublishDlg();
  224.  
  225.     MWContext   *m_pMWContext;
  226.     
  227.     // The list is first built here and sorted
  228.     // We condense strings in the listbox so filenames show,
  229.     //   so we need to save this list of full URLs
  230.     char      **m_ppImageList;
  231.     // Count of files in m_ppFileList
  232.     int         m_iFileCount;
  233.  
  234.     // This is list of files returned to NET_PublishDocument()
  235.     char      **m_ppIncludedFiles;
  236.     // The final ftp://username:password@location
  237.     //  is assembled here to be passed back to caller
  238.     char       *m_pFullLocation;
  239.  
  240. // Dialog Data
  241.     //{{AFX_DATA(CPublishDlg)
  242.     enum { IDD = IDD_PUBLISH };
  243.     CString    m_csUserName;
  244.     CString    m_csPassword;
  245.     BOOL    m_bRememberPassword;
  246.     CString m_csFilename;
  247.     CString m_csTitle;
  248.     //}}AFX_DATA
  249.  
  250.     CString    m_csLocation;
  251.  
  252. private:
  253.     // This will change resource hInstance to Editor dll (in constructor)
  254.     CEditorResourceSwitcher m_ResourceSwitcher;
  255.  
  256. // Overrides
  257.     // ClassWizard generated virtual function overrides
  258.     //{{AFX_VIRTUAL(CPublishDlg)
  259.     protected:
  260.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  261.     //}}AFX_VIRTUAL
  262.  
  263. // Implementation
  264. protected:
  265.     char      *m_pCurrentUrl;
  266.     char      *m_pCurrentFile;
  267.     char      *m_pCurrentDirectory;
  268.     char      *m_pImageFiles;
  269.     XP_Bool   *m_pSelectedDefault;
  270.     char     **m_ppAllFiles;
  271.     BOOL       m_bIsRootDirectory;
  272.     char     **m_ppUserList;
  273.     char     **m_ppPasswordList;
  274.  
  275.     // Generated message map functions
  276.     //{{AFX_MSG(CPublishDlg)
  277.     afx_msg void OnHelp();
  278.     virtual void OnOK();
  279.     virtual void OnCancel();
  280.     virtual BOOL OnInitDialog();
  281.     afx_msg void OnSelectAll();
  282.     afx_msg void OnSelectNone();
  283.     afx_msg void OnIncludeAllFiles();
  284.     afx_msg void OnIncludeImageFiles();
  285.     afx_msg void OnKillfocusPublishLocationList();
  286.     afx_msg void OnPublishDefaultLocation();
  287.     afx_msg void OnSelchangePublishLocation();
  288.     //}}AFX_MSG
  289. #ifdef XP_WIN32
  290.     afx_msg BOOL OnHelpInfo(HELPINFO *);
  291. #endif
  292.     DECLARE_MESSAGE_MAP()
  293. };
  294.  
  295. /////////////////////////////////////////////////////////////////////////////
  296. // CEditHintDlg dialog
  297.  
  298. class CEditHintDlg : public CDialog
  299. {
  300. // Construction
  301. public:
  302.     CEditHintDlg(CWnd* pParent = NULL,      // standard constructor
  303.                  UINT  nID_Msg = 0,
  304.                  UINT  nID_Caption = 0,
  305.                  BOOL  bYesNo = FALSE);     // Default action is like MB_OK
  306.                                             // If TRUE, action is like MB_YESNO,
  307.                                             // return value: IDOK = "Yes", IDCANCEL = "No"
  308.  
  309. // Dialog Data
  310.     //{{AFX_DATA(CEditHintDlg)
  311.     enum { IDD = IDD_HINT_DLG };
  312.     BOOL    m_bDontShowAgain;
  313.     CString    m_cHintText;
  314.     //}}AFX_DATA
  315.  
  316. private:
  317.     BOOL  m_bYesNo;
  318.     UINT  m_nID_Msg;
  319.     UINT  m_nID_Caption;
  320.  
  321.     // This will change resource hInstance to Editor dll (in constructor)
  322.     // Be sure to call m_ResourceSwitcher.Reset() 
  323.     //   in InitDialog() or OnSetActive() if dialog accesses strings
  324.     //   in NETSCAPE.EXE
  325.     CEditorResourceSwitcher m_ResourceSwitcher;
  326.  
  327. // Overrides
  328.     // ClassWizard generated virtual function overrides
  329.     //{{AFX_VIRTUAL(CEditHintDlg)
  330.     protected:
  331.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  332.     //}}AFX_VIRTUAL
  333.  
  334. // Implementation
  335. protected:
  336.  
  337.     // Generated message map functions
  338.     //{{AFX_MSG(CEditHintDlg)
  339.     virtual void OnOK();
  340.     virtual BOOL OnInitDialog();
  341.     afx_msg void OnYes();
  342.     afx_msg void OnNo();
  343.     //}}AFX_MSG
  344.     DECLARE_MESSAGE_MAP()
  345. };
  346.  
  347. /////////////////////////////////////////////////////////////////////////////
  348. // CGetLocationDlg dialog
  349.  
  350. class CGetLocationDlg : public CDialog
  351. {
  352. // Construction
  353. public:
  354.     CGetLocationDlg(CWnd* pParent = NULL,      // standard constructor
  355.                  UINT  nID_Msg = 0,
  356.                  UINT  nID_Caption = 0,
  357.                  UINT  nID_FileCaption = 0);
  358. // Dialog Data
  359.     //{{AFX_DATA(CGetLocationDlg)
  360.     enum { IDD = IDD_LOCATION_DLG };
  361.     CString    m_csLocation;
  362.     //}}AFX_DATA
  363.  
  364. private:
  365.     UINT  m_nID_Msg;
  366.     UINT  m_nID_Caption;
  367.     UINT  m_nID_FileCaption;
  368.  
  369.     // This will change resource hInstance to Editor dll (in constructor)
  370.     // Be sure to call m_ResourceSwitcher.Reset() 
  371.     //   in InitDialog() or OnSetActive() if dialog accesses strings
  372.     //   in NETSCAPE.EXE
  373.     CEditorResourceSwitcher m_ResourceSwitcher;
  374.  
  375. // Overrides
  376.     // ClassWizard generated virtual function overrides
  377.     //{{AFX_VIRTUAL(CGetLocationDlg)
  378.     protected:
  379.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  380.     //}}AFX_VIRTUAL
  381.  
  382. // Implementation
  383. protected:
  384.  
  385.     // Generated message map functions
  386.     //{{AFX_MSG(CGetLocationDlg)
  387.     virtual void OnOK();
  388.     virtual BOOL OnInitDialog();
  389.     afx_msg void OnChooseFile();
  390.     //}}AFX_MSG
  391.     DECLARE_MESSAGE_MAP()
  392. };
  393.  
  394. /////////////////////////////////////////////////////////////////////////////
  395. // COpenTemplateDlg dialog
  396.  
  397. class COpenTemplateDlg : public CDialog
  398. {
  399. // Construction
  400. public:
  401.     COpenTemplateDlg(CWnd* pParent = NULL);      // standard constructor
  402.  
  403. // Dialog Data
  404.     //{{AFX_DATA(COpenTemplateDlg)
  405.     enum { IDD = IDD_OPEN_TEMPLATE };
  406.     CString    m_csLocation;
  407.     //}}AFX_DATA
  408.  
  409. private:
  410.     char  *m_pHistoryBase;
  411.     int    m_iTemplateLocationCount;
  412.     char **m_pLocationList;
  413.  
  414.     // This will change resource hInstance to Editor dll (in constructor)
  415.     // Be sure to call m_ResourceSwitcher.Reset() 
  416.     //   in InitDialog() or OnSetActive() if dialog accesses strings
  417.     //   in NETSCAPE.EXE
  418.     CEditorResourceSwitcher m_ResourceSwitcher;
  419.  
  420. // Overrides
  421.     // ClassWizard generated virtual function overrides
  422.     //{{AFX_VIRTUAL(COpenTemplateDlg)
  423.     protected:
  424.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  425.     //}}AFX_VIRTUAL
  426.  
  427. // Implementation
  428. protected:
  429.  
  430.     // Generated message map functions
  431.     //{{AFX_MSG(COpenTemplateDlg)
  432.     virtual void OnOK();
  433.     virtual BOOL OnInitDialog();
  434.     afx_msg void OnChooseFile();
  435.     afx_msg void OnGotoNetscapeTemplates();
  436.     //}}AFX_MSG
  437.     DECLARE_MESSAGE_MAP()
  438. };
  439.  
  440. /////////////////////////////////////////////////////////////////////////////
  441. // CPageTitleDlg dialog
  442.  
  443. class CPageTitleDlg : public CDialog
  444. {
  445. // Construction
  446. public:
  447.     CPageTitleDlg(CWnd* pParent, char** ppTitle = NULL);
  448.  
  449. // Dialog Data
  450.     //{{AFX_DATA(CPageTitleDlg)
  451.     enum { IDD = IDD_PAGE_TITLE };
  452.     CString    m_csTitle;
  453.     //}}AFX_DATA
  454.  
  455. private:
  456.     // Return result here
  457.     char **m_ppTitle;
  458.  
  459.     // This will change resource hInstance to Editor dll (in constructor)
  460.     // Be sure to call m_ResourceSwitcher.Reset() 
  461.     //   in InitDialog() or OnSetActive() if dialog accesses strings
  462.     //   in NETSCAPE.EXE
  463.     CEditorResourceSwitcher m_ResourceSwitcher;
  464.  
  465. // Overrides
  466.     // ClassWizard generated virtual function overrides
  467.     //{{AFX_VIRTUAL(CPageTitleDlg)
  468.     protected:
  469.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  470.     //}}AFX_VIRTUAL
  471.  
  472. // Implementation
  473. protected:
  474.  
  475.     // Generated message map functions
  476.     //{{AFX_MSG(CPageTitleDlg)
  477.     virtual void OnOK();
  478.     virtual BOOL OnInitDialog();
  479.     //}}AFX_MSG
  480.     DECLARE_MESSAGE_MAP()
  481. };
  482.  
  483. #endif // EDDIALOG_H
  484.