TApplication


class description - source file - inheritance tree

class TApplication : public TObject


    protected:
TApplication TApplication() virtual void Help(const char* line) virtual void InitializeColors() virtual void LoadGraphicsLibs() void SetReturnFromRun(Bool_t ret) void SetSignalHandler(TSignalHandler* sh) public:
TApplication TApplication(const char* appClassName, int* argc, char** argv, void* options = 0, int numOptions = 0) TApplication TApplication(TApplication&) virtual void ~TApplication() virtual char* ApplicationName() const int Argc() const char** Argv() const char* Argv(int index) const static TClass* Class() void ClearInputFiles() static void CreateApplication() virtual TApplicationImp* GetApplicationImp() const char* GetIdleCommand() const virtual void GetOptions(int* argc, char** argv) TSignalHandler* GetSignalHandler() const virtual void HandleIdleTimer() virtual void HandleTermInput() virtual void Hide() virtual void Iconify() virtual void Init() TObjArray* InputFiles() const virtual TClass* IsA() const virtual Bool_t IsCmdThread() virtual void Lower() Bool_t NoLogOpt() const virtual void Open() virtual void ProcessFile(const char* line) virtual void ProcessLine(const char* line, Bool_t sync = kFALSE) Bool_t QuitOpt() const virtual void Raise() virtual void RemoveIdleTimer() Bool_t ReturnFromRun() const virtual void Run(Bool_t retrn = kFALSE) virtual void SetIdleTimer(UInt_t idleTimeInSec, const char* command) virtual void Show() virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void StartIdleing() virtual void StopIdleing() virtual void Streamer(TBuffer& b) virtual void Terminate(int status = 0)

Data Members

private:
Bool_t fReturnFromRun When true return from Run() int fArgc Number of command line arguments char** fArgv Command line arguments TApplicationImp* fAppImp Window system specific application implementation Bool_t fNoLog Do not process logon and logoff macros Bool_t fQuit Exit after having processed input files TObjArray* fFiles Array of input files (TObjString's) char* fIdleCommand Command to execute while application is idle TTimer* fIdleTimer Idle timer TSignalHandler* fSigHandler Interrupt handler


See also

TProofServ, TRint

Class Description

                                                                      
 TApplication                                                         
                                                                      
 This class creates the ROOT Application Environment that interfaces  
 to the windowing system eventloop and eventhandlers.                 
 This class must be instantiated exactly once in any given            
 application. Normally the specific application class inherits from   
 TApplication (see TRint).                                            
                                                                      


TApplication(const char *appClassName, int *argc, char **argv, void *options, int numOptions)
 Create an application environment. The application environment
 provides an interface to the graphics system and eventloop
 (be it X, Windoze, MacOS or BeOS). After creating the application
 object start the eventloop by calling its Run() method. The command
 line options recogized by TApplication are described in the GetOptions()
 method. The recognized options are removed from the argument array.
 The original list of argument options can be retrieved via the Argc()
 and Argv() methods. The "options" and "numOptions" arguments are
 not used. The appClassName "proofserv" is reserved for the PROOF system.

~TApplication()
 TApplication dtor.

void ClearInputFiles()
 Clear list containing macro files passed as program arguments.
 This method is called from TRint::Run() to ensure that the macro
 files are only executed the first time Run() is called.

void GetOptions(int *argc, char **argv)
 Get and handle command line options. Arguments handled are removed
 from the argument array. The following arguments are handled:
    -? : help
    -h : help
    -b : run in batch mode without graphics
    -n : do not execute logon and logoff macros as specified in .rootrc
    -q : exit after processing command line macro files
    -l : do not show splash screen
 The last three options are only relevant in conjunction with TRint.

void HandleIdleTimer()
 Handle idle timeout. When this timer expires the registered idle command
 will be executed by this routine.

void Help(const char *line)
 Print help on interpreter.

void InitializeColors()
 Initialize colors used by the TCanvas based graphics (via TColor objects).
 This method should be called before the ApplicationImp is created (which
 initializes the GUI colors).

void LoadGraphicsLibs()
 Load shared libs neccesary for graphics. These libraries are only
 loaded when gROOT->IsBatch() is kFALSE.

void ProcessLine(const char *line, Bool_t sync)
 Process a single command line, either a C++ statement or an interpreter
 command starting with a ".".

void ProcessFile(const char *name)
 Process a file containing a C++ macro.

void Run(Bool_t retrn)
 Main application eventloop. Calls system dependent eventloop via gSystem.

void SetIdleTimer(UInt_t idleTimeInSec, const char *command)
 Set the command to be executed after the system has been idle for
 idleTimeInSec seconds. Normally called via TROOT::Idle(...).

void RemoveIdleTimer()
 Remove idle timer. Normally called via TROOT::Idle(0).

void StartIdleing()
 Call when system starts idleing.

void StopIdleing()
 Call when system stops idleing.

void Terminate(int status)
 Terminate the application by call TSystem::Exit() unless application has
 been told to return from Run(), by a call to SetReturnFromRun().

void CreateApplication()
 Static function used to create a default application environment.



Inline Functions


                    void SetReturnFromRun(Bool_t ret)
                    void SetSignalHandler(TSignalHandler* sh)
            TApplication TApplication(const char* appClassName, int* argc, char** argv, void* options = 0, int numOptions = 0)
         TSignalHandler* GetSignalHandler() const
                    void HandleTermInput()
                    void Init()
             const char* GetIdleCommand() const
                   char* ApplicationName() const
                    void Show()
                    void Hide()
        TApplicationImp* GetApplicationImp()
                    void Iconify()
                  Bool_t IsCmdThread()
                    void Open()
                    void Raise()
                    void Lower()
                     int Argc() const
                  char** Argv() const
                   char* Argv(int index) const
                  Bool_t NoLogOpt() const
                  Bool_t QuitOpt() const
              TObjArray* InputFiles() const
                  Bool_t ReturnFromRun() const
                 TClass* Class()
                 TClass* IsA() const
                    void ShowMembers(TMemberInspector& insp, char* parent)
                    void Streamer(TBuffer& b)
            TApplication TApplication(TApplication&)


Author: Fons Rademakers 22/12/95
Last update: root/base:$Name: $:$Id: TApplication.cxx,v 1.3 2000/08/20 14:42:43 rdm Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.