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);
78 Error(
"TGApplication",
"cannot switch to batch mode, exiting...");
85 if (strcmp(appClassName,
"proofserv")) {
88 if ((
h =
gROOT->GetPluginManager()->FindHandler(
"TVirtualX",
"x11ttf")))
89 if (
h->LoadPlugin() == -1)
90 Info(
"TGApplication",
"no TTF support");
114 gROOT->SetLineHasBeenProcessed();
132 TString title1 =
"ROOT interface to ";
137 title = title1 +
"X11";
139 nativex =
"win32gdk";
141 title = title1 +
"Win32gdk";
146 if (guiBackend ==
"native") {
147 guiBackend = nativex;
150 title = title1 + guiBackend;
154 if ((
h =
gROOT->GetPluginManager()->FindHandler(
"TVirtualX", guiBackend))) {
155 if (
h->LoadPlugin() == -1)
170 for (i = 0; i < *argc; i++) {
171 if (!strcmp(argv[i],
"-display")) {
172 if (argv[i+1] && strlen(argv[i+1]) && argv[i+1][0] !=
'-') {
182 for (i = 0; i < *argc; i++) {
Semi-Abstract base class defining a generic interface to the underlying, low level, native graphics backend (X11, Win32, MacOS, OpenGL...).
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
virtual void NotifyApplicationCreated()
Hook to tell TSystem that the TApplication object has been created.
R__EXTERN TStyle * gStyle
virtual ~TGApplication()
TGApplication dtor.
void ToLower()
Change string to lower-case.
R__EXTERN TApplication * gApplication
virtual void LoadGraphicsLibs()
Load shared libs necessary for GUI.
virtual void SetDisplay()
Set DISPLAY environment variable based on utmp entry. Only for UNIX.
R__ALWAYS_INLINE Bool_t IsZombie() const
virtual void GetOptions(Int_t *argc, char **argv)
Handle command line arguments.
R__EXTERN TSystem * gSystem
void SetScreenFactor(Float_t factor=1)
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
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...
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
const char * Data() const