23namespace Experimental {
27class RPadBaseDisplayItem;
80 template <
class T,
class...
ARGS>
94 template<
class T,
class...
ARGS>
97 auto drawable = std::make_shared<T>(args...);
107 template<
class T,
class...
ARGS>
110 auto drawable = std::make_shared<T>(args...);
120 std::shared_ptr<RDrawable>
Draw(std::shared_ptr<RDrawable> &&drawable)
124 auto dr = std::move(drawable);
141 std::shared_ptr<RDrawable>
FindPrimitive(
const std::string &
id)
const;
152 res.emplace_back(entry.get_shared());
169 bool Remove(
const std::shared_ptr<RDrawable> &drawable)
194 const std::shared_ptr<RFrame>
GetFrame()
const;
203 std::vector<std::vector<std::shared_ptr<RPad>>>
Divide(
int nHoriz,
int nVert,
const RPadExtent &padding = {});
Base class for drawable entities: objects that can be painted on a RPad.
virtual bool IsFrameRequired() const
class RPadBaseDisplayItem
Base class for graphic containers for RDrawable-s.
RPadBase & operator=(const RPadBase &)=delete
Disable assignment.
void DisplayPrimitives(RPadBaseDisplayItem &paditem, RDisplayContext &ctxt)
Create display items for all primitives in the pad Each display item gets its special id,...
RPadBase(const RPadBase &)=delete
Disable copy construction.
bool Remove(const std::shared_ptr< RDrawable > &drawable)
Remove drawable from list of primitives.
void SetDrawableVersion(Version_t vers) override
Assign drawable version - for pad itself and all primitives.
std::shared_ptr< T > Draw(ARGS... args)
Create drawable of specified class T.
std::shared_ptr< T > Add(ARGS... args)
Add drawable of specified class T.
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...
RPadBase(const char *csstype)
Allow derived classes to default construct a RPadBase.
const RPadBase * FindPadForPrimitiveWithDisplayId(const std::string &display_id) const
Find subpad which contains primitive with given display id.
void TestIfFrameRequired(const RDrawable *drawable)
std::vector< std::shared_ptr< RDrawable > > Primitives_t
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.
virtual const RCanvas * GetCanvas() const =0
Access to the top-most canvas, if any (const version).
bool Remove(const std::string &id)
Remove an object from the list of primitives.
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.
auto GetPrimitives() const
Get all primitives contained in the pad.
unsigned NumPrimitives() const
returns number of primitives in the pad
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.
virtual RCanvas * GetCanvas()=0
Access to the top-most canvas, if any (non-const version).
std::shared_ptr< RFrame > AddFrame()
Add a frame object for the pad.
bool RemoveAt(unsigned indx)
Remove drawable at specified position.
auto Draw(const std::shared_ptr< T > &what, ARGS... args)
Add object to be painted.
std::shared_ptr< RDrawable > Draw(std::shared_ptr< RDrawable > &&drawable)
Add existing drawable instance to canvas.
void Wipe()
Wipe the pad by clearing the list of primitives.
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.
std::vector< RIOSharedBase * > RIOSharedVector_t
auto GetDrawable(const std::shared_ptr< DRAWABLE > &drawable)
Central method to insert drawable in list of pad primitives By default drawable placed as is.
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.