react-native-nitro-input 0.3.8 → 0.4.1
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 +105 -0
- package/README.md +6 -1
- package/android/src/main/java/com/margelo/nitro/nitroinput/DigitSlots.kt +143 -0
- package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroInputMeasure.kt +52 -0
- package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroInputView.kt +80 -80
- package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroNumberView.kt +18 -18
- package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroTextView.kt +14 -14
- package/android/src/main/java/com/margelo/nitro/nitroinput/InputFonts.kt +244 -0
- package/android/src/main/java/com/margelo/nitro/nitroinput/InputSizing.kt +404 -0
- package/android/src/main/java/com/margelo/nitro/nitroinput/NitroInputView.kt +168 -338
- package/android/src/main/java/com/margelo/nitro/nitroinput/NitroNumberView.kt +178 -30
- package/ios/HybridNitroInputView.swift +73 -75
- package/ios/HybridNitroNumberView.swift +18 -18
- package/ios/HybridNitroTextView.swift +14 -14
- package/ios/InputSizing.swift +628 -0
- package/ios/NitroInputView.swift +180 -209
- package/ios/NitroNumberView.swift +98 -23
- package/lib/commonjs/nitrogen/generated/shared/json/NitroInputViewConfig.json +14 -8
- package/lib/commonjs/nitrogen/generated/shared/json/NitroNumberViewConfig.json +6 -6
- package/lib/commonjs/nitrogen/generated/shared/json/NitroTextViewConfig.json +6 -6
- package/lib/commonjs/src/NitroInput.js +166 -23
- package/lib/commonjs/src/NitroNumber.js +1 -1
- package/lib/commonjs/src/NitroText.js +6 -6
- package/lib/commonjs/src/specs/NitroInputMeasure.nitro.js +2 -0
- package/lib/module/nitrogen/generated/shared/json/NitroInputViewConfig.json +14 -8
- package/lib/module/nitrogen/generated/shared/json/NitroNumberViewConfig.json +6 -6
- package/lib/module/nitrogen/generated/shared/json/NitroTextViewConfig.json +6 -6
- package/lib/module/src/NitroInput.js +167 -24
- package/lib/module/src/NitroNumber.js +1 -1
- package/lib/module/src/NitroText.js +6 -6
- package/lib/module/src/specs/NitroInputMeasure.nitro.js +1 -0
- package/lib/typescript/src/NitroInput.d.ts +20 -16
- package/lib/typescript/src/specs/NitroInput.nitro.d.ts +21 -8
- package/lib/typescript/src/specs/NitroInputMeasure.nitro.d.ts +69 -0
- package/lib/typescript/src/specs/NitroNumber.nitro.d.ts +6 -6
- package/lib/typescript/src/specs/NitroText.nitro.d.ts +6 -6
- package/nitro.json +10 -0
- package/nitrogen/generated/android/NitroInput+autolinking.cmake +2 -0
- package/nitrogen/generated/android/NitroInputOnLoad.cpp +16 -0
- package/nitrogen/generated/android/c++/JHybridNitroInputMeasureSpec.cpp +93 -0
- package/nitrogen/generated/android/c++/JHybridNitroInputMeasureSpec.hpp +63 -0
- package/nitrogen/generated/android/c++/JHybridNitroInputViewSpec.cpp +94 -40
- package/nitrogen/generated/android/c++/JHybridNitroInputViewSpec.hpp +28 -16
- package/nitrogen/generated/android/c++/JHybridNitroNumberViewSpec.cpp +30 -30
- package/nitrogen/generated/android/c++/JHybridNitroNumberViewSpec.hpp +12 -12
- package/nitrogen/generated/android/c++/JHybridNitroTextViewSpec.cpp +30 -30
- package/nitrogen/generated/android/c++/JHybridNitroTextViewSpec.hpp +12 -12
- package/nitrogen/generated/android/c++/JNitroInputSize.hpp +61 -0
- package/nitrogen/generated/android/c++/JNitroInputSizing.hpp +292 -0
- package/nitrogen/generated/android/c++/views/JHybridNitroInputViewStateUpdater.cpp +54 -24
- package/nitrogen/generated/android/c++/views/JHybridNitroNumberViewStateUpdater.cpp +18 -18
- package/nitrogen/generated/android/c++/views/JHybridNitroTextViewStateUpdater.cpp +18 -18
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroInputMeasureSpec.kt +56 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroInputViewSpec.kt +44 -8
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroNumberViewSpec.kt +6 -6
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroTextViewSpec.kt +6 -6
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NitroInputSize.kt +56 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NitroInputSizing.kt +256 -0
- package/nitrogen/generated/ios/NitroInput-Swift-Cxx-Bridge.cpp +17 -0
- package/nitrogen/generated/ios/NitroInput-Swift-Cxx-Bridge.hpp +29 -0
- package/nitrogen/generated/ios/NitroInput-Swift-Cxx-Umbrella.hpp +11 -0
- package/nitrogen/generated/ios/NitroInputAutolinking.mm +8 -0
- package/nitrogen/generated/ios/NitroInputAutolinking.swift +12 -0
- package/nitrogen/generated/ios/c++/HybridNitroInputMeasureSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridNitroInputMeasureSpecSwift.hpp +112 -0
- package/nitrogen/generated/ios/c++/HybridNitroInputViewSpecSwift.hpp +68 -32
- package/nitrogen/generated/ios/c++/HybridNitroNumberViewSpecSwift.hpp +24 -24
- package/nitrogen/generated/ios/c++/HybridNitroTextViewSpecSwift.hpp +24 -24
- package/nitrogen/generated/ios/c++/views/HybridNitroInputViewComponent.mm +68 -32
- package/nitrogen/generated/ios/c++/views/HybridNitroNumberViewComponent.mm +24 -24
- package/nitrogen/generated/ios/c++/views/HybridNitroTextViewComponent.mm +24 -24
- package/nitrogen/generated/ios/swift/HybridNitroInputMeasureSpec.swift +55 -0
- package/nitrogen/generated/ios/swift/HybridNitroInputMeasureSpec_cxx.swift +138 -0
- package/nitrogen/generated/ios/swift/HybridNitroInputViewSpec.swift +14 -8
- package/nitrogen/generated/ios/swift/HybridNitroInputViewSpec_cxx.swift +90 -24
- package/nitrogen/generated/ios/swift/HybridNitroNumberViewSpec.swift +6 -6
- package/nitrogen/generated/ios/swift/HybridNitroNumberViewSpec_cxx.swift +18 -18
- package/nitrogen/generated/ios/swift/HybridNitroTextViewSpec.swift +6 -6
- package/nitrogen/generated/ios/swift/HybridNitroTextViewSpec_cxx.swift +18 -18
- package/nitrogen/generated/ios/swift/NitroInputSize.swift +34 -0
- package/nitrogen/generated/ios/swift/NitroInputSizing.swift +252 -0
- package/nitrogen/generated/shared/c++/HybridNitroInputMeasureSpec.cpp +21 -0
- package/nitrogen/generated/shared/c++/HybridNitroInputMeasureSpec.hpp +66 -0
- package/nitrogen/generated/shared/c++/HybridNitroInputViewSpec.cpp +28 -16
- package/nitrogen/generated/shared/c++/HybridNitroInputViewSpec.hpp +28 -16
- package/nitrogen/generated/shared/c++/HybridNitroNumberViewSpec.cpp +12 -12
- package/nitrogen/generated/shared/c++/HybridNitroNumberViewSpec.hpp +12 -12
- package/nitrogen/generated/shared/c++/HybridNitroTextViewSpec.cpp +12 -12
- package/nitrogen/generated/shared/c++/HybridNitroTextViewSpec.hpp +12 -12
- package/nitrogen/generated/shared/c++/NitroInputSize.hpp +87 -0
- package/nitrogen/generated/shared/c++/NitroInputSizing.hpp +271 -0
- package/nitrogen/generated/shared/c++/views/HybridNitroInputViewComponent.cpp +28 -16
- package/nitrogen/generated/shared/c++/views/HybridNitroInputViewComponent.hpp +42 -24
- package/nitrogen/generated/shared/c++/views/HybridNitroNumberViewComponent.cpp +12 -12
- package/nitrogen/generated/shared/c++/views/HybridNitroNumberViewComponent.hpp +18 -18
- package/nitrogen/generated/shared/c++/views/HybridNitroTextViewComponent.cpp +12 -12
- package/nitrogen/generated/shared/c++/views/HybridNitroTextViewComponent.hpp +18 -18
- package/nitrogen/generated/shared/json/NitroInputViewConfig.json +14 -8
- package/nitrogen/generated/shared/json/NitroNumberViewConfig.json +6 -6
- package/nitrogen/generated/shared/json/NitroTextViewConfig.json +6 -6
- package/package.json +4 -2
- package/src/NitroInput.tsx +215 -64
- package/src/NitroNumber.tsx +6 -6
- package/src/NitroText.tsx +6 -6
- package/src/specs/NitroInput.nitro.ts +21 -8
- package/src/specs/NitroInputMeasure.nitro.ts +78 -0
- package/src/specs/NitroNumber.nitro.ts +6 -6
- package/src/specs/NitroText.nitro.ts +6 -6
|
@@ -15,16 +15,16 @@ import type { NitroInputEasing, NitroInputEffect } from './NitroInput.nitro';
|
|
|
15
15
|
export interface NitroTextProps extends HybridViewProps {
|
|
16
16
|
text: string;
|
|
17
17
|
/** In points, already scaled for the system text size when the wrapper was asked to. Default 17. */
|
|
18
|
-
|
|
18
|
+
textSize?: number;
|
|
19
19
|
/** Numeric weight, 100–900. Default 400. */
|
|
20
|
-
|
|
20
|
+
textWeight?: number;
|
|
21
21
|
/** Default: the system font. */
|
|
22
|
-
|
|
22
|
+
textFamily?: string;
|
|
23
23
|
/** Processed ARGB. Default: the platform label colour. */
|
|
24
|
-
|
|
24
|
+
textColor?: number;
|
|
25
25
|
/** Points after every character. */
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
textLetterSpacing?: number;
|
|
27
|
+
textAlignment?: NitroNumberTextAlign;
|
|
28
28
|
rightToLeft?: boolean;
|
|
29
29
|
/** Of a morph, in ms. Default 400. */
|
|
30
30
|
duration?: number;
|
package/nitro.json
CHANGED
|
@@ -74,6 +74,16 @@
|
|
|
74
74
|
"language": "kotlin",
|
|
75
75
|
"implementationClassName": "HybridNitroTextMeasure"
|
|
76
76
|
}
|
|
77
|
+
},
|
|
78
|
+
"NitroInputMeasure": {
|
|
79
|
+
"ios": {
|
|
80
|
+
"language": "swift",
|
|
81
|
+
"implementationClassName": "HybridNitroInputMeasure"
|
|
82
|
+
},
|
|
83
|
+
"android": {
|
|
84
|
+
"language": "kotlin",
|
|
85
|
+
"implementationClassName": "HybridNitroInputMeasure"
|
|
86
|
+
}
|
|
77
87
|
}
|
|
78
88
|
},
|
|
79
89
|
"ignorePaths": [
|
|
@@ -35,6 +35,7 @@ target_sources(
|
|
|
35
35
|
# Shared Nitrogen C++ sources
|
|
36
36
|
../nitrogen/generated/shared/c++/HybridNitroInputViewSpec.cpp
|
|
37
37
|
../nitrogen/generated/shared/c++/views/HybridNitroInputViewComponent.cpp
|
|
38
|
+
../nitrogen/generated/shared/c++/HybridNitroInputMeasureSpec.cpp
|
|
38
39
|
../nitrogen/generated/shared/c++/HybridNitroInputWorkletsSpec.cpp
|
|
39
40
|
../nitrogen/generated/shared/c++/HybridNitroNumberViewSpec.cpp
|
|
40
41
|
../nitrogen/generated/shared/c++/views/HybridNitroNumberViewComponent.cpp
|
|
@@ -48,6 +49,7 @@ target_sources(
|
|
|
48
49
|
# Android-specific Nitrogen C++ sources
|
|
49
50
|
../nitrogen/generated/android/c++/JHybridNitroInputViewSpec.cpp
|
|
50
51
|
../nitrogen/generated/android/c++/views/JHybridNitroInputViewStateUpdater.cpp
|
|
52
|
+
../nitrogen/generated/android/c++/JHybridNitroInputMeasureSpec.cpp
|
|
51
53
|
../nitrogen/generated/android/c++/JHybridNitroNumberViewSpec.cpp
|
|
52
54
|
../nitrogen/generated/android/c++/views/JHybridNitroNumberViewStateUpdater.cpp
|
|
53
55
|
../nitrogen/generated/android/c++/JHybridNitroTextMeasureSpec.cpp
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
#include "JFunc_void_std__string.hpp"
|
|
24
24
|
#include "JFunc_void_double_double.hpp"
|
|
25
25
|
#include "views/JHybridNitroInputViewStateUpdater.hpp"
|
|
26
|
+
#include "JHybridNitroInputMeasureSpec.hpp"
|
|
26
27
|
#include "JHybridNitroNumberViewSpec.hpp"
|
|
27
28
|
#include "JFunc_void.hpp"
|
|
28
29
|
#include "views/JHybridNitroNumberViewStateUpdater.hpp"
|
|
@@ -83,6 +84,14 @@ struct JHybridNitroTextMeasureSpecImpl: public jni::JavaClass<JHybridNitroTextMe
|
|
|
83
84
|
return javaPart->getJHybridNitroTextMeasureSpec();
|
|
84
85
|
}
|
|
85
86
|
};
|
|
87
|
+
struct JHybridNitroInputMeasureSpecImpl: public jni::JavaClass<JHybridNitroInputMeasureSpecImpl, JHybridNitroInputMeasureSpec::JavaPart> {
|
|
88
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitroinput/HybridNitroInputMeasure;";
|
|
89
|
+
static std::shared_ptr<JHybridNitroInputMeasureSpec> create() {
|
|
90
|
+
static const auto constructorFn = javaClassStatic()->getConstructor<JHybridNitroInputMeasureSpecImpl::javaobject()>();
|
|
91
|
+
jni::local_ref<JHybridNitroInputMeasureSpec::JavaPart> javaPart = javaClassStatic()->newObject(constructorFn);
|
|
92
|
+
return javaPart->getJHybridNitroInputMeasureSpec();
|
|
93
|
+
}
|
|
94
|
+
};
|
|
86
95
|
|
|
87
96
|
void registerAllNatives() {
|
|
88
97
|
using namespace margelo::nitro;
|
|
@@ -97,6 +106,7 @@ void registerAllNatives() {
|
|
|
97
106
|
margelo::nitro::nitroinput::JFunc_void_std__string_cxx::registerNatives();
|
|
98
107
|
margelo::nitro::nitroinput::JFunc_void_double_double_cxx::registerNatives();
|
|
99
108
|
margelo::nitro::nitroinput::views::JHybridNitroInputViewStateUpdater::registerNatives();
|
|
109
|
+
margelo::nitro::nitroinput::JHybridNitroInputMeasureSpec::CxxPart::registerNatives();
|
|
100
110
|
margelo::nitro::nitroinput::JHybridNitroNumberViewSpec::CxxPart::registerNatives();
|
|
101
111
|
margelo::nitro::nitroinput::JFunc_void_cxx::registerNatives();
|
|
102
112
|
margelo::nitro::nitroinput::views::JHybridNitroNumberViewStateUpdater::registerNatives();
|
|
@@ -155,6 +165,12 @@ void registerAllNatives() {
|
|
|
155
165
|
return JHybridNitroTextMeasureSpecImpl::create();
|
|
156
166
|
}
|
|
157
167
|
);
|
|
168
|
+
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
169
|
+
"NitroInputMeasure",
|
|
170
|
+
[]() -> std::shared_ptr<HybridObject> {
|
|
171
|
+
return JHybridNitroInputMeasureSpecImpl::create();
|
|
172
|
+
}
|
|
173
|
+
);
|
|
158
174
|
}
|
|
159
175
|
|
|
160
176
|
} // namespace margelo::nitro::nitroinput
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JHybridNitroInputMeasureSpec.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 "JHybridNitroInputMeasureSpec.hpp"
|
|
9
|
+
|
|
10
|
+
// Forward declaration of `NitroInputSize` to properly resolve imports.
|
|
11
|
+
namespace margelo::nitro::nitroinput { struct NitroInputSize; }
|
|
12
|
+
// Forward declaration of `NitroInputSizing` to properly resolve imports.
|
|
13
|
+
namespace margelo::nitro::nitroinput { struct NitroInputSizing; }
|
|
14
|
+
// Forward declaration of `NitroInputMode` to properly resolve imports.
|
|
15
|
+
namespace margelo::nitro::nitroinput { enum class NitroInputMode; }
|
|
16
|
+
// Forward declaration of `NitroInputSignPlacement` to properly resolve imports.
|
|
17
|
+
namespace margelo::nitro::nitroinput { enum class NitroInputSignPlacement; }
|
|
18
|
+
// Forward declaration of `NitroInputNotation` to properly resolve imports.
|
|
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; }
|
|
26
|
+
// Forward declaration of `NitroInputVariant` to properly resolve imports.
|
|
27
|
+
namespace margelo::nitro::nitroinput { enum class NitroInputVariant; }
|
|
28
|
+
// Forward declaration of `NitroInputLabelBehavior` to properly resolve imports.
|
|
29
|
+
namespace margelo::nitro::nitroinput { enum class NitroInputLabelBehavior; }
|
|
30
|
+
|
|
31
|
+
#include "NitroInputSize.hpp"
|
|
32
|
+
#include "JNitroInputSize.hpp"
|
|
33
|
+
#include "NitroInputSizing.hpp"
|
|
34
|
+
#include "JNitroInputSizing.hpp"
|
|
35
|
+
#include <string>
|
|
36
|
+
#include "NitroInputMode.hpp"
|
|
37
|
+
#include "JNitroInputMode.hpp"
|
|
38
|
+
#include "NitroInputSignPlacement.hpp"
|
|
39
|
+
#include "JNitroInputSignPlacement.hpp"
|
|
40
|
+
#include "NitroInputNotation.hpp"
|
|
41
|
+
#include <vector>
|
|
42
|
+
#include "JNitroInputNotation.hpp"
|
|
43
|
+
#include "NitroInputMaskAffinity.hpp"
|
|
44
|
+
#include "JNitroInputMaskAffinity.hpp"
|
|
45
|
+
#include "NitroInputTextCase.hpp"
|
|
46
|
+
#include "JNitroInputTextCase.hpp"
|
|
47
|
+
#include "NitroInputCharacterMapping.hpp"
|
|
48
|
+
#include "JNitroInputCharacterMapping.hpp"
|
|
49
|
+
#include "NitroInputVariant.hpp"
|
|
50
|
+
#include "JNitroInputVariant.hpp"
|
|
51
|
+
#include "NitroInputLabelBehavior.hpp"
|
|
52
|
+
#include "JNitroInputLabelBehavior.hpp"
|
|
53
|
+
|
|
54
|
+
namespace margelo::nitro::nitroinput {
|
|
55
|
+
|
|
56
|
+
std::shared_ptr<JHybridNitroInputMeasureSpec> JHybridNitroInputMeasureSpec::JavaPart::getJHybridNitroInputMeasureSpec() {
|
|
57
|
+
auto hybridObject = JHybridObject::JavaPart::getJHybridObject();
|
|
58
|
+
auto castHybridObject = std::dynamic_pointer_cast<JHybridNitroInputMeasureSpec>(hybridObject);
|
|
59
|
+
if (castHybridObject == nullptr) [[unlikely]] {
|
|
60
|
+
throw std::runtime_error("Failed to downcast JHybridObject to JHybridNitroInputMeasureSpec!");
|
|
61
|
+
}
|
|
62
|
+
return castHybridObject;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
jni::local_ref<JHybridNitroInputMeasureSpec::CxxPart::jhybriddata> JHybridNitroInputMeasureSpec::CxxPart::initHybrid(jni::alias_ref<jhybridobject> jThis) {
|
|
66
|
+
return makeCxxInstance(jThis);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
std::shared_ptr<JHybridObject> JHybridNitroInputMeasureSpec::CxxPart::createHybridObject(const jni::local_ref<JHybridObject::JavaPart>& javaPart) {
|
|
70
|
+
auto castJavaPart = jni::dynamic_ref_cast<JHybridNitroInputMeasureSpec::JavaPart>(javaPart);
|
|
71
|
+
if (castJavaPart == nullptr) [[unlikely]] {
|
|
72
|
+
throw std::runtime_error("Failed to cast JHybridObject::JavaPart to JHybridNitroInputMeasureSpec::JavaPart!");
|
|
73
|
+
}
|
|
74
|
+
return std::make_shared<JHybridNitroInputMeasureSpec>(castJavaPart);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
void JHybridNitroInputMeasureSpec::CxxPart::registerNatives() {
|
|
78
|
+
registerHybrid({
|
|
79
|
+
makeNativeMethod("initHybrid", JHybridNitroInputMeasureSpec::CxxPart::initHybrid),
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// Properties
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
// Methods
|
|
87
|
+
NitroInputSize JHybridNitroInputMeasureSpec::measure(const NitroInputSizing& sizing) {
|
|
88
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JNitroInputSize>(jni::alias_ref<JNitroInputSizing> /* sizing */)>("measure");
|
|
89
|
+
auto __result = method(_javaPart, JNitroInputSizing::fromCpp(sizing));
|
|
90
|
+
return __result->toCpp();
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
} // namespace margelo::nitro::nitroinput
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridNitroInputMeasureSpec.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
|
+
#include <NitroModules/JHybridObject.hpp>
|
|
11
|
+
#include <fbjni/fbjni.h>
|
|
12
|
+
#include "HybridNitroInputMeasureSpec.hpp"
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
namespace margelo::nitro::nitroinput {
|
|
18
|
+
|
|
19
|
+
using namespace facebook;
|
|
20
|
+
|
|
21
|
+
class JHybridNitroInputMeasureSpec: public virtual HybridNitroInputMeasureSpec, public virtual JHybridObject {
|
|
22
|
+
public:
|
|
23
|
+
struct JavaPart: public jni::JavaClass<JavaPart, JHybridObject::JavaPart> {
|
|
24
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitroinput/HybridNitroInputMeasureSpec;";
|
|
25
|
+
std::shared_ptr<JHybridNitroInputMeasureSpec> getJHybridNitroInputMeasureSpec();
|
|
26
|
+
};
|
|
27
|
+
struct CxxPart: public jni::HybridClass<CxxPart, JHybridObject::CxxPart> {
|
|
28
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitroinput/HybridNitroInputMeasureSpec$CxxPart;";
|
|
29
|
+
static jni::local_ref<jhybriddata> initHybrid(jni::alias_ref<jhybridobject> jThis);
|
|
30
|
+
static void registerNatives();
|
|
31
|
+
using HybridBase::HybridBase;
|
|
32
|
+
protected:
|
|
33
|
+
std::shared_ptr<JHybridObject> createHybridObject(const jni::local_ref<JHybridObject::JavaPart>& javaPart) override;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
public:
|
|
37
|
+
explicit JHybridNitroInputMeasureSpec(const jni::local_ref<JHybridNitroInputMeasureSpec::JavaPart>& javaPart):
|
|
38
|
+
HybridObject(HybridNitroInputMeasureSpec::TAG),
|
|
39
|
+
JHybridObject(javaPart),
|
|
40
|
+
_javaPart(jni::make_global(javaPart)) {}
|
|
41
|
+
~JHybridNitroInputMeasureSpec() override {
|
|
42
|
+
// Hermes GC can destroy JS objects on a non-JNI Thread.
|
|
43
|
+
jni::ThreadScope::WithClassLoader([&] { _javaPart.reset(); });
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
public:
|
|
47
|
+
inline const jni::global_ref<JHybridNitroInputMeasureSpec::JavaPart>& getJavaPart() const noexcept {
|
|
48
|
+
return _javaPart;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
public:
|
|
52
|
+
// Properties
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
public:
|
|
56
|
+
// Methods
|
|
57
|
+
NitroInputSize measure(const NitroInputSizing& sizing) override;
|
|
58
|
+
|
|
59
|
+
private:
|
|
60
|
+
jni::global_ref<JHybridNitroInputMeasureSpec::JavaPart> _javaPart;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
} // namespace margelo::nitro::nitroinput
|
|
@@ -500,14 +500,32 @@ namespace margelo::nitro::nitroinput {
|
|
|
500
500
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JNitroInputAffixAlign> /* suffixAlign */)>("setSuffixAlign");
|
|
501
501
|
method(_javaPart, JNitroInputAffixAlign::fromCpp(suffixAlign));
|
|
502
502
|
}
|
|
503
|
-
double JHybridNitroInputViewSpec::
|
|
504
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("
|
|
503
|
+
double JHybridNitroInputViewSpec::getTextLetterSpacing() {
|
|
504
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getTextLetterSpacing");
|
|
505
505
|
auto __result = method(_javaPart);
|
|
506
506
|
return __result;
|
|
507
507
|
}
|
|
508
|
-
void JHybridNitroInputViewSpec::
|
|
509
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<void(double /*
|
|
510
|
-
method(_javaPart,
|
|
508
|
+
void JHybridNitroInputViewSpec::setTextLetterSpacing(double textLetterSpacing) {
|
|
509
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(double /* textLetterSpacing */)>("setTextLetterSpacing");
|
|
510
|
+
method(_javaPart, textLetterSpacing);
|
|
511
|
+
}
|
|
512
|
+
bool JHybridNitroInputViewSpec::getTabularNums() {
|
|
513
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<jboolean()>("getTabularNums");
|
|
514
|
+
auto __result = method(_javaPart);
|
|
515
|
+
return static_cast<bool>(__result);
|
|
516
|
+
}
|
|
517
|
+
void JHybridNitroInputViewSpec::setTabularNums(bool tabularNums) {
|
|
518
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jboolean /* tabularNums */)>("setTabularNums");
|
|
519
|
+
method(_javaPart, tabularNums);
|
|
520
|
+
}
|
|
521
|
+
bool JHybridNitroInputViewSpec::getSlotDigits() {
|
|
522
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<jboolean()>("getSlotDigits");
|
|
523
|
+
auto __result = method(_javaPart);
|
|
524
|
+
return static_cast<bool>(__result);
|
|
525
|
+
}
|
|
526
|
+
void JHybridNitroInputViewSpec::setSlotDigits(bool slotDigits) {
|
|
527
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jboolean /* slotDigits */)>("setSlotDigits");
|
|
528
|
+
method(_javaPart, slotDigits);
|
|
511
529
|
}
|
|
512
530
|
double JHybridNitroInputViewSpec::getPrefixSpacing() {
|
|
513
531
|
static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getPrefixSpacing");
|
|
@@ -599,59 +617,59 @@ namespace margelo::nitro::nitroinput {
|
|
|
599
617
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JNitroInputEffect> /* effect */)>("setEffect");
|
|
600
618
|
method(_javaPart, JNitroInputEffect::fromCpp(effect));
|
|
601
619
|
}
|
|
602
|
-
double JHybridNitroInputViewSpec::
|
|
603
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("
|
|
620
|
+
double JHybridNitroInputViewSpec::getTextSize() {
|
|
621
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getTextSize");
|
|
604
622
|
auto __result = method(_javaPart);
|
|
605
623
|
return __result;
|
|
606
624
|
}
|
|
607
|
-
void JHybridNitroInputViewSpec::
|
|
608
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<void(double /*
|
|
609
|
-
method(_javaPart,
|
|
625
|
+
void JHybridNitroInputViewSpec::setTextSize(double textSize) {
|
|
626
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(double /* textSize */)>("setTextSize");
|
|
627
|
+
method(_javaPart, textSize);
|
|
610
628
|
}
|
|
611
|
-
double JHybridNitroInputViewSpec::
|
|
612
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("
|
|
629
|
+
double JHybridNitroInputViewSpec::getTextLineHeight() {
|
|
630
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getTextLineHeight");
|
|
613
631
|
auto __result = method(_javaPart);
|
|
614
632
|
return __result;
|
|
615
633
|
}
|
|
616
|
-
void JHybridNitroInputViewSpec::
|
|
617
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<void(double /*
|
|
618
|
-
method(_javaPart,
|
|
634
|
+
void JHybridNitroInputViewSpec::setTextLineHeight(double textLineHeight) {
|
|
635
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(double /* textLineHeight */)>("setTextLineHeight");
|
|
636
|
+
method(_javaPart, textLineHeight);
|
|
619
637
|
}
|
|
620
|
-
double JHybridNitroInputViewSpec::
|
|
621
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("
|
|
638
|
+
double JHybridNitroInputViewSpec::getTextWeight() {
|
|
639
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getTextWeight");
|
|
622
640
|
auto __result = method(_javaPart);
|
|
623
641
|
return __result;
|
|
624
642
|
}
|
|
625
|
-
void JHybridNitroInputViewSpec::
|
|
626
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<void(double /*
|
|
627
|
-
method(_javaPart,
|
|
643
|
+
void JHybridNitroInputViewSpec::setTextWeight(double textWeight) {
|
|
644
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(double /* textWeight */)>("setTextWeight");
|
|
645
|
+
method(_javaPart, textWeight);
|
|
628
646
|
}
|
|
629
|
-
std::string JHybridNitroInputViewSpec::
|
|
630
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("
|
|
647
|
+
std::string JHybridNitroInputViewSpec::getTextFamily() {
|
|
648
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getTextFamily");
|
|
631
649
|
auto __result = method(_javaPart);
|
|
632
650
|
return __result->toStdString();
|
|
633
651
|
}
|
|
634
|
-
void JHybridNitroInputViewSpec::
|
|
635
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<jni::JString> /*
|
|
636
|
-
method(_javaPart, jni::make_jstring(
|
|
652
|
+
void JHybridNitroInputViewSpec::setTextFamily(const std::string& textFamily) {
|
|
653
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<jni::JString> /* textFamily */)>("setTextFamily");
|
|
654
|
+
method(_javaPart, jni::make_jstring(textFamily));
|
|
637
655
|
}
|
|
638
|
-
double JHybridNitroInputViewSpec::
|
|
639
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("
|
|
656
|
+
double JHybridNitroInputViewSpec::getTextColor() {
|
|
657
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getTextColor");
|
|
640
658
|
auto __result = method(_javaPart);
|
|
641
659
|
return __result;
|
|
642
660
|
}
|
|
643
|
-
void JHybridNitroInputViewSpec::
|
|
644
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<void(double /*
|
|
645
|
-
method(_javaPart,
|
|
661
|
+
void JHybridNitroInputViewSpec::setTextColor(double textColor) {
|
|
662
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(double /* textColor */)>("setTextColor");
|
|
663
|
+
method(_javaPart, textColor);
|
|
646
664
|
}
|
|
647
|
-
NitroInputTextAlign JHybridNitroInputViewSpec::
|
|
648
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JNitroInputTextAlign>()>("
|
|
665
|
+
NitroInputTextAlign JHybridNitroInputViewSpec::getTextAlignment() {
|
|
666
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JNitroInputTextAlign>()>("getTextAlignment");
|
|
649
667
|
auto __result = method(_javaPart);
|
|
650
668
|
return __result->toCpp();
|
|
651
669
|
}
|
|
652
|
-
void JHybridNitroInputViewSpec::
|
|
653
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JNitroInputTextAlign> /*
|
|
654
|
-
method(_javaPart, JNitroInputTextAlign::fromCpp(
|
|
670
|
+
void JHybridNitroInputViewSpec::setTextAlignment(NitroInputTextAlign textAlignment) {
|
|
671
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JNitroInputTextAlign> /* textAlignment */)>("setTextAlignment");
|
|
672
|
+
method(_javaPart, JNitroInputTextAlign::fromCpp(textAlignment));
|
|
655
673
|
}
|
|
656
674
|
bool JHybridNitroInputViewSpec::getRightToLeft() {
|
|
657
675
|
static const auto method = _javaPart->javaClassStatic()->getMethod<jboolean()>("getRightToLeft");
|
|
@@ -788,14 +806,50 @@ namespace margelo::nitro::nitroinput {
|
|
|
788
806
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(double /* numberOfLines */)>("setNumberOfLines");
|
|
789
807
|
method(_javaPart, numberOfLines);
|
|
790
808
|
}
|
|
791
|
-
NitroInputTextAlignVertical JHybridNitroInputViewSpec::
|
|
792
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JNitroInputTextAlignVertical>()>("
|
|
809
|
+
NitroInputTextAlignVertical JHybridNitroInputViewSpec::getTextVerticalAlignment() {
|
|
810
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JNitroInputTextAlignVertical>()>("getTextVerticalAlignment");
|
|
793
811
|
auto __result = method(_javaPart);
|
|
794
812
|
return __result->toCpp();
|
|
795
813
|
}
|
|
796
|
-
void JHybridNitroInputViewSpec::
|
|
797
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JNitroInputTextAlignVertical> /*
|
|
798
|
-
method(_javaPart, JNitroInputTextAlignVertical::fromCpp(
|
|
814
|
+
void JHybridNitroInputViewSpec::setTextVerticalAlignment(NitroInputTextAlignVertical textVerticalAlignment) {
|
|
815
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JNitroInputTextAlignVertical> /* textVerticalAlignment */)>("setTextVerticalAlignment");
|
|
816
|
+
method(_javaPart, JNitroInputTextAlignVertical::fromCpp(textVerticalAlignment));
|
|
817
|
+
}
|
|
818
|
+
double JHybridNitroInputViewSpec::getTextInsetLeft() {
|
|
819
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getTextInsetLeft");
|
|
820
|
+
auto __result = method(_javaPart);
|
|
821
|
+
return __result;
|
|
822
|
+
}
|
|
823
|
+
void JHybridNitroInputViewSpec::setTextInsetLeft(double textInsetLeft) {
|
|
824
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(double /* textInsetLeft */)>("setTextInsetLeft");
|
|
825
|
+
method(_javaPart, textInsetLeft);
|
|
826
|
+
}
|
|
827
|
+
double JHybridNitroInputViewSpec::getTextInsetTop() {
|
|
828
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getTextInsetTop");
|
|
829
|
+
auto __result = method(_javaPart);
|
|
830
|
+
return __result;
|
|
831
|
+
}
|
|
832
|
+
void JHybridNitroInputViewSpec::setTextInsetTop(double textInsetTop) {
|
|
833
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(double /* textInsetTop */)>("setTextInsetTop");
|
|
834
|
+
method(_javaPart, textInsetTop);
|
|
835
|
+
}
|
|
836
|
+
double JHybridNitroInputViewSpec::getTextInsetRight() {
|
|
837
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getTextInsetRight");
|
|
838
|
+
auto __result = method(_javaPart);
|
|
839
|
+
return __result;
|
|
840
|
+
}
|
|
841
|
+
void JHybridNitroInputViewSpec::setTextInsetRight(double textInsetRight) {
|
|
842
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(double /* textInsetRight */)>("setTextInsetRight");
|
|
843
|
+
method(_javaPart, textInsetRight);
|
|
844
|
+
}
|
|
845
|
+
double JHybridNitroInputViewSpec::getTextInsetBottom() {
|
|
846
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getTextInsetBottom");
|
|
847
|
+
auto __result = method(_javaPart);
|
|
848
|
+
return __result;
|
|
849
|
+
}
|
|
850
|
+
void JHybridNitroInputViewSpec::setTextInsetBottom(double textInsetBottom) {
|
|
851
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(double /* textInsetBottom */)>("setTextInsetBottom");
|
|
852
|
+
method(_javaPart, textInsetBottom);
|
|
799
853
|
}
|
|
800
854
|
bool JHybridNitroInputViewSpec::getScrollEnabled() {
|
|
801
855
|
static const auto method = _javaPart->javaClassStatic()->getMethod<jboolean()>("getScrollEnabled");
|
|
@@ -122,8 +122,12 @@ namespace margelo::nitro::nitroinput {
|
|
|
122
122
|
void setPrefixAlign(NitroInputAffixAlign prefixAlign) override;
|
|
123
123
|
NitroInputAffixAlign getSuffixAlign() override;
|
|
124
124
|
void setSuffixAlign(NitroInputAffixAlign suffixAlign) override;
|
|
125
|
-
double
|
|
126
|
-
void
|
|
125
|
+
double getTextLetterSpacing() override;
|
|
126
|
+
void setTextLetterSpacing(double textLetterSpacing) override;
|
|
127
|
+
bool getTabularNums() override;
|
|
128
|
+
void setTabularNums(bool tabularNums) override;
|
|
129
|
+
bool getSlotDigits() override;
|
|
130
|
+
void setSlotDigits(bool slotDigits) override;
|
|
127
131
|
double getPrefixSpacing() override;
|
|
128
132
|
void setPrefixSpacing(double prefixSpacing) override;
|
|
129
133
|
double getSuffixSpacing() override;
|
|
@@ -144,18 +148,18 @@ namespace margelo::nitro::nitroinput {
|
|
|
144
148
|
void setBounce(double bounce) override;
|
|
145
149
|
NitroInputEffect getEffect() override;
|
|
146
150
|
void setEffect(NitroInputEffect effect) override;
|
|
147
|
-
double
|
|
148
|
-
void
|
|
149
|
-
double
|
|
150
|
-
void
|
|
151
|
-
double
|
|
152
|
-
void
|
|
153
|
-
std::string
|
|
154
|
-
void
|
|
155
|
-
double
|
|
156
|
-
void
|
|
157
|
-
NitroInputTextAlign
|
|
158
|
-
void
|
|
151
|
+
double getTextSize() override;
|
|
152
|
+
void setTextSize(double textSize) override;
|
|
153
|
+
double getTextLineHeight() override;
|
|
154
|
+
void setTextLineHeight(double textLineHeight) override;
|
|
155
|
+
double getTextWeight() override;
|
|
156
|
+
void setTextWeight(double textWeight) override;
|
|
157
|
+
std::string getTextFamily() override;
|
|
158
|
+
void setTextFamily(const std::string& textFamily) override;
|
|
159
|
+
double getTextColor() override;
|
|
160
|
+
void setTextColor(double textColor) override;
|
|
161
|
+
NitroInputTextAlign getTextAlignment() override;
|
|
162
|
+
void setTextAlignment(NitroInputTextAlign textAlignment) override;
|
|
159
163
|
bool getRightToLeft() override;
|
|
160
164
|
void setRightToLeft(bool rightToLeft) override;
|
|
161
165
|
double getCaretColor() override;
|
|
@@ -186,8 +190,16 @@ namespace margelo::nitro::nitroinput {
|
|
|
186
190
|
void setMultiline(bool multiline) override;
|
|
187
191
|
double getNumberOfLines() override;
|
|
188
192
|
void setNumberOfLines(double numberOfLines) override;
|
|
189
|
-
NitroInputTextAlignVertical
|
|
190
|
-
void
|
|
193
|
+
NitroInputTextAlignVertical getTextVerticalAlignment() override;
|
|
194
|
+
void setTextVerticalAlignment(NitroInputTextAlignVertical textVerticalAlignment) override;
|
|
195
|
+
double getTextInsetLeft() override;
|
|
196
|
+
void setTextInsetLeft(double textInsetLeft) override;
|
|
197
|
+
double getTextInsetTop() override;
|
|
198
|
+
void setTextInsetTop(double textInsetTop) override;
|
|
199
|
+
double getTextInsetRight() override;
|
|
200
|
+
void setTextInsetRight(double textInsetRight) override;
|
|
201
|
+
double getTextInsetBottom() override;
|
|
202
|
+
void setTextInsetBottom(double textInsetBottom) override;
|
|
191
203
|
bool getScrollEnabled() override;
|
|
192
204
|
void setScrollEnabled(bool scrollEnabled) override;
|
|
193
205
|
bool getAutoFocus() override;
|
|
@@ -386,14 +386,14 @@ namespace margelo::nitro::nitroinput {
|
|
|
386
386
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<jni::JDouble> /* shimmerDelay */)>("setShimmerDelay");
|
|
387
387
|
method(_javaPart, shimmerDelay.has_value() ? jni::JDouble::valueOf(shimmerDelay.value()) : nullptr);
|
|
388
388
|
}
|
|
389
|
-
std::optional<double> JHybridNitroNumberViewSpec::
|
|
390
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JDouble>()>("
|
|
389
|
+
std::optional<double> JHybridNitroNumberViewSpec::getTextSize() {
|
|
390
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JDouble>()>("getTextSize");
|
|
391
391
|
auto __result = method(_javaPart);
|
|
392
392
|
return __result != nullptr ? std::make_optional(__result->value()) : std::nullopt;
|
|
393
393
|
}
|
|
394
|
-
void JHybridNitroNumberViewSpec::
|
|
395
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<jni::JDouble> /*
|
|
396
|
-
method(_javaPart,
|
|
394
|
+
void JHybridNitroNumberViewSpec::setTextSize(std::optional<double> textSize) {
|
|
395
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<jni::JDouble> /* textSize */)>("setTextSize");
|
|
396
|
+
method(_javaPart, textSize.has_value() ? jni::JDouble::valueOf(textSize.value()) : nullptr);
|
|
397
397
|
}
|
|
398
398
|
std::optional<double> JHybridNitroNumberViewSpec::getPrefixFontSize() {
|
|
399
399
|
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JDouble>()>("getPrefixFontSize");
|
|
@@ -440,14 +440,14 @@ namespace margelo::nitro::nitroinput {
|
|
|
440
440
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JNitroNumberAffixAlign> /* suffixAlign */)>("setSuffixAlign");
|
|
441
441
|
method(_javaPart, suffixAlign.has_value() ? JNitroNumberAffixAlign::fromCpp(suffixAlign.value()) : nullptr);
|
|
442
442
|
}
|
|
443
|
-
std::optional<double> JHybridNitroNumberViewSpec::
|
|
444
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JDouble>()>("
|
|
443
|
+
std::optional<double> JHybridNitroNumberViewSpec::getTextLetterSpacing() {
|
|
444
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JDouble>()>("getTextLetterSpacing");
|
|
445
445
|
auto __result = method(_javaPart);
|
|
446
446
|
return __result != nullptr ? std::make_optional(__result->value()) : std::nullopt;
|
|
447
447
|
}
|
|
448
|
-
void JHybridNitroNumberViewSpec::
|
|
449
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<jni::JDouble> /*
|
|
450
|
-
method(_javaPart,
|
|
448
|
+
void JHybridNitroNumberViewSpec::setTextLetterSpacing(std::optional<double> textLetterSpacing) {
|
|
449
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<jni::JDouble> /* textLetterSpacing */)>("setTextLetterSpacing");
|
|
450
|
+
method(_javaPart, textLetterSpacing.has_value() ? jni::JDouble::valueOf(textLetterSpacing.value()) : nullptr);
|
|
451
451
|
}
|
|
452
452
|
std::optional<double> JHybridNitroNumberViewSpec::getPrefixSpacing() {
|
|
453
453
|
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JDouble>()>("getPrefixSpacing");
|
|
@@ -685,41 +685,41 @@ namespace margelo::nitro::nitroinput {
|
|
|
685
685
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<jni::JDouble> /* maxFontSizeMultiplier */)>("setMaxFontSizeMultiplier");
|
|
686
686
|
method(_javaPart, maxFontSizeMultiplier.has_value() ? jni::JDouble::valueOf(maxFontSizeMultiplier.value()) : nullptr);
|
|
687
687
|
}
|
|
688
|
-
std::optional<double> JHybridNitroNumberViewSpec::
|
|
689
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JDouble>()>("
|
|
688
|
+
std::optional<double> JHybridNitroNumberViewSpec::getTextWeight() {
|
|
689
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JDouble>()>("getTextWeight");
|
|
690
690
|
auto __result = method(_javaPart);
|
|
691
691
|
return __result != nullptr ? std::make_optional(__result->value()) : std::nullopt;
|
|
692
692
|
}
|
|
693
|
-
void JHybridNitroNumberViewSpec::
|
|
694
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<jni::JDouble> /*
|
|
695
|
-
method(_javaPart,
|
|
693
|
+
void JHybridNitroNumberViewSpec::setTextWeight(std::optional<double> textWeight) {
|
|
694
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<jni::JDouble> /* textWeight */)>("setTextWeight");
|
|
695
|
+
method(_javaPart, textWeight.has_value() ? jni::JDouble::valueOf(textWeight.value()) : nullptr);
|
|
696
696
|
}
|
|
697
|
-
std::optional<std::string> JHybridNitroNumberViewSpec::
|
|
698
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("
|
|
697
|
+
std::optional<std::string> JHybridNitroNumberViewSpec::getTextFamily() {
|
|
698
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getTextFamily");
|
|
699
699
|
auto __result = method(_javaPart);
|
|
700
700
|
return __result != nullptr ? std::make_optional(__result->toStdString()) : std::nullopt;
|
|
701
701
|
}
|
|
702
|
-
void JHybridNitroNumberViewSpec::
|
|
703
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<jni::JString> /*
|
|
704
|
-
method(_javaPart,
|
|
702
|
+
void JHybridNitroNumberViewSpec::setTextFamily(const std::optional<std::string>& textFamily) {
|
|
703
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<jni::JString> /* textFamily */)>("setTextFamily");
|
|
704
|
+
method(_javaPart, textFamily.has_value() ? jni::make_jstring(textFamily.value()) : nullptr);
|
|
705
705
|
}
|
|
706
|
-
std::optional<double> JHybridNitroNumberViewSpec::
|
|
707
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JDouble>()>("
|
|
706
|
+
std::optional<double> JHybridNitroNumberViewSpec::getTextColor() {
|
|
707
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JDouble>()>("getTextColor");
|
|
708
708
|
auto __result = method(_javaPart);
|
|
709
709
|
return __result != nullptr ? std::make_optional(__result->value()) : std::nullopt;
|
|
710
710
|
}
|
|
711
|
-
void JHybridNitroNumberViewSpec::
|
|
712
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<jni::JDouble> /*
|
|
713
|
-
method(_javaPart,
|
|
711
|
+
void JHybridNitroNumberViewSpec::setTextColor(std::optional<double> textColor) {
|
|
712
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<jni::JDouble> /* textColor */)>("setTextColor");
|
|
713
|
+
method(_javaPart, textColor.has_value() ? jni::JDouble::valueOf(textColor.value()) : nullptr);
|
|
714
714
|
}
|
|
715
|
-
std::optional<NitroNumberTextAlign> JHybridNitroNumberViewSpec::
|
|
716
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JNitroNumberTextAlign>()>("
|
|
715
|
+
std::optional<NitroNumberTextAlign> JHybridNitroNumberViewSpec::getTextAlignment() {
|
|
716
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JNitroNumberTextAlign>()>("getTextAlignment");
|
|
717
717
|
auto __result = method(_javaPart);
|
|
718
718
|
return __result != nullptr ? std::make_optional(__result->toCpp()) : std::nullopt;
|
|
719
719
|
}
|
|
720
|
-
void JHybridNitroNumberViewSpec::
|
|
721
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JNitroNumberTextAlign> /*
|
|
722
|
-
method(_javaPart,
|
|
720
|
+
void JHybridNitroNumberViewSpec::setTextAlignment(std::optional<NitroNumberTextAlign> textAlignment) {
|
|
721
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JNitroNumberTextAlign> /* textAlignment */)>("setTextAlignment");
|
|
722
|
+
method(_javaPart, textAlignment.has_value() ? JNitroNumberTextAlign::fromCpp(textAlignment.value()) : nullptr);
|
|
723
723
|
}
|
|
724
724
|
std::optional<bool> JHybridNitroNumberViewSpec::getRightToLeft() {
|
|
725
725
|
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JBoolean>()>("getRightToLeft");
|