Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TWebCanvas Class Reference

Basic TCanvasImp ABI implementation for Web-based GUI Provides painting of main ROOT6 classes in web browsers.

Definition at line 34 of file TWebCanvas.h.

Classes

struct  PadStatus
 
struct  WebConn
 

Public Types

using ObjectSelectSignal_t = std::function< void(TPad *, TObject *)>
 Function type for signals, invoked when object is selected.
 
using PadClickedSignal_t = std::function< void(TPad *, int, int)>
 Function type for pad-click signals.
 
using PadSignal_t = std::function< void(TPad *)>
 Function type for pad-related signals - like activate pad signal.
 
using UpdatedSignal_t = std::function< void()>
 Function type for signals, invoked when canvas drawing or update is completed.
 

Public Member Functions

 TWebCanvas (TCanvas *c, const char *name, Int_t x, Int_t y, UInt_t width, UInt_t height, Bool_t readonly=kTRUE)
 Constructor.
 
virtual ~TWebCanvas ()=default
 
void ActivateInEditor (TPad *pad, TObject *obj)
 Activate object in editor in web browser.
 
void AddCustomClass (const std::string &clname, bool with_derived=false)
 Assign custom class.
 
void Close () override
 Close web canvas - not implemented.
 
void ForceUpdate () override
 Increment canvas version and force sending data to client - do not wait for reply.
 
Bool_t GetCanCreateObjects () const
 
Bool_t GetLongerPolling () const
 
Int_t GetPaletteDelivery () const
 
Int_t GetPrimitivesMerge () const
 
Int_t GetStyleDelivery () const
 
const std::shared_ptr< ROOT::Experimental::RWebWindow > & GetWebWindow () const
 
UInt_t GetWindowGeometry (Int_t &x, Int_t &y, UInt_t &w, UInt_t &h) override
 Returns window geometry including borders and menus.
 
Bool_t HasEditor () const override
 Returns kTRUE if web canvas has graphical editor.
 
Bool_t HasMenuBar () const override
 Returns kTRUE if web canvas has menu bar.
 
Bool_t HasStatusBar () const override
 Returns kTRUE if web canvas has status bar.
 
Bool_t HasToolBar () const override
 
Bool_t HasToolTips () const override
 Returns kTRUE if tooltips are activated in web canvas.
 
Int_t InitWindow () override
 Initialize window for the web canvas At this place canvas is not yet register to the list of canvases - one cannot call RWebWindow::Show()
 
TClassIsA () const override
 
Bool_t IsAsyncMode () const
 
bool IsCustomClass (const TClass *cl) const
 Checks if class belongs to custom.
 
virtual Bool_t IsReadOnly () const
 
void SetActivePadChangedHandler (PadSignal_t func)
 
void SetAsyncMode (Bool_t on=kTRUE)
 
void SetCanCreateObjects (Bool_t on=kTRUE)
 
void SetCustomScripts (const std::string &src)
 Configures custom script for canvas.
 
void SetLongerPolling (Bool_t on)
 
void SetObjSelectHandler (ObjectSelectSignal_t func)
 
void SetPadClickedHandler (PadClickedSignal_t func)
 
void SetPadDblClickedHandler (PadClickedSignal_t func)
 
void SetPaletteDelivery (Int_t val)
 
void SetPrimitivesMerge (Int_t cnt)
 
void SetStyleDelivery (Int_t val)
 
void SetUpdatedHandler (UpdatedSignal_t func)
 
void Show () override
 Show canvas in browser window.
 
void ShowEditor (Bool_t show=kTRUE) override
 
void ShowMenuBar (Bool_t show=kTRUE) override
 
void ShowStatusBar (Bool_t show=kTRUE) override
 
void ShowToolBar (Bool_t show=kTRUE) override
 
void ShowToolTips (Bool_t show=kTRUE) override
 
void ShowWebWindow (const ROOT::Experimental::RWebDisplayArgs &user_args="")
 Show canvas in specified place.
 
void Streamer (TBuffer &) override
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TCanvasImp
 TCanvasImp (TCanvas *c, const char *name, Int_t x, Int_t y, UInt_t width, UInt_t height)
 
 TCanvasImp (TCanvas *c, const char *name, UInt_t width, UInt_t height)
 
 TCanvasImp (TCanvas *c=nullptr)
 
virtual ~TCanvasImp ()
 
TCanvasCanvas () const
 
virtual void Iconify ()
 
virtual void RaiseWindow ()
 
virtual void ReallyDelete ()
 
virtual void SetCanvasSize (UInt_t w, UInt_t h)
 
