home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / xfe / src / AddrBookView.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.8 KB  |  99 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.    AddrBookView.h -- class definition for AddrBookView
  20.    Created: Chris Toshok <toshok@netscape.com>, 7-Aug-96.
  21.    Revised: Tao Cheng <tao@netscape.com>, 01-nov-96
  22.  */
  23.  
  24. #ifndef _xfe_addrbookview_h
  25. #define _xfe_addrbookview_h
  26.  
  27. #include "ABListSearchView.h"
  28.  
  29. #include "addrbook.h"
  30.  
  31. class XFE_AddrBookFrame;
  32. class XFE_ABNameFolderDlg;
  33. class XFE_ABMListDlg;
  34.  
  35.  
  36. class XFE_AddrBookView : public XFE_ABListSearchView
  37. {
  38. public:
  39.   XFE_AddrBookView(XFE_Component *toplevel_component, 
  40.                    Widget         parent, 
  41.                    XFE_View      *parent_view, 
  42.                    MWContext     *context,
  43.                    XP_List       *directories);
  44.   ~XFE_AddrBookView();
  45.  
  46.   void abCall();
  47.   void abVCard();
  48.  
  49.   //
  50.   // The Outlinable interface.
  51.   //
  52.   virtual EOutlinerTextStyle 
  53.                    getColumnHeaderStyle(int column);
  54.   virtual char    *getColumnName(int column);
  55.   virtual char    *getColumnHeaderText(int column);
  56.   virtual char    *getColumnText(int column);
  57.   virtual fe_icon *getColumnIcon(int column);
  58.   virtual void     clickHeader(const OutlineButtonFuncData *data);
  59.   virtual void     doubleClickBody(const OutlineButtonFuncData *data);
  60.  
  61.   // Get tooltipString & docString; 
  62.   // returned string shall be freed by the callee
  63.   // row < 0 indicates heading row; otherwise it is a content row
  64.   // (starting from 0)
  65.   //
  66.   virtual char *getCellTipString(int /* row */, int /* column */);
  67.   virtual char *getCellDocString(int /* row */, int /* column */);
  68.  
  69.   // tooltips and doc string
  70.   virtual char *getDocString(CommandType cmd);
  71.  
  72.  
  73.   //
  74.   // 
  75.   //
  76.  
  77.   // columns for the Outliner
  78.   enum {OUTLINER_COLUMN_TYPE = 0,
  79.     OUTLINER_COLUMN_NAME,
  80. #if 0
  81.     OUTLINER_COLUMN_CERTIFICATE,
  82. #endif
  83.     OUTLINER_COLUMN_EMAIL,
  84.     OUTLINER_COLUMN_COMPANY,
  85.     OUTLINER_COLUMN_PHONE,
  86.     OUTLINER_COLUMN_NICKNAME,
  87.     OUTLINER_COLUMN_LOCALITY,
  88.     OUTLINER_COLUMN_LAST
  89.   };
  90. protected:
  91.   /* Address Book specific
  92.    */
  93.   virtual Boolean isCommandSelected(CommandType cmd, 
  94.                                     void *calldata = NULL,
  95.                                     XFE_CommandInfo* i = NULL);
  96. private:
  97. };
  98. #endif /* _xfe_addrbookview_h */
  99.