Implementation of painter for ROOT::Experimental::RCanvas, using RWebWindow.
Definition at line 62 of file RCanvasPainter.cxx.
Classes | |
| class | GeneratorImpl |
| struct | WebCommand |
| struct | WebConn |
| struct | WebUpdate |
Public Member Functions | |
| RCanvasPainter (RCanvas &canv) | |
| Constructor. | |
| ~RCanvasPainter () override | |
| Destructor. | |
| bool | AddPanel (std::shared_ptr< ROOT::RWebWindow >) final |
| Add window as panel inside canvas window. | |
| 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. | |
| void | DoWhenReady (const std::string &name, const std::string &arg, bool async, CanvasCallback_t callback) final |
| perform special action when drawing is ready | |
| std::shared_ptr< ROOT::RWebWindow > | GetWindow () final |
| Returns web window used for canvas display. | |
| std::string | GetWindowAddr () const final |
| Returns web window name. | |
| std::string | GetWindowUrl (bool remote) final |
| Returns connection URL for web window. | |
| bool | IsCanvasModified (uint64_t id) const final |
| return true if canvas modified since last painting | |
| void | NewDisplay (const std::string &where) final |
| Create new display for the canvas See ROOT::RWebWindowsManager::Show() docu for more info. | |
| int | NumDisplays () const final |
| Returns number of connected displays. | |
| bool | ProduceBatchOutput (const std::string &fname, int width, int height) final |
| Produce batch output, using chrome headless mode with DOM dump. | |
| std::string | ProduceJSON () final |
| Produce JSON for the canvas. | |
| void | Run (double tm=0.) final |
| Run canvas functionality for specified period of time Required when canvas used not from the main thread. | |
| void | SetClearOnClose (const std::shared_ptr< void > &) final |
| Set handle to window which will be cleared when connection is closed. | |
Public Member Functions inherited from ROOT::Experimental::Internal::RVirtualCanvasPainter | |
| virtual | ~RVirtualCanvasPainter () |
| Default destructor. | |
Private Types | |
| typedef std::vector< Detail::RMenuItem > | MenuItemsVector |
Private Member Functions | |
| RCanvasPainter (const RCanvasPainter &)=delete | |
| Disable copy construction. | |
| void | CancelCommands (unsigned connid=0) |
| Cancel command execution on provided connection All commands are cancelled, when connid === 0. | |
| void | CancelUpdates () |
| Cancel all pending Canvas::Update() | |
| void | CheckDataToSend () |
| Check if canvas need to send data to the clients. | |
| 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. | |
| void | CreateWindow () |
| Create web window for canvas. | |
| std::shared_ptr< RDrawable > | FindPrimitive (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. | |
| void | FrontCommandReplied (const std::string &reply) |
| Process reply on the currently active command. | |
| RCanvasPainter & | operator= (const RCanvasPainter &)=delete |
| Disable assignment. | |
| void | ProcessData (unsigned connid, const std::string &arg) |
| Process data from the client. | |
| 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. | |
Private Attributes | |
| RCanvas & | fCanvas |
| ! Canvas we are painting, *this will be owned by canvas | |
| std::list< std::shared_ptr< WebCommand > > | fCmds |
| ! list of submitted commands | |
| uint64_t | fCmdsCnt {0} |
| ! commands counter | |
| std::vector< std::unique_ptr< ROOT::RWebDisplayHandle > > | fHelpHandles |
| ! array of handles for help widgets | |
| int | fJsonComp {23} |
| ! json compression for data send to client | |
| uint64_t | fSnapshotDelivered {0} |
| ! minimal version delivered to all connections | |
| std::list< WebUpdate > | fUpdatesLst |
| ! list of callbacks for canvas update | |
| std::list< WebConn > | fWebConn |
| !< configured display | |
| std::shared_ptr< ROOT::RWebWindow > | fWindow |
Additional Inherited Members | |
Static Public Member Functions inherited from ROOT::Experimental::Internal::RVirtualCanvasPainter | |
| static std::unique_ptr< RVirtualCanvasPainter > | Create (RCanvas &canv) |
| Loads the plugin that implements this class. | |
Static Protected Member Functions inherited from ROOT::Experimental::Internal::RVirtualCanvasPainter | |
| static std::unique_ptr< Generator > & | GetGenerator () |
| generator getter | |
|
private |
Definition at line 108 of file RCanvasPainter.cxx.
|
privatedelete |
Disable copy construction.
| RCanvasPainter::RCanvasPainter | ( | RCanvas & | canv | ) |
Constructor.
Definition at line 222 of file RCanvasPainter.cxx.
|
override |
Destructor.
Definition at line 231 of file RCanvasPainter.cxx.
|
finalvirtual |
Add window as panel inside canvas window.
Reimplemented from ROOT::Experimental::Internal::RVirtualCanvasPainter.
Definition at line 725 of file RCanvasPainter.cxx.
|
private |
Cancel command execution on provided connection All commands are cancelled, when connid === 0.
Definition at line 254 of file RCanvasPainter.cxx.
|
private |
Cancel all pending Canvas::Update()
Definition at line 242 of file RCanvasPainter.cxx.
|
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 367 of file RCanvasPainter.cxx.
|
private |
Check if canvas need to send data to the clients.
Definition at line 273 of file RCanvasPainter.cxx.
|
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 780 of file RCanvasPainter.cxx.
|
private |
Create web window for canvas.
Definition at line 630 of file RCanvasPainter.cxx.
|
finalvirtual |
perform special action when drawing is ready
Perform special action when drawing is ready.
Implements ROOT::Experimental::Internal::RVirtualCanvasPainter.
Definition at line 413 of file RCanvasPainter.cxx.
|
private |
Find drawable in the canvas with specified id Used to communicate with the clients, which does not have any pointer.
Definition at line 822 of file RCanvasPainter.cxx.
|
private |
Process reply on the currently active command.
Definition at line 871 of file RCanvasPainter.cxx.
|
finalvirtual |
Returns web window used for canvas display.
Implements ROOT::Experimental::Internal::RVirtualCanvasPainter.
Definition at line 685 of file RCanvasPainter.cxx.
|
finalvirtual |
Returns web window name.
Implements ROOT::Experimental::Internal::RVirtualCanvasPainter.
Definition at line 704 of file RCanvasPainter.cxx.
|
finalvirtual |
Returns connection URL for web window.
Implements ROOT::Experimental::Internal::RVirtualCanvasPainter.
Definition at line 714 of file RCanvasPainter.cxx.
|
inlinefinalvirtual |
return true if canvas modified since last painting
Implements ROOT::Experimental::Internal::RVirtualCanvasPainter.
Definition at line 157 of file RCanvasPainter.cxx.
|
finalvirtual |
Create new display for the canvas See ROOT::RWebWindowsManager::Show() docu for more info.
Implements ROOT::Experimental::Internal::RVirtualCanvasPainter.
Definition at line 662 of file RCanvasPainter.cxx.
|
finalvirtual |
Returns number of connected displays.
Implements ROOT::Experimental::Internal::RVirtualCanvasPainter.
Definition at line 694 of file RCanvasPainter.cxx.
|
privatedelete |
Disable assignment.
|
private |
Process data from the client.
Definition at line 508 of file RCanvasPainter.cxx.
|
finalvirtual |
Produce batch output, using chrome headless mode with DOM dump.
Implements ROOT::Experimental::Internal::RVirtualCanvasPainter.
Definition at line 466 of file RCanvasPainter.cxx.
|
finalvirtual |
Produce JSON for the canvas.
Implements ROOT::Experimental::Internal::RVirtualCanvasPainter.
Definition at line 497 of file RCanvasPainter.cxx.
|
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 906 of file RCanvasPainter.cxx.
|
private |
Method called when GUI sends file to save on local disk File data coded with base64 coding beside SVG format.
Definition at line 839 of file RCanvasPainter.cxx.
|
finalvirtual |
Set handle to window which will be cleared when connection is closed.
Reimplemented from ROOT::Experimental::Internal::RVirtualCanvasPainter.
Definition at line 769 of file RCanvasPainter.cxx.
|
private |
! Canvas we are painting, *this will be owned by canvas
Definition at line 110 of file RCanvasPainter.cxx.
|
private |
! list of submitted commands
Definition at line 115 of file RCanvasPainter.cxx.
|
private |
! commands counter
Definition at line 116 of file RCanvasPainter.cxx.
|
private |
! array of handles for help widgets
Definition at line 123 of file RCanvasPainter.cxx.
|
private |
! json compression for data send to client
Definition at line 121 of file RCanvasPainter.cxx.
|
private |
! minimal version delivered to all connections
Definition at line 118 of file RCanvasPainter.cxx.
|
private |
! list of callbacks for canvas update
Definition at line 119 of file RCanvasPainter.cxx.
|
private |
|
private |
Definition at line 112 of file RCanvasPainter.cxx.