virtual void SetStatusText (const char *text=nullptr, Int_t partidx=0)
 
virtual void SetWindowPosition (Int_t x, Int_t y)
 
virtual void SetWindowSize (UInt_t width, UInt_t height)
 
virtual void SetWindowTitle (const char *newTitle)
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 

Static Public Member Functions

static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static TString CreateCanvasJSON (TCanvas *c, Int_t json_compression=0)
 Create JSON painting output for given canvas Produce JSON can be used for offline drawing with JSROOT.
 
static TString CreatePadJSON (TPad *pad, Int_t json_compression=0)
 
static const char * DeclFileName ()
 
static TCanvasImpNewCanvas (TCanvas *c, const char *name, Int_t x, Int_t y, UInt_t width, UInt_t height)
 Static method to create TWebCanvas instance Used by plugin manager.
 
static bool ProduceImage (TPad *pad, const char *filename, Int_t width=0, Int_t height=0)
 Create image using batch (headless) capability of Chrome or Firefox browsers Supported png, jpeg, svg, pdf formats.
 
static Int_t StoreCanvasJSON (TCanvas *c, const char *filename, const char *option="")
 Create JSON painting output for given canvas and store into the file See TBufferJSON::ExportToFile() method for more details.
 
- Static Public Member Functions inherited from TCanvasImp
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 

Protected Types

using PadPaintingReady_t = std::function< void(TPadWebSnapshot *)>
 Function called when pad painting produced.
 

Protected Member Functions

void AddColorsPalette (TPadWebSnapshot &master)
 Add special canvas objects like colors list at selected palette.
 
Bool_t AddToSendQueue (unsigned connid, const std::string &msg)
 Add message to send queue for specified connection If connid == 0, message will be add to all connections Return kFALSE if queue is full or connection is not exists.
 
void AssignStatusBits (UInt_t bits)
 Assign clients bits.
 
UInt_t CalculateColorsHash ()
 Calculate hash function for all colors and palette.
 
virtual Bool_t CanCreateObject (const std::string &)
 
void CheckCanvasModified (bool force_modified=false)
 Check if any pad on the canvas was modified If yes, increment version of correspondent pad.
 
void CheckDataToSend (unsigned connid=0)
 Check if any data should be send to client If connid != 0, only selected connection will be checked.
 
void CheckPadModified (TPad *pad)
 Returns true if any pad in the canvas were modified Reset modified flags, increment canvas version (if inc_version is true)
 
void CreateObjectSnapshot (TPadWebSnapshot &master, TPad *pad, TObject *obj, const char *opt, TWebPS *masterps=nullptr)
 Creates representation of the object for painting in web browser.
 
TVirtualPadPainterCreatePadPainter () override
 Creates web-based pad painter.
 
void CreatePadSnapshot (TPadWebSnapshot &paddata, TPad *pad, Long64_t version, PadPaintingReady_t func)
 Create snapshot for pad and all primitives Callback function is used to create JSON in the middle of data processing - when all misc objects removed from canvas list of primitives or histogram list of functions After that objects are moved back to their places.
 
virtual Bool_t DecodePadOptions (const std::string &, bool process_execs=false)
 Decode all pad options, which includes ranges plus objects options.
 
TObjectFindPrimitive (const std::string &id, int idcnt=1, TPad *pad=nullptr, TObjLink **objlnk=nullptr, TPad **objpad=nullptr)
 Search of object with given id in list of primitives One could specify pad where search could be start Also if object is in list of primitives, one could ask for entry link for such object, This can allow to change draw option.
 
Bool_t IsFirstConn (unsigned connid) const
 
virtual Bool_t IsJSSupportedClass (TObject *obj, Bool_t many_primitives=kFALSE)
 Returns kTRUE when object is fully supported on JSROOT side In ROOT7 Paint function will just return appropriate flag that object can be displayed on JSROOT side.
 
Bool_t IsLocked () override
 
Bool_t IsWeb () const override
 
void Lock () override
 
Bool_t PerformUpdate () override
 if canvas or any subpad was modified, scan all primitives in the TCanvas and subpads and convert them into the structure which will be delivered to JSROOT client
 
virtual Bool_t ProcessData (unsigned connid, const std::string &arg)
 Handle data from web browser Returns kFALSE if message was not processed.
 
void ProcessExecs (TPad *pad, TExec *extra=nullptr)
 Process TExec objects in the pad.
 
TPadProcessObjectOptions (TWebObjectOptions &item, TPad *pad, int idcnt=1)
 Process data for single primitive Returns object pad if object was modified.
 
void ShowCmd (const std::string &arg, Bool_t show)
 Function used to send command to browser to toggle menu, toolbar, editors, ...
 
