10#define ROOT7_RDrawable
20namespace Experimental {
26class RDrawableDisplayItem;
27class RIndirectDisplayItem;
30class RChangeAttrRequest;
31class RDrawableMenuRequest;
32class RDrawableExecRequest;
190 virtual std::unique_ptr<RDisplayItem>
Display(
const RDisplayContext &);
199 virtual void Execute(
const std::string &);
225template <
class DRAWABLE, std::enable_if_t<std::is_base_of<RDrawable, DRAWABLE>{}>* =
nullptr>
virtual void SetShared(void *shared)=0
virtual void * MakeShared()=0
virtual const void * GetIOPtr() const =0
virtual ~RIOSharedBase()=default
virtual bool HasShared() const =0
T * fIO
plain pointer for IO
std::shared_ptr< T > fShared
! holder of object
bool HasShared() const final
void * MakeShared() final
RIOShared(const std::shared_ptr< T > &ptr)
const void * GetIOPtr() const final
const T * operator->() const
RIOShared & operator=(const std::shared_ptr< T > &ptr)
void SetShared(void *shared) final
std::shared_ptr< T > get_shared() const
Base class for all attributes, used with RDrawable.
Base class for painting data for JS.
Generic display item for RDrawable, just reference drawable itself.
Request execution of method of referenced drawable, no reply.
void SetDrawable(RDrawable *dr, unsigned indx)
Set drawable and its index in list of primitives.
void SetCanvas(RCanvas *canv)
Set canvas.
RCanvas * GetCanvas() const
unsigned GetConnId() const
RDisplayContext(RCanvas *canv, RPadBase *pad, Version_t vers=0)
Version_t GetLastVersion() const
RPadBase * fPad
! subpad where drawable is displayed
RDrawable * fDrawable
! reference on the drawable
void SetConnection(unsigned connid, bool ismain)
Set connection id and ismain flag for connection.
unsigned fConnId
! connection id
RDrawable * GetDrawable() const
RPadBase * GetPad() const
unsigned fIndex
! index in list of primitives
Version_t fLastVersion
! last displayed version
bool fMainConn
! is main connection
RCanvas * fCanvas
! canvas where drawable is displayed
void SetPad(RPadBase *pad)
Set pad.
unsigned GetIndex() const
RDisplayContext()=default
Base class for drawable entities: objects that can be painted on a RPad.
const RAttrMap & GetAttrMap() const
RDrawable(const RDrawable &)=delete
RDrawable & operator=(const RDrawable &)=delete
virtual void Execute(const std::string &)
virtual bool IsFrameRequired() const
Version_t GetVersion() const
std::weak_ptr< RStyle > fStyle
! style applied for RDrawable, not stored when canvas is saved
const std::string & GetId() const
void SetCssClass(const std::string &cl)
RAttrMap fAttr
attributes values
virtual void SetDrawableVersion(Version_t vers)
std::string fCssClass
user defined drawable class, can later go inside map
virtual void PopulateMenu(RMenuItems &)
std::string fId
optional object identifier, may be used in CSS as well
const std::string & GetCssType() const
virtual void OnDisplayItemDestroyed(RDisplayItem *) const
bool MatchSelector(const std::string &selector) const
Preliminary method which checks if drawable matches with given selector Following selector are allowe...
virtual void UseStyle(const std::shared_ptr< RStyle > &style)
const std::string & GetCssClass() const
void SetId(const std::string &id)
virtual void CollectShared(Internal::RIOSharedVector_t &)
RDrawable(const std::string &type)
Version_t fVersion
! drawable version, changed from the canvas
std::string fCssType
! drawable type, not stored in the root file, must be initialized in constructor
virtual std::unique_ptr< RDisplayItem > Display(const RDisplayContext &)
Creates display item for drawable By default item contains drawable data itself.
Extract (reference) only basic attributes from drawable, but not drawable itself.
Base class for graphic containers for RDrawable-s.
A set of defaults for graphics attributes, e.g.
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.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...