10#define ROOT7_RDrawable
20namespace Experimental {
26class RIndirectDisplayItem;
29class RChangeAttrRequest;
30class RDrawableMenuRequest;
31class RDrawableExecRequest;
61 virtual void SetShared(
void *shared)
final {
fShared = *((std::shared_ptr<T> *) shared); }
182 virtual std::unique_ptr<RDisplayItem>
Display(
const RDisplayContext &);
189 virtual void Execute(
const std::string &);
215template <
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
virtual void SetShared(void *shared) final
RIOShared(const std::shared_ptr< T > &ptr)
const void * GetIOPtr() const final
virtual void * MakeShared() final
virtual bool HasShared() const final
const T * operator->() const
RIOShared & operator=(const std::shared_ptr< T > &ptr)
std::shared_ptr< T > get_shared() const
Base class for all attributes, used with RDrawable.
Base class for requests which can be submitted from the clients.
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
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.
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...