home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / winfe / prefs / nsprefui / src / framedlg.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.3 KB  |  81 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 __FRAMEDLG_H_
  20. #define __FRAMEDLG_H_
  21.  
  22. class CPPropertyPage;
  23.  
  24. class CPropertyFrameDialog {
  25.     public:
  26.         CPropertyFrameDialog(HWND          hwndOwner,
  27.                                 int         x,
  28.                              int         y,
  29.                              LPCSTR         lpszCaption,
  30.                              NETHELPFUNC lpfnNetHelp);
  31.        ~CPropertyFrameDialog();
  32.  
  33.         // Initialization
  34.         HRESULT        CreatePages(ULONG                           nCategories,
  35.                                 LPSPECIFYPROPERTYPAGEOBJECTS *lplpProviders,
  36.                                 ULONG                          nInitialCategory);
  37.  
  38.         // Modal processing
  39.         int            DoModal();
  40.  
  41.         // Event processing
  42.         BOOL        InitDialog(HWND hdlg);
  43.         BOOL        OnCommand(int id, HWND hwndCtl, UINT notifyCode);
  44.         void        OnPaint(HDC);
  45.         void        TreeViewSelChanged(LPNM_TREEVIEW);
  46.  
  47.         // Called by the property page site to give the property frame
  48.         // a chance to translate accelerators
  49.         HRESULT        TranslateAccelerator(LPMSG);
  50.  
  51.     protected:
  52.         int            RunModalLoop();
  53.  
  54.     private:
  55.         HWND                 m_hdlg;
  56.         HWND                 m_hwndOwner;
  57.         int                     m_x, m_y;
  58.         LPCSTR                 m_lpszCaption;
  59.         ULONG                 m_nInitialCategory;
  60.         CPropertyCategories     m_categories;
  61.         CPropertyPage        *m_pCurPage;
  62.         BOOL                 m_bKeepGoing;
  63.         int                     m_nModalResult;
  64.         RECT                 m_pageRect;
  65.         HFONT                 m_hBoldFont;
  66.         LPBITMAPINFOHEADER     m_lpGradient;
  67.         HBRUSH                 m_hBrush;
  68.         NETHELPFUNC          m_lpfnNetHelp;
  69.  
  70.         // Helper routines
  71.         void        FillTreeView();
  72.         void        SizeToFit();
  73.         SIZE        GetMaxPageSize();
  74.         HWND        GetPropertyPageWindow();
  75.         BOOL        PreTranslateMessage(LPMSG);
  76.         void        CheckDefPushButton(HWND, HWND);
  77. };
  78.  
  79. #endif /* __FRAMEDLG_H_ */
  80.  
  81.