void Unlock () override
 
Bool_t WaitWhenCanvasPainted (Long64_t ver)
 Wait when specified version of canvas was painted and confirmed by browser.
 
- Protected Member Functions inherited from TCanvasImp
 TCanvasImp (const TCanvasImp &ci)
 
TCanvasImpoperator= (const TCanvasImp &ci)
 

Protected Attributes

PadSignal_t fActivePadChangedSignal
 ! signal emitted when active pad changed in the canvas
 
Bool_t fAsyncMode {kFALSE}
 ! when true, methods like TCanvas::Update will never block
 
Bool_t fCanCreateObjects {kTRUE}
 ! indicates if canvas allowed to create extra objects for interactive painting
 
Long64_t fCanvVersion {1}
 ! actual canvas version, changed with every new Modified() call
 
UInt_t fClientBits {0}
 ! latest status bits from client like editor visible or not
 
UInt_t fColorsHash {0}
 ! last hash of colors/palette
 
Long64_t fColorsVersion {0}
 ! current colors/palette version, checked every time when new snapshot created
 
std::vector< std::string > fCustomClasses
 ! list of custom classes, which can be delivered as is to client
 
std::string fCustomScripts
 ! custom JavaScript code or URL on JavaScript files to load before start drawing
 
Int_t fJsonComp {0}
 ! compression factor for messages send to the client
 
Bool_t fLongerPolling {kFALSE}
 ! when true, make longer polling in blocking operations
 
ObjectSelectSignal_t fObjSelectSignal
 ! signal emitted when new object selected in the pad
 
PadClickedSignal_t fPadClickedSignal
 ! signal emitted when simple mouse click performed on the pad
 
PadClickedSignal_t fPadDblClickedSignal
 ! signal emitted when simple mouse click performed on the pad
 
std::map< TPad *, PadStatusfPadsStatus
 ! map of pads in canvas and their status flags
 
Int_t fPaletteDelivery {1}
 ! colors palette delivery 0:never, 1:once, 2:always, 3:per subpad
 
TList fPrimitivesLists
 ! list of lists of primitives, temporary collected during painting
 
Int_t fPrimitivesMerge {100}
 ! number of PS primitives, which will be merged together
 
Bool_t fProcessingData {kFALSE}
 ! flag used to prevent blocking methods when process data is invoked
 
Bool_t fReadOnly {true}
 !< configured display
 
Int_t fStyleDelivery {0}
 ! gStyle delivery to clients: 0:never, 1:once, 2:always
 
UInt_t fStyleHash {0}
 ! last hash of gStyle
 
Long64_t fStyleVersion {0}
 ! current gStyle object version, checked every time when new snapshot created
 
UpdatedSignal_t fUpdatedSignal
 ! signal emitted when canvas updated or state is changed
 
std::vector< WebConnfWebConn
 ! connections
 
std::shared_ptr< ROOT::Experimental::RWebWindowfWindow
 
- Protected Attributes inherited from TCanvasImp
TCanvasfCanvas {nullptr}
 

#include <TWebCanvas.h>

Inheritance diagram for TWebCanvas:
[legend]

Member Typedef Documentation

◆ ObjectSelectSignal_t

using TWebCanvas::ObjectSelectSignal_t = std::function<void(TPad *, TObject *)>

Function type for signals, invoked when object is selected.

Definition at line 47 of file TWebCanvas.h.

◆ PadClickedSignal_t

using TWebCanvas::PadClickedSignal_t = std::function<void(TPad *, int, int)>

Function type for pad-click signals.

Definition at line 44 of file TWebCanvas.h.

◆ PadPaintingReady_t

using TWebCanvas::PadPaintingReady_t = std::function<void(TPadWebSnapshot *)>
protected

Function called when pad painting produced.

Definition at line 52 of file TWebCanvas.h.

◆ PadSignal_t

using TWebCanvas::PadSignal_t = std::function<void(TPad *)>

Function type for pad-related signals - like activate pad signal.

Definition at line 41 of file TWebCanvas.h.

◆ UpdatedSignal_t

using TWebCanvas::UpdatedSignal_t = std::function<void()>

Function type for signals, invoked when canvas drawing or update is completed.

Definition at line 38 of file TWebCanvas.h.

Constructor & Destructor Documentation

◆ TWebCanvas()

TWebCanvas::TWebCanvas ( TCanvas c,
const char *  name,
Int_t  x,
Int_t  y,
UInt_t  width,
UInt_t  height,
Bool_t  readonly = kTRUE 
)

Constructor.

