22#include "RConfigure.h"
44 int *argc,
char **argv,
void*,
int)
48 Error(
"TGApplication",
"only one instance of TGApplication allowed");
53 ::Fatal(
"TGApplication::TGApplication",
"ROOT system not initialized");
56 ::Fatal(
"TGApplication::TGApplication",
"gSystem not initialized");
59 gROOT->SetApplication(
this);
60 gROOT->SetName(appClassName);
75 Error(
"TGApplication",
"cannot switch to batch mode, exiting...");
82 if (strcmp(appClassName,
"proofserv")) {
91 if ((
h =
gROOT->GetPluginManager()->FindHandler(
"TVirtualX",
"x11ttf")))
92 if (
h->LoadPlugin() == -1)
93 Info(
"TGApplication",
"no TTF support");
119 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 (!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
char * StrDup(const char *str)
Duplicate the string str.
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.
virtual void LoadGraphicsLibs()
Load shared libs necessary for GUI.
virtual void GetOptions(Int_t *argc, char **argv)
Handle command line arguments.
virtual ~TGApplication()
TGApplication dtor.
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.
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,...