library: libGui
#include "TGClient.h"

TGClient


class description - header file - source file
viewCVS header - viewCVS source

class TGClient: public TObject

Inheritance Inherited Members Includes Libraries
Class Charts

Function Members (Methods)

Display options:
Show inherited
Show non-public
public:
TGClient(const char* dpyName = "0")
virtual~TGClient()
voidTObject::AbstractMethod(const char* method) const
voidAddIdleHandler(TGIdleHandler* h)
voidAddUnknownWindowHandler(TGUnknownWindowHandler* h)
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
virtual voidTObject::Delete(Option_t* option = "")
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() const
virtual TObject*TObject::DrawClone(Option_t* option = "") const
virtual voidTObject::Dump() const
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
voidForceRedraw()
voidFreeColor(Pixel_t color) const
voidFreeFont(const TGFont* font)
voidFreeGC(const TGGC* gc)
voidFreeGC(GContext_t gc)
voidFreePicture(const TGPicture* pic)
Bool_tGetColorByName(const char* name, Pixel_t& pixel) const
Colormap_tGetDefaultColormap() const
const TGWindow*GetDefaultRoot() const
UInt_tGetDisplayHeight() const
UInt_tGetDisplayWidth() const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
TGFont*GetFont(const TGFont* font)
TGFont*GetFont(const char* font, Bool_t fixedDefault = kTRUE)
FontStruct_tGetFontByName(const char* name, Bool_t fixedDefault = kTRUE) const
TGFontPool*GetFontPool() const
TGGC*GetGC(GCValues_t* values, Bool_t rw = kFALSE)
TGGCPool*GetGCPool() const
Pixel_tGetHilite(Pixel_t base_color) const
virtual const char*TObject::GetIconName() const
TList*GetListOfPopups() const
THashList*GetListOfWindows() const
TGMimeTypes*GetMimeTypeList() const
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
const TGPicture*GetPicture(const char* name)
const TGPicture*GetPicture(const char* name, UInt_t new_width, UInt_t new_height)
TGPicturePool*GetPicturePool() const
const TGResourcePool*GetResourcePool() const
const TGWindow*GetRoot() const
Pixel_tGetShadow(Pixel_t base_color) const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
EGEventTypeGetWaitForEvent() const
Window_tGetWaitForWindow() const
TGWindow*GetWindowById(Window_t sw) const
TGWindow*GetWindowByName(const char* name) const
Bool_tHandleInput()
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() const
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
Bool_tIsEditable() const
Bool_tIsEditDisabled() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
voidNeedRedraw(TGWindow* w, Bool_t force = kFALSE)
virtual Bool_tTObject::Notify()
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
Bool_tProcessEventsFor(TGWindow* w)
voidProcessLine(TString cmd, Long_t msg, Long_t parm1, Long_t parm2)
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidRegisterPopup(TGWindow* w)
voidRegisterWindow(TGWindow* w)
voidRemoveIdleHandler(TGIdleHandler* h)
voidRemoveUnknownWindowHandler(TGUnknownWindowHandler* h)
voidTObject::ResetBit(UInt_t f)
voidResetWaitFor(TGWindow* w)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") const
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")
static voidTObject::SetDtorOnly(void* obj)
voidSetEditDisabled(Bool_t on = kTRUE)
static voidTObject::SetObjectStat(Bool_t stat)
voidSetRoot(TGWindow* root = 0)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
voidUnregisterPopup(TGWindow* w)
voidUnregisterWindow(TGWindow* w)
virtual voidTObject::UseCurrentStyle()
voidWaitFor(TGWindow* w)
voidWaitForUnmap(TGWindow* w)
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = "0", Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = "0", Int_t option = 0, Int_t bufsize = 0) const
protected:
TGClient(const TGClient&)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
Bool_tDoRedraw()
Bool_tHandleEvent(Event_t* event)
Bool_tHandleMaskEvent(Event_t* event, Window_t wid)
voidTObject::MakeZombie()
TGClient&operator=(const TGClient&)
Bool_tProcessIdleEvent()
Bool_tProcessOneEvent()

Data Members

