Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Experimental::RBrowser Class Reference

Web-based ROOT file browser.

RBrowser requires one of the supported web browsers:

  • Google Chrome (preferable)
  • Mozilla Firefox

Definition at line 27 of file RBrowser.hxx.

Public Member Functions

 RBrowser (bool use_rcanvas=true)
 constructor
 
virtual ~RBrowser ()
 destructor
 
void AddRCanvas ()
 
void AddTCanvas ()
 
bool GetCatchWindowShow () const
 Is RWebWindow::Show calls catched for embeding of created widgets.
 
bool GetUseRCanvas () const
 
void Hide ()
 hide Browser
 
void SetCatchWindowShow (bool on=true)
 Enable/disable catch of RWebWindow::Show calls to embed created widgets, default on.
 
void SetUseRCanvas (bool on=true)
 
void SetWorkingPath (const std::string &path)
 Set working path in the browser.
 
void Show (const RWebDisplayArgs &args="", bool always_start_new_browser=false)
 show Browser in specified place
 

Protected Member Functions

std::shared_ptr< RBrowserWidgetAddCatchedWidget (const std::string &url, const std::string &kind)
 Add widget catched from external scripts.
 
void AddInitWidget (const std::string &kind)
 Create new widget and send init message to the client.
 
std::shared_ptr< RBrowserWidgetAddWidget (const std::string &kind)
 Creates new widget.
 
void CheckWidgtesModified ()
 Check if any widget was modified and update if necessary.
 
void CloseTab (const std::string &name)
 Close and delete specified widget.
 
std::shared_ptr< RBrowserWidgetFindWidget (const std::string &name) const
 Returns active geometry viewer (if any)
 
std::shared_ptr< RBrowserWidgetGetActiveWidget () const
 
std::string GetCurrentWorkingDirectory ()
 Return the current directory of ROOT.
 
std::vector< std::string > GetRootHistory ()
 Get content of history file.
 
std::vector< std::string > GetRootLogs ()
 Get content of log file.
 
std::string NewWidgetMsg (std::shared_ptr< RBrowserWidget > &widget)
 Create message which send to client to create new widget.
 
std::string ProcessBrowserRequest (const std::string &msg)
 Process browser request.
 
std::string ProcessDblClick (std::vector< std::string > &args)
 Process dbl click on browser item.
 
void ProcessMsg (unsigned connid, const std::string &arg)
 Process received message from the client.
 
void ProcessRunMacro (const std::string &file_path)
 Process run macro command in the editor.
 
void ProcessSaveFile (const std::string &fname, const std::string &content)
 Process file save command in the editor.
 
void SendInitMsg (unsigned connid)
 Process client connect.
 

Protected Attributes

std::string fActiveWidgetName
 ! name of active widget
 
RBrowserData fBrowsable
 ! central browsing element
 
bool fCatchWindowShow {true}
 ! if arbitrary RWebWindow::Show calls should be catched by browser
 
unsigned fConnId {0}
 ! default connection id
 
std::string fTitle
 ! title
 
bool fUseRCanvas {false}
 ! which canvas should be used
 
std::shared_ptr< RWebWindowfWebWindow
 ! web window to browser
 
int fWidgetCnt {0}
 ! counter for created widgets
 
std::vector< std::shared_ptr< RBrowserWidget > > fWidgets
 ! all browser widgets
 

#include <ROOT/RBrowser.hxx>

Constructor & Destructor Documentation

◆ RBrowser()

RBrowser::RBrowser ( bool  use_rcanvas = true)

constructor

Definition at line 157 of file RBrowser.cxx.

◆ ~RBrowser()

RBrowser::~RBrowser ( )
virtual

destructor

Definition at line 213 of file RBrowser.cxx.

Member Function Documentation

◆ AddCatchedWidget()

std::shared_ptr< RBrowserWidget > RBrowser::AddCatchedWidget ( const std::string &  url,
const std::string &  kind 
)
protected

Add widget catched from external scripts.

Definition at line 418 of file RBrowser.cxx.

◆ AddInitWidget()

void RBrowser::AddInitWidget ( const std::string &  kind)
protected

Create new widget and send init message to the client.

Definition at line 437 of file RBrowser.cxx.

◆ AddRCanvas()

void ROOT::Experimental::RBrowser::AddRCanvas ( )
inline

Definition at line 76 of file RBrowser.hxx.

◆ AddTCanvas()

void ROOT::Experimental::RBrowser::AddTCanvas ( )
inline

Definition at line 75 of file RBrowser.hxx.

◆ AddWidget()

std::shared_ptr< RBrowserWidget > RBrowser::AddWidget ( const std::string &  kind)
protected

Creates new widget.

Definition at line 389 of file RBrowser.cxx.

◆ CheckWidgtesModified()

void RBrowser::CheckWidgtesModified ( )
protected

Check if any widget was modified and update if necessary.

Definition at line 570 of file RBrowser.cxx.

◆ CloseTab()

void RBrowser::CloseTab ( const std::string &  name)
protected

Close and delete specified widget.

Definition at line 461 of file RBrowser.cxx.

◆ FindWidget()

std::shared_ptr< RBrowserWidget > RBrowser::FindWidget ( const std::string &  name) const
protected

Returns active geometry viewer (if any)

Definition at line 447 of file RBrowser.cxx.

◆ GetActiveWidget()

std::shared_ptr< RBrowserWidget > ROOT::Experimental::RBrowser::GetActiveWidget ( ) const
inlineprotected

