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")) {
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 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.
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.
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
Long_t ExecPlugin(int nargs, const T &... params)
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