Definition at line 66 of file TWebCanvas.cxx.

◆ ~TWebCanvas()

virtual TWebCanvas::~TWebCanvas ( )
virtualdefault

Member Function Documentation

◆ ActivateInEditor()

void TWebCanvas::ActivateInEditor ( TPad pad,
TObject obj 
)

Activate object in editor in web browser.

Definition at line 779 of file TWebCanvas.cxx.

◆ AddColorsPalette()

void TWebCanvas::AddColorsPalette ( TPadWebSnapshot master)
protected

Add special canvas objects like colors list at selected palette.

Definition at line 275 of file TWebCanvas.cxx.

◆ AddCustomClass()

void TWebCanvas::AddCustomClass ( const std::string &  clname,
bool  with_derived = false 
)

Assign custom class.

Definition at line 169 of file TWebCanvas.cxx.

◆ AddToSendQueue()

Bool_t TWebCanvas::AddToSendQueue ( unsigned  connid,
const std::string &  msg 
)
protected

Add message to send queue for specified connection If connid == 0, message will be add to all connections Return kFALSE if queue is full or connection is not exists.

Definition at line 622 of file TWebCanvas.cxx.

◆ AssignStatusBits()

void TWebCanvas::AssignStatusBits ( UInt_t  bits)
protected

Assign clients bits.

Definition at line 824 of file TWebCanvas.cxx.

◆ CalculateColorsHash()

UInt_t TWebCanvas::CalculateColorsHash ( )
protected

Calculate hash function for all colors and palette.

Definition at line 252 of file TWebCanvas.cxx.

◆ CanCreateObject()

virtual Bool_t TWebCanvas::CanCreateObject ( const std::string &  )
inlineprotectedvirtual

Definition at line 143 of file TWebCanvas.h.

◆ CheckCanvasModified()

void TWebCanvas::CheckCanvasModified ( bool  force_modified = false)
protected

Check if any pad on the canvas was modified If yes, increment version of correspondent pad.

Definition at line 1487 of file TWebCanvas.cxx.

◆ CheckDataToSend()

void TWebCanvas::CheckDataToSend ( unsigned  connid = 0)
protected

Check if any data should be send to client If connid != 0, only selected connection will be checked.

Definition at line 639 of file TWebCanvas.cxx.

◆ CheckPadModified()

void TWebCanvas::CheckPadModified ( TPad pad)
protected

Returns true if any pad in the canvas were modified Reset modified flags, increment canvas version (if inc_version is true)

Definition at line 1464 of file TWebCanvas.cxx.

◆ Class()

static TClass * TWebCanvas::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

static const char * TWebCanvas::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

static constexpr Version_t TWebCanvas::Class_Version ( )
inlinestaticconstexpr
Returns
Version of this class

Definition at line 234 of file TWebCanvas.h.

◆ Close()

void TWebCanvas::Close ( )
overridevirtual

Close web canvas - not implemented.

Reimplemented from TCanvasImp.

Definition at line 700 of file TWebCanvas.cxx.

◆ CreateCanvasJSON()

TString TWebCanvas::CreateCanvasJSON ( TCanvas c,
Int_t  json_compression = 0 
)
static

Create JSON painting output for given canvas Produce JSON can be used for offline drawing with JSROOT.

Definition at line 1632 of file TWebCanvas.cxx.

◆ CreateObjectSnapshot()

void TWebCanvas::CreateObjectSnapshot ( TPadWebSnapshot master,
TPad pad,
TObject obj,
const char *  opt,
TWebPS masterps = nullptr 
)
protected

Creates representation of the object for painting in web browser.

Definition at line 196 of file TWebCanvas.cxx.

◆ CreatePadJSON()

TString TWebCanvas::CreatePadJSON ( TPad pad,
Int_t  json_compression = 0 
)
static

Definition at line 1606 of file TWebCanvas.cxx.

◆ CreatePadPainter()

TVirtualPadPainter * TWebCanvas::CreatePadPainter ( )
overrideprotectedvirtual

Creates web-based pad painter.

Reimplemented from TCanvasImp.

Definition at line 88 of file TWebCanvas.cxx.

◆ CreatePadSnapshot()

void TWebCanvas::CreatePadSnapshot ( TPadWebSnapshot paddata,
TPad pad,
Long64_t  version,
PadPaintingReady_t  func 
)
protected

Create snapshot for pad and all primitives Callback function is used to create JSON in the middle of data processing - when all misc objects removed from canvas list of primitives or histogram list of functions After that objects are moved back to their places.

Definition at line 311 of file TWebCanvas.cxx.

◆ DeclFileName()

