OpenPine C++ API
C++ wrapper for the OpenPine Pine Script VM
Loading...
Searching...
No Matches
openpine::BarColors Class Reference

Represents bar-colors settings in a chart. More...

#include <bar_colors.hpp>

Public Member Functions

 BarColors (const ffi::BarColors *p)
int32_t offset () const
 Returns the bar-colors offset.
bool editable () const
 Returns whether bar-colors are editable.
std::optional< uintptr_t > showLast () const
 Gets the show_last value, if set.
std::optional< std::string_view > title () const
 Gets the title of the bar-colors series.
Display display () const
 Gets the display bitmask.
std::optional< uint32_t > color (uintptr_t idx) const
 Gets the bar color at the specified index.

Detailed Description

Represents bar-colors settings in a chart.

A BarColors exposes the per-bar color series as well as metadata like title, offset and display mask.

Definition at line 29 of file bar_colors.hpp.

Constructor & Destructor Documentation

◆ BarColors()

openpine::BarColors::BarColors ( const ffi::BarColors * p)
inline

Definition at line 34 of file bar_colors.hpp.

Member Function Documentation

◆ color()

std::optional< uint32_t > openpine::BarColors::color ( uintptr_t idx) const
inline

Gets the bar color at the specified index.

Parameters
idxThe bar index.
Returns
The color value (format defined by the ABI) if available, otherwise std::nullopt.

Definition at line 82 of file bar_colors.hpp.

◆ display()

Display openpine::BarColors::display ( ) const
inline

Gets the display bitmask.

Definition at line 74 of file bar_colors.hpp.

◆ editable()

bool openpine::BarColors::editable ( ) const
inline

Returns whether bar-colors are editable.

Definition at line 44 of file bar_colors.hpp.

◆ offset()

int32_t openpine::BarColors::offset ( ) const
inline

Returns the bar-colors offset.

Definition at line 39 of file bar_colors.hpp.

◆ showLast()

std::optional< uintptr_t > openpine::BarColors::showLast ( ) const
inline

Gets the show_last value, if set.

Definition at line 49 of file bar_colors.hpp.

◆ title()

std::optional< std::string_view > openpine::BarColors::title ( ) const
inline

Gets the title of the bar-colors series.

Returns
The title if available, otherwise std::nullopt.

Definition at line 62 of file bar_colors.hpp.

References openpine::detail::refToView().


The documentation for this class was generated from the following file: