home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / xfe / src / RDFView.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  4.7 KB  |  136 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.    RDFView.h -- class definition for RDFView
  20.    Created: Stephen Lamm <slamm@netscape.com>, 5-Nov-97.
  21.  */
  22.  
  23.  
  24.  
  25. #ifndef _xfe_rdfview_h
  26. #define _xfe_rdfview_h
  27.  
  28. #include "View.h"
  29. #include "IconGroup.h"
  30. #include "Outliner.h"
  31. #include "Outlinable.h"
  32. #include "htrdf.h"
  33.  
  34. //#include "PopupMenu.h"
  35.  
  36. class XFE_RDFView : public XFE_View, public XFE_Outlinable
  37. {
  38. public:
  39.   XFE_RDFView(XFE_Component *toplevel, Widget parent,
  40.               XFE_View *parent_view, MWContext *context, HT_View htview);
  41.  
  42.   ~XFE_RDFView();
  43.  
  44.   // Methods we override from XFE_View
  45.   virtual Boolean isCommandEnabled(CommandType cmd, void *calldata = NULL,
  46.                                    XFE_CommandInfo* i = NULL);
  47.   virtual void doCommand(CommandType cmd, void *calldata = NULL,
  48.                                    XFE_CommandInfo* i = NULL);
  49.   virtual Boolean handlesCommand(CommandType cmd, void *calldata = NULL,
  50.                                    XFE_CommandInfo* i = NULL);
  51.   virtual XP_Bool isCommandSelected(CommandType cmd, void *calldata,
  52.                                     XFE_CommandInfo* info);
  53.   virtual char *commandToString(CommandType cmd, void *calldata = NULL,
  54.                                    XFE_CommandInfo* i = NULL);
  55.   
  56.   //void setClipContents(void *block, int32 length);
  57.   //void *getClipContents(int32 *length);
  58.   //void freeClipContents();
  59.  
  60.   // The Outlinable interface.
  61.   virtual void *ConvFromIndex(int index);
  62.   virtual int ConvToIndex(void *item);
  63.  
  64.   virtual char *getColumnName(int column);
  65.  
  66.   virtual char *getColumnHeaderText(int column);
  67.   virtual fe_icon *getColumnHeaderIcon(int column);
  68.   virtual EOutlinerTextStyle getColumnHeaderStyle(int column);
  69.   virtual void *acquireLineData(int line);
  70.   virtual void getTreeInfo(XP_Bool *expandable, XP_Bool *is_expanded, 
  71.                            int *depth, OutlinerAncestorInfo **ancestor);
  72.   virtual EOutlinerTextStyle getColumnStyle(int column);
  73.   virtual char *getColumnText(int column);
  74.   virtual fe_icon *getColumnIcon(int column);
  75.   virtual void releaseLineData();
  76.  
  77.   virtual void Buttonfunc(const OutlineButtonFuncData *data);
  78.   virtual void Flippyfunc(const OutlineFlippyFuncData *data);
  79.  
  80.   virtual XFE_Outliner *getOutliner();
  81.  
  82.   // Get tooltipString & docString; 
  83.   // returned string shall be freed by the callee
  84.   // row < 0 indicates heading row; otherwise it is a content row
  85.   // (starting from 0)
  86.   //
  87.   virtual char *getCellTipString(int /* row */, int /* column */) {return NULL;}
  88.   virtual char *getCellDocString(int /* row */, int /* column */) {return NULL;}
  89.  
  90.   // Open properties dialog
  91.   //void openPropertiesWindow();
  92.   //void closePropertiesWindow();
  93.  
  94.   // RDF Specific calls
  95.   void setRDFView(HT_View view);
  96.  
  97. private:
  98.   //HT_Pane m_Pane;        // The pane that owns this view
  99.   HT_View m_rdfview;        // The view as registered in the hypertree
  100.   HT_Resource m_node;      // needed by the outlinable interface methods.
  101.  
  102.   int m_nodeDepth;         // needed by the outlinable interface methods.
  103.   OutlinerAncestorInfo *m_ancestorInfo; // needed by the outlinable interface methods.
  104.  
  105.   XFE_Outliner *m_outliner; // the outliner object used to display everything.
  106.  
  107.   //XFE_PopupMenu *m_popup;
  108.  
  109.   // icons for use in the bookmark window.
  110.   static fe_icon bookmark;
  111.   static fe_icon openedFolder;
  112.   static fe_icon closedFolder;
  113.  
  114. #ifdef NOTYET
  115.   void dropfunc(Widget dropw, fe_dnd_Event type, fe_dnd_Source *source, XEvent *event);
  116.   static void drop_func(Widget dropw, void *closure, fe_dnd_Event type,
  117.             fe_dnd_Source *source, XEvent* event);
  118.   //void doPopup(XEvent *event);
  119.  
  120.   static fe_icon mailBookmark;
  121.   static fe_icon newsBookmark;
  122.   static fe_icon changedBookmark;
  123.   //  static fe_icon unknownBookmark;
  124.   static fe_icon closedPersonalFolder;
  125.   static fe_icon openedPersonalFolder;
  126.   static fe_icon closedFolderDest;
  127.   static fe_icon openedFolderDest;
  128.   static fe_icon closedFolderMenu;
  129.   static fe_icon openedFolderMenu;
  130.   static fe_icon closedFolderMenuDest;
  131.   static fe_icon openedFolderMenuDest;
  132. #endif /*NOTYET*/
  133. };
  134.  
  135. #endif /* _xfe_rdfview_h */
  136.