static const char * TWebCanvas::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 234 of file TWebCanvas.h.

◆ DecodePadOptions()

Bool_t TWebCanvas::DecodePadOptions ( const std::string &  msg,
bool  process_execs = false 
)
protectedvirtual

Decode all pad options, which includes ranges plus objects options.

Definition at line 836 of file TWebCanvas.cxx.

◆ FindPrimitive()

TObject * TWebCanvas::FindPrimitive ( const std::string &  id,
int  idcnt = 1,
TPad pad = nullptr,
TObjLink **  objlnk = nullptr,
TPad **  objpad = nullptr 
)
protected

Search of object with given id in list of primitives One could specify pad where search could be start Also if object is in list of primitives, one could ask for entry link for such object, This can allow to change draw option.

Definition at line 1772 of file TWebCanvas.cxx.

◆ ForceUpdate()

void TWebCanvas::ForceUpdate ( )
overridevirtual

Increment canvas version and force sending data to client - do not wait for reply.

Reimplemented from TCanvasImp.

Definition at line 1555 of file TWebCanvas.cxx.

◆ GetCanCreateObjects()

Bool_t TWebCanvas::GetCanCreateObjects ( ) const
inline

Definition at line 204 of file TWebCanvas.h.

◆ GetLongerPolling()

Bool_t TWebCanvas::GetLongerPolling ( ) const
inline

Definition at line 216 of file TWebCanvas.h.

◆ GetPaletteDelivery()

Int_t TWebCanvas::GetPaletteDelivery ( ) const
inline

Definition at line 210 of file TWebCanvas.h.

◆ GetPrimitivesMerge()

Int_t TWebCanvas::GetPrimitivesMerge ( ) const
inline

Definition at line 213 of file TWebCanvas.h.

◆ GetStyleDelivery()

Int_t TWebCanvas::GetStyleDelivery ( ) const
inline

Definition at line 207 of file TWebCanvas.h.

◆ GetWebWindow()

const std::shared_ptr< ROOT::Experimental::RWebWindow > & TWebCanvas::GetWebWindow ( ) const
inline

Definition at line 157 of file TWebCanvas.h.

◆ GetWindowGeometry()

UInt_t TWebCanvas::GetWindowGeometry ( Int_t x,
Int_t y,
UInt_t w,
UInt_t h 
)
overridevirtual

Returns window geometry including borders and menus.

Reimplemented from TCanvasImp.

Definition at line 1522 of file TWebCanvas.cxx.

◆ HasEditor()

Bool_t TWebCanvas::HasEditor ( ) const
overridevirtual

Returns kTRUE if web canvas has graphical editor.

Reimplemented from TCanvasImp.

Definition at line 792 of file TWebCanvas.cxx.

◆ HasMenuBar()

Bool_t TWebCanvas::HasMenuBar ( ) const
overridevirtual

Returns kTRUE if web canvas has menu bar.

Reimplemented from TCanvasImp.

Definition at line 800 of file TWebCanvas.cxx.

◆ HasStatusBar()

Bool_t TWebCanvas::HasStatusBar ( ) const
overridevirtual

Returns kTRUE if web canvas has status bar.

Reimplemented from TCanvasImp.

Definition at line 808 of file TWebCanvas.cxx.

◆ HasToolBar()

Bool_t TWebCanvas::HasToolBar ( ) const
inlineoverridevirtual

Reimplemented from TCanvasImp.

Definition at line 194 of file TWebCanvas.h.

◆ HasToolTips()

Bool_t TWebCanvas::HasToolTips ( ) const
overridevirtual

Returns kTRUE if tooltips are activated in web canvas.

Reimplemented from TCanvasImp.

Definition at line 816 of file TWebCanvas.cxx.

◆ InitWindow()

Int_t TWebCanvas::InitWindow ( )
overridevirtual

Initialize window for the web canvas At this place canvas is not yet register to the list of canvases - one cannot call RWebWindow::Show()

Reimplemented from TCanvasImp.

Definition at line 80 of file TWebCanvas.cxx.

◆ IsA()

TClass * TWebCanvas::IsA ( ) const
inlineoverridevirtual
Returns
TClass describing current object

Reimplemented from TCanvasImp.

Definition at line 234 of file TWebCanvas.h.

◆ IsAsyncMode()

Bool_t TWebCanvas::IsAsyncMode ( ) const
inline

Definition at line 224 of file TWebCanvas.h.

◆ IsCustomClass()

bool TWebCanvas::IsCustomClass ( const TClass cl) const

Checks if class belongs to custom.

Definition at line 180 of file TWebCanvas.cxx.

