home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / xfe / src / AddrBookFrame.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  3.2 KB  |  108 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.    AddrBookFrame.h -- class definitions for address book frames.
  20.    Created: Chris Toshok <toshok@netscape.com>, 29-Aug-96.
  21.    Revised: Tao Cheng <tao@netscape.com>, 01-nov-96
  22.  */
  23.  
  24. #ifndef _xfe_addressbookframe_h
  25. #define _xfe_addressbookframe_h
  26.  
  27. #include "Frame.h"
  28. #include "PopupMenu.h"
  29.  
  30. #include "xp_core.h"
  31. #include <Xm/Xm.h>
  32.  
  33. class XFE_AddrBookView;
  34.  
  35. class XFE_AddrBookFrame : public XFE_Frame
  36. {
  37. public:
  38.   XFE_AddrBookFrame(Widget toplevel, XFE_Frame *parent_frame, Chrome *chromespec = NULL);
  39.   virtual ~XFE_AddrBookFrame();
  40.  
  41.   // Dealing with command
  42.   virtual XP_Bool isOkToClose();
  43.   virtual char *commandToString(CommandType cmd, void *calldata = NULL,
  44.                          XFE_CommandInfo* = NULL);
  45.   virtual XP_Bool handlesCommand(CommandType cmd, void *calldata = NULL,
  46.                          XFE_CommandInfo* info = NULL);
  47.   virtual XP_Bool isCommandEnabled(CommandType cmd, 
  48.                    void *calldata = NULL,
  49.                          XFE_CommandInfo* = NULL);
  50.   virtual void doCommand(CommandType cmd, void *calldata = NULL,
  51.                          XFE_CommandInfo* = NULL);
  52.  
  53.   //
  54.   static XFE_Frame *m_theFrame;
  55.  
  56. protected:
  57.  
  58.   // tooltips and doc string
  59.   virtual char *getDocString(CommandType cmd);
  60.   virtual char *getTipString(CommandType cmd);
  61.  
  62.   virtual void openBrowser();
  63.   virtual void composeMessage();
  64.   virtual void abAddToMessage();
  65.   virtual void import();
  66.   virtual void saveAs();
  67.   virtual void close();
  68.  
  69.   virtual void undo();
  70.   virtual void redo();
  71.   virtual void abDelete();
  72.  
  73.   virtual void addToAddressBook();
  74.   virtual void newList();
  75.   virtual void viewProperties();
  76.   virtual void abCall();
  77.   virtual void abVCard();
  78.  
  79. private:
  80.  
  81.   XFE_AddrBookView *m_abView;
  82.  
  83.   /* menu specs
  84.    */
  85.   static MenuSpec menu_bar_spec[];
  86.   static ToolbarSpec toolbar_spec[];
  87.  
  88.   static MenuSpec file_menu_spec[];
  89.   static MenuSpec edit_menu_spec[];
  90.   static MenuSpec view_menu_spec[];
  91.   // static MenuSpec navigate_menu_spec[];
  92.   //  static MenuSpec help_menu_spec[];
  93.   XFE_PopupMenu *m_popup;
  94.  
  95.   static MenuSpec frame_popup_spec[];
  96.  
  97.   // Toolbox methods
  98.   virtual void        toolboxItemClose        (XFE_ToolboxItem * item);
  99.   virtual void        toolboxItemOpen        (XFE_ToolboxItem * item);
  100.   virtual void        toolboxItemChangeShowing(XFE_ToolboxItem * item);
  101.  
  102.   virtual void        configureToolbox    ();
  103. };
  104.  
  105. extern "C" MWContext* fe_showAddrBook(Widget toplevel, XFE_Frame *parent_frame, Chrome *chromespec);
  106.  
  107. #endif /* _xfe_mailfilterframe_h */
  108.