Samond Classes Library 1.2.0-RELEASE build 166
SCTextDelegate.h
Go to the documentation of this file.
1 //
2 // SCTextDelegate.h
3 // scl
4 //
5 // Created by Viacheslav Smolensky on 05.02.13.
6 // Copyright (c) 2007 - 2017 by Samond Development Corporation. All rights reserved.
7 //
8 
21 #import <scl/SCDelegate.h>
22 #import <scl/SCTextDelegateProtocol.h>
23 
24 #pragma mark -
25 #pragma mark Константы класса
26 
30 #define SCTextDelegateClass @"SCTextDelegate"
31 
46 
47 #pragma mark -
48 #pragma mark Обработка строк
49 - (void)processString:(NSString *)string text:(SCStrings *)text;
50 
51 #pragma mark -
52 #pragma mark Обработка текстовых ошибок
53 - (BOOL)text:(SCStrings *)text didDetectException:(SCTextException *)exception;
54 
55 #pragma mark -
56 #pragma mark События добавления строк
57 - (void)text:(SCStrings *)text willAddString:(NSString *)string;
58 - (void)text:(SCStrings *)text willInsertString:(NSString *)string atIndex:(SCIndex)index;
59 - (void)text:(SCStrings *)text didFinishAddingString:(NSString *)string;
60 - (void)text:(SCStrings *)text didFinishInsertingString:(NSString *)string atIndex:(SCIndex)index;
61 
62 #pragma mark -
63 #pragma mark События удаления строк
64 - (void)willRemoveAllStringsFromText:(SCStrings *)text;
65 - (void)text:(SCStrings *)text willRemoveStringAtIndex:(SCIndex)index;
66 - (void)text:(SCStrings *)text willRemoveString:(NSString *)string;
67 - (void)text:(SCText *)text willRemoveTextInRange:(NSRange)range;
68 - (void)text:(SCText *)text willRemoveSubstring:(NSString *)substring;
69 - (void)text:(SCText *)text willRemoveText:(SCStrings *)removedText;
70 - (void)didFinishRemovingAllStringsFromText:(SCStrings *)text;
71 - (void)text:(SCStrings *)text didFinishRemovingStringAtIndex:(SCIndex)index;
72 - (void)text:(SCStrings *)text didFinishRemovingString:(NSString *)string;
73 - (void)text:(SCText *)text didFinishRemovingTextInRange:(NSRange)range;
74 - (void)text:(SCText *)text didFinishRemovingSubstring:(NSString *)substring;
75 - (void)text:(SCText *)text didFinishRemovingText:(SCStrings *)removedText;
76 
77 #pragma mark -
78 #pragma mark События сортировки строк
79 - (void)text:(SCStrings *)text willSortAscending:(BOOL)ascending sorter:(id<SCSorter>)sorter;
80 - (void)text:(SCStrings *)text didFinishSortingAscending:(BOOL)ascending sorter:(id<SCSorter>)sorter;
81 
82 #pragma mark -
83 #pragma mark События замены строк
84 - (void)text:(SCStrings *)text willReplaceStringAtIndex:(SCIndex)index withString:(NSString *)string;
85 - (void)text:(SCStrings *)text willReplaceString:(NSString *)string withString:(NSString *)newString;
86 - (void)text:(SCText *)text willReplaceTextInRange:(NSRange)range withText:(SCStrings *)ntext;
87 - (void)text:(SCText *)text willReplaceText:(SCStrings *)oldText withText:(SCStrings *)newText;
88 - (void)text:(SCStrings *)text didFinishReplacingStringAtIndex:(SCIndex)index withString:(NSString *)string;
89 - (void)text:(SCStrings *)text didFinishReplacingString:(NSString *)string withString:(NSString *)newString;
90 - (void)text:(SCText *)text didFinishReplacingTextInRange:(NSRange)range withText:(SCStrings *)ntext;
91 - (void)text:(SCText *)text didFinishReplacingText:(SCStrings *)oldText withText:(SCStrings *)newText;
92 
93 #pragma mark -
94 #pragma mark События копирования и перемещения строк
95 - (void)text:(SCStrings *)text willExchangeStringAtIndex:(SCIndex)index withStringAtIndex:(SCIndex)destination;
96 - (void)text:(SCStrings *)text willDuplicateStringAtIndex:(SCIndex)index;
97 - (void)willDuplicateText:(SCStrings *)text;
98 - (void)text:(SCText *)text willExchangeTextInRange:(NSRange)source withTextInRange:(NSRange)destination;
99 - (void)text:(SCStrings *)text didFinishExchangingStringAtIndex:(SCIndex)index withStringAtIndex:(SCIndex)destination;
100 - (void)text:(SCStrings *)text didFinishDuplicatingStringAtIndex:(SCIndex)index;
101 - (void)didFinishDuplicatingText:(SCStrings *)text;
102 - (void)text:(SCText *)text didFinishExchangingTextInRange:(NSRange)source withTextInRange:(NSRange)destination;
103 
104 #pragma mark -
105 #pragma mark События чтения и записи файлов
106 - (void)text:(SCTextFile *)text willReadFromStream:(SCStream *)stream;
107 - (void)text:(SCTextFile *)text willReadWithPath:(NSString *)path;
108 - (void)text:(SCTextFile *)text willWriteToStream:(SCStream *)stream;
109 - (void)text:(SCTextFile *)text willWriteWithPath:(NSString *)path;
110 - (void)willResetText:(SCTextFile *)text;
111 - (void)text:(SCTextFile *)text didFinishReadingFromStream:(SCStream *)stream;
112 - (void)text:(SCTextFile *)text didFinishReadingWithPath:(NSString *)path;
113 - (void)text:(SCTextFile *)text didFinishWritingToStream:(SCStream *)stream;
114 - (void)text:(SCTextFile *)text didFinishWritingWithPath:(NSString *)path;
115 - (void)didFinishResettingText:(SCTextFile *)text;
116 
117 @end
Text class.
Definition: SCText.h:68
SCULong SCIndex
Index data type.
Definition: SCTypes.h:240
Strings list class.
Definition: SCStrings.h:65
Abstract implementation of the protocol SCSorter.
Definition: SCSorter.h:37
Text object event handlers class.
Definition: SCTextDelegate.h:45
Parent class of all library delegate classes.
Definition: SCDelegate.h:46
Text file class.
Definition: SCTextFile.h:79
Text objects delegate protocol.
Definition: SCTextDelegateProtocol.h:45
Exception class SCTextException.
Definition: SCTextException.h:194
Abstract parent class of the stream classes hierarchy.
Definition: SCStream.h:242