Logo ROOT  
Reference Guide
ROOT::Experimental::RCanvasPainter Class Reference

Definition at line 60 of file RCanvasPainter.cxx.

Classes

class  GeneratorImpl
 
struct  WebCommand
 
struct  WebConn
 
struct  WebUpdate
 

Public Member Functions

 RCanvasPainter (RCanvas &canv)
 Constructor. More...
 
virtual ~RCanvasPainter ()
 Destructor. More...
 
bool AddPanel (std::shared_ptr< RWebWindow >) final
 Add window as panel inside canvas window. More...
 
void CanvasUpdated (uint64_t ver, bool async, CanvasCallback_t callback) final
 Method invoked when canvas should be updated on the client side Depending from delivered status, each client will received new data. More...
 
void DoWhenReady (const std::string &name, const std::string &arg, bool async, CanvasCallback_t callback) final
 perform special action when drawing is ready More...
 
std::string GetWindowAddr () const final
 Returns web window name. More...
 
bool IsCanvasModified (uint64_t id) const final
 return true if canvas modified since last painting More...
 
void NewDisplay (const std::string &where) final
 Create new display for the canvas See RWebWindowsManager::Show() docu for more info. More...
 
int NumDisplays () const final
 Returns number of connected displays. More...
 
bool ProduceBatchOutput (const std::string &fname, int width, int height) final
 Produce batch output, using chrome headless mode with DOM dump. More...
 
std::string ProduceJSON () final
 Produce JSON for the canvas. More...
 
void Run (double tm=0.) final
 Run canvas functionality for specified period of time Required when canvas used not from the main thread. More...
 
- Public Member Functions inherited from ROOT::Experimental::Internal::RVirtualCanvasPainter
virtual ~RVirtualCanvasPainter ()
 Default destructor. More...
 
virtual bool AddPanel (std::shared_ptr< RWebWindow >)
 
virtual void CanvasUpdated (uint64_t, bool, CanvasCallback_t)=0
 indicate that canvas changed, provides current version of the canvas More...
 
virtual void DoWhenReady (const std::string &, const std::string &, bool, CanvasCallback_t)=0
 perform special action when drawing is ready More...
 
virtual std::string GetWindowAddr () const =0
 
virtual bool IsCanvasModified (uint64_t) const =0
 return true if canvas modified since last painting More...
 
virtual void NewDisplay (const std::string &where)=0
 
virtual int NumDisplays () const =0
 
virtual bool ProduceBatchOutput (const std::string &, int, int)=0
 produce file output in batch mode like png, jpeg, svg or pdf More...
 
virtual std::string ProduceJSON ()=0
 produce canvas JSON More...
 
virtual void Run (double tm=0.)=0
 run canvas functionality in caller thread, not needed when main thread is used More...
 

Private Types

typedef std::vector< Detail::RMenuItemMenuItemsVector
 

Private Member Functions

 RCanvasPainter (const RCanvasPainter &)=delete
 Disable copy construction. More...
 
void CancelCommands (unsigned connid=0)
 Cancel command execution on provided connection All commands are cancelled, when connid === 0. More...
 
void CancelUpdates ()
 Cancel all pending Canvas::Update() More...
 
void CheckDataToSend ()
 Check if canvas need to send data to the clients. More...
 
std::string CreateSnapshot (RDrawable::RDisplayContext &ctxt)
 Create JSON representation of data, which should be send to the clients Here server-side painting is performed - each drawable adds own elements in so-called display list, which transferred to the clients. More...
 
void CreateWindow ()
 Create web window for canvas. More...
 
std::shared_ptr< RDrawableFindPrimitive (const RCanvas &can, const std::string &id, const RPadBase **subpad=nullptr)
 Find drawable in the canvas with specified id Used to communicate with the clients, which does not have any pointer. More...
 
void FrontCommandReplied (const std::string &reply)
 Process reply on the currently active command. More...
 
RCanvasPainteroperator= (const RCanvasPainter &)=delete
 Disable assignment. More...
 
void ProcessData (unsigned connid, const std::string &arg)
 Process data from the client. More...
 
void SaveCreatedFile (std::string &reply)
 Method called when GUI sends file to save on local disk File data coded with base64 coding beside SVG format. More...
 

Private Attributes

RCanvasfCanvas
 ! Canvas we are painting, *this will be owned by canvas More...
 
std::list< std::shared_ptr< WebCommand > > fCmds
 ! list of submitted commands More...
 
uint64_t fCmdsCnt {0}
 ! commands counter More...
 
