forked from microsoft/react-native-macos
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRCTUITextField.h
More file actions
80 lines (66 loc) · 3.31 KB
/
RCTUITextField.h
File metadata and controls
80 lines (66 loc) · 3.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import <React/RCTUIKit.h> // [macOS]
#import "RCTTextUIKit.h" // [macOS]
#import <React/RCTBackedTextInputDelegate.h>
#import <React/RCTBackedTextInputViewProtocol.h>
NS_ASSUME_NONNULL_BEGIN
/*
* Just regular UITextField... but much better!
*/
#if !TARGET_OS_OSX // [macOS]
@interface RCTUITextField : UITextField <RCTBackedTextInputViewProtocol>
#else // [macOS
#if RCT_SUBCLASS_SECURETEXTFIELD
@interface RCTUISecureTextField : NSSecureTextField <RCTBackedTextInputViewProtocol>
#else
@interface RCTUITextField : NSTextField <RCTBackedTextInputViewProtocol>
#endif // RCT_SUBCLASS_SECURETEXTFIELD
#endif // macOS]
- (instancetype)initWithCoder:(NSCoder *)decoder NS_UNAVAILABLE;
@property (nonatomic, weak) id<RCTBackedTextInputDelegate> textInputDelegate;
@property (nonatomic, assign) BOOL caretHidden;
@property (nonatomic, assign) BOOL contextMenuHidden;
#if !TARGET_OS_OSX // [macOS]
@property (nonatomic, assign, readonly) BOOL textWasPasted;
#else // [macOS
@property (nonatomic, assign) BOOL textWasPasted;
#endif // macOS]
@property (nonatomic, assign, readonly) BOOL dictationRecognizing;
@property (nonatomic, strong, nullable) RCTPlatformColor *placeholderColor; // [macOS]
@property (nonatomic, assign) UIEdgeInsets textContainerInset;
#if !TARGET_OS_OSX // [macOS]
@property (nonatomic, assign, getter=isEditable) BOOL editable;
#else // [macOS
@property (atomic, assign, getter=isEditable) BOOL editable;
#endif // macOS]
@property (nonatomic, getter=isScrollEnabled) BOOL scrollEnabled;
@property (nonatomic, strong, nullable) NSString *inputAccessoryViewID;
@property (nonatomic, strong, nullable) NSString *inputAccessoryViewButtonLabel;
@property (nonatomic, assign, readonly) CGFloat zoomScale;
@property (nonatomic, assign, readonly) CGPoint contentOffset;
@property (nonatomic, assign, readonly) UIEdgeInsets contentInset;
@property (nonatomic, assign) BOOL disableKeyboardShortcuts;
#if TARGET_OS_OSX // [macOS
@property (nonatomic, copy, nullable) NSString *text;
@property (nonatomic, copy, nullable) NSAttributedString *attributedText;
@property (nonatomic, strong, nullable) NSDictionary<NSAttributedStringKey, id> *defaultTextAttributes;
@property (nullable, nonatomic, copy) NSDictionary<NSAttributedStringKey, id> *typingAttributes;
@property (nonatomic, assign) NSTextAlignment textAlignment;
@property (nonatomic, getter=isAutomaticTextReplacementEnabled) BOOL automaticTextReplacementEnabled;
@property (nonatomic, getter=isAutomaticSpellingCorrectionEnabled) BOOL automaticSpellingCorrectionEnabled;
@property (nonatomic, getter=isContinuousSpellCheckingEnabled) BOOL continuousSpellCheckingEnabled;
@property (nonatomic, getter=isGrammarCheckingEnabled) BOOL grammarCheckingEnabled;
@property (nonatomic, assign) BOOL enableFocusRing;
@property (nonatomic, strong, nullable) RCTPlatformColor *selectionColor;
@property (weak, nullable) id<RCTUITextFieldDelegate> delegate;
@property (nonatomic, assign) CGFloat pointScaleFactor;
- (void)setReadablePasteBoardTypes:(NSArray<NSPasteboardType> *)readablePasteboardTypes;
#endif // macOS]
@property (nonatomic, getter=isGhostTextChanging) BOOL ghostTextChanging; // [macOS]
@end
NS_ASSUME_NONNULL_END