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);
62 GetOptions(argc, argv);
77 if (fClient->IsZombie()) {
78 Error(
"TGApplication",
"cannot switch to batch mode, exiting...");
85 if (strcmp(appClassName,
"proofserv")) {
94 if ((h =
gROOT->GetPluginManager()->FindHandler(
"TVirtualX",
"x11ttf")))
96 Info(
"TGApplication",
"no TTF support");
122 gROOT->SetLineHasBeenProcessed();
140 TString title1 =
"ROOT interface to ";
145 title = title1 +
"X11";
147 nativex =
"win32gdk";
149 title = title1 +
"Win32gdk";
154 if (guiBackend ==
"native") {
155 guiBackend = nativex;
158 title = title1 + guiBackend;
162 if ((h =
gROOT->GetPluginManager()->FindHandler(
"TVirtualX", guiBackend))) {
178 for (i = 0; i < *argc; i++) {
179 if (!strcmp(argv[i],
"-display")) {
180 if (argv[i+1] && strlen(argv[i+1]) && argv[i+1][0] !=
'-') {
190 for (i = 0; i < *argc; i++) {
static const TString & GetTTFFontDir()
Get the fonts directory in the installation. Static utility function.
Semi-Abstract base class defining a generic interface to the underlying, low level, native graphics backend (X11, Win32, MacOS, OpenGL...).
virtual void NotifyApplicationCreated()
Hook to tell TSystem that the TApplication object has been created.
void Fatal(const char *location, const char *msgfmt,...)
R__EXTERN TStyle * gStyle
virtual ~TGApplication()
TGApplication dtor.
Int_t LoadPlugin()
Load the plugin library for this handler.
void ToLower()
Change string to lower-case.
virtual char * Which(const char *search, const char *file, EAccessMode mode=kFileExists)
Find location of file in a search path.
R__EXTERN TApplication * gApplication
virtual void LoadGraphicsLibs()
Load shared libs necessary for GUI.
void Info(const char *location, const char *msgfmt,...)
virtual void SetDisplay()
Set DISPLAY environment variable based on utmp entry. Only for UNIX.
void Error(const char *location, const char *msgfmt,...)
virtual void GetOptions(Int_t *argc, char **argv)
Handle command line arguments.
R__EXTERN TSystem * gSystem
Long_t ExecPlugin(int nargs, const T &... params)
virtual Int_t GetValue(const char *name, Int_t dflt)
Returns the integer value for a resource.
void SetScreenFactor(Float_t factor=1)
char * StrDup(const char *str)
Duplicate the string str.
virtual void SetProgname(const char *name)
Set the application name (from command line, argv[0]) and copy it in gProgName.
virtual void Exit(int code, Bool_t mode=kTRUE)
Exit the application.
static void InitializeColors()
Initialize colors used by the TCanvas based graphics (via TColor objects).
This class creates the ROOT Application Environment that interfaces to the windowing system eventloop...
const char * Data() const