int fJsonComp {23}
 ! json compression for data send to client More...
 
uint64_t fSnapshotDelivered {0}
 ! minimal version delivered to all connections More...
 
std::list< WebUpdatefUpdatesLst
 ! list of callbacks for canvas update More...
 
std::list< WebConnfWebConn
 !< configured display More...
 
std::shared_ptr< RWebWindowfWindow
 

Additional Inherited Members

- Static Public Member Functions inherited from ROOT::Experimental::Internal::RVirtualCanvasPainter
static std::unique_ptr< RVirtualCanvasPainterCreate (RCanvas &canv)
 Loads the plugin that implements this class. More...
 
- Static Protected Member Functions inherited from ROOT::Experimental::Internal::RVirtualCanvasPainter
static std::unique_ptr< Generator > & GetGenerator ()
 generator getter More...
 
Inheritance diagram for ROOT::Experimental::RCanvasPainter:
[legend]

Member Typedef Documentation

◆ MenuItemsVector

Definition at line 106 of file RCanvasPainter.cxx.

Constructor & Destructor Documentation

◆ RCanvasPainter() [1/2]

ROOT::Experimental::RCanvasPainter::RCanvasPainter ( const RCanvasPainter )
privatedelete

Disable copy construction.

◆ RCanvasPainter() [2/2]

RCanvasPainter::RCanvasPainter ( RCanvas canv)

Constructor.

Definition at line 212 of file RCanvasPainter.cxx.

◆ ~RCanvasPainter()

RCanvasPainter::~RCanvasPainter ( )
virtual

Destructor.

Definition at line 221 of file RCanvasPainter.cxx.

Member Function Documentation

◆ AddPanel()

bool RCanvasPainter::AddPanel ( std::shared_ptr< RWebWindow win)
finalvirtual

Add window as panel inside canvas window.

Reimplemented from ROOT::Experimental::Internal::RVirtualCanvasPainter.

Definition at line 666 of file RCanvasPainter.cxx.

◆ CancelCommands()

void RCanvasPainter::CancelCommands ( unsigned  connid = 0)
private

Cancel command execution on provided connection All commands are cancelled, when connid === 0.

Definition at line 244 of file RCanvasPainter.cxx.

◆ CancelUpdates()

void RCanvasPainter::CancelUpdates ( )
private

Cancel all pending Canvas::Update()

Definition at line 232 of file RCanvasPainter.cxx.

◆ CanvasUpdated()

void RCanvasPainter::CanvasUpdated ( uint64_t  ver,
bool  async,
CanvasCallback_t  callback 
)
finalvirtual

Method invoked when canvas should be updated on the client side Depending from delivered status, each client will received new data.

Implements ROOT::Experimental::Internal::RVirtualCanvasPainter.

Definition at line 357 of file RCanvasPainter.cxx.

◆ CheckDataToSend()

void RCanvasPainter::CheckDataToSend ( )
private

Check if canvas need to send data to the clients.

Definition at line 263 of file RCanvasPainter.cxx.

◆ CreateSnapshot()

std::string RCanvasPainter::CreateSnapshot ( RDrawable::RDisplayContext ctxt)
private

Create JSON representation of data, which should be send to the clients Here server-side painting is performed - each drawable adds own elements in so-called display list, which transferred to the clients.

Definition at line 705 of file RCanvasPainter.cxx.

◆ CreateWindow()

void RCanvasPainter::CreateWindow ( )
private

Create web window for canvas.

Definition at line 593 of file RCanvasPainter.cxx.

◆ DoWhenReady()

void RCanvasPainter::DoWhenReady ( const std::string &  name,
const std::string &  arg,
bool  async,
CanvasCallback_t  callback 
)
finalvirtual

perform special action when drawing is ready

Perform special action when drawing is ready.

Implements ROOT::Experimental::Internal::RVirtualCanvasPainter.

Definition at line 403 of file RCanvasPainter.cxx.

◆ FindPrimitive()

std::shared_ptr< RDrawable > RCanvasPainter::FindPrimitive ( const RCanvas can,
const std::string &  id,
const RPadBase **  subpad = nullptr 
)
private

Find drawable in the canvas with specified id Used to communicate with the clients, which does not have any pointer.

Definition at line 747 of file RCanvasPainter.cxx.

◆ FrontCommandReplied()

void RCanvasPainter::FrontCommandReplied ( const std::string &  reply)
private

Process reply on the currently active command.

Definition at line 796 of file RCanvasPainter.cxx.

