home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / xfe / src / ABAddrSearchView.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  3.5 KB  |  113 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.    ABAddrSearchView.h -- class definition for XFE_AddrSearchView
  20.    Created: Tao Cheng <tao@netscape.com>, 20-nov-96
  21.  */
  22.  
  23. #ifndef _ABADDRSEARCHVIEW_H_
  24. #define _ABADDRSEARCHVIEW_H_
  25.  
  26. #include "ABListSearchView.h"
  27. #include "addrbook.h"
  28.  
  29. class XFE_AddresseeView;
  30.  
  31. class XFE_AddrSearchView: public XFE_ABListSearchView
  32. {
  33.  
  34. public:
  35.  
  36.   XFE_AddrSearchView(XFE_Component *toplevel_component, 
  37.                      Widget         parent, 
  38.                      XFE_View      *parent_view, 
  39.                      MWContext     *context,
  40.                      XP_List       *directories);
  41.   ~XFE_AddrSearchView();
  42.  
  43.   void setAddressee(XFE_AddresseeView *view) { m_addresseeView = view;}
  44.   void setAdd2ABBtn(Widget w) {m_addToAddressBtn = w;}
  45.   void setPropertyBtn(Widget w) {m_propertyBtn = w;}
  46.   void setToBtn(Widget w) {m_toBtn = w;}
  47.   void setCcBtn(Widget w) {m_ccBtn = w;}
  48.   void setBccBtn(Widget w) {m_bccBtn = w;}
  49.  
  50.   // columns for the Outliner
  51.   enum {
  52.     OUTLINER_COLUMN_TYPE = 0,
  53.     OUTLINER_COLUMN_NAME,
  54.     OUTLINER_COLUMN_EMAIL,
  55.     OUTLINER_COLUMN_COMPANY,
  56.     OUTLINER_COLUMN_PHONE,
  57.     OUTLINER_COLUMN_NICKNAME,
  58.     OUTLINER_COLUMN_LOCALITY,
  59.     OUTLINER_COLUMN_LAST
  60.   };
  61.  
  62.   // The Outlinable interface.
  63.   //
  64.  
  65.   virtual fe_icon *getColumnIcon(int column);
  66.   virtual EOutlinerTextStyle 
  67.                    getColumnHeaderStyle(int column);
  68.   virtual char    *getColumnHeaderText(int column);
  69.   virtual char    *getColumnText(int column);
  70.   virtual char      *getColumnName(int column);
  71.   virtual void     clickHeader(const OutlineButtonFuncData *data);
  72.   virtual void     doubleClickBody(const OutlineButtonFuncData *data);
  73.  
  74.   // Get tooltipString & docString; 
  75.   // returned string shall be freed by the callee
  76.   // row < 0 indicates heading row; otherwise it is a content row
  77.   // (starting from 0)
  78.   //
  79.   virtual char *getCellTipString(int /* row */, int /* column */);
  80.   virtual char *getCellDocString(int /* row */, int /* column */);
  81.   //
  82.   static void toCallback(Widget, XtPointer, XtPointer);
  83.   static void ccCallback(Widget, XtPointer, XtPointer);
  84.   static void bccCallback(Widget, XtPointer, XtPointer);
  85.   static void addToAddressCallback(Widget, XtPointer, XtPointer);
  86.  
  87. protected:
  88.   virtual void toCB(Widget w, XtPointer callData);
  89.   virtual void ccCB(Widget w, XtPointer callData);
  90.   virtual void bccCB(Widget w, XtPointer callData);
  91.   virtual void addToAddressCB(Widget w, XtPointer callData);
  92.  
  93.   StatusID_t *makePair(const int ind, SEND_STATUS status);
  94.  
  95.   XFE_CALLBACK_DECL(updateCommands)
  96.  
  97. private:
  98.  
  99.   Widget        m_addToAddressBtn;
  100.   Widget        m_propertyBtn;
  101.   //
  102.   MSG_Master   *m_master;
  103.   //
  104.   Widget        m_toBtn;
  105.   Widget        m_ccBtn;
  106.   Widget        m_bccBtn;
  107.  
  108.   //
  109.   XFE_AddresseeView *m_addresseeView;
  110. };
  111.  
  112. #endif /* _ABADDRSEARCHVIEW_H_ */
  113.