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")) {
99 if ((h =
gROOT->GetPluginManager()->FindHandler(
"TVirtualX",
"x11ttf")))
101 Info(
"TGApplication",
"no TTF support");
127 gROOT->SetLineHasBeenProcessed();
145 TString title1 =
"ROOT interface to ";
150 title = title1 +
"X11";
152 nativex =
"win32gdk";
154 title = title1 +
"Win32gdk";
159 if (guiBackend ==
"native") {
160 guiBackend = nativex;
163 title = title1 + guiBackend;
167 if ((h =
gROOT->GetPluginManager()->FindHandler(
"TVirtualX", guiBackend))) {
183 for (i = 0; i < *argc; i++) {
184 if (!strcmp(argv[i],
"-display")) {
185 if (argv[i+1] && strlen(argv[i+1]) && argv[i+1][0] !=
'-') {
195 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.
virtual char * Which(const char *search, const char *file, EAccessMode mode=kFileExists)
Find location of file in a search path.
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
TPaveLabel title(3, 27.1, 15, 28.7,"ROOT Environment and Tools")
virtual Int_t GetValue(const char *name, Int_t dflt)
Returns the integer value for a resource.
void SetScreenFactor(Float_t factor=1)
ClassImp(TGApplication) TGApplication
Create a GUI application environment.
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...