◆ GetWindowAddr()

std::string RCanvasPainter::GetWindowAddr ( ) const
finalvirtual

Returns web window name.

Implements ROOT::Experimental::Internal::RVirtualCanvasPainter.

Definition at line 656 of file RCanvasPainter.cxx.

◆ IsCanvasModified()

bool ROOT::Experimental::RCanvasPainter::IsCanvasModified ( uint64_t  id) const
inlinefinalvirtual

return true if canvas modified since last painting

Implements ROOT::Experimental::Internal::RVirtualCanvasPainter.

Definition at line 153 of file RCanvasPainter.cxx.

◆ NewDisplay()

void RCanvasPainter::NewDisplay ( const std::string &  where)
finalvirtual

Create new display for the canvas See RWebWindowsManager::Show() docu for more info.

Implements ROOT::Experimental::Internal::RVirtualCanvasPainter.

Definition at line 625 of file RCanvasPainter.cxx.

◆ NumDisplays()

int RCanvasPainter::NumDisplays ( ) const
finalvirtual

Returns number of connected displays.

Implements ROOT::Experimental::Internal::RVirtualCanvasPainter.

Definition at line 646 of file RCanvasPainter.cxx.

◆ operator=()

RCanvasPainter & ROOT::Experimental::RCanvasPainter::operator= ( const RCanvasPainter )
privatedelete

Disable assignment.

◆ ProcessData()

void RCanvasPainter::ProcessData ( unsigned  connid,
const std::string &  arg 
)
private

Process data from the client.

Definition at line 492 of file RCanvasPainter.cxx.

◆ ProduceBatchOutput()

bool RCanvasPainter::ProduceBatchOutput ( const std::string &  fname,
int  width,
int  height 
)
finalvirtual

Produce batch output, using chrome headless mode with DOM dump.

Implements ROOT::Experimental::Internal::RVirtualCanvasPainter.

Definition at line 456 of file RCanvasPainter.cxx.

◆ ProduceJSON()

std::string RCanvasPainter::ProduceJSON ( )
finalvirtual

Produce JSON for the canvas.

Implements ROOT::Experimental::Internal::RVirtualCanvasPainter.

Definition at line 481 of file RCanvasPainter.cxx.

◆ Run()

void RCanvasPainter::Run ( double  tm = 0.)
finalvirtual

Run canvas functionality for specified period of time Required when canvas used not from the main thread.

Implements ROOT::Experimental::Internal::RVirtualCanvasPainter.

Definition at line 831 of file RCanvasPainter.cxx.

◆ SaveCreatedFile()

void RCanvasPainter::SaveCreatedFile ( std::string &  reply)
private

Method called when GUI sends file to save on local disk File data coded with base64 coding beside SVG format.

Definition at line 764 of file RCanvasPainter.cxx.

Member Data Documentation

◆ fCanvas

RCanvas& ROOT::Experimental::RCanvasPainter::fCanvas
private

! Canvas we are painting, *this will be owned by canvas

Definition at line 108 of file RCanvasPainter.cxx.

◆ fCmds

std::list<std::shared_ptr<WebCommand> > ROOT::Experimental::RCanvasPainter::fCmds
private

! list of submitted commands

Definition at line 113 of file RCanvasPainter.cxx.

◆ fCmdsCnt

uint64_t ROOT::Experimental::RCanvasPainter::fCmdsCnt {0}
private

! commands counter

Definition at line 114 of file RCanvasPainter.cxx.

◆ fJsonComp

int ROOT::Experimental::RCanvasPainter::fJsonComp {23}
private

! json compression for data send to client

Definition at line 119 of file RCanvasPainter.cxx.

◆ fSnapshotDelivered

uint64_t ROOT::Experimental::RCanvasPainter::fSnapshotDelivered {0}
private

! minimal version delivered to all connections

Definition at line 116 of file RCanvasPainter.cxx.

◆ fUpdatesLst

std::list<WebUpdate> ROOT::Experimental::RCanvasPainter::fUpdatesLst
private

! list of callbacks for canvas update

Definition at line 117 of file RCanvasPainter.cxx.

◆ fWebConn

std::list<WebConn> ROOT::Experimental::RCanvasPainter::fWebConn
private

!< configured display

! connections list

Definition at line 112 of file RCanvasPainter.cxx.

◆ fWindow

std::shared_ptr<RWebWindow> ROOT::Experimental::RCanvasPainter::fWindow
private

Definition at line 110 of file RCanvasPainter.cxx.


The documentation for this class was generated from the following file: