home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / winfe / mainfrm.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  6.2 KB  |  186 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. // mainfrm.h : interface of the CMainFrame class
  20. //
  21. /////////////////////////////////////////////////////////////////////////////
  22.  
  23. #ifndef MAINFRAME_H
  24. #define MAINFRAME_H
  25.  
  26. #include "tlbutton.h"
  27. #include "urlbar.h"
  28.  
  29. typedef struct big_rect {
  30.     long top, bottom, left, right;
  31. } BIG_RECT;
  32.  
  33. //////////////////////////////////////////////////////////////////////            
  34. //////////////////////////////////////////////////////////////////////            
  35. //////////////////////////////////////////////////////////////////////
  36.  
  37. extern IL_RGB animationPalette[];
  38. extern int iLowerSystemColors;
  39. extern int iLowerAnimationColors;
  40. extern int iLowerColors;
  41. extern int colorCubeSize;
  42.  
  43. class CMainFrame : public CGenericFrame
  44. {
  45. public: // create from serialization only
  46.     CMainFrame();
  47.     DECLARE_DYNCREATE(CMainFrame)
  48.  
  49. // Attributes
  50. public:
  51.     CString       m_csText;
  52.     CStringList   m_csImageList;
  53.  
  54. public:
  55.     CWnd        * m_pHistoryWindow;
  56.     CWnd        * m_pDocInfoWindow;
  57.  
  58. private:
  59. //    Some static public data, initialized in framinit.cpp
  60.     static int    m_FirstFrame;
  61.     CURLBar        * m_barLocation;
  62.     CLinkToolbar *m_barLinks;
  63.     CCommandToolbar *m_pCommandToolbar;
  64.  
  65.  
  66. private :
  67. //#ifndef NO_TAB_NAVIGATION
  68.     // BOOL CMainFrame::setNextTabableFrame( CMainFrame * pCurrentFrame, int forward );
  69.     BOOL CMainFrame::setNextTabFocus( int forward );
  70.     int m_SrvrItemCount; // reference counting the server item.
  71.  
  72.     UINT    m_tabFocusInMainFrm; 
  73. public :
  74.     enum  { TAB_FOCUS_IN_NULL, TAB_FOCUS_IN_CHROME,TAB_FOCUS_IN_GRID };
  75.     void SetTabFocusFlag( int nn ) { m_tabFocusInMainFrm = nn; }
  76. //#endif /* NO_TAB_NAVIGATION */
  77.  
  78. // Implementation
  79. public:
  80.     virtual         ~CMainFrame();
  81.     virtual BOOL    OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext *pContext);
  82.     void AddRef() {    m_SrvrItemCount++;} 
  83.     void Release() {m_SrvrItemCount--;}
  84.     BOOL HasSrvrItem() { return m_SrvrItemCount > 0; }
  85.  
  86.     BOOL         PreTranslateMessage(MSG *pMsg);
  87.     BOOL        PreCreateWindow(CREATESTRUCT& cs);
  88.     virtual void GetMessageString( UINT nID, CString& rMessage ) const;
  89.  
  90.     void        Alert(char * Msg);
  91.     int         Confirm(char * Msg);
  92.     char      * Prompt(const char * Msg, const char * Dflt);
  93.     char      * PromptPassword(char * Msg);
  94.  
  95.     void         BuildHistoryMenu(CMenu* pMenu);
  96.     void        OnLoadHomePage();
  97.     const char *FindHistoryToolTipText(UINT nCommand);
  98.     void        FillPlacesMenu(HMENU hMenu);
  99.  
  100.     int            CreateLocationBar(void);
  101.     int            CreateLinkBar(void);
  102.     int            CreateMainToolbar(void);
  103.  
  104.     virtual void RefreshNewEncoding(int16 csid, BOOL bIgnore=TRUE);
  105.  
  106.     void LoadShortcut(int iShortcutID);
  107.  
  108.     // Needed public for preference callback routines
  109.     afx_msg void OnToggleImageLoad();
  110.     afx_msg void OnOptionsShowstarterbuttons();
  111.     afx_msg void OnOptionsViewToolBar();
  112.  
  113. #ifdef _DEBUG
  114.     virtual void AssertValid() const;
  115.     virtual void Dump(CDumpContext& dc) const;
  116. #endif
  117.  
  118.     virtual BOOL AllowDocking() {return TRUE;}
  119. // Generated message map functions
  120. protected:
  121.     //{{AFX_MSG(CMainFrame)
  122.     afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
  123.     afx_msg BOOL OnCommand(UINT wParam,LONG lParam);
  124.     afx_msg void OnInitMenuPopup(CMenu* pPopup, UINT nIndex, BOOL bSysMenu);
  125.     afx_msg void OnMenuSelect(UINT nItemID, UINT nFl, HMENU hSysMenu);
  126.     afx_msg void OnOptionsTitlelocationBar();
  127.     afx_msg void OnUpdateOptionsTitlelocationBar(CCmdUI* pCmdUI);
  128.     afx_msg void OnDropdownUrl();
  129.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  130.     afx_msg void OnDestroy();
  131.     afx_msg void OnOptionsTogglenetdebug();
  132.     afx_msg void OnShowTransferStatus();
  133.     afx_msg void OnUpdateToggleImageLoad(CCmdUI* pCmdUI);
  134.     afx_msg void OnUpdateShowTransferStatus(CCmdUI* pCmdUI);
  135.     afx_msg void OnUpdateOptionsTogglenetdebug(CCmdUI* pCmdUI);
  136.     afx_msg void OnNetscapeHome();
  137.     afx_msg void OnGuide();
  138.     afx_msg void OnStartingPoints();
  139.     afx_msg void OnMetaIndex();
  140.     afx_msg void OnHotlistHotlist();
  141.     afx_msg LRESULT OnFindReplace(WPARAM wParam, LPARAM lParam);
  142.     afx_msg void OnFlushCache();
  143.     afx_msg void OnToggleFancyFtp();
  144.     afx_msg void OnUpdateToggleFancyFtp(CCmdUI* pCmdUI);
  145.  
  146.     afx_msg void OnUpdateOptionsShowstarterbuttons(CCmdUI* pCmdUI);
  147.     afx_msg void OnUpdateSecurity(CCmdUI* pCmdUI);
  148.     afx_msg void OnUpdateSecurityStatus(CCmdUI *pCmdUI);
  149.     afx_msg void OnShortcut1();
  150.     afx_msg void OnShortcut2();
  151.     afx_msg void OnShortcut3();
  152.     afx_msg void OnShortcut4();
  153.     afx_msg void OnShortcut5();
  154.     afx_msg void OnShortcut6();
  155.     afx_msg void OnClose();
  156.     afx_msg void OnLocalHelp();
  157.     afx_msg void OnDropFiles(HDROP hDropInfo);
  158.     afx_msg BOOL OnQueryOpen();
  159.     afx_msg void OnHelpSecurity();
  160.     afx_msg void OnAboutPlugins();
  161.     afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
  162.     afx_msg void OnUpdateEditUndo(CCmdUI* pCmdUI);
  163.     afx_msg void OnHelpMenu();
  164.     afx_msg LRESULT OnButtonMenuOpen(WPARAM, LPARAM); 
  165.     afx_msg LRESULT OnFillInToolTip(WPARAM, LPARAM); 
  166.     afx_msg LRESULT OnFillInToolbarButtonStatus(WPARAM, LPARAM); 
  167.     afx_msg void OnIncreaseFont();
  168.     afx_msg void OnDecreaseFont();
  169.     afx_msg void OnNetSearch();
  170.     afx_msg void OnUpdateNetSearch(CCmdUI *pCmdUI);
  171.     afx_msg void OnUpdateViewCommandToolbar(CCmdUI* pCmdUI);
  172.     afx_msg void OnUpdateViewLocationToolbar(CCmdUI* pCmdUI);
  173.     afx_msg void OnUpdateViewCustomToolbar(CCmdUI* pCmdUI);
  174.  
  175.  
  176.     //}}AFX_MSG
  177.  
  178.     BOOL FileBookmark(HT_Resource pFolder);
  179.  
  180.     DECLARE_MESSAGE_MAP()
  181. };
  182.  
  183. /////////////////////////////////////////////////////////////////////////////
  184.  
  185. #endif // MAINFRAME_H
  186.