◆ IsFirstConn()

Bool_t TWebCanvas::IsFirstConn ( unsigned  connid) const
inlineprotected

Definition at line 133 of file TWebCanvas.h.

◆ IsJSSupportedClass()

Bool_t TWebCanvas::IsJSSupportedClass ( TObject obj,
Bool_t  many_primitives = kFALSE 
)
protectedvirtual

Returns kTRUE when object is fully supported on JSROOT side In ROOT7 Paint function will just return appropriate flag that object can be displayed on JSROOT side.

Definition at line 97 of file TWebCanvas.cxx.

◆ IsLocked()

Bool_t TWebCanvas::IsLocked ( )
inlineoverrideprotectedvirtual

Reimplemented from TCanvasImp.

Definition at line 109 of file TWebCanvas.h.

◆ IsReadOnly()

virtual Bool_t TWebCanvas::IsReadOnly ( ) const
inlinevirtual

Definition at line 159 of file TWebCanvas.h.

◆ IsWeb()

Bool_t TWebCanvas::IsWeb ( ) const
inlineoverrideprotectedvirtual

Reimplemented from TCanvasImp.

Definition at line 111 of file TWebCanvas.h.

◆ Lock()

void TWebCanvas::Lock ( )
inlineoverrideprotectedvirtual

Reimplemented from TCanvasImp.

Definition at line 107 of file TWebCanvas.h.

◆ NewCanvas()

TCanvasImp * TWebCanvas::NewCanvas ( TCanvas c,
const char *  name,
Int_t  x,
Int_t  y,
UInt_t  width,
UInt_t  height 
)
static

Static method to create TWebCanvas instance Used by plugin manager.

Definition at line 1906 of file TWebCanvas.cxx.

◆ PerformUpdate()

Bool_t TWebCanvas::PerformUpdate ( )
overrideprotectedvirtual

if canvas or any subpad was modified, scan all primitives in the TCanvas and subpads and convert them into the structure which will be delivered to JSROOT client

Reimplemented from TCanvasImp.

Definition at line 1537 of file TWebCanvas.cxx.

◆ ProcessData()

Bool_t TWebCanvas::ProcessData ( unsigned  connid,
const std::string &  arg 
)
protectedvirtual

Handle data from web browser Returns kFALSE if message was not processed.

Definition at line 1097 of file TWebCanvas.cxx.

◆ ProcessExecs()

void TWebCanvas::ProcessExecs ( TPad pad,
TExec extra = nullptr 
)
protected

Process TExec objects in the pad.

Definition at line 1064 of file TWebCanvas.cxx.

◆ ProcessObjectOptions()

TPad * TWebCanvas::ProcessObjectOptions ( TWebObjectOptions item,
TPad pad,
int  idcnt = 1 
)
protected

Process data for single primitive Returns object pad if object was modified.

Definition at line 1696 of file TWebCanvas.cxx.

◆ ProduceImage()

bool TWebCanvas::ProduceImage ( TPad pad,
const char *  filename,
Int_t  width = 0,
Int_t  height = 0 
)
static

Create image using batch (headless) capability of Chrome or Firefox browsers Supported png, jpeg, svg, pdf formats.

Definition at line 1680 of file TWebCanvas.cxx.

◆ SetActivePadChangedHandler()

void TWebCanvas::SetActivePadChangedHandler ( PadSignal_t  func)
inline

Definition at line 198 of file TWebCanvas.h.

◆ SetAsyncMode()

void TWebCanvas::SetAsyncMode ( Bool_t  on = kTRUE)
inline

Definition at line 223 of file TWebCanvas.h.

◆ SetCanCreateObjects()

void TWebCanvas::SetCanCreateObjects ( Bool_t  on = kTRUE)
inline

Definition at line 203 of file TWebCanvas.h.

◆ SetCustomScripts()

void TWebCanvas::SetCustomScripts ( const std::string &  src)

Configures custom script for canvas.

If started from "load:" or "assert:" prefix will be loaded with JSROOT.AssertPrerequisites function Script should implement custom user classes, which transferred as is to client In the script draw handler for appropriate classes would be assigned

Definition at line 161 of file TWebCanvas.cxx.

◆ SetLongerPolling()

void TWebCanvas::SetLongerPolling ( Bool_t  on)
inline

Definition at line 215 of file TWebCanvas.h.

◆ SetObjSelectHandler()

void TWebCanvas::SetObjSelectHandler ( ObjectSelectSignal_t  func)
inline

Definition at line 201 of file TWebCanvas.h.

◆ SetPadClickedHandler()

void TWebCanvas::SetPadClickedHandler ( PadClickedSignal_t  func)
inline

