16#ifndef ROOT7_RWebWindowsManager
17#define ROOT7_RWebWindowsManager
32namespace Experimental {
78 static std::shared_ptr<RWebWindowsManager> &
Instance();
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.
Central instance to create and show web-based windows like Canvas or FitPanel.
std::shared_ptr< RWebWindow > CreateWindow()
Creates new window To show window, RWebWindow::Show() have to be called.
std::unique_ptr< THttpServer > fServer
! central communication with the all used displays
static std::shared_ptr< RWebWindowsManager > & Instance()
Returns default window manager Used to display all standard ROOT elements like TCanvas or TFitPanel.
float GetLaunchTmout() const
Returns timeout for launching new browser process.
std::string GetUrl(const RWebWindow &win, bool remote=false)
Provide URL address to access specified window from inside or from remote.
std::string GetServerAddr() const
Returns http address of the server, empty string when not available.
std::recursive_mutex fMutex
! main mutex, used for window creations
unsigned fIdCnt
! counter for identifiers
std::string fAddr
! HTTP address of the server
void Unregister(RWebWindow &win)
Release all references to specified window Called from RWebWindow destructor.
bool fUseSenderThreads
! use extra threads for sending data from RWebWindow to clients
static bool IsMainThrd()
Returns true when called from main process Main process recognized at the moment when library is load...
THttpServer * GetServer() const
Returns THttpServer instance.
static void AssignMainThrd()
Re-assigns main thread id Normally main thread id recognized at the moment when library is loaded It ...
RWebWindowsManager()
window manager constructor Required here for correct usage of unique_ptr<THttpServer>
unsigned ShowWindow(RWebWindow &win, bool batch_mode, const RWebDisplayArgs &args)
Show window in specified location, see Show() method for more details.
bool CreateServer(bool with_http=false)
Creates http server, if required - with real http engine (civetweb) One could configure concrete HTTP...
bool IsUseSenderThreads() const
Returns true if extra threads to send data via websockets will be used (default off)
~RWebWindowsManager()
window manager destructor Required here for correct usage of unique_ptr<THttpServer>
int WaitFor(RWebWindow &win, WebWindowWaitFunc_t check, bool timed=false, double tm=-1)
Waits until provided check function or lambdas returns non-zero value Regularly calls WebWindow::Sync...
bool IsUseHttpThread() const
Returns true if http server use special thread for requests processing (default off)
bool fUseHttpThrd
! use special thread for THttpServer
void Terminate()
Terminate http server and ROOT application.
float fLaunchTmout
! timeout in seconds to start browser process, default 30s
std::function< int(double)> WebWindowWaitFunc_t
function signature for waiting call-backs Such callback used when calling thread need to waits for so...
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...