ROOT » GUI » GUI » TGClient

class TGClient: public TObject, public TQObject


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

Function Members (Methods)

voidTObject::AbstractMethod(const char* method) const
voidAddIdleHandler(TGIdleHandler* h)
voidAddUnknownWindowHandler(TGUnknownWindowHandler* h)
virtual voidTObject::AppendPad(Option_t* option = "")
static Bool_tTQObject::AreAllSignalsBlocked()
Bool_tTQObject::AreSignalsBlocked() const
static Bool_tTQObject::BlockAllSignals(Bool_t b)
Bool_tTQObject::BlockSignals(Bool_t b)
virtual voidTObject::Browse(TBrowser* b)
voidCancelRedraw(TGWindow* w)
virtual voidTQObject::ChangedBy(const char* method)SIGNAL
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
voidTQObject::CollectClassSignalLists(TList& list, TClass* cls)
virtual Int_tTObject::Compare(const TObject* obj) const
Bool_tTQObject::Connect(const char* signal, const char* receiver_class, void* receiver, const char* slot)
static Bool_tTQObject::Connect(TQObject* sender, const char* signal, const char* receiver_class, void* receiver, const char* slot)
static Bool_tTQObject::Connect(const char* sender_class, const char* signal, const char* receiver_class, void* receiver, const char* slot)
virtual voidTQObject::Connected(const char*)
virtual voidTObject::Copy(TObject& object) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual voidTQObject::Destroyed()SIGNAL
Bool_tTQObject::Disconnect(const char* signal = 0, void* receiver = 0, const char* slot = 0)
static Bool_tTQObject::Disconnect(TQObject* sender, const char* signal = 0, void* receiver = 0, const char* slot = 0)
static Bool_tTQObject::Disconnect(const char* class_name, const char* signal, void* receiver = 0, const char* slot = 0)
virtual voidTQObject::Disconnected(const char*)
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
voidTQObject::Emit(const char* signal)
voidTQObject::Emit(const char* signal, Long_t* paramArr)
voidTQObject::Emit(const char* signal, const char* params)
voidTQObject::Emit(const char* signal, Double_t param)
voidTQObject::Emit(const char* signal, Long_t param)
voidTQObject::Emit(const char* signal, Long64_t param)
voidTQObject::Emit(const char* signal, Bool_t param)
voidTQObject::Emit(const char* signal, Char_t param)
voidTQObject::Emit(const char* signal, UChar_t param)
voidTQObject::Emit(const char* signal, Short_t param)
voidTQObject::Emit(const char* signal, UShort_t param)
voidTQObject::Emit(const char* signal, Int_t param)
voidTQObject::Emit(const char* signal, UInt_t param)
voidTQObject::Emit(const char* signal, ULong_t param)
voidTQObject::Emit(const char* signal, ULong64_t param)
voidTQObject::Emit(const char* signal, Float_t param)
voidTQObject::EmitVA(const char* signal, Int_t nargs, va_list va)
voidTQObject::EmitVA<>(const char* signal_name, Int_t)
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
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*TQObject::GetListOfClassSignals() const
TList*TQObject::GetListOfConnections() const
TList*GetListOfPopups() const
TList*TQObject::GetListOfSignals() 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
UInt_tGetStyle() 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_tHandleEvent(Event_t* event)
Bool_tHandleMaskEvent(Event_t* event, Window_t wid)
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual Bool_tTQObject::HasConnection(const char* signal_name) const
virtual ULong_tTObject::Hash() const
virtual voidTQObject::HighPriority(const char* signal_name, const char* slot_name = 0)
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() constMENU
static TGClient*Instance()
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 voidTQObject::LowPriority(const char* signal_name, const char* slot_name = 0)
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual voidTQObject::Message(const char* msg)SIGNAL
voidNeedRedraw(TGWindow* w, Bool_t force = kFALSE)
virtual Bool_tTObject::Notify()
virtual Int_tTQObject::NumberOfConnections() const
virtual Int_tTQObject::NumberOfSignals() const
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
voidTObject::operator delete(void* ptr)
voidTObject::operator delete(void* ptr, void* vp)
voidTObject::operator delete[](void* ptr)
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
voidProcessedEvent(Event_t* event, Window_t wid)SIGNAL
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)
voidRegisteredWindow(Window_t w)SIGNAL
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 = "") constMENU
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 = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidSetEditDisabled(Bool_t on = kTRUE)
static voidTObject::SetObjectStat(Bool_t stat)
voidSetRoot(TGWindow* root = 0)
voidSetStyle(UInt_t newstyle)
voidSetStyle(const char* style)
virtual voidTObject::SetUniqueID(UInt_t uid)
voidSetWaitForWindow(Window_t wid)
virtual voidShowMembers(TMemberInspector& insp) const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_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
TGClient(const char* dpyName = 0)
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
static Int_tTQObject::CheckConnectArgs(TQObject* sender, TClass* sender_class, const char* signal, TClass* receiver_class, const char* slot)
static TStringTQObject::CompressName(const char* method_name)
static Bool_tTQObject::ConnectToClass(TQObject* sender, const char* signal, TClass* receiver_class, void* receiver, const char* slot)
static Bool_tTQObject::ConnectToClass(const char* sender_class, const char* signal, TClass* receiver_class, void* receiver, const char* slot)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
virtual void*TQObject::GetSender()
virtual const char*TQObject::GetSenderClassName() const
TGClient&operator=(const TGClient&)
TGClient(const TGClient&)