public:
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
Pixel_tfBackColordefault background color
Pixel_tfForeColordefault foreground color
Pixel_tfHilitedefault hilite color
Pixel_tfShadowdefault shadow color
Pixel_tfSelBackColordefault selection background color
Pixel_tfSelForeColordefault selection foreground color
Pixel_tfWhitewhite color index
Pixel_tfBlackblack color index
TGWindow*fDefaultRootdefault root window (base window of display)
TGWindow*fRootcurrent root window (changing root window allows embedding)
Int_tfXfdfile descriptor of connection to server
TGResourcePool*fResourcePoolglobal GUI resource pool
TGGCPool*fGCPoolgraphics context pool
TGFontPool*fFontPoolfont pool
TGPicturePool*fPicturePoolpixmap pool
TGMimeTypes*fMimeTypeListmimetype list
Colormap_tfDefaultColormapdefault colormap
Bool_tfGlobalNeedRedrawtrue if at least one window needs to be redrawn
Bool_tfForceRedrawredraw widgets as soon as possible
THashList*fWlistlist of frames
TList*fPlistlist of popup windows used in HandleMaskEvent()
TList*fUWHandlerslist of event handlers for unknown windows
TList*fIdleHandlerslist of idle handlers
EGEventTypefWaitForEventevent to wait for
Window_tfWaitForWindowwindow in which to wait for event

Class Description

                                                                      
 TGClient                                                             
                                                                      
 Window client. In client server windowing systems, like X11 this     
 class is used to make the initial connection to the window server.   
                                                                      

TGClient(const char *dpyName)
 Create a connection with the display sever on host dpyName and setup
 the complete GUI system, i.e., graphics contexts, fonts, etc. for all
 widgets.
TGClient(const TGClient& gc)
copy constructor
TGClient& operator=(const TGClient& gc)
assignment operator
const TGWindow * GetRoot()
 Returns current root (i.e. base) window. By changing the root
 window one can change the window hierarchy, e.g. a top level
 frame (TGMainFrame) can be embedded in another window.
const TGWindow * GetDefaultRoot()
 Returns the root (i.e. desktop) window. Should only be used as parent
 for frames that will never be embedded, like popups, message boxes,
 etc. (like TGToolTips, TGMessageBox, etc.).
void SetRoot(TGWindow *root)
 Sets the current root (i.e. base) window. By changing the root
 window one can change the window hierarchy, e.g. a top level
 frame (TGMainFrame) can be embedded in another window.
UInt_t GetDisplayWidth()
 Get display width.
UInt_t GetDisplayHeight()
 Get display height.
const TGPicture * GetPicture(const char *name)
 Get picture from the picture pool. Picture must be freed using
 TGClient::FreePicture(). If picture is not found 0 is returned.
const TGPicture * GetPicture(const char *name, UInt_t new_width, UInt_t new_height)
 Get picture with specified size from pool (picture will be scaled if
 necessary). Picture must be freed using TGClient::FreePicture(). If
 picture is not found 0 is returned.
void FreePicture(const TGPicture *pic)
 Free picture resource.
TGGC * GetGC(GCValues_t *values, Bool_t rw)
 Get graphics context from the gc pool. Context must be freed via
 TGClient::FreeGC(). If rw is true a new read/write-able GC
 is returned, otherwise a shared read-only context is returned.
 For historical reasons it is also possible to create directly a
 TGGC object, but it is advised to use this new interface only.
void FreeGC(const TGGC *gc)
 Free a graphics context.
void FreeGC(GContext_t gc)
 Free a graphics context.
TGFont * GetFont(const char *font, Bool_t fixedDefault)
 Get a font from the font pool. Fonts must be freed via
 TGClient::FreeFont(). Returns 0 in case of error or if font
 does not exist. If fixedDefault is false the "fixed" font
 will not be substituted as fallback when the asked for font
 does not exist.
TGFont * GetFont(const TGFont *font)
 Get again specified font. Will increase its usage count.
void FreeFont(const TGFont *font)
 Free a font.
void NeedRedraw(TGWindow *w, Bool_t force)
 Set redraw flags.
Bool_t GetColorByName(const char *name, Pixel_t &pixel)
 Get a color by name. If color is found return kTRUE and pixel is
 set to the color's pixel value, kFALSE otherwise.
FontStruct_t GetFontByName(const char *name, Bool_t fixedDefault)
 Get a font by name. If font is not found, fixed font is returned,
 if fixed font also does not exist return 0 and print error.
 The loaded font needs to be freed using TVirtualX::DeleteFont().
 If fixedDefault is false the "fixed" font will not be substituted
 as fallback when the asked for font does not exist.
Pixel_t GetHilite(Pixel_t base_color)
 Return pixel value of hilite color based on base_color.
