mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-24 20:49:13 +00:00
Added some new methods that allow for lazy fixing of attributes in
subclasses. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11489 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
618ba42c09
commit
35ab35ded0
2 changed files with 22 additions and 12 deletions
|
@ -117,6 +117,12 @@ enum
|
|||
- (void) setDelegate: (id)delegate;
|
||||
- (id) delegate;
|
||||
|
||||
#ifndef STRICT_OPENSTEP
|
||||
- (void) ensureAttributesAreFixedInRange: (NSRange)range;
|
||||
- (BOOL) fixesAttributesLazily;
|
||||
- (void) invalidateAttributesInRange: (NSRange)range;
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
|
|
@ -207,7 +207,7 @@ static Class concrete;
|
|||
As a consequence, if any attribute has been fixed, r !=
|
||||
editedRange after this call. This is why we saved r in the first
|
||||
place. */
|
||||
[self fixAttributesInRange: r];
|
||||
[self invalidateAttributesInRange: r];
|
||||
|
||||
[nc postNotificationName: NSTextStorageDidProcessEditingNotification
|
||||
object: self];
|
||||
|
@ -282,15 +282,19 @@ static Class concrete;
|
|||
return _delegate;
|
||||
}
|
||||
|
||||
- (void) ensureAttributesAreFixedInRange: (NSRange)range
|
||||
{
|
||||
// Do nothing as the default is not lazy fixing, so all is done already
|
||||
}
|
||||
|
||||
- (BOOL) fixesAttributesLazily
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (void) invalidateAttributesInRange: (NSRange)range
|
||||
{
|
||||
[self fixAttributesInRange: range];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
/*
|
||||
* Notifications
|
||||
*/
|
||||
|
||||
NSString *NSTextStorageWillProcessEditingNotification =
|
||||
@"NSTextStorageWillProcessEditingNotification";
|
||||
NSString *NSTextStorageDidProcessEditingNotification =
|
||||
@"NSTextStorageDidProcessEditingNotification";
|
||||
|
||||
|
|
Loading…
Reference in a new issue