8#if (defined(_MSVC_LANG) ? _MSVC_LANG : __cplusplus) < 201703L
9#error "OpenPine C++ wrapper headers require C++17."
36 InputEnum(
const ffi::InputEnum& data,
const ffi::Input* input =
nullptr)
37 : data_(data), input_(input) {}
39 int64_t
id()
const {
return data_.id; }
41 uintptr_t
enumTypeId()
const {
return data_.enum_typeid; }
45 std::optional<std::string_view>
title()
const {
49 std::optional<std::string_view>
tooltip()
const {
57 std::optional<std::string_view>
group()
const {
61 uint64_t
display()
const {
return data_.display; }
63 bool active()
const {
return data_.active; }
67 bool confirm()
const {
return data_.confirm; }
74 std::optional<InputEnumOptionView>
optionAt(uintptr_t index)
const {
75 if (!input_)
return std::nullopt;
76 ffi::InputEnumOption opt{};
77 if (!ffi::inputEnumOptionAt(input_, index, &opt))
return std::nullopt;
83 const ffi::Input* input_ =
nullptr;
std::optional< std::string_view > optRefToView(bool has_field, const ffi::PineStringRef &ref)
Returns optional string_view when has_field is true, otherwise std::nullopt.
std::string_view refToView(const ffi::PineStringRef &ref)
Shared helpers for converting C ABI string refs to std::string_view.
Re-exports FFI types into the openpine namespace.