21using namespace std::string_literals;
34 drawable->UseStyle(
style);
44 if (drawable->GetId() ==
id)
45 return drawable.get_shared();
66 auto p =
id.find(
'_');
67 if (
p == std::string::npos)
74 auto subid =
id.substr(
p+1);
79 auto subpad = std::dynamic_pointer_cast<RPadBase>(
prim);
89 auto p =
id.find(
'_');
90 if (
p == std::string::npos)
97 auto subid =
id.substr(
p+1);
102 auto subpad = std::dynamic_pointer_cast<RPadBase>(
prim);
121 ctxt.SetDrawable(drawable.get(),
indx++);
123 auto item = drawable->Display(
ctxt);
126 item = std::make_unique<RDisplayItem>(
true);
128 item->SetObjectIDAsPtr(drawable.get());
129 item->SetIndex(
ctxt.GetIndex());
131 paditem.Add(std::move(item), drawable->fStyle.lock());
142 pad->SetParent(
this);
153std::vector<std::vector<std::shared_ptr<RPad>>>
156 std::vector<std::vector<std::shared_ptr<RPad>>>
ret;
205 if (
const std::shared_ptr<RFrame> frame = std::dynamic_pointer_cast<RFrame>(drawable.get_shared()))
217 if (std::shared_ptr<RFrame> frame = std::dynamic_pointer_cast<RFrame>(drawable.get_shared()))
229 vect.emplace_back(&handle);
230 auto drawable = handle.get();
231 if (drawable) drawable->CollectShared(
vect);
243 drawable->SetDrawableVersion(
vers);
#define R__LOG_ERROR(...)
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
winID h TVirtualViewer3D TVirtualGLPainter p
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
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize id
static std::string ObjectIDFromPtr(const void *ptr)
Construct fillid using pointer value.
std::weak_ptr< RStyle > fStyle
! style applied for RDrawable, not stored when canvas is saved
virtual void SetDrawableVersion(Version_t vers)
virtual void UseStyle(const std::shared_ptr< RStyle > &style)
Holds an area where drawing on user coordinate-system can be performed.
class RPadBaseDisplayItem
Base class for graphic containers for RDrawable-s.
void DisplayPrimitives(RPadBaseDisplayItem &paditem, RDisplayContext &ctxt)
Create display items for all primitives in the pad Each display item gets its special id,...
void SetDrawableVersion(Version_t vers) override
Assign drawable version - for pad itself and all primitives.
std::shared_ptr< RDrawable > FindPrimitiveByDisplayId(const std::string &display_id) const
Find primitive with unique id, produce for RDisplayItem Such id used for client-server identification...
const RPadBase * FindPadForPrimitiveWithDisplayId(const std::string &display_id) const
Find subpad which contains primitive with given display id.
std::shared_ptr< RDrawable > GetPrimitive(unsigned num) const
returns primitive of given number
std::shared_ptr< RFrame > GetFrame()
Get a frame object if exists.
std::shared_ptr< RPad > AddPad(const RPadPos &, const RPadExtent &)
Add subpad.
std::shared_ptr< RDrawable > FindPrimitive(const std::string &id) const
Find primitive with specified id.
void CollectShared(Internal::RIOSharedVector_t &) override
Collect all shared items to resolve shared_ptr after IO.
std::vector< Primitive_t > fPrimitives
Content of the pad.
std::vector< std::vector< std::shared_ptr< RPad > > > Divide(int nHoriz, int nVert, const RPadExtent &padding={})
Divide this pad into a grid of subpads with padding in between.
std::shared_ptr< RFrame > AddFrame()
Add a frame object for the pad.
void UseStyle(const std::shared_ptr< RStyle > &style) override
Use provided style for pad and all primitives inside.
An extent / size (horizontal and vertical) in a RPad.
A position (horizontal and vertical) in a RPad.
Graphic container for RDrawable-s.
std::vector< RIOSharedBase * > RIOSharedVector_t
RLogChannel & GPadLog()
Log channel for GPad diagnostics.