home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / xfe / src / BrowserFrame.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  3.3 KB  |  102 lines

  1. /* -*- Mode: C++; tab-width: 8; 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.    BrowserFrame.h -- class definition for the browser frame class
  20.    Created: Spence Murray <spence@netscape.com>, 17-Oct-96.
  21.  */
  22.  
  23.  
  24.  
  25. #ifndef _xfe_browserframe_h
  26. #define _xfe_browserframe_h
  27.  
  28. #include "Frame.h"
  29. #include "URLBar.h"
  30. #include "Dashboard.h"
  31. #include "xp_core.h"
  32. #include "BrowserDrop.h"
  33. #include "PersonalToolbar.h"
  34. #include <Xm/Xm.h>
  35.  
  36. class XFE_BrowserFrame : public XFE_Frame
  37. {
  38. public:
  39.   XFE_BrowserFrame(Widget toplevel, XFE_Frame *parent_frame, Chrome *chromespec);
  40.   virtual ~XFE_BrowserFrame();
  41.  
  42.   virtual void updateToolbar();
  43.   
  44.   virtual XP_Bool isCommandEnabled(CommandType cmd, void *calldata = NULL,
  45.                          XFE_CommandInfo* = NULL);
  46.   virtual void doCommand(CommandType cmd, void *calldata = NULL,
  47.                          XFE_CommandInfo* = NULL);
  48.   virtual XP_Bool handlesCommand(CommandType cmd, void *calldata = NULL,
  49.                          XFE_CommandInfo* = NULL);
  50.   virtual char *commandToString(CommandType cmd, void *calldata = NULL,
  51.                          XFE_CommandInfo* = NULL);
  52.  
  53.   virtual int getURL(URL_Struct *url, Boolean skip_get_url);
  54.  
  55.   virtual void queryChrome(Chrome * chrome);
  56.   virtual void respectChrome(Chrome * chrome);
  57.  
  58.   static void bringToFrontOrMakeNew(Widget toplevel);
  59.                                           
  60. private:
  61.  
  62.   XFE_PersonalToolbar *        m_personalToolbar;
  63.   XFE_URLBar *                m_urlBar;
  64.   XFE_BrowserDrop *            m_browserDropSite;
  65.  
  66.   XP_Bool                    m_notification_added;
  67.  
  68.   static MenuSpec menu_bar_spec[];
  69.   static MenuSpec file_menu_spec[];
  70.   static MenuSpec edit_menu_spec[];
  71.   static MenuSpec view_menu_spec[];
  72.   static MenuSpec go_menu_spec[];
  73.  
  74.   //static MenuSpec help_menu_spec[];
  75.  
  76.   // static MenuSpec file_bookmarks_menu_spec[];
  77.   // static MenuSpec navigate_menu_spec[];
  78.  
  79.   static ToolbarSpec toolbar_spec[];
  80.  
  81.   XFE_CALLBACK_DECL(navigateToURL) // URL_Struct is sent in callData
  82.   XFE_CALLBACK_DECL(newPageLoading) // URL_Struct is sent in callData
  83.  
  84.   // update the toolbar appearance
  85.   XFE_CALLBACK_DECL(updateToolbarAppearance)
  86.  
  87.   // Toolbox methods
  88.   virtual void        toolboxItemSnap            (XFE_ToolboxItem * item);
  89.   virtual void        toolboxItemClose        (XFE_ToolboxItem * item);
  90.   virtual void        toolboxItemOpen        (XFE_ToolboxItem * item);
  91.   virtual void        toolboxItemChangeShowing(XFE_ToolboxItem * item);
  92.  
  93.   virtual void        configureToolbox    ();
  94.  
  95. };
  96.  
  97. extern "C" MWContext *fe_showBrowser(Widget toplevel, XFE_Frame *parent_frame, Chrome *chromespec, URL_Struct *url);
  98.  
  99. extern "C" MWContext *fe_reuseBrowser(MWContext *context,
  100.                                       URL_Struct *url);
  101. #endif /* _xfe_browserframe_h */
  102.