home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / xfe / src / MsgFrame.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  3.2 KB  |  109 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.    MsgFrame.h -- class definitions for mail/news message frames.
  20.    Created: Chris Toshok <toshok@netscape.com>, 29-Aug-96.
  21.  */
  22.  
  23.  
  24.  
  25. #ifndef _xfe_msgframe_h
  26. #define _xfe_msgframe_h
  27.  
  28. #include "Frame.h"
  29. #include "MNBanner.h"
  30.  
  31. #include "xp_core.h"
  32. #include "msgcom.h"
  33.  
  34. #include <Xm/Xm.h>
  35.  
  36. class XFE_MsgFrame : public XFE_Frame
  37. {
  38. public:
  39.   XFE_MsgFrame(Widget toplevel, XFE_Frame *parent_frame, Chrome *chromespec);
  40.  
  41.   virtual ~XFE_MsgFrame();
  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.  
  52.   virtual XP_Bool isOkToClose();
  53.  
  54.   virtual void allConnectionsComplete();
  55.   void loadMessage(MSG_FolderInfo *folder_info, MessageKey msg_key);
  56.  
  57.   MSG_FolderInfo *getFolderInfo();
  58.   MessageKey getMessageKey();
  59.  
  60.   static XFE_MsgFrame *frameForMessage(MSG_FolderInfo *folder_info, MessageKey msg_key);
  61.  
  62.   MSG_Pane *getPane();
  63.   
  64.   // For security icon state...
  65.   virtual int getSecurityStatus();
  66.  
  67.   void setButtonsByContext(MWContextType cxType);
  68.  
  69. private:
  70.   XFE_MNBanner *m_banner;
  71.  
  72.   XFE_CALLBACK_DECL(spaceAtMsgEnd)
  73.   XFE_CALLBACK_DECL(msgLoaded)
  74.   XFE_CALLBACK_DECL(msgDeleted)
  75.   XFE_CALLBACK_DECL(folderDeleted)
  76.  
  77.   void updateReadAndTotalCounts();
  78.  
  79.   XFE_CALLBACK_DECL(MNChromeUpdate)
  80.   XFE_CALLBACK_DECL(FolderChromeUpdate)
  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.   static MenuSpec go_menu_spec[];
  87.   static MenuSpec message_menu_spec[];
  88.  
  89.   static MenuSpec offline_submenu_spec[];
  90.  
  91.   static ToolbarSpec toolbar_spec[];
  92.  
  93.   // Toolbox methods
  94.   virtual void        toolboxItemSnap            (XFE_ToolboxItem * item);
  95.   virtual void        toolboxItemClose        (XFE_ToolboxItem * item);
  96.   virtual void        toolboxItemOpen        (XFE_ToolboxItem * item);
  97.   virtual void        toolboxItemChangeShowing(XFE_ToolboxItem * item);
  98.  
  99.   virtual void        configureToolbox    ();
  100. };
  101.  
  102. extern "C" MWContext* fe_showMsg(Widget toplevel, XFE_Frame *parent_frame, 
  103.                                  Chrome *chromespec, 
  104.                                  MSG_FolderInfo *folder_info, 
  105.                                  MessageKey msg_key, 
  106.                                  XP_Bool with_reuse);
  107.  
  108. #endif /* _xfe_msgframe_h */
  109.