8#if (defined(_MSVC_LANG) ? _MSVC_LANG : __cplusplus) < 201703L
10 "OpenPine C++ wrapper headers require C++17 (std::optional, std::string_view)."
33 Fill(
const ffi::Fill* p) : p_(p) {}
38 FillAnchorType
fromType()
const {
return ffi::fillFromType(p_); }
45 if (ffi::fillFromPlotId(p_, &v)) {
57 if (ffi::fillFromHlineId(p_, &v)) {
67 FillAnchorType
toType()
const {
return ffi::fillToType(p_); }
74 if (ffi::fillToPlotId(p_, &v)) {
86 if (ffi::fillToHlineId(p_, &v)) {
96 std::optional<std::string_view>
title()
const {
97 ffi::PineStringRef ref;
98 if (ffi::fillTitle(p_, &ref)) {
108 bool editable()
const {
return ffi::fillEditable(p_); }
115 if (ffi::fillShowLast(p_, &v)) {
125 bool fillGaps()
const {
return ffi::fillFillGaps(p_); }
135 std::optional<FillColorType>
colorType(uintptr_t idx)
const {
137 if (ffi::fillColorType(p_, idx, &t)) {
149 if (ffi::fillColorSolid(p_, idx, &col)) {
159 std::optional<FillGradient>
gradient(uintptr_t idx)
const {
161 if (ffi::fillColorGradient(p_, idx, &g)) {
A type-safe display bitmask.
FillAnchorType fromType() const
Gets the kind of the "from" anchor.
std::optional< uintptr_t > showLast() const
Gets the show_last value, if set.
std::optional< int64_t > fromHlineId() const
Gets the hline id of the "from" anchor, if it is a hline.
std::optional< uint32_t > solidColor(uintptr_t idx) const
Gets the solid fill color at the specified index.
std::optional< int64_t > toPlotId() const
Gets the plot id of the "to" anchor, if it is a plot.
std::optional< std::string_view > title() const
Gets the fill title, if set.
FillAnchorType toType() const
Gets the kind of the "to" anchor.
std::optional< FillGradient > gradient(uintptr_t idx) const
Gets the gradient fill definition at the specified index.
bool fillGaps() const
Returns whether the fill is drawn across gaps.
std::optional< int64_t > toHlineId() const
Gets the hline id of the "to" anchor, if it is a hline.
std::optional< FillColorType > colorType(uintptr_t idx) const
Gets the fill color kind at the specified index.
bool editable() const
Returns whether the fill is user-editable.
std::optional< int64_t > fromPlotId() const
Gets the plot id of the "from" anchor, if it is a plot.
Display display() const
Gets the display bitmask.
Type-safe wrappers for display bitmasks used by visuals.
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.