// // DSTextViewCategories.h // Shared categories // // Created by David Sinclair on Mon May 24 2004. // Copyright (c) 2004 - 2007 Dejal Systems, LLC. All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, // are permitted provided that the following conditions are met: // // Redistributions of source code must retain this list of conditions and the following disclaimer. // // The name of Dejal Systems, LLC may not be used to endorse or promote products derived from this // software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR // PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE AUTHORS OR // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE // SOFTWARE OR THE USE OR OTHER DEALINGS IN THIS SOFTWARE. // #import @interface NSTextView (DSTextViewCategories) - (int)length; - (NSRange)allRange; - (void)setTypingAttributesToMatchView; - (IBAction)deselectAll:(id)sender; // ---------------------------------------------------------------------------------------- #pragma mark - // ---------------------------------------------------------------------------------------- - (void)appendStringValue:(NSString *)value; - (void)appendAttributedStringValue:(NSAttributedString *)value; // ---------------------------------------------------------------------------------------- #pragma mark - // ---------------------------------------------------------------------------------------- - (NSString *)selectedStringValue; - (NSString *)selectedOrAllStringValue; - (NSAttributedString *)selectedAttributedStringValue; - (NSAttributedString *)selectedOrAllAttributedStringValue; // ---------------------------------------------------------------------------------------- #pragma mark - // ---------------------------------------------------------------------------------------- - (NSString *)stringValue; - (NSAttributedString *)attributedStringValue; - (NSData *)RTFValue; - (NSData *)RTFDValue; // ---------------------------------------------------------------------------------------- #pragma mark - // ---------------------------------------------------------------------------------------- - (void)setStringValue:(NSString *)value; - (void)setAttributedStringValue:(NSAttributedString *)value; - (void)setRTFValue:(NSData *)value; - (void)setRTFDValue:(NSData *)value; - (void)setRTFDValue:(NSData *)theRTFD orRTF:(NSData *)theRTF orAttributedString:(NSAttributedString *)attrString orString:(NSString *)string; @end