38 std::vector<std::shared_ptr<RBrowserWidget>>
fWidgets;
47 std::unique_ptr<RBrowserTimer>
fTimer;
50 std::shared_ptr<RBrowserWidget>
AddWidget(
const std::string &kind);
52 std::shared_ptr<RBrowserWidget>
FindWidget(
const std::string &
name,
const std::string &kind =
"")
const;
58 std::string
ProcessDblClick(
unsigned connid, std::vector<std::string> &args);
59 std::string
ProcessDrop(
unsigned connid, std::vector<std::string> &args);
60 std::string
NewWidgetMsg(std::shared_ptr<RBrowserWidget> &widget);
62 void ProcessSaveFile(
const std::string &fname,
const std::string &content);
69 void ProcessMsg(
unsigned connid,
const std::string &arg);
104 bool ActivateWidget(
const std::string &title,
const std::string &kind =
"");
Way to browse (hopefully) everything in ROOT.
bool fUseRCanvas
! which canvas should be used
std::unique_ptr< RBrowserTimer > fTimer
! timer to handle postponed requests
RBrowserData fBrowsable
! central browsing element
std::shared_ptr< RBrowserWidget > AddWidget(const std::string &kind)
Creates new widget.
std::vector< std::string > GetRootHistory()
Get content of history file.
void AddInitWidget(const std::string &kind)
Create new widget and send init message to the client.
std::vector< std::vector< std::string > > fPostponed
! postponed messages, handled in timer
std::shared_ptr< RWebWindow > fWebWindow
! web window to browser
std::string ProcessDrop(unsigned connid, std::vector< std::string > &args)
Process drop of item in the current tab.
int fWidgetCnt
! counter for created widgets
std::shared_ptr< RBrowserWidget > GetActiveWidget() const
std::string ProcessDblClick(unsigned connid, std::vector< std::string > &args)
Process dbl click on browser item.
void ClearOnClose(const std::shared_ptr< void > &handle)
Set handle which will be cleared when connection is closed.
std::string fActiveWidgetName
! name of active widget
RBrowser(bool use_rcanvas=false)
constructor
void SetWorkingPath(const std::string &path)
Set working path in the browser.
void Hide()
Hide ROOT Browser.
std::string NewWidgetMsg(std::shared_ptr< RBrowserWidget > &widget)
Create message which send to client to create new widget.
bool fCatchWindowShow
! if arbitrary RWebWindow::Show calls should be catched by browser
std::string fPromptFileOutput
! file name for prompt output
void SetCatchWindowShow(bool on=true)
Enable/disable catch of RWebWindow::Show calls to embed created widgets, default on.
void Show(const RWebDisplayArgs &args="", bool always_start_new_browser=false)
Show or update RBrowser in web window If web window already started - just refresh it like "reload" b...
std::string GetCurrentWorkingDirectory()
Return the current directory of ROOT.
bool GetCatchWindowShow() const
Is RWebWindow::Show calls catched for embeding of created widgets.
void SetUseRCanvas(bool on=true)
std::shared_ptr< RBrowserWidget > FindWidget(const std::string &name, const std::string &kind="") const
Find widget by name or kind.
std::shared_ptr< RBrowserWidget > AddCatchedWidget(RWebWindow *win, const std::string &kind)
Add widget catched from external scripts.
bool GetUseRCanvas() const
std::vector< std::shared_ptr< RBrowserWidget > > fWidgets
! all browser widgets
virtual ~RBrowser()
destructor
void ProcessSaveFile(const std::string &fname, const std::string &content)
Process file save command in the editor.
float fLastProgressSend
! last value of send progress
std::string GetWindowUrl(bool remote)
Return URL parameter for the window showing ROOT Browser See ROOT::RWebWindow::GetUrl docu for more d...
std::string ProcessBrowserRequest(const std::string &msg)
Process browser request.
std::vector< std::string > GetRootLogs()
Get content of log file.
void ProcessMsg(unsigned connid, const std::string &arg)
Process received message from the client.
void CheckWidgtesModified(unsigned connid)
Check if any widget was modified and update if necessary.
void CloseTab(const std::string &name)
Close and delete specified widget.
void ProcessPostponedRequests()
Process postponed requests - decouple from websocket handling Only requests which can take longer tim...
unsigned fConnId
! default connection id
bool ActivateWidget(const std::string &title, const std::string &kind="")
Activate widget in RBrowser One should specify title and (optionally) kind of widget like "tcanvas" o...
std::string fTitle
! title
friend class RBrowserTimer
void SendInitMsg(unsigned connid)
Process client connect.
void SendProgress(unsigned connid, float progr)
Send generic progress message to the web window Should show progress bar on client side.
long long fLastProgressSendTm
! time when last progress message was send
void ProcessRunMacro(const std::string &file_path)
Process run macro command in the editor.
void Sync()
Run widget Sync method - processing pending actions.
Holds different arguments for starting browser with RWebDisplayHandle::Display() method.
Represents web window, which can be shown in web browser or any other supported environment.