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

  1. // Copyright © 1992 Peter Speck, speck@dat.ruc.dk. All rights reserved.
  2. // UArticleListView.h
  3.  
  4. #define __UARTICLELISTVIEW__
  5.  
  6. #ifndef __UVIEWLISTVIEWVIEW__
  7. #include "UViewListView.h"
  8. #endif
  9.  
  10. #ifndef __UARTICLESTATUS__
  11. #include "UArticleStatus.h"
  12. #endif
  13.  
  14. class TNavigatorArrowView;
  15. class TArticleStatus;
  16. class PDiscList;
  17. class TDiscListView;
  18. class TGroupDoc;
  19. class TTextScroller;
  20. class TThreadList;
  21. class TShowDiscJunkCommand;
  22. class TSaveArticlesCommand;
  23. class TMultiSuperNextKeyCommand;
  24. class TArticleTextSelectCommand;
  25. class TCopyArticleTextCommand;
  26. class TUpdateArticleViewCommand;
  27. class TStoreNotesCommand;
  28.  
  29. class TArticleListView : public TViewListView
  30. {
  31.     public:
  32.         pascal void DoCalcPageStrips(VPoint& pageStrips);
  33.  
  34.         pascal void DoKeyEvent(TToolboxEvent *event);
  35.         pascal void DoMenuCommand(CommandNumber aCommandNumber);
  36.         pascal void DoSetupMenus();
  37.         pascal Boolean HandleMouseDown(const VPoint& theMouse,
  38.                                       TToolboxEvent* event, CPoint hysteresis);
  39.  
  40.         void SetArticleList(TLongintList *discIndexList);
  41.         // TArticleView _owns_ the lists
  42.  
  43.         TLongintList *GetListOfExpandedArticles(); // caller owns list
  44.         TLongintList *GetListOfAllArticles(); // caller owns list
  45.         TLongintList *GetListOfSelectedArticles(); // caller owns list
  46.  
  47.         Handle GetSelectionAsQuotedTextForMail();
  48.         Handle GetSelectionAsTextForClipboard(Boolean asQuote, Boolean addHeader);
  49.         Handle GetSelectionAsQuoteText(Boolean asQuote, 
  50.                                                     Boolean addHeader, short quoteID);
  51.  
  52.         TArticleListView();
  53.         pascal void Initialize();
  54.         pascal void ReadFields(TStream *aStream);
  55.         pascal void DoPostCreate(TDocument *itsDocument);
  56.         pascal void Close();
  57.         pascal void Free();
  58.     private:
  59.         friend class TShowDiscJunkCommand;
  60.         friend class TSaveArticlesCommand;
  61.         friend class TMultiSuperNextKeyCommand;
  62.         friend class TArticleTextSelectCommand;
  63.         friend class TCopyArticleTextCommand;
  64.         friend class TUpdateArticleViewCommand;
  65.         friend class TStoreNotesCommand;
  66.  
  67.         TWindow *fWindow;
  68.         TNavigatorArrowView *fPrefDiscArrow, *fNextDiscArrow;
  69.         TTextScroller *fScroller;
  70.  
  71.         TThreadList *fUpdateThreadList;
  72.         Boolean fIsClosing;
  73.         TGroupDoc *fDoc;
  74.         TArticleStatus *fArticleStatus, *fOldArticleStatus;
  75.  
  76.         PDiscList *fDiscList;
  77.         TDiscListView *fDiscListView;
  78.         ArrayIndex fDiscIndex; // into fDiscList
  79.         TLongintList *fDiscIndexList;
  80.         ArrayIndex fArticleIndex; // into fDiscIndexList
  81.         TextStyle fTextStyle;
  82.         Boolean fShowsHeaders;
  83.         Boolean fUseROT13;
  84.  
  85.         VCoordinate GetSeparatorHeight();
  86.         void CheckNewFrame(VRect &newFrame);    
  87.         void DrawViewSeparator(VCoordinate vOffset);
  88.  
  89.         void DeleteDisplayedArticles(Boolean isDoneReadingArticles);
  90.         void KillUpdateListThread();
  91.         Boolean ShouldExpandArticle(ArticleShowType whatToShow, ArrayIndex index, long theID);
  92.  
  93.         void ChangedFont();
  94.         void SetDiscussionDisplayed(long index);
  95.         void UpdateList(ArrayIndex newArticleListIndex, ArticleShowType whatToShow);
  96.         void DoTheUpdateList(ArticleShowType whatToShow);
  97.         void CreateNewArticleView(long theID, Boolean showIt);
  98.         void ExpandExistingArticleView(ArrayIndex index, Boolean showIt);
  99.         void CancelSelectedArticles();
  100. };
  101.