| 
            Last change
 on this file since 76 was             33, checked in by RBRi, 19 years ago           | 
        
        
          | 
             
more uses cleanup 
 
           | 
        
        
          
            
              - 
Property                 svn:eol-style
 set to                 
native
               
             
           | 
        
        
          | 
            File size:
            1.4 KB
           | 
        
      
      
| Line |   | 
|---|
| 1 | Unit MiscUnit;
 | 
|---|
| 2 | 
 | 
|---|
| 3 | // NewView - a new OS/2 Help Viewer
 | 
|---|
| 4 | // Copyright 2003 Aaron Lawrence (aaronl at consultant dot com)
 | 
|---|
| 5 | // This software is released under the Gnu Public License - see readme.txt
 | 
|---|
| 6 | 
 | 
|---|
| 7 | 
 | 
|---|
| 8 | // Miscellaneous objects...
 | 
|---|
| 9 | 
 | 
|---|
| 10 | Interface
 | 
|---|
| 11 | 
 | 
|---|
| 12 | uses
 | 
|---|
| 13 |   HelpTopic,
 | 
|---|
| 14 |   ACLString,
 | 
|---|
| 15 |   NavigatePointUnit,
 | 
|---|
| 16 |   HelpFile;
 | 
|---|
| 17 | 
 | 
|---|
| 18 | // Help Notes
 | 
|---|
| 19 | // -----------------------------------------------------------
 | 
|---|
| 20 | 
 | 
|---|
| 21 | type
 | 
|---|
| 22 |   THelpNote = class
 | 
|---|
| 23 |     Text: TAString;
 | 
|---|
| 24 |     Topic: TTopic;
 | 
|---|
| 25 |     InsertPoint: longint;
 | 
|---|
| 26 | 
 | 
|---|
| 27 |     // calculated
 | 
|---|
| 28 |     InsertText: TAString;
 | 
|---|
| 29 | 
 | 
|---|
| 30 |     constructor Create;
 | 
|---|
| 31 |     destructor Destroy; override;
 | 
|---|
| 32 |   end;
 | 
|---|
| 33 | 
 | 
|---|
| 34 | // Bookmarks
 | 
|---|
| 35 | // -----------------------------------------------------------
 | 
|---|
| 36 | 
 | 
|---|
| 37 | type
 | 
|---|
| 38 |   TBookmark = class( TNavigatePoint )
 | 
|---|
| 39 |     Name: string;
 | 
|---|
| 40 |     procedure Save( Var F: TextFile );
 | 
|---|
| 41 |     constructor Load( Var F: TextFile; HelpFile: THelpFile );
 | 
|---|
| 42 |   end;
 | 
|---|
| 43 | 
 | 
|---|
| 44 | Implementation
 | 
|---|
| 45 | 
 | 
|---|
| 46 | // Help Notes
 | 
|---|
| 47 | // -----------------------------------------------------------
 | 
|---|
| 48 | constructor THelpNote.Create;
 | 
|---|
| 49 | begin
 | 
|---|
| 50 |   Text := TAString.Create;
 | 
|---|
| 51 |   InsertText := TAString.Create;
 | 
|---|
| 52 |   Topic := nil;
 | 
|---|
| 53 |   InsertPoint := -1;
 | 
|---|
| 54 | end;
 | 
|---|
| 55 | 
 | 
|---|
| 56 | destructor THelpNote.Destroy;
 | 
|---|
| 57 | begin
 | 
|---|
| 58 |   Text.Destroy;
 | 
|---|
| 59 |   InsertText.Destroy;
 | 
|---|
| 60 | end;
 | 
|---|
| 61 | 
 | 
|---|
| 62 | // Bookmarks
 | 
|---|
| 63 | // -----------------------------------------------------------
 | 
|---|
| 64 | 
 | 
|---|
| 65 | procedure TBookmark.Save( Var F: TextFile );
 | 
|---|
| 66 | begin
 | 
|---|
| 67 |   WriteLn( F, Name );
 | 
|---|
| 68 |   inherited Save( F );
 | 
|---|
| 69 | end;
 | 
|---|
| 70 | 
 | 
|---|
| 71 | constructor TBookmark.Load( Var F: TextFile; HelpFile: THelpFile );
 | 
|---|
| 72 | begin
 | 
|---|
| 73 |   ReadLn( F, Name );
 | 
|---|
| 74 |   inherited Load( F, HelpFile );
 | 
|---|
| 75 | end;
 | 
|---|
| 76 | 
 | 
|---|
| 77 | Initialization
 | 
|---|
| 78 | End.
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.