23#include "RConfigure.h"
45 int *argc,
char **argv,
void*,
int)
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);
76 Error(
"TGApplication",
"cannot switch to batch mode, exiting...");
83 if (strcmp(appClassName,
"proofserv")) {
92 if ((
h =
gROOT->GetPluginManager()->FindHandler(
"TVirtualX",
"x11ttf")))
93 if (
h->LoadPlugin() == -1)
94 Info(
"TGApplication",
"no TTF support");
120 gROOT->SetLineHasBeenProcessed();
137 TString title1 =
"ROOT interface to ";
142 title = title1 +
"X11";
144 nativex =
"win32gdk";
146 title = title1 +
"Win32gdk";
151 if (guiBackend ==
"native") {
152 guiBackend = nativex;
155 title = title1 + guiBackend;
159 if ((
h =
gROOT->GetPluginManager()->FindHandler(
"TVirtualX", guiBackend))) {
160 if (
h->LoadPlugin() == -1)
175 for (i = 0; i < *argc; i++) {
176 if (argv[i] && !strcmp(argv[i],
"-display")) {
177 if (argv[i+1] && strlen(argv[i+1]) && argv[i+1][0] !=
'-') {
187 for (i = 0; i < *argc; i++) {
R__EXTERN TApplication * gApplication
R__EXTERN TStyle * gStyle
R__EXTERN TSystem * gSystem
This class creates the ROOT Application Environment that interfaces to the windowing system eventloop...
static void InitializeColors()
Initialize colors used by the TCanvas based graphics (via TColor objects).
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
This class initialize the ROOT GUI toolkit.
virtual void LoadGraphicsLibs()
Load shared libs necessary for GUI.
virtual void GetOptions(Int_t *argc, char **argv)
Handle command line arguments.
TGClient * fClient
pointer to the client environment
virtual ~TGApplication()
TGApplication dtor.
TString fDisplay
display server to connect to
R__ALWAYS_INLINE Bool_t IsZombie() const
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.
Longptr_t ExecPlugin(int nargs, const T &... params)
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
void SetScreenFactor(Float_t factor=1)
virtual void NotifyApplicationCreated()
Hook to tell TSystem that the TApplication object has been created.
virtual void SetDisplay()
Set DISPLAY environment variable based on utmp entry. Only for UNIX.
virtual void Exit(int code, Bool_t mode=kTRUE)
Exit the application.
virtual char * Which(const char *search, const char *file, EAccessMode mode=kFileExists)
Find location of file in a search path.
virtual void SetProgname(const char *name)
Set the application name (from command line, argv[0]) and copy it in gProgName.
Semi-Abstract base class defining a generic interface to the underlying, low level,...