home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / xfe / src / EditorFrame.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  3.7 KB  |  117 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.    EditorFrame.h -- class definition for the editor frame class
  20.    Created: Richard Hess <rhess@netscape.com>, 11-Nov-96
  21.  */
  22.  
  23.  
  24.  
  25. #ifndef _xfe_editorframe_h
  26. #define _xfe_editorframe_h
  27.  
  28. #include "Frame.h"
  29. #include "EditorToolbar.h"
  30. #include "Dashboard.h"
  31. #include "PopupMenu.h"
  32. #include "xp_core.h"
  33. #include <Xm/Xm.h>
  34.  
  35. class XFE_EditorFrame : public XFE_Frame
  36. {
  37. public:
  38.   XFE_EditorFrame(Widget toplevel, XFE_Frame *parent_frame, Chrome *);
  39.  
  40.   virtual int getURL(URL_Struct *url, Boolean skip_get_url);
  41.   virtual MWContext* getContext();
  42.  
  43.   virtual XP_Bool isCommandEnabled(CommandType cmd, void *calldata = NULL,
  44.                          XFE_CommandInfo* = NULL);
  45.   virtual void    doCommand(CommandType cmd, void *calldata = NULL,
  46.                          XFE_CommandInfo* = NULL);
  47.   virtual XP_Bool handlesCommand(CommandType cmd, void *calldata = NULL,
  48.                          XFE_CommandInfo* = NULL);
  49.   virtual char*   commandToString(CommandType cmd, void *calldata = NULL,
  50.                          XFE_CommandInfo* = NULL);
  51.   virtual XFE_Command* getCommand(CommandType);
  52.   virtual Boolean XFE_EditorFrame::isCommandSelected(CommandType cmd, 
  53.                                   void* calldata, XFE_CommandInfo* info);
  54.  
  55.   // void    delete_response();
  56.   XP_Bool isOkToClose();
  57.   virtual void    doClose();
  58.  
  59. public:
  60.   // Edit submenus
  61.   static MenuSpec delete_table_menu_spec[];
  62.   // insert menu
  63.   static MenuSpec insert_menu_spec[];
  64.   // Format menu & submenus
  65.   static MenuSpec format_menu_spec[];
  66.   static MenuSpec character_style_menu_spec[];
  67.   static MenuSpec character_size_menu_spec[];
  68.   static MenuSpec heading_style_menu_spec[];
  69.   static MenuSpec paragraph_style_menu_spec[];
  70.   static MenuSpec list_style_menu_spec[];
  71.   static MenuSpec alignment_style_menu_spec[];
  72.  
  73.   static MenuSpec tools_menu_spec[];
  74.  
  75.   static MenuSpec new_submenu_spec[];
  76.   static MenuSpec save_submenu_spec[];
  77.   static MenuSpec publish_submenu_spec[];
  78.  
  79. private:
  80.   XFE_EditorToolbar* m_format_toolbar;
  81.  
  82.   static MenuSpec menu_bar_spec[];
  83.   static MenuSpec file_menu_spec[];
  84.   static MenuSpec edit_menu_spec[];
  85.   static MenuSpec view_menu_spec[];
  86.  
  87.   static MenuSpec go_menu_spec[];
  88.   static MenuSpec bookmark_menu_spec[];
  89.  
  90.   // static MenuSpec navigate_menu_spec[];
  91.   // static MenuSpec help_menu_spec[];
  92.  
  93. //  static ToolbarSpec toolbar_spec[];
  94.  
  95.   XFE_CALLBACK_DECL(navigateToURL) // URL_Struct is sent in callData
  96.   XFE_CALLBACK_DECL(newPageLoading) // URL_Struct is sent in callData
  97.  
  98.  
  99. protected:
  100.   virtual void            configureLogo    ();
  101.   virtual XFE_Logo *    getLogo            ();
  102.  
  103.   // Toolbox methods
  104.   virtual void        toolboxItemSnap            (XFE_ToolboxItem * item);
  105.   virtual void        toolboxItemClose        (XFE_ToolboxItem * item);
  106.   virtual void        toolboxItemOpen        (XFE_ToolboxItem * item);
  107.   virtual void        toolboxItemChangeShowing(XFE_ToolboxItem * item);
  108.  
  109.   virtual void        configureToolbox    ();
  110.  
  111. };
  112.  
  113. MenuSpec* fe_EditorInstanciateMenu(XFE_Frame* frame, MenuSpec* spec);
  114. XFE_PopupMenu* fe_EditorNewPopupMenu(XFE_Frame*, Widget);
  115.  
  116. #endif /* _xfe_editorframe_h */
  117.