home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / winfe / prefs / nsprefui / src / prefpriv.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.5 KB  |  82 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 __PREFPRIV_H_
  20. #define __PREFPRIV_H_
  21.  
  22. #include "isppageo.h"
  23.  
  24. extern HINSTANCE    g_hInstance;
  25.  
  26. struct CPropertyCategory;
  27.  
  28. // Structure containing information for each property page
  29. struct CPropertyPage {
  30.     CPropertyCategory  *m_pCategory;
  31.     LPPROPERTYPAGE        m_pPage;
  32.     SIZE                m_size;
  33.     LPCSTR                m_lpszTitle;
  34.     LPCSTR                m_lpszDescription;
  35.     LPCSTR                m_lpszHelpTopic;
  36.     HTREEITEM            m_hitem;
  37.  
  38.     // Releases the reference to the interface for the property page,
  39.     // and frees any memory
  40.    ~CPropertyPage();
  41.  
  42.     // Initializes the property page by setting the page site
  43.     // and getting the page info
  44.     HRESULT        Initialize(LPPROPERTYPAGE pPage, LPPROPERTYPAGESITE pSite);
  45. };
  46.  
  47. // Counted array of property pages
  48. struct CPropertyCategory {
  49.     LPSPECIFYPROPERTYPAGEOBJECTS m_pProvider;
  50.     ULONG                            m_nPages;
  51.     CPropertyPage                     *m_pPages;
  52.  
  53.     // Releases the reference to the interface for the property page provider,
  54.     // and destroys each of the property pages objects
  55.    ~CPropertyCategory();
  56.  
  57.     // Gets the list of property page objects and initializes each of the pages
  58.     HRESULT        CreatePages(LPSPECIFYPROPERTYPAGEOBJECTS, LPPROPERTYPAGESITE);
  59.  
  60.     // Subscripting operator
  61.     CPropertyPage& operator[](ULONG nIndex) {return m_pPages[nIndex];}
  62. };
  63.  
  64. // Counted array of CPropertyCategory structures
  65. struct CPropertyCategories {
  66.     ULONG               m_nCategories;
  67.     CPropertyCategory *m_pCategories;
  68.  
  69.    ~CPropertyCategories();
  70.  
  71.     // Asks each category to create its property pages
  72.     HRESULT        Initialize(ULONG nCategories,
  73.                            LPSPECIFYPROPERTYPAGEOBJECTS *,
  74.                            LPPROPERTYPAGESITE);
  75.  
  76.     // Subscripting operator
  77.     CPropertyCategory& operator[](ULONG nIndex) {return m_pCategories[nIndex];}
  78. };
  79.  
  80. #endif /* __PREFPRIV_H_ */
  81.  
  82.