27using namespace std::string_literals;
35 std::multimap<TVirtualPad *, std::unique_ptr<Browsable::RHolder>>
fObjects;
42 if (*
id ==
fCanvas->GetCanvasID()) *
id = on_init ? 111222333 : -1;
44 printf(
"ERROR: Cannot modify TCanvas::fCanvasID data member\n");
50 if (*
id ==
fCanvas->GetPixmapID()) *
id = on_init ? 332211 : -1;
52 printf(
"ERROR: Cannot modify TCanvas::fPixmapID data member\n");
60 printf(
"ERROR: Cannot set TCanvas::fMother data member\n");
66 if (*cw ==
fCanvas->GetWw()) *cw = on_init ? 800 : 0;
68 printf(
"ERROR: Cannot set TCanvas::fCw data member\n");
74 if (*ch ==
fCanvas->GetWh()) *ch = on_init ? 600 : 0;
76 printf(
"ERROR: Cannot set TCanvas::fCw data member\n");
146 fCanvas->SetCanvasImp(
nullptr);
153 std::string
GetKind()
const override {
return "tcanvas"s; }
160 void Show(
const std::string &arg)
override
175 bool DrawElement(std::shared_ptr<Browsable::RElement> &elem,
const std::string &opt =
"")
override
180 std::unique_ptr<Browsable::RHolder> obj = elem->GetObject();
186 std::string drawopt = opt;
189 bool find_removed_pad;
191 find_removed_pad =
false;
193 if ((entry.first !=
fCanvas.get()) && !
fCanvas->FindObject(entry.first)) {
195 find_removed_pad =
true;
198 }
while (find_removed_pad);
204 if (drawopt.compare(0,8,
"<append>") == 0) {
215 if (drawopt ==
"<dflt>")
219 fObjects.emplace(pad, std::move(obj));
240 std::shared_ptr<RBrowserWidget>
Create(
const std::string &
name)
final
242 return std::make_shared<RBrowserTCanvasWidget>(
name);
245 std::shared_ptr<RBrowserWidget>
CreateFor(
const std::string &
name, std::shared_ptr<Browsable::RElement> &elem)
final
247 auto holder = elem->GetObject();
248 if (!holder)
return nullptr;
250 auto canv = holder->get_unique<
TCanvas>();
251 if (!canv)
return nullptr;
253 return std::make_shared<RBrowserTCanvasWidget>(
name, canv);
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
R__EXTERN TVirtualMutex * gROOTMutex
#define R__LOCKGUARD(mutex)
~RBrowserTCanvasProvider()=default
std::shared_ptr< RBrowserWidget > Create(const std::string &name) final
RBrowserTCanvasProvider()
std::shared_ptr< RBrowserWidget > CreateFor(const std::string &name, std::shared_ptr< Browsable::RElement > &elem) final
@ kActDraw6
can be drawn inside ROOT6 canvas
static bool Draw6(TVirtualPad *subpad, std::unique_ptr< RHolder > &obj, const std::string &opt="")
Invoke drawing of object on TCanvas 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 void ExtendProgressHandle(void *handle, void *handle2)
Extend progress handle - to be able react on sub item.
Longptr_t GetDataMemberOffset(const char *membername) const
return offset for member name.
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
void Clear(Option_t *option="") override
Remove all objects from the list.
The most important graphics class in the ROOT system.
TVirtualPad * GetMother() const override
TVirtualPad is an abstract base class for the Pad and Canvas classes.
virtual void Modified(Bool_t flag=1)=0
virtual TList * GetListOfPrimitives() const =0
virtual void Range(Double_t x1, Double_t y1, Double_t x2, Double_t y2)=0
Basic TCanvasImp ABI implementation for Web-based Graphics Provides painting of main ROOT classes in ...
const std::shared_ptr< ROOT::RWebWindow > & GetWebWindow() const
void ShowWebWindow(const ROOT::RWebDisplayArgs &user_args="")
Show canvas in specified place.
void SetAsyncMode(Bool_t on=kTRUE)
void Close() override
Close web canvas - not implemented.
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.