github.com/keybase/client/go@v0.0.0-20241007131713-f10651d043c8/updater/osx/Updater/TextView.h (about)

     1  //
     2  //  TextView.h
     3  //  Updater
     4  //
     5  //  Created by Gabriel on 4/10/16.
     6  //  Copyright © 2016 Keybase. All rights reserved.
     7  //
     8  
     9  #import <Foundation/Foundation.h>
    10  #import <AppKit/AppKit.h>
    11  
    12  @class TextView;
    13  
    14  typedef BOOL (^TextViewOnPaste)(TextView *textView);
    15  typedef void (^TextViewOnChange)(TextView *textView);
    16  
    17  @interface TextView : NSScrollView <NSTextViewDelegate>
    18  
    19  @property (readonly) NSTextView *view;
    20  @property (nonatomic) NSAttributedString *attributedText;
    21  @property (nonatomic) NSString *text;
    22  @property (nonatomic, getter=isEditable) BOOL editable;
    23  
    24  @property (copy) TextViewOnChange onChange;
    25  @property (copy) TextViewOnPaste onPaste;
    26  
    27  - (void)viewInit;
    28  
    29  - (void)setText:(NSString *)text font:(NSFont *)font color:(NSColor *)color;
    30  - (void)setText:(NSString *)text font:(NSFont *)font color:(NSColor *)color alignment:(NSTextAlignment)alignment lineBreakMode:(NSLineBreakMode)lineBreakMode;
    31  
    32  - (void)setEnabled:(BOOL)enabled;
    33  
    34  @end