8#if (defined(_MSVC_LANG) ? _MSVC_LANG : __cplusplus) < 201703L
10 "OpenPine C++ wrapper headers require C++17 (std::optional, std::string_view)."
31 const ffi::BarColors* p_;
39 int32_t
offset()
const {
return ffi::barcolorsOffset(p_); }
44 bool editable()
const {
return ffi::barcolorsEditable(p_); }
51 if (ffi::barcolorsShowLast(p_, &v)) {
62 std::optional<std::string_view>
title()
const {
63 ffi::PineStringRef ref;
64 if (ffi::barcolorsTitle(p_, &ref)) {
82 std::optional<uint32_t>
color(uintptr_t idx)
const {
84 if (ffi::barcolorsColor(p_, idx, &col)) {
std::optional< uintptr_t > showLast() const
Gets the show_last value, if set.
bool editable() const
Returns whether bar-colors are editable.
std::optional< std::string_view > title() const
Gets the title of the bar-colors series.
int32_t offset() const
Returns the bar-colors offset.
Display display() const
Gets the display bitmask.
std::optional< uint32_t > color(uintptr_t idx) const
Gets the bar color at the specified index.
BarColors(const ffi::BarColors *p)
A type-safe 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.