Definition at line 47 of file RBrowser.hxx.

◆ GetCatchWindowShow()

bool ROOT::Experimental::RBrowser::GetCatchWindowShow ( ) const
inline

Is RWebWindow::Show calls catched for embeding of created widgets.

Definition at line 90 of file RBrowser.hxx.

◆ GetCurrentWorkingDirectory()

std::string RBrowser::GetCurrentWorkingDirectory ( )
protected

Return the current directory of ROOT.

Definition at line 553 of file RBrowser.cxx.

◆ GetRootHistory()

std::vector< std::string > RBrowser::GetRootHistory ( )
protected

Get content of history file.

Definition at line 474 of file RBrowser.cxx.

◆ GetRootLogs()

std::vector< std::string > RBrowser::GetRootLogs ( )
protected

Get content of log file.

Definition at line 497 of file RBrowser.cxx.

◆ GetUseRCanvas()

bool ROOT::Experimental::RBrowser::GetUseRCanvas ( ) const
inline

Definition at line 72 of file RBrowser.hxx.

◆ Hide()

void RBrowser::Hide ( )

hide Browser

Hide ROOT Browser.

Definition at line 377 of file RBrowser.cxx.

◆ NewWidgetMsg()

std::string RBrowser::NewWidgetMsg ( std::shared_ptr< RBrowserWidget > &  widget)
protected

Create message which send to client to create new widget.

Definition at line 561 of file RBrowser.cxx.

◆ ProcessBrowserRequest()

std::string RBrowser::ProcessBrowserRequest ( const std::string &  msg)
protected

Process browser request.

Definition at line 222 of file RBrowser.cxx.

◆ ProcessDblClick()

std::string RBrowser::ProcessDblClick ( std::vector< std::string > &  args)
protected

Process dbl click on browser item.

Definition at line 271 of file RBrowser.cxx.

◆ ProcessMsg()

void RBrowser::ProcessMsg ( unsigned  connid,
const std::string &  arg 
)
protected

Process received message from the client.

Definition at line 579 of file RBrowser.cxx.

◆ ProcessRunMacro()

void RBrowser::ProcessRunMacro ( const std::string &  file_path)
protected

Process run macro command in the editor.

Definition at line 257 of file RBrowser.cxx.

◆ ProcessSaveFile()

void RBrowser::ProcessSaveFile ( const std::string &  fname,
const std::string &  content 
)
protected

Process file save command in the editor.

Definition at line 246 of file RBrowser.cxx.

◆ SendInitMsg()

void RBrowser::SendInitMsg ( unsigned  connid)
protected

Process client connect.

Definition at line 518 of file RBrowser.cxx.

◆ SetCatchWindowShow()

void ROOT::Experimental::RBrowser::SetCatchWindowShow ( bool  on = true)
inline

Enable/disable catch of RWebWindow::Show calls to embed created widgets, default on.

Definition at line 87 of file RBrowser.hxx.

◆ SetUseRCanvas()

void ROOT::Experimental::RBrowser::SetUseRCanvas ( bool  on = true)
inline

Definition at line 73 of file RBrowser.hxx.

◆ SetWorkingPath()

void RBrowser::SetWorkingPath ( const std::string &  path)

Set working path in the browser.

Definition at line 694 of file RBrowser.cxx.

◆ Show()

void RBrowser::Show ( const RWebDisplayArgs args = "",
bool  always_start_new_browser = false 
)

show Browser in specified place

Show or update RBrowser in web window If web window already started - just refresh it like "reload" button does If no web window exists or.

Parameters
always_start_new_browserconfigured, starts new window

Definition at line 365 of file RBrowser.cxx.

Member Data Documentation

◆ fActiveWidgetName

std::string ROOT::Experimental::RBrowser::fActiveWidgetName
protected

! name of active widget

Definition at line 36 of file RBrowser.hxx.

◆ fBrowsable

RBrowserData ROOT::Experimental::RBrowser::fBrowsable
protected

! central browsing element

Definition at line 42 of file RBrowser.hxx.

◆ fCatchWindowShow

bool ROOT::Experimental::RBrowser::fCatchWindowShow {true}
protected

! if arbitrary RWebWindow::Show calls should be catched by browser

Definition at line 35 of file RBrowser.hxx.

◆ fConnId

unsigned ROOT::Experimental::RBrowser::fConnId {0}
protected

! default connection id

Definition at line 32 of file RBrowser.hxx.

◆ fTitle

std::string ROOT::Experimental::RBrowser::fTitle
protected

! title

Definition at line 31 of file RBrowser.hxx.

◆ fUseRCanvas

bool ROOT::Experimental::RBrowser::fUseRCanvas {false}
protected

! which canvas should be used

Definition at line 34 of file RBrowser.hxx.

◆ fWebWindow

std::shared_ptr<RWebWindow> ROOT::Experimental::RBrowser::fWebWindow
protected

! web window to browser

Definition at line 40 of file RBrowser.hxx.

◆ fWidgetCnt

int ROOT::Experimental::RBrowser::fWidgetCnt {0}
protected

! counter for created widgets

Definition at line 38 of file RBrowser.hxx.

◆ fWidgets

std::vector<std::shared_ptr<RBrowserWidget> > ROOT::Experimental::RBrowser::fWidgets
protected

! all browser widgets

Definition at line 37 of file RBrowser.hxx.

Libraries for ROOT::Experimental::RBrowser:

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