Pixel_t GetShadow(Pixel_t base_color)
 Return pixel value of shadow color based on base_color.
 Shadow is 60% of base_color intensity.
void FreeColor(Pixel_t color)
 Free color.
void RegisterWindow(TGWindow *w)
 Add a TGWindow to the clients list of windows.
void UnregisterWindow(TGWindow *w)
 Remove a TGWindow from the list of windows.
void RegisterPopup(TGWindow *w)
 Add a popup menu to the list of popups. This list is used to pass
 events to popup menus that are popped up over a transient window which
 is waited for (see WaitFor()).
void UnregisterPopup(TGWindow *w)
 Remove a popup menu from the list of popups.
void AddUnknownWindowHandler(TGUnknownWindowHandler *h)
 Add handler for unknown (i.e. unregistered) windows.
void RemoveUnknownWindowHandler(TGUnknownWindowHandler *h)
 Remove handler for unknown (i.e. unregistered) windows.
void AddIdleHandler(TGIdleHandler *h)
 Add handler for idle events.
void RemoveIdleHandler(TGIdleHandler *h)
 Remove handler for idle events.
TGWindow * GetWindowById(Window_t wid)
 Find a TGWindow via its handle. If window is not found return 0.
TGWindow * GetWindowByName(const char *name)
 Find a TGWindow via its name (unique name used in TGWindow::SavePrimitive).
 If window is not found return 0.
~TGClient()
 Closing down client: cleanup and close X connection.
Bool_t ProcessOneEvent()
 Process one event. This method should only be called when there is
 a GUI event ready to be processed. If event has been processed
 kTRUE is returned. If processing of a specific event type for a specific
 window was requested kFALSE is returned when specific event has been
 processed, kTRUE otherwise. If no more pending events return kFALSE.
Bool_t ProcessIdleEvent()
 Process one idle event.
Bool_t HandleInput()
 Handles input from the display server. Returns kTRUE if one or more
 events have been processed, kFALSE otherwise.
void WaitFor(TGWindow *w)
 Wait for window to be destroyed.
void WaitForUnmap(TGWindow *w)
 Wait for window to be unmapped.
void ResetWaitFor(TGWindow *w)
 reset waiting
Bool_t ProcessEventsFor(TGWindow *w)
 Like gSystem->ProcessEvents() but then only allow events for w to
 be processed. For example to interrupt the processing and destroy
 the window, call gROOT->SetInterrupt() before destroying the window.
Bool_t DoRedraw()
 Redraw all windows that need redrawing. Returns kFALSE if no redraw
 was needed, kTRUE otherwise.
 Only redraw the application's windows when the event queue
 does not contain expose event anymore.
Bool_t HandleEvent(Event_t *event)
 Handle a GUI 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 parent of the event window. The not
 masked event are handled directly. The masked events are:
 kButtonPress, kButtonRelease, kKeyPress, kKeyRelease, kEnterNotify,
 kLeaveNotify, kMotionNotify.
void ProcessLine(TString cmd, Long_t msg, Long_t parm1, Long_t parm2)
 Execute string "cmd" via the interpreter. Before executing replace
 in the command string the token $MSG, $PARM1 and $PARM2 by msg,
 parm1 and parm2, respectively. The function in cmd string must accept
 these as longs.
Bool_t IsEditDisabled()
 returns kTRUE if edit/guibuilding is forbidden
void SetEditDisabled(Bool_t on)
 if on is kTRUE editting/guibuilding is forbidden
Bool_t IsEditable()
{ return fRoot != fDefaultRoot; }
void ForceRedraw()
{ fForceRedraw = kTRUE; }
EGEventType GetWaitForEvent()
{ return fWaitForEvent;}
Window_t GetWaitForWindow()
{ return fWaitForWindow; }
const TGResourcePool * GetResourcePool()
{ return fResourcePool; }
TGPicturePool * GetPicturePool()
{ return fPicturePool; }
TGGCPool * GetGCPool()
{ return fGCPool; }
TGFontPool * GetFontPool()
{ return fFontPool; }
Colormap_t GetDefaultColormap()
{ return fDefaultColormap; }
TGMimeTypes * GetMimeTypeList()
{ return fMimeTypeList; }
THashList * GetListOfWindows()
{ return fWlist; }
TList * GetListOfPopups()
{ return fPlist; }

Author: Fons Rademakers 27/12/97
Last update: root/gui:$Name: $:$Id: TGClient.cxx,v 1.53 2006/11/16 17:17:37 rdm Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Class Hierarchy - 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.