23#include "RConfigure.h"
49 Error(
"TGApplication",
"only one instance of TGApplication allowed");
54 ::Fatal(
"TGApplication::TGApplication",
"ROOT system not initialized");
57 ::Fatal(
"TGApplication::TGApplication",
"gSystem not initialized");
60 gROOT->SetApplication(
this);
61 gROOT->SetName(appClassName);
68 gSystem->NotifyApplicationCreated();
76 Error(
"TGApplication",
"cannot switch to batch mode, exiting...");
83 if (strcmp(appClassName,
"proofserv")) {
84 const char *ttpath =
gEnv->GetValue(
"Root.TTFontPath",
90 if (ttfont &&
gEnv->GetValue(
"Root.UseTTFonts", 1)) {
92 if ((
h =
gROOT->GetPluginManager()->FindHandler(
"TVirtualX",
"x11ttf")))
93 if (
h->LoadPlugin() == -1)
94 Info(
"TGApplication",
"no TTF support");
106 if (
gEnv->GetValue(
"Canvas.UseScreenFactor", 1)) {
112 gStyle->SetScreenFactor(0.001 *
h);
121 gROOT->SetLineHasBeenProcessed();
138 TString title1 =
"ROOT interface to ";
143 title = title1 +
"X11";
145 nativex =
"win32gdk";
147 title = title1 +
"Win32gdk";
150 TString guiBackend(
gEnv->GetValue(
"Gui.Backend",
"native"));
152 if (guiBackend ==
"native") {
153 guiBackend = nativex;
156 title = title1 + guiBackend;
160 if ((
h =
gROOT->GetPluginManager()->FindHandler(
"TVirtualX", guiBackend))) {
161 if (
h->LoadPlugin() == -1)
176 for (
i = 0;
i < *argc;
i++) {
177 if (argv[
i] && !strcmp(argv[
i],
"-display")) {
178 if (argv[
i+1] && strlen(argv[
i+1]) && argv[
i+1][0] !=
'-') {
188 for (
i = 0;
i < *argc;
i++) {
R__EXTERN TApplication * gApplication
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void w
R__EXTERN TStyle * gStyle
R__EXTERN TSystem * gSystem
TApplication(const TApplication &)=delete
static void InitializeColors()
Initialize colors used by the TCanvas based graphics (via TColor objects).
This class initialize the ROOT GUI toolkit.
TGClient * fClient
pointer to the client environment
void GetOptions(Int_t *argc, char **argv) override
Handle command line arguments.
~TGApplication() override
TGApplication dtor.
void LoadGraphicsLibs() override
Load shared libs necessary for GUI.
TString fDisplay
display server to connect to
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
static const TString & GetTTFFontDir()
Get the fonts directory in the installation. Static utility function.
void ToLower()
Change string to lower-case.
const char * Data() const
Semi-Abstract base class defining a generic interface to the underlying, low level,...