Removed old commented-out code.
[CleverRabbit.git] / RTKVerse.h
blob2201ef1582d8e7493a14fc2cf4fcbaf8e1e3c64c
1 //
2 // RTKVerse.h
3 // (CleverRabbit.app)
4 //
5 // Copyright (c) 2005 A. Karl Keller (http://karlk.net)
6 //
7 // This code is open-source, free software, made available without warranty under
8 // the terms of the GNU General Public License, either version 2 or later (see
9 // http://www.gnu.org/licenses/gpl.html or included copy); as such, it may be
10 // redistributed and/or modified in accordance with that document.
15 #import <Cocoa/Cocoa.h>
17 #define RTK_CHANGED_REVISION @"RTKChangedRevision"
19 @class RTKRevision;
21 @interface RTKVerse : NSObject
23 NSString * reference;
24 NSString * preUSFMType; // maintained for previous versions
25 NSString * type;
26 BOOL locked;
28 NSMutableArray *revisions;
29 int currentRevisionIndex;
31 // Lossless forwards/backwards compatibility
32 NSDictionary * dictionary;
35 - (id)initWithDictionary:(NSDictionary *)dict;
36 - (id)initWithString:(NSString *)string;
37 - (id)initWithSFMString:(NSString *)string
38 andStateDict:(NSMutableDictionary *)dict;
39 - (id)deepCopy;
40 + (RTKVerse *)verseWithSFMString:string
41 andStateDict:dict;
42 - (void)updateTypeFieldToUSFM;
43 - (void)appendLine:(NSString *)line;
44 - (NSString *)string;
45 - (NSString *)sfmString;
46 - (NSMutableAttributedString *)mutableAttributedString:(BOOL)romanString;
48 - (void)setLocked:(BOOL)state;
49 - (BOOL)locked;
51 - (void)setReference:(NSString *)theReference;
52 - (NSString *)reference;
54 - (void)setPreUSFMType:(NSString *)theType;
55 - (NSString *)preUSFMType;
56 - (void)setType:(NSString *)theType;
57 - (NSString *)type;
59 - (BOOL)blank;
60 - (BOOL)matchesString:(NSString *)string;
61 - (void)setDictionary:(NSDictionary *)theDictionary;
62 - (NSDictionary *)dictionary;
64 - (BOOL)updateWithAttributedString:(NSAttributedString *)string
65 atIndex:(NSUInteger)index;
67 #pragma mark - revision management
69 - (void)setRevisions:(NSMutableArray *)theRevisions;
70 - (NSMutableArray *)revisions;
71 - (int)revisionCount;
72 - (void)setCurrentRevisionIndex:(int)index;
73 - (int)currentRevisionIndex;
74 - (RTKRevision *)currentRevision;
78 @end