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")) {
88 if ((h =
gROOT->GetPluginManager()->FindHandler(
"TVirtualX",
"x11ttf")))
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))) {
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 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.
R__EXTERN TApplication * gApplication
Long_t ExecPlugin(int nargs, const T &...params)
const char * Data() const
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
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...