home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / winfe / prefs / edpref / src / pages.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  3.4 KB  |  120 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 __EDPAGES_H_
  20. #define __EDPAGES_H_
  21.  
  22. #include "cppageex.h"
  23.  
  24. /////////////////////////////////////////////////////////////////////////////
  25. // Helper functions
  26.  
  27. // CString interface to PREF_GetCharPref routine
  28. int
  29. PREF_GetStringPref(LPCSTR lpszPref, CString &str);
  30.  
  31. /////////////////////////////////////////////////////////////////////////////
  32. // CEditorPropertyPage
  33.  
  34. // Simple base class that handles reference counting of the DLL object and
  35. // caching the size of the property page. Note: all property pages derived
  36. // from this class MUST be the same size
  37. class CEditorPropertyPage : public CPropertyPageEx {
  38.     public:
  39.         CEditorPropertyPage(UINT nTemplateID, LPCSTR lpszHelpTopic);
  40.  
  41.     protected:
  42.         HRESULT        GetPageSize(SIZE &);
  43.  
  44.     private:
  45.         CRefDll    m_refDll;
  46.  
  47.         static SIZE    m_size;  // cached size
  48. };
  49.  
  50. /////////////////////////////////////////////////////////////////////////////
  51. // CEditorPrefs
  52.  
  53. class CEditorPrefs : public CEditorPropertyPage {
  54.     public:
  55.         CEditorPrefs();
  56.  
  57.     protected:
  58.         STDMETHODIMP Activate(HWND hwndParent, LPCRECT lprc, BOOL bModal);
  59.         BOOL         DoTransfer(BOOL bSaveAndValidate);
  60.         BOOL         ApplyChanges();
  61.         // Event processing
  62.         BOOL    OnCommand(int id, HWND hwndCtl, UINT notifyCode);
  63.         BOOL    GetApplicationFilename(CString& strFilename, UINT nIDCaption);
  64.         BOOL    InitDialog();
  65.  
  66.     private:
  67.         // Member variables
  68.         CString m_strAuthor;
  69.         CString m_strHTML_Editor;
  70.         CString m_strImageEditor;
  71.         int     m_iFontSizeMode;
  72.         BOOL    m_bAutoSave;
  73.         int     m_iAutoSaveMinutes;
  74. };
  75.  
  76.  
  77. /////////////////////////////////////////////////////////////////////////////
  78. // CPublishPrefs
  79.  
  80. class CPublishPrefs : public CEditorPropertyPage {
  81.     public:
  82.         CPublishPrefs();
  83.  
  84.     protected:
  85.         STDMETHODIMP Activate(HWND hwndParent, LPCRECT lprc, BOOL bModal);
  86.         BOOL         DoTransfer(BOOL bSaveAndValidate);
  87.         BOOL         ApplyChanges();
  88.         BOOL         InitDialog();
  89.  
  90.     private:
  91.         // Member variables
  92.         BOOL        m_bAutoAdjustLinks;
  93.         BOOL        m_bKeepImagesWithDoc;
  94.         CString     m_strPublishLocation;
  95.         CString     m_strBrowseLocation;
  96. };
  97.  
  98.  
  99.  
  100. /////////////////////////////////////////////////////////////////////////////
  101. // CEditorPrefs2
  102.  
  103. class CEditorPrefs2 : public CEditorPropertyPage {
  104.     public:
  105.         CEditorPrefs2();
  106.  
  107.     protected:
  108.         STDMETHODIMP Activate(HWND hwndParent, LPCRECT lprc, BOOL bModal);
  109.         BOOL         DoTransfer(BOOL bSaveAndValidate);
  110.         BOOL         ApplyChanges();
  111.         BOOL         InitDialog();
  112.  
  113.     private:
  114.         // Member variables
  115.         BOOL        m_bUpDownMoveCursor;
  116. };
  117.  
  118. #endif /* __EDPAGES_H_ */
  119.  
  120.