8#if (defined(_MSVC_LANG) ? _MSVC_LANG : __cplusplus) < 201703L
10 "OpenPine C++ wrapper headers require C++17 (std::optional, std::string_view)."
29 const ffi::PlotArrow* p_;
38 std::optional<std::string_view>
title()
const {
39 ffi::PineStringRef ref;
40 if (ffi::plotArrowTitle(p_, &ref)) {
50 std::optional<double>
value(uintptr_t idx)
const {
52 if (ffi::plotArrowValue(p_, idx, &v)) {
62 std::optional<uint32_t>
upColor(uintptr_t idx)
const {
64 if (ffi::plotArrowUpColor(p_, idx, &col)) {
74 std::optional<uint32_t>
downColor(uintptr_t idx)
const {
76 if (ffi::plotArrowDownColor(p_, idx, &col)) {
86 int32_t
offset()
const {
return ffi::plotArrowOffset(p_); }
91 uintptr_t
minHeight()
const {
return ffi::plotArrowMinHeight(p_); }
96 uintptr_t
maxHeight()
const {
return ffi::plotArrowMaxHeight(p_); }
101 bool editable()
const {
return ffi::plotArrowEditable(p_); }
108 if (ffi::plotArrowShowLast(p_, &v)) {
123 std::optional<std::string_view>
format()
const {
124 ffi::PineStringRef ref;
125 if (ffi::plotArrowFormat(p_, &ref)) {
137 if (ffi::plotArrowPrecision(p_, &v)) {
A type-safe display bitmask.
std::optional< uint32_t > upColor(uintptr_t idx) const
Gets the up color at the specified index.
std::optional< int32_t > precision() const
Gets the optional decimal precision.
uintptr_t maxHeight() const
Gets the maximum arrow height.
std::optional< uintptr_t > showLast() const
Gets the show_last value, if set.
bool forceOverlay() const
Gets whether the plot-arrow is forced to render as overlay.
PlotArrow(const ffi::PlotArrow *p)
std::optional< std::string_view > format() const
Gets the optional formatting hint.
std::optional< std::string_view > title() const
Gets the title.
bool editable() const
Returns whether the plot-arrow is editable.
std::optional< uint32_t > downColor(uintptr_t idx) const
Gets the down color at the specified index.
int32_t offset() const
Gets the bar index offset.
std::optional< double > value(uintptr_t idx) const
Gets the series value at the specified index.
uintptr_t minHeight() const
Gets the minimum arrow height.
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.