21using namespace std::string_literals;
42 std::string
GetKind()
const override {
return "rcanvas"s; }
44 void Show(
const std::string &arg)
override
51 return "../"s +
fCanvas->GetWindowAddr() +
"/"s;
59 bool DrawElement(std::shared_ptr<Browsable::RElement> &elem,
const std::string &opt =
"")
override
64 auto obj = elem->GetObject();
68 std::shared_ptr<RPadBase> subpad =
fCanvas;
70 std::string drawopt = opt;
72 if (drawopt.compare(0,8,
"<append>") == 0) {
74 }
else if (subpad->NumPrimitives() > 0) {
80 if (drawopt ==
"<dflt>")
104 std::shared_ptr<RBrowserWidget>
Create(
const std::string &
name)
final
106 return std::make_shared<RBrowserRCanvasWidget>(
name);
109 std::shared_ptr<RBrowserWidget>
CreateFor(
const std::string &
name, std::shared_ptr<Browsable::RElement> &elem)
final
111 auto holder = elem->GetObject();
112 if (!holder)
return nullptr;
114 auto canv = holder->get_shared<
RCanvas>();
115 if (!canv)
return nullptr;
117 return std::make_shared<RBrowserRCanvasWidget>(
name, canv);
std::shared_ptr< RBrowserWidget > Create(const std::string &name) final
~RBrowserRCanvasProvider()=default
RBrowserRCanvasProvider()
std::shared_ptr< RBrowserWidget > CreateFor(const std::string &name, std::shared_ptr< Browsable::RElement > &elem) final
@ kActDraw7
can be drawn inside ROOT7 canvas
static bool Draw7(std::shared_ptr< ROOT::Experimental::RPadBase > &subpad, std::unique_ptr< RHolder > &obj, const std::string &opt="")
Invoke drawing of object on RCanvas sub-pad All existing providers are checked, first checked are cla...
static std::string GetClassDrawOption(const ClassArg &)
Return configured draw option for the class.
static std::shared_ptr< RCanvas > Create(const std::string &title)
Create new canvas instance.