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

  1. // Copyright © 1992 Peter Speck, speck@dat.ruc.dk. All rights reserved.
  2. // UArticleView.h
  3.  
  4. #define __UARTICLEVIEW__
  5.  
  6. #ifndef __UGRIDVIEW__
  7. #include <UGridView.h>
  8. #endif
  9.  
  10. class TGroupDoc;
  11. class TArticle;
  12. class TArticleTextSelectCommand;
  13. class TCopyArticleTextCommand;
  14.  
  15. #ifndef __FONTTOOLS__
  16. #include "FontTools.h"
  17. #endif
  18.  
  19. class TArticleView : public TGridView
  20. {
  21.     public:
  22.         pascal void DrawRangeOfCells(GridCell startCell,
  23.                                         GridCell stopCell,
  24.                                         const VRect &aRect);
  25.         pascal void DrawCell(GridCell aCell, const VRect &aRect);
  26.         void DrawLine(short anItem, CRect &r);
  27.  
  28.         pascal void DoMouseCommand(VPoint &theMouse,
  29.                                        TToolboxEvent *event,
  30.                                        CPoint hysteresis);
  31.  
  32.         pascal void DoKeyEvent(TToolboxEvent *event);
  33.         pascal void DoMenuCommand(CommandNumber aCommandNumber);
  34.         pascal void DoSetupMenus();
  35.  
  36.         void SetNewFont(const TextStyle &textStyle);
  37.         long GetArticleID();
  38.         TArticle *GetArticle();
  39.         void AppendSelectionAsTextForClipboard(Handle h, Boolean asQuote, 
  40.                                                     Boolean addHeader, short quoteTemplateID);
  41.         void UpdateDisplay();
  42.         void SetUseROT13(Boolean useROT13);
  43.         
  44.         TArticleView();
  45.         pascal void Close();
  46.         pascal void Initialize();
  47.         void IArticleView(TGroupDoc *doc, TView *superView, VPoint location,
  48.                                             long articleID, TArticle *article);
  49.         pascal void ReadFields(TStream *aStream);
  50.         pascal void DoPostCreate(TDocument *itsDocument);
  51.         pascal void Free();
  52.     private:
  53.         friend class TArticleTextSelectCommand;
  54.         friend class TCopyArticleTextCommand;
  55.  
  56.         TArticle *fArticle;
  57.         TGroupDoc *fDoc;
  58.         long fArticleID;
  59.         ArrayIndex fBodyStartLineNo;
  60.         Boolean fShowsAllHeaders;
  61.         Boolean fUseROT13;
  62.         Boolean fUseJapaneseFont;
  63.  
  64.         StandardGridViewTextStyle fGridViewTextStyle;
  65.         
  66.         void GetLineText(short lineNo, Boolean asQuote, CStr255 &text);
  67.         Boolean DoGetLineText(short lineNo, Boolean asQuote, CStr255 &text);
  68.         void GetQuoteFromTextLine(CStr255 &text, short quoteTemplateID);
  69.         void SetArticleDisplayed(long articleID);
  70. };
  71.