32#include "RConfigure.h" 
   56static struct AddPseudoGlobals {
 
   74      if (rootlocal && rootlocal->
IsBatch()) {
 
  113Bool_t TGInputHandler::Notify()
 
  115   return fClient->HandleInput();
 
  137      Error(
"TGClient", 
"only one instance of TGClient allowed");
 
  147      Error(
"TGClient", 
"can't open display \"%s\", switching to batch mode...\n In case you run from a remote ssh session, reconnect with ssh -Y",
 
  154      TGInputHandler *xi = 
new TGInputHandler(
this, 
fXfd);
 
  403      Error(
"GetColorByName", 
"couldn't parse color %s", 
name);
 
  406      Warning(
"GetColorByName", 
"couldn't retrieve color %s.\n" 
  407              "Please close any other application, like netscape, " 
  408              "that might exhaust\nthe colormap and start ROOT again", 
name);
 
  426   if (
gROOT->IsBatch())
 
  431   if (!font && fixedDefault) {
 
  432      font = 
gVirtualX->LoadQueryFont(
"fixed");
 
  434         Warning(
"GetFontByName", 
"couldn't retrieve font %s, using \"fixed\"", 
name);
 
  438         Error(
"GetFontByName", 
"couldn't retrieve font %s nor backup font \"fixed\"", 
name);
 
  440         Warning(
"GetFontByName", 
"couldn't retrieve font %s", 
name);
 
  456   color.
fPixel = base_color;
 
  471      Error(
"GetHilite", 
"couldn't allocate hilight color");
 
  487   color.
fPixel = base_color;
 
  495      Error(
"GetShadow", 
"couldn't allocate shadow color");
 
  609   while ((obj = next())) {
 
  701      handledevent = 
kTRUE;
 
  870      if ((ptr->
fId == wid) ||
 
  885   while ((pop = (
TGWindow *) next())) {
 
  887         if ((ptr->
fId == pop->
fId) &&
 
  957   Emit(
"ProcessedEvent(Event_t*, Window_t)", args);
 
  966   Emit(
"RegisteredWindow(Window_t)", w);
 
R__EXTERN TApplication * gApplication
 
static TGClient * gClientGlobal
 
static TGClientInit gClientInit
 
void TriggerDictionaryInitialization_libGui()
 
R__EXTERN TSystem * gSystem
 
R__EXTERN TFileHandler * gXDisplay
 
R__EXTERN Atom_t gROOT_MESSAGE
 
R__EXTERN Atom_t gMOTIF_WM_HINTS
 
R__EXTERN Atom_t gWM_DELETE_WINDOW
 
void InitializeGraphics()
Initialize the graphics environment.
 
static void NeedGraphicsLibs()
Static method.
 
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
 
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
 
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
 
virtual Bool_t Notify()
Notify when event occurred on descriptor associated with this handler.
 
const TGWindow * GetDefaultRoot() const
Returns the root (i.e.
 
const TGWindow * GetRoot() const
Returns current root (i.e.
 
EGEventType fWaitForEvent
 
Bool_t ProcessIdleEvent()
Process one idle event.
 
Bool_t HandleMaskEvent(Event_t *event, Window_t wid)
Handle masked events only if window wid is the window for which the event was reported or if wid is a...
 
void FreeColor(Pixel_t color) const
Free color.
 
void CancelRedraw(TGWindow *w)
 
void ProcessLine(TString cmd, Long_t msg, Long_t parm1, Long_t parm2)
Execute string "cmd" via the interpreter.
 
static TGClient * Instance()
Returns global gClient (initialize graphics first, if not already done)
 
virtual ~TGClient()
Closing down client: cleanup and close X connection.
 
void RegisterPopup(TGWindow *w)
Add a popup menu to the list of popups.
 
void WaitForUnmap(TGWindow *w)
Wait for window to be unmapped.
 
void UnregisterPopup(TGWindow *w)
Remove a popup menu from the list of popups.
 
void ResetWaitFor(TGWindow *w)
reset waiting
 
TGGC * GetGC(GCValues_t *values, Bool_t rw=kFALSE)
Get graphics context from the gc pool.
 
Colormap_t fDefaultColormap
 
TGResourcePool * fResourcePool
 
TGFont * GetFont(const char *font, Bool_t fixedDefault=kTRUE)
Get a font from the font pool.
 
void FreeGC(const TGGC *gc)
Free a graphics context.
 
void AddUnknownWindowHandler(TGUnknownWindowHandler *h)
Add handler for unknown (i.e. unregistered) windows.
 
void SetStyle(UInt_t newstyle)
 
void RemoveUnknownWindowHandler(TGUnknownWindowHandler *h)
Remove handler for unknown (i.e. unregistered) windows.
 
void AddIdleHandler(TGIdleHandler *h)
Add handler for idle events.
 
void SetRoot(TGWindow *root=0)
Sets the current root (i.e.
 
void FreeFont(const TGFont *font)
Free a font.
 
void SetEditDisabled(Bool_t on=kTRUE)
If on is kTRUE editting/guibuilding is forbidden.
 
Bool_t ProcessEventsFor(TGWindow *w)
Like gSystem->ProcessEvents() but then only allow events for w to be processed.
 
Bool_t HandleEvent(Event_t *event)
Handle a GUI event.
 
Bool_t ProcessOneEvent()
Process one event.
 
void ProcessedEvent(Event_t *event, Window_t wid)
Emits a signal when an event has been processed.
 
TGMimeTypes * fMimeTypeList
 
Bool_t DoRedraw()
Redraw all windows that need redrawing.
 
UInt_t GetDisplayHeight() const
Get display height.
 
void WaitFor(TGWindow *w)
Wait for window to be destroyed.
 
void RegisterWindow(TGWindow *w)
Add a TGWindow to the clients list of windows.
 
TGWindow * GetWindowById(Window_t sw) const
Find a TGWindow via its handle. If window is not found return 0.
 
void RegisteredWindow(Window_t w)
Emits a signal when a Window has been registered in TGClient.
 
const TGPicture * GetPicture(const char *name)
Get picture from the picture pool.
 
Bool_t GetColorByName(const char *name, Pixel_t &pixel) const
Get a color by name.
 
TGClient(const TGClient &)
 
void RemoveIdleHandler(TGIdleHandler *h)
Remove handler for idle events.
 
Bool_t IsEditDisabled() const
Returns kTRUE if edit/guibuilding is forbidden.
 
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
 
Pixel_t GetHilite(Pixel_t base_color) const
Return pixel value of hilite color based on base_color.
 
FontStruct_t GetFontByName(const char *name, Bool_t fixedDefault=kTRUE) const
Get a font by name.
 
TGPicturePool * fPicturePool
 
Bool_t HandleInput()
Handles input from the display server.
 
UInt_t GetDisplayWidth() const
Get display width.
 
Pixel_t GetShadow(Pixel_t base_color) const
Return pixel value of shadow color based on base_color.
 
void FreePicture(const TGPicture *pic)
Free picture resource.
 
void UnregisterWindow(TGWindow *w)
Remove a TGWindow from the list of windows.
 
TGWindow * GetWindowByName(const char *name) const
Find a TGWindow via its name (unique name used in TGWindow::SavePrimitive).
 
TGFont * GetFont(const char *font, Bool_t fixedDefault=kTRUE)
Get the specified font.
 
void FreeFont(const TGFont *font)
Free font. If ref count is 0 delete font.
 
TGGC * GetGC(GCValues_t *values, Bool_t rw=kFALSE)
Get the best matching graphics context depending on values.
 
void FreeGC(const TGGC *gc)
Delete graphics context if it is not used anymore.
 
virtual Bool_t HandleEvent()
Handle the idle event.
 
void FreePicture(const TGPicture *pic)
Remove picture from cache if nobody is using it anymore.
 
const TGPicture * GetPicture(const char *name)
Get a picture from the picture pool.
 
Colormap_t GetDefaultColormap() const
 
Pixel_t GetSelectedBgndColor() const
 
Pixel_t GetFrameFgndColor() const
 
TGPicturePool * GetPicturePool() const
 
Pixel_t GetBlackColor() const
 
Pixel_t GetWhiteColor() const
 
TGFontPool * GetFontPool() const
 
TGGCPool * GetGCPool() const
 
TGMimeTypes * GetMimeTypes() const
 
Pixel_t GetSelectedFgndColor() const
 
Pixel_t GetFrameBgndColor() const
 
virtual Bool_t HandleEvent(Event_t *)=0
 
virtual Bool_t HandleEvent(Event_t *)
 
virtual UInt_t GetEditDisabled() const
 
virtual void SetEditDisabled(UInt_t on=kEditDisable)
 
static void MakeFunctor(const char *name, const char *type, GlobFunc &func)
 
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
 
TObject * FindObject(const char *name) const
Find object using its name.
 
TObject * Remove(TObject *obj)
Remove object from the list.
 
void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
 
TObject * Next()
Return next object in the list. Returns 0 when no more objects in list.
 
virtual void Add(TObject *obj)
 
virtual TObject * Remove(TObject *obj)
Remove object from the list.
 
virtual TObjLink * FirstLink() const
 
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
 
Wrapper around a TObject so it can be stored in a TList.
 
TObject * GetObject() const
 
Mother of all ROOT objects.
 
virtual const char * GetName() const
Returns name of object.
 
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
 
R__ALWAYS_INLINE Bool_t IsZombie() const
 
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
 
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
 
ROOT top level object description.
 
const char * Data() const
 
TString & ReplaceAll(const TString &s1, const TString &s2)
 
virtual void AddFileHandler(TFileHandler *fh)
Add a file handler to the list of system file handlers.
 
virtual void SetDisplay()
Set DISPLAY environment variable based on utmp entry. Only for UNIX.
 
virtual void Sleep(UInt_t milliSec)
Sleep milliSec milli seconds.
 
virtual Bool_t ProcessEvents()
Process pending events (GUI, timers, sockets).
 
R__EXTERN TROOT * gROOTLocal
 
static constexpr double s
 
Short_t Max(Short_t a, Short_t b)
 
Short_t Min(Short_t a, Short_t b)