Data Members

static TObject::(anonymous)TObject::kBitMask
static TObject::EStatusBitsTObject::kCanDelete
static TObject::EStatusBitsTObject::kCannotPick
static TObject::EStatusBitsTObject::kHasUUID
static TObject::EStatusBitsTObject::kInvalidObject
static TObject::(anonymous)TObject::kIsOnHeap
static TObject::EStatusBitsTObject::kIsReferenced
static TObject::EStatusBitsTObject::kMustCleanup
static TObject::EStatusBitsTObject::kNoContextMenu
static TObject::(anonymous)TObject::kNotDeleted
static TObject::EStatusBitsTObject::kObjInCanvas
static TObject::(anonymous)TObject::kOverwrite
static TObject::(anonymous)TObject::kSingleKey
static TObject::(anonymous)TObject::kWriteDelete
static TObject::(anonymous)TObject::kZombie
Pixel_tfBackColordefault background color
Pixel_tfBlackblack color index
Colormap_tfDefaultColormapdefault colormap
TGWindow*fDefaultRootdefault root window (base window of display)
TGFontPool*fFontPoolfont pool
Bool_tfForceRedrawredraw widgets as soon as possible
Pixel_tfForeColordefault foreground color
TGGCPool*fGCPoolgraphics context pool
Bool_tfGlobalNeedRedrawtrue if at least one window needs to be redrawn
Pixel_tfHilitedefault hilite color
TList*fIdleHandlerslist of idle handlers
TList*TQObject::fListOfConnections! list of connections to this object
TList*TQObject::fListOfSignals! list of signals from this object
TGMimeTypes*fMimeTypeListmimetype list
TGPicturePool*fPicturePoolpixmap pool
TList*fPlistlist of popup windows used in HandleMaskEvent()
TGResourcePool*fResourcePoolglobal GUI resource pool
TGWindow*fRootcurrent root window (changing root window allows embedding)
Pixel_tfSelBackColordefault selection background color
Pixel_tfSelForeColordefault selection foreground color
Pixel_tfShadowdefault shadow color
Bool_tTQObject::fSignalsBlocked! flag used for suppression of signals
UInt_tfStyleGUI style (modern or classic)
TList*fUWHandlerslist of event handlers for unknown windows
EGEventTypefWaitForEventevent to wait for
Window_tfWaitForWindowwindow in which to wait for event
Pixel_tfWhitewhite color index
THashList*fWlistlist of frames
Int_tfXfdfile descriptor of connection to server
static Bool_tTQObject::fgAllSignalsBlockedflag used for suppression of all signals

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TGClient * Instance()
 Returns global gClient (initialize graphics first, if not already done)
TGClient(const char* dpyName = 0)
 Create a connection with the display sever on host dpyName and setup
 the complete GUI system, i.e., graphics contexts, fonts, etc. for all
const TGWindow * GetRoot() const
 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() const
 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 = 0)
 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.
void SetStyle(const char* style)
 Set the button style (modern or classic).
UInt_t GetDisplayWidth() const
 Get display width.
UInt_t GetDisplayHeight() const
 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 = kFALSE)
 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 = kTRUE)
 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 = kFALSE)
 Set redraw flags.
void CancelRedraw(TGWindow* w)
Bool_t GetColorByName(const char* name, Pixel_t& pixel) const
 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 = kTRUE) const
 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) const
 Return pixel value of hilite color based on base_color.
Pixel_t GetShadow(Pixel_t base_color) const
 Return pixel value of shadow color based on base_color.
 Shadow is 60% of base_color intensity.
void FreeColor(Pixel_t color) const
 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 sw) const
 Find a TGWindow via its handle. If window is not found return 0.
TGWindow * GetWindowByName(const char* name) const
 Find a TGWindow via its name (unique name used in TGWindow::SavePrimitive).
 If window is not found return 0.
 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() const
 Returns kTRUE if edit/guibuilding is forbidden.
void SetEditDisabled(Bool_t on = kTRUE)
 If on is kTRUE editting/guibuilding is forbidden.
void ProcessedEvent(Event_t* event, Window_t wid)
 Emits a signal when an event has been processed.
 Used in TRecorder.
void RegisteredWindow(Window_t w)
 Emits a signal when a Window has been registered in TGClient.
 Used in TRecorder.
TGClient(const TGClient& )
TGClient& operator=(const TGClient& )
Bool_t IsEditable() const
{ return fRoot != fDefaultRoot; }
void ForceRedraw()
EGEventType GetWaitForEvent() const
{ return fWaitForEvent;}
Window_t GetWaitForWindow() const
{ return fWaitForWindow; }
void SetWaitForWindow(Window_t wid)
const TGResourcePool * GetResourcePool() const
{ return fResourcePool; }
TGPicturePool * GetPicturePool() const
{ return fPicturePool; }
TGGCPool * GetGCPool() const
{ return fGCPool; }
TGFontPool * GetFontPool() const
{ return fFontPool; }
UInt_t GetStyle() const
{ return fStyle; }
void SetStyle(UInt_t newstyle)
{ fStyle = newstyle; }
Colormap_t GetDefaultColormap() const
{ return fDefaultColormap; }
TGMimeTypes * GetMimeTypeList() const
{ return fMimeTypeList; }
THashList * GetListOfWindows() const
{ return fWlist; }
TList * GetListOfPopups() const
{ return fPlist; }