home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / xfe / src / AB2PaneView.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.9 KB  |  102 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.    AB2PaneView.h -- class definition for AB2PaneView
  20.    Created: Tao Cheng <tao@netscape.com>, 14-oct-97
  21.  */
  22.  
  23. #ifndef _XFE_AB2PANEVIEW_H
  24. #define _XFE_AB2PANEVIEW_H
  25.  
  26. #include "ABListSearchView.h"
  27. #include "ABDirListView.h"
  28.  
  29. class XFE_AB2PaneView : public XFE_View
  30. {
  31. public:
  32.     XFE_AB2PaneView(XFE_Component *toplevel_component, 
  33.                     Widget parent, 
  34.                     XFE_View *parent_view, 
  35.                     MWContext *context,
  36.                     eABViewMode mode);
  37.  
  38.     virtual ~XFE_AB2PaneView();
  39.  
  40.     // 
  41.     void                  expandCollapse(XP_Bool expand);
  42.     void                  expandCollapse();
  43.     //
  44.     void                  selectLine(int line);
  45.     void                  selectDir(DIR_Server* dir);
  46.  
  47.     XFE_ABListSearchView* getEntriesListView(){return m_entriesListView;}
  48.     XFE_ABDirListView*    getDirListView(){return m_dirListView;}
  49. #if defined(USE_ABCOM)
  50.     const AB_ContainerInfo **getRootContainers(uint32 &count) const;
  51. #endif
  52.  
  53.     //
  54.     virtual Boolean isCommandEnabled(CommandType command, 
  55.                                      void *calldata = NULL,
  56.                                      XFE_CommandInfo* i = NULL);
  57.  
  58.     virtual Boolean isCommandSelected(CommandType command, 
  59.                                       void *calldata = NULL,
  60.                                       XFE_CommandInfo* i = NULL);
  61.  
  62.     virtual Boolean handlesCommand(CommandType command, 
  63.                                    void *calldata = NULL,
  64.                                    XFE_CommandInfo* i = NULL);
  65.  
  66.     virtual void doCommand(CommandType command, 
  67.                            void *calldata = NULL,
  68.                            XFE_CommandInfo* i = NULL);
  69.  
  70.     // callbacks
  71.     static void propertiesCallback(Widget, XtPointer, XtPointer);
  72.  
  73.     //
  74.     XFE_CALLBACK_DECL(dirCollapse)
  75.     XFE_CALLBACK_DECL(dirExpand)
  76.     XFE_CALLBACK_DECL(dirSelect)
  77.     XFE_CALLBACK_DECL(dirsChanged)
  78.     XFE_CALLBACK_DECL(changeFocus)
  79.  
  80.  
  81. protected:
  82.     // callbacks
  83.     void propertiesCB(Widget w, XtPointer callData);
  84.  
  85. private:
  86.     // subviews
  87.     XFE_ABDirListView    *m_dirListView;
  88.     XFE_ABListSearchView *m_entriesListView;
  89.  
  90.     XP_List              *m_directories;
  91.     int                   m_nDirs;
  92.     DIR_Server           *m_dir;
  93.     XP_Bool               m_expanded;
  94. #if defined(USE_ABCOM)
  95.     AB_ContainerInfo    **m_rootContainers;
  96. #endif
  97.     // focus
  98.     XFE_MNListView       *m_focusedView;
  99.     void setFocusView(XFE_MNListView *listView);
  100. };
  101. #endif /* _XFE_AB2PANEVIEW_H */
  102.