Definition at line 199 of file TWebCanvas.h.

◆ SetPadDblClickedHandler()

void TWebCanvas::SetPadDblClickedHandler ( PadClickedSignal_t  func)
inline

Definition at line 200 of file TWebCanvas.h.

◆ SetPaletteDelivery()

void TWebCanvas::SetPaletteDelivery ( Int_t  val)
inline

Definition at line 209 of file TWebCanvas.h.

◆ SetPrimitivesMerge()

void TWebCanvas::SetPrimitivesMerge ( Int_t  cnt)
inline

Definition at line 212 of file TWebCanvas.h.

◆ SetStyleDelivery()

void TWebCanvas::SetStyleDelivery ( Int_t  val)
inline

Definition at line 206 of file TWebCanvas.h.

◆ SetUpdatedHandler()

void TWebCanvas::SetUpdatedHandler ( UpdatedSignal_t  func)
inline

Definition at line 197 of file TWebCanvas.h.

◆ Show()

void TWebCanvas::Show ( )
overridevirtual

Show canvas in browser window.

Reimplemented from TCanvasImp.

Definition at line 757 of file TWebCanvas.cxx.

◆ ShowCmd()

void TWebCanvas::ShowCmd ( const std::string &  arg,
Bool_t  show 
)
protected

Function used to send command to browser to toggle menu, toolbar, editors, ...

Definition at line 770 of file TWebCanvas.cxx.

◆ ShowEditor()

void TWebCanvas::ShowEditor ( Bool_t  show = kTRUE)
inlineoverridevirtual

Reimplemented from TCanvasImp.

Definition at line 169 of file TWebCanvas.h.

◆ ShowMenuBar()

void TWebCanvas::ShowMenuBar ( Bool_t  show = kTRUE)
inlineoverridevirtual

Reimplemented from TCanvasImp.

Definition at line 167 of file TWebCanvas.h.

◆ ShowStatusBar()

void TWebCanvas::ShowStatusBar ( Bool_t  show = kTRUE)
inlineoverridevirtual

Reimplemented from TCanvasImp.

Definition at line 168 of file TWebCanvas.h.

◆ ShowToolBar()

void TWebCanvas::ShowToolBar ( Bool_t  show = kTRUE)
inlineoverridevirtual

Reimplemented from TCanvasImp.

Definition at line 170 of file TWebCanvas.h.

◆ ShowToolTips()

void TWebCanvas::ShowToolTips ( Bool_t  show = kTRUE)
inlineoverridevirtual

Reimplemented from TCanvasImp.

Definition at line 171 of file TWebCanvas.h.

◆ ShowWebWindow()

void TWebCanvas::ShowWebWindow ( const ROOT::Experimental::RWebDisplayArgs args = "")

Show canvas in specified place.

If parameter args not specified, default ROOT web display will be used

Definition at line 708 of file TWebCanvas.cxx.

◆ StoreCanvasJSON()

Int_t TWebCanvas::StoreCanvasJSON ( TCanvas c,
const char *  filename,
const char *  option = "" 
)
static

Create JSON painting output for given canvas and store into the file See TBufferJSON::ExportToFile() method for more details.

Definition at line 1656 of file TWebCanvas.cxx.

◆ Streamer()

void TWebCanvas::Streamer ( TBuffer )
overridevirtual

Reimplemented from TCanvasImp.

◆ StreamerNVirtual()

void TWebCanvas::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 234 of file TWebCanvas.h.

◆ Unlock()

void TWebCanvas::Unlock ( )
inlineoverrideprotectedvirtual

Reimplemented from TCanvasImp.

Definition at line 108 of file TWebCanvas.h.

◆ WaitWhenCanvasPainted()

Bool_t TWebCanvas::WaitWhenCanvasPainted ( Long64_t  ver)
protected

Wait when specified version of canvas was painted and confirmed by browser.

Definition at line 1568 of file TWebCanvas.cxx.

Member Data Documentation

◆ fActivePadChangedSignal

PadSignal_t TWebCanvas::fActivePadChangedSignal
protected

! signal emitted when active pad changed in the canvas

Definition at line 102 of file TWebCanvas.h.

◆ fAsyncMode

Bool_t TWebCanvas::fAsyncMode {kFALSE}
protected

! when true, methods like TCanvas::Update will never block

Definition at line 95 of file TWebCanvas.h.

◆ fCanCreateObjects

Bool_t TWebCanvas::fCanCreateObjects {kTRUE}
protected

! indicates if canvas allowed to create extra objects for interactive painting

Definition at line 92 of file TWebCanvas.h.

