react-native-nitro-input 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +80 -0
- package/README.md +120 -5
- package/android/src/main/cpp/JMaskEngine.cpp +45 -0
- package/android/src/main/cpp/JMaskEngine.hpp +9 -0
- package/android/src/main/cpp/JReflowEngine.cpp +32 -0
- package/android/src/main/cpp/JReflowEngine.hpp +13 -0
- package/android/src/main/cpp/JRollingEngine.cpp +42 -2
- package/android/src/main/cpp/JRollingEngine.hpp +9 -1
- package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroInputView.kt +24 -0
- package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroNumberFormatPlatform.kt +76 -1
- package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroNumberView.kt +88 -0
- package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroTextMeasure.kt +25 -0
- package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroTextView.kt +140 -0
- package/android/src/main/java/com/margelo/nitro/nitroinput/MaskEngine.kt +16 -0
- package/android/src/main/java/com/margelo/nitro/nitroinput/NitroInputPackage.kt +2 -1
- package/android/src/main/java/com/margelo/nitro/nitroinput/NitroInputView.kt +96 -6
- package/android/src/main/java/com/margelo/nitro/nitroinput/NitroNumberView.kt +388 -136
- package/android/src/main/java/com/margelo/nitro/nitroinput/NitroTextView.kt +868 -0
- package/android/src/main/java/com/margelo/nitro/nitroinput/ReflowEngine.kt +21 -0
- package/android/src/main/java/com/margelo/nitro/nitroinput/RollingEngine.kt +13 -2
- package/cpp/MaskEngine.cpp +294 -33
- package/cpp/MaskEngine.hpp +68 -0
- package/cpp/RollingEngine.cpp +92 -8
- package/cpp/RollingEngine.hpp +36 -2
- package/ios/HybridNitroInputView.swift +18 -0
- package/ios/HybridNitroNumberFormatPlatform.swift +87 -9
- package/ios/HybridNitroNumberView.swift +82 -1
- package/ios/HybridNitroTextView.swift +134 -0
- package/ios/NitroInputView.swift +125 -7
- package/ios/NitroNumberView.swift +368 -135
- package/ios/NitroTextView.swift +583 -0
- package/lib/commonjs/nitrogen/generated/shared/json/NitroInputViewConfig.json +6 -0
- package/lib/commonjs/nitrogen/generated/shared/json/NitroNumberViewConfig.json +20 -0
- package/lib/commonjs/nitrogen/generated/shared/json/NitroTextViewConfig.json +30 -0
- package/lib/commonjs/src/NitroInput.js +15 -2
- package/lib/commonjs/src/NitroNumber.js +52 -3
- package/lib/commonjs/src/NitroText.js +138 -0
- package/lib/commonjs/src/NitroTime.js +65 -0
- package/lib/commonjs/src/formatProps.js +76 -16
- package/lib/commonjs/src/index.js +6 -1
- package/lib/commonjs/src/specs/NitroText.nitro.js +2 -0
- package/lib/module/nitrogen/generated/shared/json/NitroInputViewConfig.json +6 -0
- package/lib/module/nitrogen/generated/shared/json/NitroNumberViewConfig.json +20 -0
- package/lib/module/nitrogen/generated/shared/json/NitroTextViewConfig.json +30 -0
- package/lib/module/src/NitroInput.js +15 -2
- package/lib/module/src/NitroNumber.js +53 -4
- package/lib/module/src/NitroText.js +98 -0
- package/lib/module/src/NitroTime.js +29 -0
- package/lib/module/src/formatProps.js +76 -17
- package/lib/module/src/index.js +2 -0
- package/lib/module/src/specs/NitroText.nitro.js +1 -0
- package/lib/typescript/src/NitroInput.d.ts +39 -1
- package/lib/typescript/src/NitroNumber.d.ts +79 -1
- package/lib/typescript/src/NitroText.d.ts +67 -0
- package/lib/typescript/src/NitroTime.d.ts +19 -0
- package/lib/typescript/src/formatProps.d.ts +30 -4
- package/lib/typescript/src/index.d.ts +5 -2
- package/lib/typescript/src/specs/NitroInput.nitro.d.ts +43 -0
- package/lib/typescript/src/specs/NitroNumber.nitro.d.ts +67 -0
- package/lib/typescript/src/specs/NitroText.nitro.d.ts +60 -0
- package/nitro.json +20 -0
- package/nitrogen/generated/android/NitroInput+autolinking.cmake +6 -0
- package/nitrogen/generated/android/NitroInputOnLoad.cpp +34 -0
- package/nitrogen/generated/android/c++/JHybridNitroInputViewSpec.cpp +102 -0
- package/nitrogen/generated/android/c++/JHybridNitroInputViewSpec.hpp +12 -0
- package/nitrogen/generated/android/c++/JHybridNitroNumberViewSpec.cpp +243 -0
- package/nitrogen/generated/android/c++/JHybridNitroNumberViewSpec.hpp +40 -0
- package/nitrogen/generated/android/c++/JHybridNitroTextMeasureSpec.cpp +58 -0
- package/nitrogen/generated/android/c++/JHybridNitroTextMeasureSpec.hpp +64 -0
- package/nitrogen/generated/android/c++/JHybridNitroTextViewSpec.cpp +253 -0
- package/nitrogen/generated/android/c++/JHybridNitroTextViewSpec.hpp +104 -0
- package/nitrogen/generated/android/c++/JNitroInputCharacterMapping.hpp +61 -0
- package/nitrogen/generated/android/c++/JNitroInputMaskAffinity.hpp +64 -0
- package/nitrogen/generated/android/c++/JNitroInputTextCase.hpp +61 -0
- package/nitrogen/generated/android/c++/JNitroNumberShimmerDirection.hpp +61 -0
- package/nitrogen/generated/android/c++/JNitroNumberSignDisplay.hpp +67 -0
- package/nitrogen/generated/android/c++/views/JHybridNitroInputViewStateUpdater.cpp +30 -0
- package/nitrogen/generated/android/c++/views/JHybridNitroNumberViewStateUpdater.cpp +100 -0
- package/nitrogen/generated/android/c++/views/JHybridNitroTextViewStateUpdater.cpp +174 -0
- package/nitrogen/generated/android/c++/views/JHybridNitroTextViewStateUpdater.hpp +54 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroInputViewSpec.kt +36 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroNumberViewSpec.kt +136 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroTextMeasureSpec.kt +60 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroTextViewSpec.kt +179 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NitroInputCharacterMapping.kt +56 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NitroInputMaskAffinity.kt +25 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NitroInputTextCase.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NitroNumberShimmerDirection.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NitroNumberSignDisplay.kt +26 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/views/HybridNitroTextViewManager.kt +96 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/views/HybridNitroTextViewStateUpdater.kt +23 -0
- package/nitrogen/generated/ios/NitroInput-Swift-Cxx-Bridge.cpp +34 -0
- package/nitrogen/generated/ios/NitroInput-Swift-Cxx-Bridge.hpp +146 -11
- package/nitrogen/generated/ios/NitroInput-Swift-Cxx-Umbrella.hpp +25 -0
- package/nitrogen/generated/ios/NitroInputAutolinking.mm +16 -0
- package/nitrogen/generated/ios/NitroInputAutolinking.swift +24 -0
- package/nitrogen/generated/ios/c++/HybridNitroInputViewSpecSwift.hpp +50 -0
- package/nitrogen/generated/ios/c++/HybridNitroNumberViewSpecSwift.hpp +146 -0
- package/nitrogen/generated/ios/c++/HybridNitroTextMeasureSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridNitroTextMeasureSpecSwift.hpp +90 -0
- package/nitrogen/generated/ios/c++/HybridNitroTextViewSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridNitroTextViewSpecSwift.hpp +233 -0
- package/nitrogen/generated/ios/c++/views/HybridNitroInputViewComponent.mm +36 -0
- package/nitrogen/generated/ios/c++/views/HybridNitroNumberViewComponent.mm +120 -0
- package/nitrogen/generated/ios/c++/views/HybridNitroTextViewComponent.mm +264 -0
- package/nitrogen/generated/ios/swift/HybridNitroInputViewSpec.swift +6 -0
- package/nitrogen/generated/ios/swift/HybridNitroInputViewSpec_cxx.swift +78 -0
- package/nitrogen/generated/ios/swift/HybridNitroNumberViewSpec.swift +20 -0
- package/nitrogen/generated/ios/swift/HybridNitroNumberViewSpec_cxx.swift +493 -0
- package/nitrogen/generated/ios/swift/HybridNitroTextMeasureSpec.swift +56 -0
- package/nitrogen/generated/ios/swift/HybridNitroTextMeasureSpec_cxx.swift +150 -0
- package/nitrogen/generated/ios/swift/HybridNitroTextViewSpec.swift +75 -0
- package/nitrogen/generated/ios/swift/HybridNitroTextViewSpec_cxx.swift +608 -0
- package/nitrogen/generated/ios/swift/NitroInputCharacterMapping.swift +34 -0
- package/nitrogen/generated/ios/swift/NitroInputMaskAffinity.swift +48 -0
- package/nitrogen/generated/ios/swift/NitroInputTextCase.swift +44 -0
- package/nitrogen/generated/ios/swift/NitroNumberShimmerDirection.swift +44 -0
- package/nitrogen/generated/ios/swift/NitroNumberSignDisplay.swift +52 -0
- package/nitrogen/generated/shared/c++/HybridNitroInputViewSpec.cpp +12 -0
- package/nitrogen/generated/shared/c++/HybridNitroInputViewSpec.hpp +21 -0
- package/nitrogen/generated/shared/c++/HybridNitroNumberViewSpec.cpp +40 -0
- package/nitrogen/generated/shared/c++/HybridNitroNumberViewSpec.hpp +46 -0
- package/nitrogen/generated/shared/c++/HybridNitroTextMeasureSpec.cpp +22 -0
- package/nitrogen/generated/shared/c++/HybridNitroTextMeasureSpec.hpp +63 -0
- package/nitrogen/generated/shared/c++/HybridNitroTextViewSpec.cpp +62 -0
- package/nitrogen/generated/shared/c++/HybridNitroTextViewSpec.hpp +115 -0
- package/nitrogen/generated/shared/c++/NitroInputCharacterMapping.hpp +87 -0
- package/nitrogen/generated/shared/c++/NitroInputMaskAffinity.hpp +84 -0
- package/nitrogen/generated/shared/c++/NitroInputTextCase.hpp +80 -0
- package/nitrogen/generated/shared/c++/NitroNumberShimmerDirection.hpp +80 -0
- package/nitrogen/generated/shared/c++/NitroNumberSignDisplay.hpp +88 -0
- package/nitrogen/generated/shared/c++/views/HybridNitroInputViewComponent.cpp +12 -0
- package/nitrogen/generated/shared/c++/views/HybridNitroInputViewComponent.hpp +21 -0
- package/nitrogen/generated/shared/c++/views/HybridNitroNumberViewComponent.cpp +40 -0
- package/nitrogen/generated/shared/c++/views/HybridNitroNumberViewComponent.hpp +62 -0
- package/nitrogen/generated/shared/c++/views/HybridNitroTextViewComponent.cpp +74 -0
- package/nitrogen/generated/shared/c++/views/HybridNitroTextViewComponent.hpp +149 -0
- package/nitrogen/generated/shared/json/NitroInputViewConfig.json +6 -0
- package/nitrogen/generated/shared/json/NitroNumberViewConfig.json +20 -0
- package/nitrogen/generated/shared/json/NitroTextViewConfig.json +30 -0
- package/package.json +2 -2
- package/src/NitroInput.tsx +73 -0
- package/src/NitroNumber.tsx +183 -9
- package/src/NitroText.tsx +166 -0
- package/src/NitroTime.tsx +68 -0
- package/src/formatProps.ts +108 -18
- package/src/index.ts +8 -0
- package/src/specs/NitroInput.nitro.ts +46 -0
- package/src/specs/NitroNumber.nitro.ts +69 -0
- package/src/specs/NitroText.nitro.ts +65 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroInputTextCase.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Represents the JS union `NitroInputTextCase`, backed by a C++ enum.
|
|
10
|
+
*/
|
|
11
|
+
public typealias NitroInputTextCase = margelo.nitro.nitroinput.NitroInputTextCase
|
|
12
|
+
|
|
13
|
+
public extension NitroInputTextCase {
|
|
14
|
+
/**
|
|
15
|
+
* Get a NitroInputTextCase for the given String value, or
|
|
16
|
+
* return `nil` if the given value was invalid/unknown.
|
|
17
|
+
*/
|
|
18
|
+
init?(fromString string: String) {
|
|
19
|
+
switch string {
|
|
20
|
+
case "none":
|
|
21
|
+
self = .none
|
|
22
|
+
case "upper":
|
|
23
|
+
self = .upper
|
|
24
|
+
case "lower":
|
|
25
|
+
self = .lower
|
|
26
|
+
default:
|
|
27
|
+
return nil
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Get the String value this NitroInputTextCase represents.
|
|
33
|
+
*/
|
|
34
|
+
var stringValue: String {
|
|
35
|
+
switch self {
|
|
36
|
+
case .none:
|
|
37
|
+
return "none"
|
|
38
|
+
case .upper:
|
|
39
|
+
return "upper"
|
|
40
|
+
case .lower:
|
|
41
|
+
return "lower"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroNumberShimmerDirection.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Represents the JS union `NitroNumberShimmerDirection`, backed by a C++ enum.
|
|
10
|
+
*/
|
|
11
|
+
public typealias NitroNumberShimmerDirection = margelo.nitro.nitroinput.NitroNumberShimmerDirection
|
|
12
|
+
|
|
13
|
+
public extension NitroNumberShimmerDirection {
|
|
14
|
+
/**
|
|
15
|
+
* Get a NitroNumberShimmerDirection for the given String value, or
|
|
16
|
+
* return `nil` if the given value was invalid/unknown.
|
|
17
|
+
*/
|
|
18
|
+
init?(fromString string: String) {
|
|
19
|
+
switch string {
|
|
20
|
+
case "auto":
|
|
21
|
+
self = .auto
|
|
22
|
+
case "ltr":
|
|
23
|
+
self = .ltr
|
|
24
|
+
case "rtl":
|
|
25
|
+
self = .rtl
|
|
26
|
+
default:
|
|
27
|
+
return nil
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Get the String value this NitroNumberShimmerDirection represents.
|
|
33
|
+
*/
|
|
34
|
+
var stringValue: String {
|
|
35
|
+
switch self {
|
|
36
|
+
case .auto:
|
|
37
|
+
return "auto"
|
|
38
|
+
case .ltr:
|
|
39
|
+
return "ltr"
|
|
40
|
+
case .rtl:
|
|
41
|
+
return "rtl"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroNumberSignDisplay.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Represents the JS union `NitroNumberSignDisplay`, backed by a C++ enum.
|
|
10
|
+
*/
|
|
11
|
+
public typealias NitroNumberSignDisplay = margelo.nitro.nitroinput.NitroNumberSignDisplay
|
|
12
|
+
|
|
13
|
+
public extension NitroNumberSignDisplay {
|
|
14
|
+
/**
|
|
15
|
+
* Get a NitroNumberSignDisplay for the given String value, or
|
|
16
|
+
* return `nil` if the given value was invalid/unknown.
|
|
17
|
+
*/
|
|
18
|
+
init?(fromString string: String) {
|
|
19
|
+
switch string {
|
|
20
|
+
case "auto":
|
|
21
|
+
self = .auto
|
|
22
|
+
case "always":
|
|
23
|
+
self = .always
|
|
24
|
+
case "never":
|
|
25
|
+
self = .never
|
|
26
|
+
case "exceptZero":
|
|
27
|
+
self = .exceptzero
|
|
28
|
+
case "negative":
|
|
29
|
+
self = .negative
|
|
30
|
+
default:
|
|
31
|
+
return nil
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Get the String value this NitroNumberSignDisplay represents.
|
|
37
|
+
*/
|
|
38
|
+
var stringValue: String {
|
|
39
|
+
switch self {
|
|
40
|
+
case .auto:
|
|
41
|
+
return "auto"
|
|
42
|
+
case .always:
|
|
43
|
+
return "always"
|
|
44
|
+
case .never:
|
|
45
|
+
return "never"
|
|
46
|
+
case .exceptzero:
|
|
47
|
+
return "exceptZero"
|
|
48
|
+
case .negative:
|
|
49
|
+
return "negative"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -34,6 +34,18 @@ namespace margelo::nitro::nitroinput {
|
|
|
34
34
|
prototype.registerHybridSetter("maskAutocomplete", &HybridNitroInputViewSpec::setMaskAutocomplete);
|
|
35
35
|
prototype.registerHybridGetter("maskAutoSkip", &HybridNitroInputViewSpec::getMaskAutoSkip);
|
|
36
36
|
prototype.registerHybridSetter("maskAutoSkip", &HybridNitroInputViewSpec::setMaskAutoSkip);
|
|
37
|
+
prototype.registerHybridGetter("maskAffinityFormats", &HybridNitroInputViewSpec::getMaskAffinityFormats);
|
|
38
|
+
prototype.registerHybridSetter("maskAffinityFormats", &HybridNitroInputViewSpec::setMaskAffinityFormats);
|
|
39
|
+
prototype.registerHybridGetter("maskAffinityStrategy", &HybridNitroInputViewSpec::getMaskAffinityStrategy);
|
|
40
|
+
prototype.registerHybridSetter("maskAffinityStrategy", &HybridNitroInputViewSpec::setMaskAffinityStrategy);
|
|
41
|
+
prototype.registerHybridGetter("maskTextCase", &HybridNitroInputViewSpec::getMaskTextCase);
|
|
42
|
+
prototype.registerHybridSetter("maskTextCase", &HybridNitroInputViewSpec::setMaskTextCase);
|
|
43
|
+
prototype.registerHybridGetter("maskCharacterMap", &HybridNitroInputViewSpec::getMaskCharacterMap);
|
|
44
|
+
prototype.registerHybridSetter("maskCharacterMap", &HybridNitroInputViewSpec::setMaskCharacterMap);
|
|
45
|
+
prototype.registerHybridGetter("maskSlotPlaceholder", &HybridNitroInputViewSpec::getMaskSlotPlaceholder);
|
|
46
|
+
prototype.registerHybridSetter("maskSlotPlaceholder", &HybridNitroInputViewSpec::setMaskSlotPlaceholder);
|
|
47
|
+
prototype.registerHybridGetter("keepPlaceholder", &HybridNitroInputViewSpec::getKeepPlaceholder);
|
|
48
|
+
prototype.registerHybridSetter("keepPlaceholder", &HybridNitroInputViewSpec::setKeepPlaceholder);
|
|
37
49
|
prototype.registerHybridGetter("groupingSeparator", &HybridNitroInputViewSpec::getGroupingSeparator);
|
|
38
50
|
prototype.registerHybridSetter("groupingSeparator", &HybridNitroInputViewSpec::setGroupingSeparator);
|
|
39
51
|
prototype.registerHybridGetter("decimalSeparator", &HybridNitroInputViewSpec::getDecimalSeparator);
|
|
@@ -17,6 +17,12 @@
|
|
|
17
17
|
namespace margelo::nitro::nitroinput { enum class NitroInputMode; }
|
|
18
18
|
// Forward declaration of `NitroInputNotation` to properly resolve imports.
|
|
19
19
|
namespace margelo::nitro::nitroinput { struct NitroInputNotation; }
|
|
20
|
+
// Forward declaration of `NitroInputMaskAffinity` to properly resolve imports.
|
|
21
|
+
namespace margelo::nitro::nitroinput { enum class NitroInputMaskAffinity; }
|
|
22
|
+
// Forward declaration of `NitroInputTextCase` to properly resolve imports.
|
|
23
|
+
namespace margelo::nitro::nitroinput { enum class NitroInputTextCase; }
|
|
24
|
+
// Forward declaration of `NitroInputCharacterMapping` to properly resolve imports.
|
|
25
|
+
namespace margelo::nitro::nitroinput { struct NitroInputCharacterMapping; }
|
|
20
26
|
// Forward declaration of `NitroInputVariant` to properly resolve imports.
|
|
21
27
|
namespace margelo::nitro::nitroinput { enum class NitroInputVariant; }
|
|
22
28
|
// Forward declaration of `NitroInputLabelBehavior` to properly resolve imports.
|
|
@@ -48,6 +54,9 @@ namespace margelo::nitro::nitroinput { enum class NitroInputKeyboardAppearance;
|
|
|
48
54
|
#include "NitroInputMode.hpp"
|
|
49
55
|
#include "NitroInputNotation.hpp"
|
|
50
56
|
#include <vector>
|
|
57
|
+
#include "NitroInputMaskAffinity.hpp"
|
|
58
|
+
#include "NitroInputTextCase.hpp"
|
|
59
|
+
#include "NitroInputCharacterMapping.hpp"
|
|
51
60
|
#include "NitroInputVariant.hpp"
|
|
52
61
|
#include "NitroInputLabelBehavior.hpp"
|
|
53
62
|
#include "NitroInputSignPlacement.hpp"
|
|
@@ -111,6 +120,18 @@ namespace margelo::nitro::nitroinput {
|
|
|
111
120
|
virtual void setMaskAutocomplete(bool maskAutocomplete) = 0;
|
|
112
121
|
virtual bool getMaskAutoSkip() = 0;
|
|
113
122
|
virtual void setMaskAutoSkip(bool maskAutoSkip) = 0;
|
|
123
|
+
virtual std::vector<std::string> getMaskAffinityFormats() = 0;
|
|
124
|
+
virtual void setMaskAffinityFormats(const std::vector<std::string>& maskAffinityFormats) = 0;
|
|
125
|
+
virtual NitroInputMaskAffinity getMaskAffinityStrategy() = 0;
|
|
126
|
+
virtual void setMaskAffinityStrategy(NitroInputMaskAffinity maskAffinityStrategy) = 0;
|
|
127
|
+
virtual NitroInputTextCase getMaskTextCase() = 0;
|
|
128
|
+
virtual void setMaskTextCase(NitroInputTextCase maskTextCase) = 0;
|
|
129
|
+
virtual std::vector<NitroInputCharacterMapping> getMaskCharacterMap() = 0;
|
|
130
|
+
virtual void setMaskCharacterMap(const std::vector<NitroInputCharacterMapping>& maskCharacterMap) = 0;
|
|
131
|
+
virtual std::string getMaskSlotPlaceholder() = 0;
|
|
132
|
+
virtual void setMaskSlotPlaceholder(const std::string& maskSlotPlaceholder) = 0;
|
|
133
|
+
virtual bool getKeepPlaceholder() = 0;
|
|
134
|
+
virtual void setKeepPlaceholder(bool keepPlaceholder) = 0;
|
|
114
135
|
virtual std::string getGroupingSeparator() = 0;
|
|
115
136
|
virtual void setGroupingSeparator(const std::string& groupingSeparator) = 0;
|
|
116
137
|
virtual std::string getDecimalSeparator() = 0;
|
|
@@ -70,6 +70,16 @@ namespace margelo::nitro::nitroinput {
|
|
|
70
70
|
prototype.registerHybridSetter("shimmerColor", &HybridNitroNumberViewSpec::setShimmerColor);
|
|
71
71
|
prototype.registerHybridGetter("shimmerDuration", &HybridNitroNumberViewSpec::getShimmerDuration);
|
|
72
72
|
prototype.registerHybridSetter("shimmerDuration", &HybridNitroNumberViewSpec::setShimmerDuration);
|
|
73
|
+
prototype.registerHybridGetter("shimmerAngle", &HybridNitroNumberViewSpec::getShimmerAngle);
|
|
74
|
+
prototype.registerHybridSetter("shimmerAngle", &HybridNitroNumberViewSpec::setShimmerAngle);
|
|
75
|
+
prototype.registerHybridGetter("shimmerWidth", &HybridNitroNumberViewSpec::getShimmerWidth);
|
|
76
|
+
prototype.registerHybridSetter("shimmerWidth", &HybridNitroNumberViewSpec::setShimmerWidth);
|
|
77
|
+
prototype.registerHybridGetter("shimmerBaseColor", &HybridNitroNumberViewSpec::getShimmerBaseColor);
|
|
78
|
+
prototype.registerHybridSetter("shimmerBaseColor", &HybridNitroNumberViewSpec::setShimmerBaseColor);
|
|
79
|
+
prototype.registerHybridGetter("shimmerDirection", &HybridNitroNumberViewSpec::getShimmerDirection);
|
|
80
|
+
prototype.registerHybridSetter("shimmerDirection", &HybridNitroNumberViewSpec::setShimmerDirection);
|
|
81
|
+
prototype.registerHybridGetter("shimmerDelay", &HybridNitroNumberViewSpec::getShimmerDelay);
|
|
82
|
+
prototype.registerHybridSetter("shimmerDelay", &HybridNitroNumberViewSpec::setShimmerDelay);
|
|
73
83
|
prototype.registerHybridGetter("fontSize", &HybridNitroNumberViewSpec::getFontSize);
|
|
74
84
|
prototype.registerHybridSetter("fontSize", &HybridNitroNumberViewSpec::setFontSize);
|
|
75
85
|
prototype.registerHybridGetter("prefixFontSize", &HybridNitroNumberViewSpec::getPrefixFontSize);
|
|
@@ -94,6 +104,32 @@ namespace margelo::nitro::nitroinput {
|
|
|
94
104
|
prototype.registerHybridSetter("suffixOffset", &HybridNitroNumberViewSpec::setSuffixOffset);
|
|
95
105
|
prototype.registerHybridGetter("tabularNums", &HybridNitroNumberViewSpec::getTabularNums);
|
|
96
106
|
prototype.registerHybridSetter("tabularNums", &HybridNitroNumberViewSpec::setTabularNums);
|
|
107
|
+
prototype.registerHybridGetter("signDisplay", &HybridNitroNumberViewSpec::getSignDisplay);
|
|
108
|
+
prototype.registerHybridSetter("signDisplay", &HybridNitroNumberViewSpec::setSignDisplay);
|
|
109
|
+
prototype.registerHybridGetter("plusSign", &HybridNitroNumberViewSpec::getPlusSign);
|
|
110
|
+
prototype.registerHybridSetter("plusSign", &HybridNitroNumberViewSpec::setPlusSign);
|
|
111
|
+
prototype.registerHybridGetter("minusSign", &HybridNitroNumberViewSpec::getMinusSign);
|
|
112
|
+
prototype.registerHybridSetter("minusSign", &HybridNitroNumberViewSpec::setMinusSign);
|
|
113
|
+
prototype.registerHybridGetter("digitGlyphs", &HybridNitroNumberViewSpec::getDigitGlyphs);
|
|
114
|
+
prototype.registerHybridSetter("digitGlyphs", &HybridNitroNumberViewSpec::setDigitGlyphs);
|
|
115
|
+
prototype.registerHybridGetter("groupingSizes", &HybridNitroNumberViewSpec::getGroupingSizes);
|
|
116
|
+
prototype.registerHybridSetter("groupingSizes", &HybridNitroNumberViewSpec::setGroupingSizes);
|
|
117
|
+
prototype.registerHybridGetter("digitMax", &HybridNitroNumberViewSpec::getDigitMax);
|
|
118
|
+
prototype.registerHybridSetter("digitMax", &HybridNitroNumberViewSpec::setDigitMax);
|
|
119
|
+
prototype.registerHybridGetter("continuous", &HybridNitroNumberViewSpec::getContinuous);
|
|
120
|
+
prototype.registerHybridSetter("continuous", &HybridNitroNumberViewSpec::setContinuous);
|
|
121
|
+
prototype.registerHybridGetter("prefixColor", &HybridNitroNumberViewSpec::getPrefixColor);
|
|
122
|
+
prototype.registerHybridSetter("prefixColor", &HybridNitroNumberViewSpec::setPrefixColor);
|
|
123
|
+
prototype.registerHybridGetter("suffixColor", &HybridNitroNumberViewSpec::getSuffixColor);
|
|
124
|
+
prototype.registerHybridSetter("suffixColor", &HybridNitroNumberViewSpec::setSuffixColor);
|
|
125
|
+
prototype.registerHybridGetter("fractionColor", &HybridNitroNumberViewSpec::getFractionColor);
|
|
126
|
+
prototype.registerHybridSetter("fractionColor", &HybridNitroNumberViewSpec::setFractionColor);
|
|
127
|
+
prototype.registerHybridGetter("fractionFontSize", &HybridNitroNumberViewSpec::getFractionFontSize);
|
|
128
|
+
prototype.registerHybridSetter("fractionFontSize", &HybridNitroNumberViewSpec::setFractionFontSize);
|
|
129
|
+
prototype.registerHybridGetter("fractionAlign", &HybridNitroNumberViewSpec::getFractionAlign);
|
|
130
|
+
prototype.registerHybridSetter("fractionAlign", &HybridNitroNumberViewSpec::setFractionAlign);
|
|
131
|
+
prototype.registerHybridGetter("respectReduceMotion", &HybridNitroNumberViewSpec::getRespectReduceMotion);
|
|
132
|
+
prototype.registerHybridSetter("respectReduceMotion", &HybridNitroNumberViewSpec::setRespectReduceMotion);
|
|
97
133
|
prototype.registerHybridGetter("adjustsFontSizeToFit", &HybridNitroNumberViewSpec::getAdjustsFontSizeToFit);
|
|
98
134
|
prototype.registerHybridSetter("adjustsFontSizeToFit", &HybridNitroNumberViewSpec::setAdjustsFontSizeToFit);
|
|
99
135
|
prototype.registerHybridGetter("minimumFontScale", &HybridNitroNumberViewSpec::getMinimumFontScale);
|
|
@@ -118,6 +154,10 @@ namespace margelo::nitro::nitroinput {
|
|
|
118
154
|
prototype.registerHybridSetter("onRevealEnd", &HybridNitroNumberViewSpec::setOnRevealEnd);
|
|
119
155
|
prototype.registerHybridGetter("onRevealMilestone", &HybridNitroNumberViewSpec::getOnRevealMilestone);
|
|
120
156
|
prototype.registerHybridSetter("onRevealMilestone", &HybridNitroNumberViewSpec::setOnRevealMilestone);
|
|
157
|
+
prototype.registerHybridGetter("onAnimationStart", &HybridNitroNumberViewSpec::getOnAnimationStart);
|
|
158
|
+
prototype.registerHybridSetter("onAnimationStart", &HybridNitroNumberViewSpec::setOnAnimationStart);
|
|
159
|
+
prototype.registerHybridGetter("onAnimationEnd", &HybridNitroNumberViewSpec::getOnAnimationEnd);
|
|
160
|
+
prototype.registerHybridSetter("onAnimationEnd", &HybridNitroNumberViewSpec::setOnAnimationEnd);
|
|
121
161
|
prototype.registerHybridMethod("jumpTo", &HybridNitroNumberViewSpec::jumpTo);
|
|
122
162
|
prototype.registerHybridMethod("animateTo", &HybridNitroNumberViewSpec::animateTo);
|
|
123
163
|
prototype.registerHybridMethod("revealTo", &HybridNitroNumberViewSpec::revealTo);
|
|
@@ -21,8 +21,12 @@ namespace margelo::nitro::nitroinput { enum class NitroNumberTransition; }
|
|
|
21
21
|
namespace margelo::nitro::nitroinput { enum class NitroNumberDirection; }
|
|
22
22
|
// Forward declaration of `NitroNumberRevealStyle` to properly resolve imports.
|
|
23
23
|
namespace margelo::nitro::nitroinput { enum class NitroNumberRevealStyle; }
|
|
24
|
+
// Forward declaration of `NitroNumberShimmerDirection` to properly resolve imports.
|
|
25
|
+
namespace margelo::nitro::nitroinput { enum class NitroNumberShimmerDirection; }
|
|
24
26
|
// Forward declaration of `NitroNumberAffixAlign` to properly resolve imports.
|
|
25
27
|
namespace margelo::nitro::nitroinput { enum class NitroNumberAffixAlign; }
|
|
28
|
+
// Forward declaration of `NitroNumberSignDisplay` to properly resolve imports.
|
|
29
|
+
namespace margelo::nitro::nitroinput { enum class NitroNumberSignDisplay; }
|
|
26
30
|
// Forward declaration of `NitroNumberTextAlign` to properly resolve imports.
|
|
27
31
|
namespace margelo::nitro::nitroinput { enum class NitroNumberTextAlign; }
|
|
28
32
|
|
|
@@ -33,7 +37,9 @@ namespace margelo::nitro::nitroinput { enum class NitroNumberTextAlign; }
|
|
|
33
37
|
#include "NitroNumberDirection.hpp"
|
|
34
38
|
#include "NitroNumberRevealStyle.hpp"
|
|
35
39
|
#include <vector>
|
|
40
|
+
#include "NitroNumberShimmerDirection.hpp"
|
|
36
41
|
#include "NitroNumberAffixAlign.hpp"
|
|
42
|
+
#include "NitroNumberSignDisplay.hpp"
|
|
37
43
|
#include "NitroNumberTextAlign.hpp"
|
|
38
44
|
#include <functional>
|
|
39
45
|
|
|
@@ -120,6 +126,16 @@ namespace margelo::nitro::nitroinput {
|
|
|
120
126
|
virtual void setShimmerColor(std::optional<double> shimmerColor) = 0;
|
|
121
127
|
virtual std::optional<double> getShimmerDuration() = 0;
|
|
122
128
|
virtual void setShimmerDuration(std::optional<double> shimmerDuration) = 0;
|
|
129
|
+
virtual std::optional<double> getShimmerAngle() = 0;
|
|
130
|
+
virtual void setShimmerAngle(std::optional<double> shimmerAngle) = 0;
|
|
131
|
+
virtual std::optional<double> getShimmerWidth() = 0;
|
|
132
|
+
virtual void setShimmerWidth(std::optional<double> shimmerWidth) = 0;
|
|
133
|
+
virtual std::optional<double> getShimmerBaseColor() = 0;
|
|
134
|
+
virtual void setShimmerBaseColor(std::optional<double> shimmerBaseColor) = 0;
|
|
135
|
+
virtual std::optional<NitroNumberShimmerDirection> getShimmerDirection() = 0;
|
|
136
|
+
virtual void setShimmerDirection(std::optional<NitroNumberShimmerDirection> shimmerDirection) = 0;
|
|
137
|
+
virtual std::optional<double> getShimmerDelay() = 0;
|
|
138
|
+
virtual void setShimmerDelay(std::optional<double> shimmerDelay) = 0;
|
|
123
139
|
virtual std::optional<double> getFontSize() = 0;
|
|
124
140
|
virtual void setFontSize(std::optional<double> fontSize) = 0;
|
|
125
141
|
virtual std::optional<double> getPrefixFontSize() = 0;
|
|
@@ -144,6 +160,32 @@ namespace margelo::nitro::nitroinput {
|
|
|
144
160
|
virtual void setSuffixOffset(std::optional<double> suffixOffset) = 0;
|
|
145
161
|
virtual std::optional<bool> getTabularNums() = 0;
|
|
146
162
|
virtual void setTabularNums(std::optional<bool> tabularNums) = 0;
|
|
163
|
+
virtual std::optional<NitroNumberSignDisplay> getSignDisplay() = 0;
|
|
164
|
+
virtual void setSignDisplay(std::optional<NitroNumberSignDisplay> signDisplay) = 0;
|
|
165
|
+
virtual std::optional<std::string> getPlusSign() = 0;
|
|
166
|
+
virtual void setPlusSign(const std::optional<std::string>& plusSign) = 0;
|
|
167
|
+
virtual std::optional<std::string> getMinusSign() = 0;
|
|
168
|
+
virtual void setMinusSign(const std::optional<std::string>& minusSign) = 0;
|
|
169
|
+
virtual std::optional<std::vector<std::string>> getDigitGlyphs() = 0;
|
|
170
|
+
virtual void setDigitGlyphs(const std::optional<std::vector<std::string>>& digitGlyphs) = 0;
|
|
171
|
+
virtual std::optional<std::vector<double>> getGroupingSizes() = 0;
|
|
172
|
+
virtual void setGroupingSizes(const std::optional<std::vector<double>>& groupingSizes) = 0;
|
|
173
|
+
virtual std::optional<std::vector<double>> getDigitMax() = 0;
|
|
174
|
+
virtual void setDigitMax(const std::optional<std::vector<double>>& digitMax) = 0;
|
|
175
|
+
virtual std::optional<bool> getContinuous() = 0;
|
|
176
|
+
virtual void setContinuous(std::optional<bool> continuous) = 0;
|
|
177
|
+
virtual std::optional<double> getPrefixColor() = 0;
|
|
178
|
+
virtual void setPrefixColor(std::optional<double> prefixColor) = 0;
|
|
179
|
+
virtual std::optional<double> getSuffixColor() = 0;
|
|
180
|
+
virtual void setSuffixColor(std::optional<double> suffixColor) = 0;
|
|
181
|
+
virtual std::optional<double> getFractionColor() = 0;
|
|
182
|
+
virtual void setFractionColor(std::optional<double> fractionColor) = 0;
|
|
183
|
+
virtual std::optional<double> getFractionFontSize() = 0;
|
|
184
|
+
virtual void setFractionFontSize(std::optional<double> fractionFontSize) = 0;
|
|
185
|
+
virtual std::optional<NitroNumberAffixAlign> getFractionAlign() = 0;
|
|
186
|
+
virtual void setFractionAlign(std::optional<NitroNumberAffixAlign> fractionAlign) = 0;
|
|
187
|
+
virtual std::optional<bool> getRespectReduceMotion() = 0;
|
|
188
|
+
virtual void setRespectReduceMotion(std::optional<bool> respectReduceMotion) = 0;
|
|
147
189
|
virtual std::optional<bool> getAdjustsFontSizeToFit() = 0;
|
|
148
190
|
virtual void setAdjustsFontSizeToFit(std::optional<bool> adjustsFontSizeToFit) = 0;
|
|
149
191
|
virtual std::optional<double> getMinimumFontScale() = 0;
|
|
@@ -168,6 +210,10 @@ namespace margelo::nitro::nitroinput {
|
|
|
168
210
|
virtual void setOnRevealEnd(const std::optional<std::function<void()>>& onRevealEnd) = 0;
|
|
169
211
|
virtual std::optional<std::function<void(double /* index */, double /* value */)>> getOnRevealMilestone() = 0;
|
|
170
212
|
virtual void setOnRevealMilestone(const std::optional<std::function<void(double /* index */, double /* value */)>>& onRevealMilestone) = 0;
|
|
213
|
+
virtual std::optional<std::function<void()>> getOnAnimationStart() = 0;
|
|
214
|
+
virtual void setOnAnimationStart(const std::optional<std::function<void()>>& onAnimationStart) = 0;
|
|
215
|
+
virtual std::optional<std::function<void(double /* value */)>> getOnAnimationEnd() = 0;
|
|
216
|
+
virtual void setOnAnimationEnd(const std::optional<std::function<void(double /* value */)>>& onAnimationEnd) = 0;
|
|
171
217
|
|
|
172
218
|
public:
|
|
173
219
|
// Methods
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridNitroTextMeasureSpec.cpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#include "HybridNitroTextMeasureSpec.hpp"
|
|
9
|
+
|
|
10
|
+
namespace margelo::nitro::nitroinput {
|
|
11
|
+
|
|
12
|
+
void HybridNitroTextMeasureSpec::loadHybridMethods() {
|
|
13
|
+
// load base methods/properties
|
|
14
|
+
HybridObject::loadHybridMethods();
|
|
15
|
+
// load custom methods/properties
|
|
16
|
+
registerHybrids(this, [](Prototype& prototype) {
|
|
17
|
+
prototype.registerHybridMethod("measure", &HybridNitroTextMeasureSpec::measure);
|
|
18
|
+
prototype.registerHybridMethod("lineHeight", &HybridNitroTextMeasureSpec::lineHeight);
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
} // namespace margelo::nitro::nitroinput
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridNitroTextMeasureSpec.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/HybridObject.hpp>)
|
|
11
|
+
#include <NitroModules/HybridObject.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
#include <string>
|
|
19
|
+
|
|
20
|
+
namespace margelo::nitro::nitroinput {
|
|
21
|
+
|
|
22
|
+
using namespace margelo::nitro;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* An abstract base class for `NitroTextMeasure`
|
|
26
|
+
* Inherit this class to create instances of `HybridNitroTextMeasureSpec` in C++.
|
|
27
|
+
* You must explicitly call `HybridObject`'s constructor yourself, because it is virtual.
|
|
28
|
+
* @example
|
|
29
|
+
* ```cpp
|
|
30
|
+
* class HybridNitroTextMeasure: public HybridNitroTextMeasureSpec {
|
|
31
|
+
* public:
|
|
32
|
+
* HybridNitroTextMeasure(...): HybridObject(TAG) { ... }
|
|
33
|
+
* // ...
|
|
34
|
+
* };
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
class HybridNitroTextMeasureSpec: public virtual HybridObject {
|
|
38
|
+
public:
|
|
39
|
+
// Constructor
|
|
40
|
+
explicit HybridNitroTextMeasureSpec(): HybridObject(TAG) { }
|
|
41
|
+
|
|
42
|
+
// Destructor
|
|
43
|
+
~HybridNitroTextMeasureSpec() override = default;
|
|
44
|
+
|
|
45
|
+
public:
|
|
46
|
+
// Properties
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
public:
|
|
50
|
+
// Methods
|
|
51
|
+
virtual double measure(const std::string& text, double fontSize, double fontWeight, const std::string& fontFamily, double letterSpacing) = 0;
|
|
52
|
+
virtual double lineHeight(double fontSize, double fontWeight, const std::string& fontFamily) = 0;
|
|
53
|
+
|
|
54
|
+
protected:
|
|
55
|
+
// Hybrid Setup
|
|
56
|
+
void loadHybridMethods() override;
|
|
57
|
+
|
|
58
|
+
protected:
|
|
59
|
+
// Tag for logging
|
|
60
|
+
static constexpr auto TAG = "NitroTextMeasure";
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
} // namespace margelo::nitro::nitroinput
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridNitroTextViewSpec.cpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#include "HybridNitroTextViewSpec.hpp"
|
|
9
|
+
|
|
10
|
+
namespace margelo::nitro::nitroinput {
|
|
11
|
+
|
|
12
|
+
void HybridNitroTextViewSpec::loadHybridMethods() {
|
|
13
|
+
// load base methods/properties
|
|
14
|
+
HybridObject::loadHybridMethods();
|
|
15
|
+
// load custom methods/properties
|
|
16
|
+
registerHybrids(this, [](Prototype& prototype) {
|
|
17
|
+
prototype.registerHybridGetter("text", &HybridNitroTextViewSpec::getText);
|
|
18
|
+
prototype.registerHybridSetter("text", &HybridNitroTextViewSpec::setText);
|
|
19
|
+
prototype.registerHybridGetter("fontSize", &HybridNitroTextViewSpec::getFontSize);
|
|
20
|
+
prototype.registerHybridSetter("fontSize", &HybridNitroTextViewSpec::setFontSize);
|
|
21
|
+
prototype.registerHybridGetter("fontWeight", &HybridNitroTextViewSpec::getFontWeight);
|
|
22
|
+
prototype.registerHybridSetter("fontWeight", &HybridNitroTextViewSpec::setFontWeight);
|
|
23
|
+
prototype.registerHybridGetter("fontFamily", &HybridNitroTextViewSpec::getFontFamily);
|
|
24
|
+
prototype.registerHybridSetter("fontFamily", &HybridNitroTextViewSpec::setFontFamily);
|
|
25
|
+
prototype.registerHybridGetter("color", &HybridNitroTextViewSpec::getColor);
|
|
26
|
+
prototype.registerHybridSetter("color", &HybridNitroTextViewSpec::setColor);
|
|
27
|
+
prototype.registerHybridGetter("letterSpacing", &HybridNitroTextViewSpec::getLetterSpacing);
|
|
28
|
+
prototype.registerHybridSetter("letterSpacing", &HybridNitroTextViewSpec::setLetterSpacing);
|
|
29
|
+
prototype.registerHybridGetter("textAlign", &HybridNitroTextViewSpec::getTextAlign);
|
|
30
|
+
prototype.registerHybridSetter("textAlign", &HybridNitroTextViewSpec::setTextAlign);
|
|
31
|
+
prototype.registerHybridGetter("rightToLeft", &HybridNitroTextViewSpec::getRightToLeft);
|
|
32
|
+
prototype.registerHybridSetter("rightToLeft", &HybridNitroTextViewSpec::setRightToLeft);
|
|
33
|
+
prototype.registerHybridGetter("duration", &HybridNitroTextViewSpec::getDuration);
|
|
34
|
+
prototype.registerHybridSetter("duration", &HybridNitroTextViewSpec::setDuration);
|
|
35
|
+
prototype.registerHybridGetter("easing", &HybridNitroTextViewSpec::getEasing);
|
|
36
|
+
prototype.registerHybridSetter("easing", &HybridNitroTextViewSpec::setEasing);
|
|
37
|
+
prototype.registerHybridGetter("bounce", &HybridNitroTextViewSpec::getBounce);
|
|
38
|
+
prototype.registerHybridSetter("bounce", &HybridNitroTextViewSpec::setBounce);
|
|
39
|
+
prototype.registerHybridGetter("effect", &HybridNitroTextViewSpec::getEffect);
|
|
40
|
+
prototype.registerHybridSetter("effect", &HybridNitroTextViewSpec::setEffect);
|
|
41
|
+
prototype.registerHybridGetter("respectReduceMotion", &HybridNitroTextViewSpec::getRespectReduceMotion);
|
|
42
|
+
prototype.registerHybridSetter("respectReduceMotion", &HybridNitroTextViewSpec::setRespectReduceMotion);
|
|
43
|
+
prototype.registerHybridGetter("loading", &HybridNitroTextViewSpec::getLoading);
|
|
44
|
+
prototype.registerHybridSetter("loading", &HybridNitroTextViewSpec::setLoading);
|
|
45
|
+
prototype.registerHybridGetter("shimmerColor", &HybridNitroTextViewSpec::getShimmerColor);
|
|
46
|
+
prototype.registerHybridSetter("shimmerColor", &HybridNitroTextViewSpec::setShimmerColor);
|
|
47
|
+
prototype.registerHybridGetter("shimmerDuration", &HybridNitroTextViewSpec::getShimmerDuration);
|
|
48
|
+
prototype.registerHybridSetter("shimmerDuration", &HybridNitroTextViewSpec::setShimmerDuration);
|
|
49
|
+
prototype.registerHybridGetter("shimmerAngle", &HybridNitroTextViewSpec::getShimmerAngle);
|
|
50
|
+
prototype.registerHybridSetter("shimmerAngle", &HybridNitroTextViewSpec::setShimmerAngle);
|
|
51
|
+
prototype.registerHybridGetter("shimmerWidth", &HybridNitroTextViewSpec::getShimmerWidth);
|
|
52
|
+
prototype.registerHybridSetter("shimmerWidth", &HybridNitroTextViewSpec::setShimmerWidth);
|
|
53
|
+
prototype.registerHybridGetter("shimmerBaseColor", &HybridNitroTextViewSpec::getShimmerBaseColor);
|
|
54
|
+
prototype.registerHybridSetter("shimmerBaseColor", &HybridNitroTextViewSpec::setShimmerBaseColor);
|
|
55
|
+
prototype.registerHybridGetter("shimmerDirection", &HybridNitroTextViewSpec::getShimmerDirection);
|
|
56
|
+
prototype.registerHybridSetter("shimmerDirection", &HybridNitroTextViewSpec::setShimmerDirection);
|
|
57
|
+
prototype.registerHybridGetter("shimmerDelay", &HybridNitroTextViewSpec::getShimmerDelay);
|
|
58
|
+
prototype.registerHybridSetter("shimmerDelay", &HybridNitroTextViewSpec::setShimmerDelay);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
} // namespace margelo::nitro::nitroinput
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridNitroTextViewSpec.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/HybridObject.hpp>)
|
|
11
|
+
#include <NitroModules/HybridObject.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
|
|
16
|
+
// Forward declaration of `NitroNumberTextAlign` to properly resolve imports.
|
|
17
|
+
namespace margelo::nitro::nitroinput { enum class NitroNumberTextAlign; }
|
|
18
|
+
// Forward declaration of `NitroInputEasing` to properly resolve imports.
|
|
19
|
+
namespace margelo::nitro::nitroinput { enum class NitroInputEasing; }
|
|
20
|
+
// Forward declaration of `NitroInputEffect` to properly resolve imports.
|
|
21
|
+
namespace margelo::nitro::nitroinput { enum class NitroInputEffect; }
|
|
22
|
+
// Forward declaration of `NitroNumberShimmerDirection` to properly resolve imports.
|
|
23
|
+
namespace margelo::nitro::nitroinput { enum class NitroNumberShimmerDirection; }
|
|
24
|
+
|
|
25
|
+
#include <string>
|
|
26
|
+
#include <optional>
|
|
27
|
+
#include "NitroNumberTextAlign.hpp"
|
|
28
|
+
#include "NitroInputEasing.hpp"
|
|
29
|
+
#include "NitroInputEffect.hpp"
|
|
30
|
+
#include "NitroNumberShimmerDirection.hpp"
|
|
31
|
+
|
|
32
|
+
namespace margelo::nitro::nitroinput {
|
|
33
|
+
|
|
34
|
+
using namespace margelo::nitro;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* An abstract base class for `NitroTextView`
|
|
38
|
+
* Inherit this class to create instances of `HybridNitroTextViewSpec` in C++.
|
|
39
|
+
* You must explicitly call `HybridObject`'s constructor yourself, because it is virtual.
|
|
40
|
+
* @example
|
|
41
|
+
* ```cpp
|
|
42
|
+
* class HybridNitroTextView: public HybridNitroTextViewSpec {
|
|
43
|
+
* public:
|
|
44
|
+
* HybridNitroTextView(...): HybridObject(TAG) { ... }
|
|
45
|
+
* // ...
|
|
46
|
+
* };
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
class HybridNitroTextViewSpec: public virtual HybridObject {
|
|
50
|
+
public:
|
|
51
|
+
// Constructor
|
|
52
|
+
explicit HybridNitroTextViewSpec(): HybridObject(TAG) { }
|
|
53
|
+
|
|
54
|
+
// Destructor
|
|
55
|
+
~HybridNitroTextViewSpec() override = default;
|
|
56
|
+
|
|
57
|
+
public:
|
|
58
|
+
// Properties
|
|
59
|
+
virtual std::string getText() = 0;
|
|
60
|
+
virtual void setText(const std::string& text) = 0;
|
|
61
|
+
virtual std::optional<double> getFontSize() = 0;
|
|
62
|
+
virtual void setFontSize(std::optional<double> fontSize) = 0;
|
|
63
|
+
virtual std::optional<double> getFontWeight() = 0;
|
|
64
|
+
virtual void setFontWeight(std::optional<double> fontWeight) = 0;
|
|
65
|
+
virtual std::optional<std::string> getFontFamily() = 0;
|
|
66
|
+
virtual void setFontFamily(const std::optional<std::string>& fontFamily) = 0;
|
|
67
|
+
virtual std::optional<double> getColor() = 0;
|
|
68
|
+
virtual void setColor(std::optional<double> color) = 0;
|
|
69
|
+
virtual std::optional<double> getLetterSpacing() = 0;
|
|
70
|
+
virtual void setLetterSpacing(std::optional<double> letterSpacing) = 0;
|
|
71
|
+
virtual std::optional<NitroNumberTextAlign> getTextAlign() = 0;
|
|
72
|
+
virtual void setTextAlign(std::optional<NitroNumberTextAlign> textAlign) = 0;
|
|
73
|
+
virtual std::optional<bool> getRightToLeft() = 0;
|
|
74
|
+
virtual void setRightToLeft(std::optional<bool> rightToLeft) = 0;
|
|
75
|
+
virtual std::optional<double> getDuration() = 0;
|
|
76
|
+
virtual void setDuration(std::optional<double> duration) = 0;
|
|
77
|
+
virtual std::optional<NitroInputEasing> getEasing() = 0;
|
|
78
|
+
virtual void setEasing(std::optional<NitroInputEasing> easing) = 0;
|
|
79
|
+
virtual std::optional<double> getBounce() = 0;
|
|
80
|
+
virtual void setBounce(std::optional<double> bounce) = 0;
|
|
81
|
+
virtual std::optional<NitroInputEffect> getEffect() = 0;
|
|
82
|
+
virtual void setEffect(std::optional<NitroInputEffect> effect) = 0;
|
|
83
|
+
virtual std::optional<bool> getRespectReduceMotion() = 0;
|
|
84
|
+
virtual void setRespectReduceMotion(std::optional<bool> respectReduceMotion) = 0;
|
|
85
|
+
virtual std::optional<bool> getLoading() = 0;
|
|
86
|
+
virtual void setLoading(std::optional<bool> loading) = 0;
|
|
87
|
+
virtual std::optional<double> getShimmerColor() = 0;
|
|
88
|
+
virtual void setShimmerColor(std::optional<double> shimmerColor) = 0;
|
|
89
|
+
virtual std::optional<double> getShimmerDuration() = 0;
|
|
90
|
+
virtual void setShimmerDuration(std::optional<double> shimmerDuration) = 0;
|
|
91
|
+
virtual std::optional<double> getShimmerAngle() = 0;
|
|
92
|
+
virtual void setShimmerAngle(std::optional<double> shimmerAngle) = 0;
|
|
93
|
+
virtual std::optional<double> getShimmerWidth() = 0;
|
|
94
|
+
virtual void setShimmerWidth(std::optional<double> shimmerWidth) = 0;
|
|
95
|
+
virtual std::optional<double> getShimmerBaseColor() = 0;
|
|
96
|
+
virtual void setShimmerBaseColor(std::optional<double> shimmerBaseColor) = 0;
|
|
97
|
+
virtual std::optional<NitroNumberShimmerDirection> getShimmerDirection() = 0;
|
|
98
|
+
virtual void setShimmerDirection(std::optional<NitroNumberShimmerDirection> shimmerDirection) = 0;
|
|
99
|
+
virtual std::optional<double> getShimmerDelay() = 0;
|
|
100
|
+
virtual void setShimmerDelay(std::optional<double> shimmerDelay) = 0;
|
|
101
|
+
|
|
102
|
+
public:
|
|
103
|
+
// Methods
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
protected:
|
|
107
|
+
// Hybrid Setup
|
|
108
|
+
void loadHybridMethods() override;
|
|
109
|
+
|
|
110
|
+
protected:
|
|
111
|
+
// Tag for logging
|
|
112
|
+
static constexpr auto TAG = "NitroTextView";
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
} // namespace margelo::nitro::nitroinput
|