home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / xfe / src / MNView.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  5.0 KB  |  158 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.    MNView.h - anything that has a MSG_Pane in it. (mail/news views.)
  20.    Created: Chris Toshok <toshok@netscape.com>, 7-Aug-96.
  21.  */
  22.  
  23.  
  24.  
  25. #ifndef _xfe_mnview_h
  26. #define _xfe_mnview_h
  27.  
  28. #include "View.h"
  29. #include "Command.h"
  30. #include "msgcom.h"
  31. #include "xfe.h"
  32. #include "icons.h"
  33.  
  34. class XFE_MNView : public XFE_View
  35. {
  36. public:
  37.   XFE_MNView(XFE_Component *toplevel_component, XFE_View *parent_view, MWContext *context, MSG_Pane *p);
  38.   virtual ~XFE_MNView();
  39.  
  40.   MSG_Pane *getPane();
  41.   void setPane(MSG_Pane *new_pane);
  42.  
  43.   void destroyPane();
  44.  
  45.     /* the one command method we have. */
  46.     char *commandToString(CommandType cmd, void *calldata, XFE_CommandInfo *info);
  47.  
  48.   virtual void paneChanged(XP_Bool asynchronous, MSG_PANE_CHANGED_NOTIFY_CODE notify_code, int32 value);
  49.  
  50.     virtual void updateCompToolbar();
  51.   /* used by toplevel to see which view can handle a command.  Returns true
  52.      if we can handle it. */
  53.   virtual Boolean handlesCommand(CommandType cmd, void *calldata = NULL,
  54.                                  XFE_CommandInfo* i = NULL);
  55.  
  56.   /* this method is used by the toplevel to dispatch a command. */
  57.   virtual void doCommand(CommandType cmd, void *calldata = NULL,
  58.                                                  XFE_CommandInfo* i = NULL);
  59.  
  60.  
  61.   XP_Bool isDisplayingNews();
  62.  
  63.   static MSG_BIFF_STATE getBiffState();
  64.   static void setBiffState(MSG_BIFF_STATE state);
  65.  
  66.   static MSG_Master *getMaster();
  67.   static void destroyMasterAndShutdown(); // only do this if we're shutting down the application
  68.  
  69.   static const char *bannerNeedsUpdating;  // notify the parent frame that the MNBanner needs updating.
  70.   static const char *foldersHaveChanged;
  71.   static const char *newsgroupsHaveChanged;
  72.   static const char *msgWasDeleted;    // in case we need to close a frame 
  73.   static const char *folderDeleted;    // in case we need to close a frame 
  74.  
  75.   // these next two are useful in updating more than one window's chrome.
  76.   static const char *folderChromeNeedsUpdating;
  77.   static const char *MNChromeNeedsUpdating;
  78.  
  79.   // icons used in the mail/news outliners and proxy icons
  80.  
  81.   // special folder icons
  82.   static fe_icon inboxIcon;
  83.   static fe_icon inboxOpenIcon;
  84.   static fe_icon draftsIcon;
  85.   static fe_icon draftsOpenIcon;
  86.   static fe_icon filedMailIcon;
  87.   static fe_icon filedMailOpenIcon;
  88.   static fe_icon outboxIcon;
  89.   static fe_icon outboxOpenIcon;
  90.   static fe_icon trashIcon;
  91.   static fe_icon folderIcon;
  92.   static fe_icon folderOpenIcon;
  93.   static fe_icon folderServerIcon;
  94.   static fe_icon folderServerOpenIcon;
  95.   static fe_icon newsgroupIcon;
  96.  
  97.   // server icons
  98.   static fe_icon mailLocalIcon;
  99.   static fe_icon mailServerIcon;
  100.   static fe_icon newsServerSecureIcon;
  101.   static fe_icon newsServerIcon;
  102.  
  103.   // message icons
  104.   static fe_icon mailMessageReadIcon;
  105.   static fe_icon mailMessageUnreadIcon;
  106.   static fe_icon newsPostIcon;
  107.   static fe_icon draftIcon;
  108.   static fe_icon newsNewIcon;
  109.   static fe_icon msgReadIcon;
  110.   static fe_icon msgUnreadIcon;
  111.   static fe_icon deletedIcon;
  112.   static fe_icon msgFlagIcon;
  113.  
  114.     // thread selection icons;
  115.     static fe_icon openSpoolIgnoredIcon;
  116.     static fe_icon closedSpoolIgnoredIcon;
  117.     static fe_icon openSpoolWatchedIcon;
  118.     static fe_icon closedSpoolWatchedIcon;
  119.     static fe_icon openSpoolNewIcon;
  120.     static fe_icon closedSpoolNewIcon;
  121.     static fe_icon openSpoolIcon;
  122.     static fe_icon closedSpoolIcon;
  123.  
  124.   static fe_icon collectionsIcon;
  125. protected:
  126.   MSG_Pane *m_pane;
  127.  
  128.     /* useful in both the threadview and msgview. */
  129.     XP_Bool m_displayingNewsgroup;
  130.  
  131.   static MSG_BIFF_STATE m_biffstate;
  132.  
  133.   static XP_Bool m_messageDownloadInProgress;
  134.   static int     m_numFolderBeingLoaded; // This is controlled by Thread View only
  135.                     // Indicating how many folder being
  136.                     // loaded in the meantime
  137.  
  138.   static MSG_Master *m_master;
  139.   static MSG_Prefs *m_prefs;
  140.  
  141.   virtual MSG_MotionType commandToMsgNav(CommandType cmd);
  142.   virtual MSG_CommandType commandToMsgCmd(CommandType cmd);
  143.   virtual MSG_PRIORITY commandToPriority(CommandType cmd);
  144.  
  145.   virtual char *priorityToString(MSG_PRIORITY priority);
  146.  
  147.   virtual void getNewNews();
  148.   virtual void getNewMail();
  149.   virtual void markReadByDate();
  150.  
  151.   // update the biff desktop icon
  152.   XFE_CALLBACK_DECL(updateBiffState)
  153. };
  154.  
  155. extern "C" MSG_Master *fe_getMNMaster();
  156.  
  157. #endif /* _xfe_mnview_h */
  158.