30 if (!persistent)
return;
59 auto arr = std::make_unique<TObjArray>();
62 auto cols =
gROOT->GetListOfColors();
63 for (
int n = 0;
n <= cols->GetLast(); ++
n) {
64 auto col =
dynamic_cast<TColor *
>(cols->At(
n));
73 return std::make_unique<TStyle>(*
gStyle);
77 auto arr = std::make_unique<TObjArray>();
81 for (
int n = 0;
n < palette.GetSize(); ++
n) {
82 auto col =
gROOT->GetColor(palette[
n]);
103 return std::make_unique<TObjectDisplayItem>(
fKind, specials.release(),
fOpts,
true);
122 std::string sub,
ex = exec;
123 if (
ex.compare(0, 6,
"xaxis#") == 0) {
125 ex.insert(0,
"GetXaxis()->");
126 }
else if (
ex.compare(0, 6,
"yaxis#") == 0) {
128 ex.insert(0,
"GetYaxis()->");
129 }
else if (
ex.compare(0, 6,
"zaxis#") == 0) {
131 ex.insert(0,
"GetZaxis()->");
134 std::stringstream cmd;
135 cmd <<
"((" << obj->
ClassName() <<
"* ) " << std::hex << std::showbase << (size_t)obj <<
")->" <<
ex <<
";";
136 std::cout <<
"TObjectDrawable::Execute Obj " << obj->
GetName() <<
"Cmd " << cmd.str() << std::endl;
137 gROOT->ProcessLine(cmd.str().c_str());
R__EXTERN TStyle * gStyle
Version_t GetLastVersion() const
Base class for drawable entities: objects that can be painted on a RPad.
Version_t GetVersion() const
@ kColors
list of ROOT colors
@ kPalette
list of colors from palette
@ kStyle
instance of TStyle object
Internal::RIOShared< TObject > fObj
The object to be painted.
std::string fOpts
drawing options
std::unique_ptr< TObject > CreateSpecials(int kind)
Create instance of requested special object.
const char * GetColorCode(TColor *col)
Convert TColor to RGB string for using with SVG.
void PopulateMenu(RMenuItems &) final
void Execute(const std::string &) final
std::unique_ptr< RDisplayItem > Display(const RDisplayContext &) override
Create display item which will be delivered to the client.
The color creation and management class.
static const TArrayI & GetPalette()
Static function returning the current active palette.
Collectable string class.
Mother of all ROOT objects.
virtual const char * GetName() const
Returns name of object.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
const char * Data() const
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.