23#include "RConfigure.h"
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...");
103 gROOT->SetLineHasBeenProcessed();
120 TString title1 =
"ROOT interface to ";
125 title = title1 +
"X11";
127 nativex =
"win32gdk";
129 title = title1 +
"Win32gdk";
134 if (guiBackend ==
"native") {
135 guiBackend = nativex;
138 title = title1 + guiBackend;
142 if ((
h =
gROOT->GetPluginManager()->FindHandler(
"TVirtualX", guiBackend))) {
143 if (
h->LoadPlugin() == -1)
158 for (i = 0; i < *argc; i++) {
159 if (argv[i] && !strcmp(argv[i],
"-display")) {
160 if (argv[i+1] && strlen(argv[i+1]) && argv[i+1][0] !=
'-') {
170 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.
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
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.
Longptr_t ExecPlugin(int nargs)
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 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,...