react-native-nitro-input 0.3.8 → 0.4.0
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 +89 -0
- package/README.md +5 -1
- package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroInputMeasure.kt +52 -0
- package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroInputView.kt +74 -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 +199 -0
- package/android/src/main/java/com/margelo/nitro/nitroinput/InputSizing.kt +398 -0
- package/android/src/main/java/com/margelo/nitro/nitroinput/NitroInputView.kt +112 -333
- package/android/src/main/java/com/margelo/nitro/nitroinput/NitroNumberView.kt +178 -30
- package/ios/HybridNitroInputView.swift +69 -75
- package/ios/HybridNitroNumberView.swift +18 -18
- package/ios/HybridNitroTextView.swift +14 -14
- package/ios/InputSizing.swift +534 -0
- package/ios/NitroInputView.swift +102 -198
- package/ios/NitroNumberView.swift +98 -23
- package/lib/commonjs/nitrogen/generated/shared/json/NitroInputViewConfig.json +12 -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 +164 -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 +12 -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 +165 -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 +9 -16
- package/lib/typescript/src/specs/NitroInput.nitro.d.ts +17 -8
- package/lib/typescript/src/specs/NitroInputMeasure.nitro.d.ts +67 -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 +76 -40
- package/nitrogen/generated/android/c++/JHybridNitroInputViewSpec.hpp +24 -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 +284 -0
- package/nitrogen/generated/android/c++/views/JHybridNitroInputViewStateUpdater.cpp +44 -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 +32 -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 +246 -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 +56 -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 +56 -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 +12 -8
- package/nitrogen/generated/ios/swift/HybridNitroInputViewSpec_cxx.swift +68 -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 +242 -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 +24 -16
- package/nitrogen/generated/shared/c++/HybridNitroInputViewSpec.hpp +24 -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 +263 -0
- package/nitrogen/generated/shared/c++/views/HybridNitroInputViewComponent.cpp +24 -16
- package/nitrogen/generated/shared/c++/views/HybridNitroInputViewComponent.hpp +36 -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 +12 -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 +201 -64
- package/src/NitroNumber.tsx +6 -6
- package/src/NitroText.tsx +6 -6
- package/src/specs/NitroInput.nitro.ts +17 -8
- package/src/specs/NitroInputMeasure.nitro.ts +76 -0
- package/src/specs/NitroNumber.nitro.ts +6 -6
- package/src/specs/NitroText.nitro.ts +6 -6
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,14 @@ 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
511
|
}
|
|
512
512
|
double JHybridNitroInputViewSpec::getPrefixSpacing() {
|
|
513
513
|
static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getPrefixSpacing");
|
|
@@ -599,59 +599,59 @@ namespace margelo::nitro::nitroinput {
|
|
|
599
599
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JNitroInputEffect> /* effect */)>("setEffect");
|
|
600
600
|
method(_javaPart, JNitroInputEffect::fromCpp(effect));
|
|
601
601
|
}
|
|
602
|
-
double JHybridNitroInputViewSpec::
|
|
603
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("
|
|
602
|
+
double JHybridNitroInputViewSpec::getTextSize() {
|
|
603
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getTextSize");
|
|
604
604
|
auto __result = method(_javaPart);
|
|
605
605
|
return __result;
|
|
606
606
|
}
|
|
607
|
-
void JHybridNitroInputViewSpec::
|
|
608
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<void(double /*
|
|
609
|
-
method(_javaPart,
|
|
607
|
+
void JHybridNitroInputViewSpec::setTextSize(double textSize) {
|
|
608
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(double /* textSize */)>("setTextSize");
|
|
609
|
+
method(_javaPart, textSize);
|
|
610
610
|
}
|
|
611
|
-
double JHybridNitroInputViewSpec::
|
|
612
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("
|
|
611
|
+
double JHybridNitroInputViewSpec::getTextLineHeight() {
|
|
612
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getTextLineHeight");
|
|
613
613
|
auto __result = method(_javaPart);
|
|
614
614
|
return __result;
|
|
615
615
|
}
|
|
616
|
-
void JHybridNitroInputViewSpec::
|
|
617
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<void(double /*
|
|
618
|
-
method(_javaPart,
|
|
616
|
+
void JHybridNitroInputViewSpec::setTextLineHeight(double textLineHeight) {
|
|
617
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(double /* textLineHeight */)>("setTextLineHeight");
|
|
618
|
+
method(_javaPart, textLineHeight);
|
|
619
619
|
}
|
|
620
|
-
double JHybridNitroInputViewSpec::
|
|
621
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("
|
|
620
|
+
double JHybridNitroInputViewSpec::getTextWeight() {
|
|
621
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getTextWeight");
|
|
622
622
|
auto __result = method(_javaPart);
|
|
623
623
|
return __result;
|
|
624
624
|
}
|
|
625
|
-
void JHybridNitroInputViewSpec::
|
|
626
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<void(double /*
|
|
627
|
-
method(_javaPart,
|
|
625
|
+
void JHybridNitroInputViewSpec::setTextWeight(double textWeight) {
|
|
626
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(double /* textWeight */)>("setTextWeight");
|
|
627
|
+
method(_javaPart, textWeight);
|
|
628
628
|
}
|
|
629
|
-
std::string JHybridNitroInputViewSpec::
|
|
630
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("
|
|
629
|
+
std::string JHybridNitroInputViewSpec::getTextFamily() {
|
|
630
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getTextFamily");
|
|
631
631
|
auto __result = method(_javaPart);
|
|
632
632
|
return __result->toStdString();
|
|
633
633
|
}
|
|
634
|
-
void JHybridNitroInputViewSpec::
|
|
635
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<jni::JString> /*
|
|
636
|
-
method(_javaPart, jni::make_jstring(
|
|
634
|
+
void JHybridNitroInputViewSpec::setTextFamily(const std::string& textFamily) {
|
|
635
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<jni::JString> /* textFamily */)>("setTextFamily");
|
|
636
|
+
method(_javaPart, jni::make_jstring(textFamily));
|
|
637
637
|
}
|
|
638
|
-
double JHybridNitroInputViewSpec::
|
|
639
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("
|
|
638
|
+
double JHybridNitroInputViewSpec::getTextColor() {
|
|
639
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getTextColor");
|
|
640
640
|
auto __result = method(_javaPart);
|
|
641
641
|
return __result;
|
|
642
642
|
}
|
|
643
|
-
void JHybridNitroInputViewSpec::
|
|
644
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<void(double /*
|
|
645
|
-
method(_javaPart,
|
|
643
|
+
void JHybridNitroInputViewSpec::setTextColor(double textColor) {
|
|
644
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(double /* textColor */)>("setTextColor");
|
|
645
|
+
method(_javaPart, textColor);
|
|
646
646
|
}
|
|
647
|
-
NitroInputTextAlign JHybridNitroInputViewSpec::
|
|
648
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JNitroInputTextAlign>()>("
|
|
647
|
+
NitroInputTextAlign JHybridNitroInputViewSpec::getTextAlignment() {
|
|
648
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JNitroInputTextAlign>()>("getTextAlignment");
|
|
649
649
|
auto __result = method(_javaPart);
|
|
650
650
|
return __result->toCpp();
|
|
651
651
|
}
|
|
652
|
-
void JHybridNitroInputViewSpec::
|
|
653
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JNitroInputTextAlign> /*
|
|
654
|
-
method(_javaPart, JNitroInputTextAlign::fromCpp(
|
|
652
|
+
void JHybridNitroInputViewSpec::setTextAlignment(NitroInputTextAlign textAlignment) {
|
|
653
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JNitroInputTextAlign> /* textAlignment */)>("setTextAlignment");
|
|
654
|
+
method(_javaPart, JNitroInputTextAlign::fromCpp(textAlignment));
|
|
655
655
|
}
|
|
656
656
|
bool JHybridNitroInputViewSpec::getRightToLeft() {
|
|
657
657
|
static const auto method = _javaPart->javaClassStatic()->getMethod<jboolean()>("getRightToLeft");
|
|
@@ -788,14 +788,50 @@ namespace margelo::nitro::nitroinput {
|
|
|
788
788
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(double /* numberOfLines */)>("setNumberOfLines");
|
|
789
789
|
method(_javaPart, numberOfLines);
|
|
790
790
|
}
|
|
791
|
-
NitroInputTextAlignVertical JHybridNitroInputViewSpec::
|
|
792
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JNitroInputTextAlignVertical>()>("
|
|
791
|
+
NitroInputTextAlignVertical JHybridNitroInputViewSpec::getTextVerticalAlignment() {
|
|
792
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JNitroInputTextAlignVertical>()>("getTextVerticalAlignment");
|
|
793
793
|
auto __result = method(_javaPart);
|
|
794
794
|
return __result->toCpp();
|
|
795
795
|
}
|
|
796
|
-
void JHybridNitroInputViewSpec::
|
|
797
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JNitroInputTextAlignVertical> /*
|
|
798
|
-
method(_javaPart, JNitroInputTextAlignVertical::fromCpp(
|
|
796
|
+
void JHybridNitroInputViewSpec::setTextVerticalAlignment(NitroInputTextAlignVertical textVerticalAlignment) {
|
|
797
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JNitroInputTextAlignVertical> /* textVerticalAlignment */)>("setTextVerticalAlignment");
|
|
798
|
+
method(_javaPart, JNitroInputTextAlignVertical::fromCpp(textVerticalAlignment));
|
|
799
|
+
}
|
|
800
|
+
double JHybridNitroInputViewSpec::getTextInsetLeft() {
|
|
801
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getTextInsetLeft");
|
|
802
|
+
auto __result = method(_javaPart);
|
|
803
|
+
return __result;
|
|
804
|
+
}
|
|
805
|
+
void JHybridNitroInputViewSpec::setTextInsetLeft(double textInsetLeft) {
|
|
806
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(double /* textInsetLeft */)>("setTextInsetLeft");
|
|
807
|
+
method(_javaPart, textInsetLeft);
|
|
808
|
+
}
|
|
809
|
+
double JHybridNitroInputViewSpec::getTextInsetTop() {
|
|
810
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getTextInsetTop");
|
|
811
|
+
auto __result = method(_javaPart);
|
|
812
|
+
return __result;
|
|
813
|
+
}
|
|
814
|
+
void JHybridNitroInputViewSpec::setTextInsetTop(double textInsetTop) {
|
|
815
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(double /* textInsetTop */)>("setTextInsetTop");
|
|
816
|
+
method(_javaPart, textInsetTop);
|
|
817
|
+
}
|
|
818
|
+
double JHybridNitroInputViewSpec::getTextInsetRight() {
|
|
819
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getTextInsetRight");
|
|
820
|
+
auto __result = method(_javaPart);
|
|
821
|
+
return __result;
|
|
822
|
+
}
|
|
823
|
+
void JHybridNitroInputViewSpec::setTextInsetRight(double textInsetRight) {
|
|
824
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(double /* textInsetRight */)>("setTextInsetRight");
|
|
825
|
+
method(_javaPart, textInsetRight);
|
|
826
|
+
}
|
|
827
|
+
double JHybridNitroInputViewSpec::getTextInsetBottom() {
|
|
828
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getTextInsetBottom");
|
|
829
|
+
auto __result = method(_javaPart);
|
|
830
|
+
return __result;
|
|
831
|
+
}
|
|
832
|
+
void JHybridNitroInputViewSpec::setTextInsetBottom(double textInsetBottom) {
|
|
833
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(double /* textInsetBottom */)>("setTextInsetBottom");
|
|
834
|
+
method(_javaPart, textInsetBottom);
|
|
799
835
|
}
|
|
800
836
|
bool JHybridNitroInputViewSpec::getScrollEnabled() {
|
|
801
837
|
static const auto method = _javaPart->javaClassStatic()->getMethod<jboolean()>("getScrollEnabled");
|
|
@@ -122,8 +122,8 @@ 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
127
|
double getPrefixSpacing() override;
|
|
128
128
|
void setPrefixSpacing(double prefixSpacing) override;
|
|
129
129
|
double getSuffixSpacing() override;
|
|
@@ -144,18 +144,18 @@ namespace margelo::nitro::nitroinput {
|
|
|
144
144
|
void setBounce(double bounce) override;
|
|
145
145
|
NitroInputEffect getEffect() override;
|
|
146
146
|
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
|
|
147
|
+
double getTextSize() override;
|
|
148
|
+
void setTextSize(double textSize) override;
|
|
149
|
+
double getTextLineHeight() override;
|
|
150
|
+
void setTextLineHeight(double textLineHeight) override;
|
|
151
|
+
double getTextWeight() override;
|
|
152
|
+
void setTextWeight(double textWeight) override;
|
|
153
|
+
std::string getTextFamily() override;
|
|
154
|
+
void setTextFamily(const std::string& textFamily) override;
|
|
155
|
+
double getTextColor() override;
|
|
156
|
+
void setTextColor(double textColor) override;
|
|
157
|
+
NitroInputTextAlign getTextAlignment() override;
|
|
158
|
+
void setTextAlignment(NitroInputTextAlign textAlignment) override;
|
|
159
159
|
bool getRightToLeft() override;
|
|
160
160
|
void setRightToLeft(bool rightToLeft) override;
|
|
161
161
|
double getCaretColor() override;
|
|
@@ -186,8 +186,16 @@ namespace margelo::nitro::nitroinput {
|
|
|
186
186
|
void setMultiline(bool multiline) override;
|
|
187
187
|
double getNumberOfLines() override;
|
|
188
188
|
void setNumberOfLines(double numberOfLines) override;
|
|
189
|
-
NitroInputTextAlignVertical
|
|
190
|
-
void
|
|
189
|
+
NitroInputTextAlignVertical getTextVerticalAlignment() override;
|
|
190
|
+
void setTextVerticalAlignment(NitroInputTextAlignVertical textVerticalAlignment) override;
|
|
191
|
+
double getTextInsetLeft() override;
|
|
192
|
+
void setTextInsetLeft(double textInsetLeft) override;
|
|
193
|
+
double getTextInsetTop() override;
|
|
194
|
+
void setTextInsetTop(double textInsetTop) override;
|
|
195
|
+
double getTextInsetRight() override;
|
|
196
|
+
void setTextInsetRight(double textInsetRight) override;
|
|
197
|
+
double getTextInsetBottom() override;
|
|
198
|
+
void setTextInsetBottom(double textInsetBottom) override;
|
|
191
199
|
bool getScrollEnabled() override;
|
|
192
200
|
void setScrollEnabled(bool scrollEnabled) override;
|
|
193
201
|
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");
|
|
@@ -116,8 +116,8 @@ namespace margelo::nitro::nitroinput {
|
|
|
116
116
|
void setShimmerDirection(std::optional<NitroNumberShimmerDirection> shimmerDirection) override;
|
|
117
117
|
std::optional<double> getShimmerDelay() override;
|
|
118
118
|
void setShimmerDelay(std::optional<double> shimmerDelay) override;
|
|
119
|
-
std::optional<double>
|
|
120
|
-
void
|
|
119
|
+
std::optional<double> getTextSize() override;
|
|
120
|
+
void setTextSize(std::optional<double> textSize) override;
|
|
121
121
|
std::optional<double> getPrefixFontSize() override;
|
|
122
122
|
void setPrefixFontSize(std::optional<double> prefixFontSize) override;
|
|
123
123
|
std::optional<double> getSuffixFontSize() override;
|
|
@@ -128,8 +128,8 @@ namespace margelo::nitro::nitroinput {
|
|
|
128
128
|
void setPrefixAlign(std::optional<NitroNumberAffixAlign> prefixAlign) override;
|
|
129
129
|
std::optional<NitroNumberAffixAlign> getSuffixAlign() override;
|
|
130
130
|
void setSuffixAlign(std::optional<NitroNumberAffixAlign> suffixAlign) override;
|
|
131
|
-
std::optional<double>
|
|
132
|
-
void
|
|
131
|
+
std::optional<double> getTextLetterSpacing() override;
|
|
132
|
+
void setTextLetterSpacing(std::optional<double> textLetterSpacing) override;
|
|
133
133
|
std::optional<double> getPrefixSpacing() override;
|
|
134
134
|
void setPrefixSpacing(std::optional<double> prefixSpacing) override;
|
|
135
135
|
std::optional<double> getSuffixSpacing() override;
|
|
@@ -174,14 +174,14 @@ namespace margelo::nitro::nitroinput {
|
|
|
174
174
|
void setAllowFontScaling(std::optional<bool> allowFontScaling) override;
|
|
175
175
|
std::optional<double> getMaxFontSizeMultiplier() override;
|
|
176
176
|
void setMaxFontSizeMultiplier(std::optional<double> maxFontSizeMultiplier) override;
|
|
177
|
-
std::optional<double>
|
|
178
|
-
void
|
|
179
|
-
std::optional<std::string>
|
|
180
|
-
void
|
|
181
|
-
std::optional<double>
|
|
182
|
-
void
|
|
183
|
-
std::optional<NitroNumberTextAlign>
|
|
184
|
-
void
|
|
177
|
+
std::optional<double> getTextWeight() override;
|
|
178
|
+
void setTextWeight(std::optional<double> textWeight) override;
|
|
179
|
+
std::optional<std::string> getTextFamily() override;
|
|
180
|
+
void setTextFamily(const std::optional<std::string>& textFamily) override;
|
|
181
|
+
std::optional<double> getTextColor() override;
|
|
182
|
+
void setTextColor(std::optional<double> textColor) override;
|
|
183
|
+
std::optional<NitroNumberTextAlign> getTextAlignment() override;
|
|
184
|
+
void setTextAlignment(std::optional<NitroNumberTextAlign> textAlignment) override;
|
|
185
185
|
std::optional<bool> getRightToLeft() override;
|
|
186
186
|
void setRightToLeft(std::optional<bool> rightToLeft) override;
|
|
187
187
|
std::optional<std::function<void(double /* width */, double /* height */)>> getOnSizeChange() override;
|