Logo ROOT  
Reference Guide
TWebGuiFactory.cxx
Go to the documentation of this file.
1// Author: Sergey Linev, GSI 7/12/2016
2
3/*************************************************************************
4 * Copyright (C) 1995-2021, Rene Brun and Fons Rademakers. *
5 * All rights reserved. *
6 * *
7 * For the licensing terms see $ROOTSYS/LICENSE. *
8 * For the list of contributors see $ROOTSYS/README/CREDITS. *
9 *************************************************************************/
10
11#include "TWebGuiFactory.h"
12#include "TRootGuiFactory.h"
13
14#include "TWebCanvas.h"
15#include "TEnv.h"
16
17#include <memory>
18
19/** \class TWebGuiFactory
20\ingroup webgui6
21
22This class is a proxy-factory for web-base ROOT GUI components.
23it overrides the member functions of the X11/win32gdk-based
24TGuiFactory.
25
26*/
27
28////////////////////////////////////////////////////////////////////////////////
29/// TWebGuiFactory ctor.
30/// Restore the right TVirtualX pointer
31
33 TGuiFactory("WebRootProxy","web-based ROOT GUI Factory")
34{
35 fGuiProxy = std::make_unique<TRootGuiFactory>();
36}
37
38////////////////////////////////////////////////////////////////////////////////
39
40TApplicationImp *TWebGuiFactory::CreateApplicationImp(const char *classname, int *argc, char **argv)
41{
42 return fGuiProxy->CreateApplicationImp(classname, argc, argv);
43}
44
45////////////////////////////////////////////////////////////////////////////////
46
48{
49 Bool_t readonly = gEnv->GetValue("WebGui.FullCanvas", (Int_t) 0) == 0;
50
51 return new TWebCanvas(c, title, 0, 0, width, height, readonly);
52}
53
54////////////////////////////////////////////////////////////////////////////////
55
57{
58 Bool_t readonly = gEnv->GetValue("WebGui.FullCanvas", (Int_t) 0) == 0;
59
60 return new TWebCanvas(c, title, x, y, width, height, readonly);
61}
62
63////////////////////////////////////////////////////////////////////////////////
64
66{
67 return CreateBrowserImp(b, title, width, height, (Option_t *)0);
68}
69
70////////////////////////////////////////////////////////////////////////////////
71
73{
74 return CreateBrowserImp(b, title, x, y, width, height, (Option_t *)0);
75}
76
77////////////////////////////////////////////////////////////////////////////////
78
80{
81 return fGuiProxy->CreateBrowserImp(b, title, width, height, opt);
82}
83
84////////////////////////////////////////////////////////////////////////////////
85
87{
88 return fGuiProxy->CreateBrowserImp(b, title, x, y, width, height, opt);
89}
90
91////////////////////////////////////////////////////////////////////////////////
92
94{
95 return fGuiProxy->CreateContextMenuImp(c, name, title);
96}
97
98////////////////////////////////////////////////////////////////////////////////
99
101{
102 return fGuiProxy->CreateControlBarImp(c,title);
103}
104
105////////////////////////////////////////////////////////////////////////////////
106
108{
109 return fGuiProxy->CreateControlBarImp(c, title, x, y);
110}
111
112////////////////////////////////////////////////////////////////////////////////
113
115{
116 return fGuiProxy->CreateInspectorImp(obj, width, height);
117}
#define b(i)
Definition: RSha256.hxx:100
#define c(i)
Definition: RSha256.hxx:101
int Int_t
Definition: RtypesCore.h:45
unsigned int UInt_t
Definition: RtypesCore.h:46
bool Bool_t
Definition: RtypesCore.h:63
const char Option_t
Definition: RtypesCore.h:66
include TDocParser_001 C image html pict1_TDocParser_001 png width
Definition: TDocParser.cxx:121
R__EXTERN TEnv * gEnv
Definition: TEnv.h:170
char name[80]
Definition: TGX11.cxx:110
ABC describing GUI independent application implementation protocol.
ABC describing GUI independent browser implementation protocol.
Definition: TBrowserImp.h:29
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:37
ABC describing GUI independent main window (with menubar, scrollbars and a drawing area).
Definition: TCanvasImp.h:30
The Canvas class.
Definition: TCanvas.h:23
This class provides an interface to GUI independent context sensitive popup menus.
This class provides an interface to context sensitive popup menus.
Definition: TContextMenu.h:44
ABC describing GUI independent control bar.
A Control Bar is a fully user configurable tool which provides fast access to frequently used operati...
Definition: TControlBar.h:26
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
Definition: TEnv.cxx:491
This ABC is a factory for GUI components.
Definition: TGuiFactory.h:42
ABC describing GUI independent object inspector (abstraction mainly needed for Win32.
Definition: TInspectorImp.h:30
Mother of all ROOT objects.
Definition: TObject.h:37
Basic TCanvasImp ABI implementation for Web-based GUI Provides painting of main ROOT6 classes in web ...
Definition: TWebCanvas.h:32
virtual TCanvasImp * CreateCanvasImp(TCanvas *c, const char *title, UInt_t width, UInt_t height)
Create a batch version of TCanvasImp.
virtual TInspectorImp * CreateInspectorImp(const TObject *obj, UInt_t width, UInt_t height)
Create a batch version of TInspectorImp.
virtual TControlBarImp * CreateControlBarImp(TControlBar *c, const char *title)
Create a batch version of TControlBarImp.
virtual TBrowserImp * CreateBrowserImp(TBrowser *b, const char *title, UInt_t width, UInt_t height)
TWebGuiFactory()
TWebGuiFactory ctor.
std::unique_ptr< TGuiFactory > fGuiProxy
virtual TContextMenuImp * CreateContextMenuImp(TContextMenu *c, const char *name, const char *title)
Create a batch version of TContextMenuImp.
virtual TApplicationImp * CreateApplicationImp(const char *classname, int *argc, char **argv)
Create a batch version of TApplicationImp.
Double_t y[n]
Definition: legend1.C:17
Double_t x[n]
Definition: legend1.C:17