home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C++ / Applications / Nuntius 1.2 / src / Nuntius / UDiscListView.h < prev    next >
Encoding:
Text File  |  1994-03-06  |  2.3 KB  |  81 lines  |  [TEXT/MPS ]

  1. // Copyright © 1992 Peter Speck, speck@dat.ruc.dk. All rights reserved.
  2. // UDiscListView.h
  3.  
  4. #define __UDISCLISTVIEW__
  5.  
  6. #ifndef __UGRIDVIEW__
  7. #include <UGridView.h>
  8. #endif
  9.  
  10. #ifndef __UARTICLESTATUS__
  11. #include "UArticleStatus.h"
  12. #endif
  13.  
  14. class TGroupDoc;
  15. class PDiscList;
  16. class TTextScroller;
  17.  
  18. #ifndef __FONTTOOLS__
  19. #include "FontTools.h"
  20. #endif
  21.  
  22. class TDiscListView : public TGridView 
  23. {
  24.     public:
  25.         pascal void DrawRangeOfCells(GridCell startCell,
  26.                                         GridCell stopCell, const VRect &aRect);
  27.         pascal void DrawCell(GridCell aCell, const VRect &aRect);
  28.         pascal void HighlightCells(RgnHandle theCells, HLState fromHL, HLState toHL);
  29.         void HighlighOneCell(GridCell aCell, HLState fromHL, HLState toHL);
  30.  
  31.         pascal Boolean CanSelectCell(GridCell aCell);
  32.         pascal void DoCalcPageStrips(VPoint& pageStrips);
  33.         void UpdateList();
  34.         void UpdateDiscussion(ArrayIndex discIndex);
  35.         
  36.         pascal void DoMouseCommand(VPoint &theMouse,
  37.                                        TToolboxEvent *event, CPoint hysteresis);
  38.         pascal void DoMenuCommand(CommandNumber aCommandNumber);
  39.         pascal void DoKeyEvent(TToolboxEvent *event);
  40.         pascal void DoSetupMenus();
  41.         pascal void DoShowHelp(const VPoint& localPoint, RgnHandle helpRegion);
  42.  
  43.         pascal void Close();
  44.         
  45.         TDiscListView();
  46.         void Startup(const CStr255 &groupName);
  47.         void CloseDown();
  48.         pascal void Initialize();
  49.         pascal void ReadFields(TStream *aStream);
  50.         pascal void DoPostCreate(TDocument *itsDocument);
  51.         pascal void Free();
  52.     private:
  53.         friend class CDiscListArticleIterator;
  54.         
  55.         TGroupDoc *fDoc;
  56.         CStr255 fGroupName;
  57.         TWindow *fWindow;
  58.         TTextScroller *fScroller;
  59.         long fFirstAvaibleID, fLastAvaibleID;
  60.         
  61.         StandardGridViewTextStyle fGridViewTextStyle;
  62.         short fSubjectWidth, fSubjectHorzOffset;
  63.         PatHandle fDiscSeparatorPattern;
  64.         
  65.         DiscussionShowType fDiscToShow;
  66.         TArticleStatus *fArticleStatus, *fOldArticleStatus;
  67.         PDiscList *fDiscList;
  68.         TLongintList *fDiscIndexList;
  69.  
  70.         Boolean ShowDiscussion(ArrayIndex discIndex);
  71.         void MarkSelectionAs(ArticleStatus newStatus);
  72.         
  73.         TLongintList *GetSelection(); // returns list of discussion index
  74.         TLongintList *GetListOfSelectedArticles();
  75.         void OpenSelection(Boolean removeSelection = false);
  76.         void DoSuperKey();
  77.         
  78.         void ChangedFont();
  79.         Boolean FindHelp(const VPoint &localPoint, VRect &helpRect, short &balloonVariant);
  80. };
  81.