◆ fCanvVersion

Long64_t TWebCanvas::fCanvVersion {1}
protected

! actual canvas version, changed with every new Modified() call

Definition at line 83 of file TWebCanvas.h.

◆ fClientBits

UInt_t TWebCanvas::fClientBits {0}
protected

! latest status bits from client like editor visible or not

Definition at line 84 of file TWebCanvas.h.

◆ fColorsHash

UInt_t TWebCanvas::fColorsHash {0}
protected

! last hash of colors/palette

Definition at line 99 of file TWebCanvas.h.

◆ fColorsVersion

Long64_t TWebCanvas::fColorsVersion {0}
protected

! current colors/palette version, checked every time when new snapshot created

Definition at line 98 of file TWebCanvas.h.

◆ fCustomClasses

std::vector<std::string> TWebCanvas::fCustomClasses
protected

! list of custom classes, which can be delivered as is to client

Definition at line 91 of file TWebCanvas.h.

◆ fCustomScripts

std::string TWebCanvas::fCustomScripts
protected

! custom JavaScript code or URL on JavaScript files to load before start drawing

Definition at line 90 of file TWebCanvas.h.

◆ fJsonComp

Int_t TWebCanvas::fJsonComp {0}
protected

! compression factor for messages send to the client

Definition at line 89 of file TWebCanvas.h.

◆ fLongerPolling

Bool_t TWebCanvas::fLongerPolling {kFALSE}
protected

! when true, make longer polling in blocking operations

Definition at line 93 of file TWebCanvas.h.

◆ fObjSelectSignal

ObjectSelectSignal_t TWebCanvas::fObjSelectSignal
protected

! signal emitted when new object selected in the pad

Definition at line 105 of file TWebCanvas.h.

◆ fPadClickedSignal

PadClickedSignal_t TWebCanvas::fPadClickedSignal
protected

! signal emitted when simple mouse click performed on the pad

Definition at line 103 of file TWebCanvas.h.

◆ fPadDblClickedSignal

PadClickedSignal_t TWebCanvas::fPadDblClickedSignal
protected

! signal emitted when simple mouse click performed on the pad

Definition at line 104 of file TWebCanvas.h.

◆ fPadsStatus

std::map<TPad*, PadStatus> TWebCanvas::fPadsStatus
protected

! map of pads in canvas and their status flags

Definition at line 78 of file TWebCanvas.h.

◆ fPaletteDelivery

Int_t TWebCanvas::fPaletteDelivery {1}
protected

! colors palette delivery 0:never, 1:once, 2:always, 3:per subpad

Definition at line 87 of file TWebCanvas.h.

◆ fPrimitivesLists

TList TWebCanvas::fPrimitivesLists
protected

! list of lists of primitives, temporary collected during painting

Definition at line 85 of file TWebCanvas.h.

◆ fPrimitivesMerge

Int_t TWebCanvas::fPrimitivesMerge {100}
protected

! number of PS primitives, which will be merged together

Definition at line 88 of file TWebCanvas.h.

◆ fProcessingData

Bool_t TWebCanvas::fProcessingData {kFALSE}
protected

! flag used to prevent blocking methods when process data is invoked

Definition at line 94 of file TWebCanvas.h.

◆ fReadOnly

Bool_t TWebCanvas::fReadOnly {true}
protected

!< configured display

! in read-only mode canvas cannot be changed from client side

Definition at line 82 of file TWebCanvas.h.

◆ fStyleDelivery

Int_t TWebCanvas::fStyleDelivery {0}
protected

! gStyle delivery to clients: 0:never, 1:once, 2:always

Definition at line 86 of file TWebCanvas.h.

◆ fStyleHash

UInt_t TWebCanvas::fStyleHash {0}
protected

! last hash of gStyle

Definition at line 97 of file TWebCanvas.h.

◆ fStyleVersion

Long64_t TWebCanvas::fStyleVersion {0}
protected

! current gStyle object version, checked every time when new snapshot created

Definition at line 96 of file TWebCanvas.h.

◆ fUpdatedSignal

UpdatedSignal_t TWebCanvas::fUpdatedSignal
protected

! signal emitted when canvas updated or state is changed

Definition at line 101 of file TWebCanvas.h.

◆ fWebConn

std::vector<WebConn> TWebCanvas::fWebConn
protected

! connections

Definition at line 76 of file TWebCanvas.h.

◆ fWindow

std::shared_ptr<ROOT::Experimental::RWebWindow> TWebCanvas::fWindow
protected

Definition at line 80 of file TWebCanvas.h.

Libraries for TWebCanvas:

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