27using namespace std::string_literals;
36 std::multimap<TVirtualPad *, std::unique_ptr<Browsable::RHolder>>
fObjects;
58 printf(
"ERROR: Cannot modify TCanvas::fCanvasID data member\n");
66 printf(
"ERROR: Cannot modify TCanvas::fPixmapID data member\n");
74 printf(
"ERROR: Cannot set TCanvas::fMother data member\n");
82 printf(
"ERROR: Cannot set TCanvas::fCw data member\n");
90 printf(
"ERROR: Cannot set TCanvas::fCw data member\n");
97 auto l1 =
gROOT->GetListOfCleanups();
100 auto l2 =
gROOT->GetListOfCanvases();
182 std::string
GetKind()
const override {
return "tcanvas"s; }
190 void Show(
const std::string &arg)
override
208 bool DrawElement(std::shared_ptr<Browsable::RElement> &elem,
const std::string &opt =
"")
override
213 std::unique_ptr<Browsable::RHolder> obj = elem->GetObject();
222 std::string drawopt = opt;
225 bool find_removed_pad;
227 find_removed_pad =
false;
231 find_removed_pad =
true;
234 }
while (find_removed_pad);
240 if (drawopt.compare(0,8,
"<append>") == 0) {
251 if (drawopt ==
"<dflt>")
255 fObjects.emplace(pad, std::move(obj));
281 std::shared_ptr<RBrowserWidget>
Create(
const std::string &
name)
final
283 return std::make_shared<RBrowserTCanvasWidget>(
name);
286 std::shared_ptr<RBrowserWidget>
CreateFor(
const std::string &
name, std::shared_ptr<Browsable::RElement> &elem)
final
288 auto holder = elem->GetObject();
289 if (!holder)
return nullptr;
291 auto canv = holder->get_unique<
TCanvas>();
292 if (!canv)
return nullptr;
294 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.
TCanvasImp * GetCanvasImp() const override
void Close(Option_t *option="") override
Close canvas.
void SetCanvasImp(TCanvasImp *i)
void UpdateAsync() override
Asynchronous pad update.
TVirtualPad * cd(Int_t subpadnumber=0) override
Set current canvas & pad.
void SetTitle(const char *title="") override
Set canvas title.
Int_t GetCanvasID() const override
void SetName(const char *name="") override
Set canvas name.
UInt_t GetWw() const override
UInt_t GetWh() const override
void SetBatch(Bool_t batch=kTRUE) override
Toggle batch mode.
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.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
The most important graphics class in the ROOT system.
Int_t GetPixmapID() const override
void SetEditable(Bool_t mode=kTRUE) override
Set pad editable yes/no If a pad is not editable:
Bool_t IsModified() const override
TVirtualPad * GetMother() const override
void SetCanvas(TCanvas *c) override
TObject * FindObject(const char *name) const override
Search if object named name is inside this pad or in pads inside this pad.
const char * GetName() const override
Returns name of object.
const char * Data() const
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)
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...