Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGClient Class Reference

Window client.

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

Definition at line 37 of file TGClient.h.

Public Member Functions

 TGClient (const char *dpyName=nullptr)
 Create a connection with the display sever on host dpyName and setup the complete GUI system, i.e., graphics contexts, fonts, etc.
 
 ~TGClient () override
 Closing down client: cleanup and close X connection.
 
void AddIdleHandler (TGIdleHandler *h)
 Add handler for idle events.
 
void AddUnknownWindowHandler (TGUnknownWindowHandler *h)
 Add handler for unknown (i.e. unregistered) windows.
 
void CancelRedraw (TGWindow *w)
 
void ForceRedraw ()
 
void FreeColor (Pixel_t color) const
 Free color.
 
void FreeFont (const TGFont *font)
 Free a font.
 
void FreeGC (const TGGC *gc)
 Free a graphics context.
 
void FreeGC (GContext_t gc)
 Free a graphics context.
 
void FreePicture (const TGPicture *pic)
 Free picture resource.
 
Bool_t GetColorByName (const char *name, Pixel_t &pixel) const
 Get a color by name.
 
Colormap_t GetDefaultColormap () const
 
const TGWindowGetDefaultRoot () const
 Returns the root (i.e.
 
UInt_t GetDisplayHeight () const
 Get display height.
 
UInt_t GetDisplayWidth () const
 Get display width.
 
TGFontGetFont (const char *font, Bool_t fixedDefault=kTRUE)
 Get a font from the font pool.
 
TGFontGetFont (const TGFont *font)
 Get again specified font. Will increase its usage count.
 
FontStruct_t GetFontByName (const char *name, Bool_t fixedDefault=kTRUE) const
 Get a font by name.
 
TGFontPoolGetFontPool () const
 
TGGCGetGC (GCValues_t *values, Bool_t rw=kFALSE)
 Get graphics context from the gc pool.
 
TGGCPoolGetGCPool () const
 
Pixel_t GetHilite (Pixel_t base_color) const
 Return pixel value of hilite color based on base_color.
 
TListGetListOfPopups () const
 
THashListGetListOfWindows () const
 
TGMimeTypesGetMimeTypeList () const
 
const TGPictureGetPicture (const char *name)
 Get picture from the picture pool.
 
const TGPictureGetPicture (const char *name, UInt_t new_width, UInt_t new_height)
 Get picture with specified size from pool (picture will be scaled if necessary).
 
TGPicturePoolGetPicturePool () const
 
const TGResourcePoolGetResourcePool () const
 
const TGWindowGetRoot () const
 Returns current root (i.e.
 
Pixel_t GetShadow (Pixel_t base_color) const
 Return pixel value of shadow color based on base_color.
 
UInt_t GetStyle () const
 
EGEventType GetWaitForEvent () const
 
Window_t GetWaitForWindow () const
 
TGWindowGetWindowById (Window_t sw) const
 Find a TGWindow via its handle. If window is not found return 0.
 
TGWindowGetWindowByName (const char *name) const
 Find a TGWindow via its name (unique name used in TGWindow::SavePrimitive).
 
Bool_t HandleEvent (Event_t *event)
 Handle a GUI event.
 
Bool_t HandleInput ()
 Handles input from the display server.
 
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.
 
TClassIsA () const override
 
Bool_t IsEditable () const
 
Bool_t IsEditDisabled () const
 Returns kTRUE if edit/guibuilding is forbidden.
 
void NeedRedraw (TGWindow *w, Bool_t force=kFALSE)
 Set redraw flags.
 
void ProcessedEvent (Event_t *event, Window_t wid)
 Emits a signal when an event has been processed.
 
Bool_t ProcessEventsFor (TGWindow *w)
 Like gSystem->ProcessEvents() but then only allow events for w to be processed.
 
void ProcessLine (TString cmd, Long_t msg, Long_t parm1, Long_t parm2)
 Execute string "cmd" via the interpreter.
 
void RegisteredWindow (Window_t w)
 Emits a signal when a Window has been registered in TGClient.
 
void RegisterPopup (TGWindow *w)
 Add a popup menu to the list of popups.
 
void RegisterWindow (TGWindow *w)
 Add a TGWindow to the clients list of windows.
 
void RemoveIdleHandler (TGIdleHandler *h)
 Remove handler for idle events.
 
void RemoveUnknownWindowHandler (TGUnknownWindowHandler *h)
 Remove handler for unknown (i.e. unregistered) windows.
 
void ResetWaitFor (TGWindow *w)
 reset waiting
 
void SetEditDisabled (Bool_t on=kTRUE)
 If on is kTRUE editting/guibuilding is forbidden.
 
void SetRoot (TGWindow *root=nullptr)
 Sets the current root (i.e.
 
void SetStyle (const char *style)
 Set the button style (modern or classic).
 
void SetStyle (UInt_t newstyle)
 
void SetWaitForWindow (Window_t wid)
 
void Streamer (TBuffer &) override
 Stream an object of class TObject.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
void UnregisterPopup (TGWindow *w)
 Remove a popup menu from the list of popups.
 
void UnregisterWindow (TGWindow *w)
 Remove a TGWindow from the list of windows.
 
void WaitFor (TGWindow *w)
 Wait for window to be destroyed.
 
void WaitForUnmap (TGWindow *w)
 Wait for window to be unmapped.
 
- Public Member Functions inherited from TObject
 TObject ()
 TObject constructor.
 
 TObject (const TObject &object)
 TObject copy ctor.
 
virtual ~TObject ()
 TObject destructor.
 
void AbstractMethod (const char *method) const
 Use this method to implement an "abstract" method that you don't want to leave purely abstract.
 
virtual void AppendPad (Option_t *option="")
 Append graphics object to current pad.
 
virtual void Browse (TBrowser *b)
 Browse object. May be overridden for another default action.
 
ULong_t CheckedHash ()
 Check and record whether this class has a consistent Hash/RecursiveRemove setup (*) and then return the regular Hash value for this object.
 
virtual const char * ClassName () const
 Returns name of class to which the object belongs.
 
virtual void Clear (Option_t *="")
 
virtual TObjectClone (const char *newname="") const
 Make a clone of an object using the Streamer facility.
 
virtual Int_t Compare (const TObject *obj) const
 Compare abstract method.
 
virtual void Copy (TObject &object) const
 Copy this to obj.
 
virtual void Delete (Option_t *option="")
 Delete this object.
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 Computes distance from point (px,py) to the object.
 
virtual void Draw (Option_t *option="")
 Default Draw method for all objects.
 
virtual void DrawClass () const
 Draw class inheritance tree of the class to which this object belongs.
 
virtual TObjectDrawClone (Option_t *option="") const
 Draw a clone of this object in the current selected pad with: gROOT->SetSelectedPad(c1).
 
virtual void Dump () const
 Dump contents of object on stdout.
 
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message.
 
virtual void Execute (const char *method, const char *params, Int_t *error=nullptr)
 Execute method on this object with the given parameter string, e.g.
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=nullptr)
 Execute method on this object with parameters stored in the TObjArray.
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 Execute action corresponding to an event at (px,py).
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message.
 
virtual TObjectFindObject (const char *name) const
 Must be redefined in derived classes.
 
virtual TObjectFindObject (const TObject *obj) const
 Must be redefined in derived classes.
 
virtual Option_tGetDrawOption () const
 Get option used by the graphics system to draw this object.
 
virtual const char * GetIconName () const
 Returns mime type name of object.
 
virtual const char * GetName () const
 Returns name of object.
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 Returns string containing info about the object at position (px,py).
 
virtual Option_tGetOption () const
 
virtual const char * GetTitle () const
 Returns title of object.
 
virtual UInt_t GetUniqueID () const
 Return the unique object id.
 
virtual Bool_t HandleTimer (TTimer *timer)
 Execute action in response of a timer timing out.
 
virtual ULong_t Hash () const
 Return hash value for this object.
 
Bool_t HasInconsistentHash () const
 Return true is the type of this object is known to have an inconsistent setup for Hash and RecursiveRemove (i.e.
 
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message.
 
virtual Bool_t InheritsFrom (const char *classname) const
 Returns kTRUE if object inherits from class "classname".
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 Returns kTRUE if object inherits from TClass cl.
 
virtual void Inspect () const
 Dump contents of this object in a graphics canvas.
 
void InvertBit (UInt_t f)
 
Bool_t IsDestructed () const
 IsDestructed.
 
virtual Bool_t IsEqual (const TObject *obj) const
 Default equal comparison (objects are equal if they have the same address in memory).
 
virtual Bool_t IsFolder () const
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
 
R__ALWAYS_INLINE Bool_t IsOnHeap () const
 
virtual Bool_t IsSortable () const
 
R__ALWAYS_INLINE Bool_t IsZombie () const
 
virtual void ls (Option_t *option="") const
 The ls function lists the contents of a class on stdout.
 
void MayNotUse (const char *method) const
 Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary).
 
virtual Bool_t Notify ()
 This method must be overridden to handle object notification (the base implementation is no-op).
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete.
 
void operator delete (void *ptr)
 Operator delete.
 
void operator delete (void *ptr, void *vp)
 Only called by placement new when throwing an exception.
 
void operator delete[] (void *ptr)
 Operator delete [].
 
void operator delete[] (void *ptr, void *vp)
 Only called by placement new[] when throwing an exception.
 
void * operator new (size_t sz)
 
void * operator new (size_t sz, void *vp)
 
void * operator new[] (size_t sz)
 
void * operator new[] (size_t sz, void *vp)
 
TObjectoperator= (const TObject &rhs)
 TObject assignment operator.
 
virtual void Paint (Option_t *option="")
 This method must be overridden if a class wants to paint itself.
 
virtual void Pop ()
 Pop on object drawn in a pad to the top of the display list.
 
virtual void Print (Option_t *option="") const
 This method must be overridden when a class wants to print itself.
 
virtual Int_t Read (const char *name)
 Read contents of object with specified name from the current directory.
 
virtual void RecursiveRemove (TObject *obj)
 Recursively remove this object from a list.
 
void ResetBit (UInt_t f)
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 Save this object in the file specified by filename.
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 Save a primitive as a C++ statement(s) on output stream "out".
 
void SetBit (UInt_t f)
 
void SetBit (UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f.
 
virtual void SetDrawOption (Option_t *option="")
 Set drawing option for object.
 
virtual void SetUniqueID (UInt_t uid)
 Set the unique object id.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 Issue system error message.
 
R__ALWAYS_INLINE Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
virtual void UseCurrentStyle ()
 Set current style settings in this object This function is called when either TCanvas::UseCurrentStyle or TROOT::ForceStyle have been invoked.
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message.
 
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0)
 Write this object to the current directory.
 
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0) const
 Write this object to the current directory.
 
- Public Member Functions inherited from TQObject
 TQObject ()
 TQObject Constructor.
 
virtual ~TQObject ()
 TQObject Destructor.
 
Bool_t AreSignalsBlocked () const
 
Bool_t BlockSignals (Bool_t b)
 
virtual void ChangedBy (const char *method)
 
void CollectClassSignalLists (TList &list, TClass *cls)
 Collect class signal lists from class cls and all its base-classes.
 
Bool_t Connect (const char *signal, const char *receiver_class, void *receiver, const char *slot)
 Non-static method is used to connect from the signal of this object to the receiver slot.
 
virtual void Connected (const char *)
 
virtual void Destroyed ()
 
Bool_t Disconnect (const char *signal=nullptr, void *receiver=nullptr, const char *slot=nullptr)
 Disconnects signal of this object from slot of receiver.
 
virtual void Disconnected (const char *)
 
void Emit (const char *signal)
 Activate signal without args.
 
template<typename T >
void Emit (const char *signal, const T &arg)
 Activate signal with single parameter.
 
template<typename... T>
void EmitVA (const char *signal_name, Int_t, const T &... params)
 Emit a signal with a varying number of arguments.
 
TListGetListOfClassSignals () const
 Returns pointer to list of signals of this class.
 
TListGetListOfConnections () const
 
TListGetListOfSignals () const
 
virtual Bool_t HasConnection (const char *signal_name) const
 Return true if there is any object connected to this signal.
 
virtual void HighPriority (const char *signal_name, const char *slot_name=nullptr)
 
virtual void LowPriority (const char *signal_name, const char *slot_name=nullptr)
 
virtual void Message (const char *msg)
 
virtual Int_t NumberOfConnections () const
 Return number of connections for this object.
 
virtual Int_t NumberOfSignals () const
 Return number of signals for this object.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 

Static Public Member Functions

static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static TGClientInstance ()
 Returns global gClient (initialize graphics first, if not already done)
 
- Static Public Member Functions inherited from TObject
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static Longptr_t GetDtorOnly ()
 Return destructor only flag.
 
static Bool_t GetObjectStat ()
 Get status of object stat flag.
 
static void SetDtorOnly (void *obj)
 Set destructor only flag.
 
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable.
 
- Static Public Member Functions inherited from TQObject
static Bool_t AreAllSignalsBlocked ()
 Returns true if all signals are blocked.
 
static Bool_t BlockAllSignals (Bool_t b)
 Block or unblock all signals. Returns the previous block status.
 
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static Bool_t Connect (const char *sender_class, const char *signal, const char *receiver_class, void *receiver, const char *slot)
 This method allows to make a connection from any object of the same class to a single slot.
 
static Bool_t Connect (TQObject *sender, const char *signal, const char *receiver_class, void *receiver, const char *slot)
 Create connection between sender and receiver.
 
static const char * DeclFileName ()
 
static Bool_t Disconnect (const char *class_name, const char *signal, void *receiver=nullptr, const char *slot=nullptr)
 Disconnects "class signal".
 
static Bool_t Disconnect (TQObject *sender, const char *signal=nullptr, void *receiver=nullptr, const char *slot=nullptr)
 Disconnects signal in object sender from slot_method in object receiver.
 

Protected Member Functions

 TGClient (const TGClient &)=delete
 
Bool_t DoRedraw ()
 Redraw all windows that need redrawing.
 
TGClientoperator= (const TGClient &)=delete
 
Bool_t ProcessIdleEvent ()
 Process one idle event.
 
Bool_t ProcessOneEvent ()
 Process one event.
 
- Protected Member Functions inherited from TObject
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 Interface to ErrorHandler (protected).
 
void MakeZombie ()
 
- Protected Member Functions inherited from TQObject
virtual void * GetSender ()
 
virtual const char * GetSenderClassName () const
 

Protected Attributes

Pixel_t fBackColor
 default background color
 
Pixel_t fBlack
 black color index
 
Colormap_t fDefaultColormap
 default colormap
 
TGWindowfDefaultRoot
 default root window (base window of display)
 
TGFontPoolfFontPool
 font pool
 
Bool_t fForceRedraw
 redraw widgets as soon as possible
 
Pixel_t fForeColor
 default foreground color
 
TGGCPoolfGCPool
 graphics context pool
 
std::atomic< Bool_tfGlobalNeedRedraw
 true if at least one window needs to be redrawn
 
Pixel_t fHilite
 default highlight color
 
TListfIdleHandlers
 list of idle handlers
 
TGMimeTypesfMimeTypeList
 mimetype list
 
TGPicturePoolfPicturePool
 pixmap pool
 
TListfPlist
 list of popup windows used in HandleMaskEvent()
 
TGResourcePoolfResourcePool
 global GUI resource pool
 
TGWindowfRoot
 current root window (changing root window allows embedding)
 
Pixel_t fSelBackColor
 default selection background color
 
Pixel_t fSelForeColor
 default selection foreground color
 
Pixel_t fShadow
 default shadow color
 
UInt_t fStyle
 GUI style (modern or classic)
 
TListfUWHandlers
 list of event handlers for unknown windows
 
EGEventType fWaitForEvent
 event to wait for
 
Window_t fWaitForWindow
 window in which to wait for event
 
Pixel_t fWhite
 white color index
 
THashListfWlist
 list of frames
 
Int_t fXfd
 file descriptor of connection to server
 
- Protected Attributes inherited from TQObject
TListfListOfConnections
 list of signals from this object
 
TListfListOfSignals
 
Bool_t fSignalsBlocked
 list of connections to this object
 

Friends

class TGCocoa
 

Additional Inherited Members

- Public Types inherited from TObject
enum  {
  kIsOnHeap = 0x01000000 , kNotDeleted = 0x02000000 , kZombie = 0x04000000 , kInconsistent = 0x08000000 ,
  kBitMask = 0x00ffffff
}
 
enum  { kSingleKey = (1ULL << ( 0 )) , kOverwrite = (1ULL << ( 1 )) , kWriteDelete = (1ULL << ( 2 )) }
 
enum  EDeprecatedStatusBits { kObjInCanvas = (1ULL << ( 3 )) }
 
enum  EStatusBits {
  kCanDelete = (1ULL << ( 0 )) , kMustCleanup = (1ULL << ( 3 )) , kIsReferenced = (1ULL << ( 4 )) , kHasUUID = (1ULL << ( 5 )) ,
  kCannotPick = (1ULL << ( 6 )) , kNoContextMenu = (1ULL << ( 8 )) , kInvalidObject = (1ULL << ( 13 ))
}
 
- Protected Types inherited from TObject
enum  { kOnlyPrepStep = (1ULL << ( 3 )) }
 
- Static Protected Member Functions inherited from TQObject
static Int_t CheckConnectArgs (TQObject *sender, TClass *sender_class, const char *signal, TClass *receiver_class, const char *slot)
 Checking of consistency of sender/receiver methods/arguments.
 
static TString CompressName (const char *method_name)
 Removes "const" words and blanks from full (with prototype) method name and resolve any typedefs in the method signature.
 
static Bool_t ConnectToClass (const char *sender_class, const char *signal, TClass *receiver_class, void *receiver, const char *slot)
 This method allows to make connection from any object of the same class to the receiver object.
 
static Bool_t ConnectToClass (TQObject *sender, const char *signal, TClass *receiver_class, void *receiver, const char *slot)
 Create connection between sender and receiver.
 
- Static Protected Attributes inherited from TQObject
static Bool_t fgAllSignalsBlocked = kFALSE
 flag used for suppression of signals
 

#include <TGClient.h>

Inheritance diagram for TGClient:
[legend]

Constructor & Destructor Documentation

◆ TGClient() [1/2]

TGClient::TGClient ( const TGClient )
protecteddelete

◆ TGClient() [2/2]

TGClient::TGClient ( const char *  dpyName = nullptr)

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.

Definition at line 128 of file TGClient.cxx.

◆ ~TGClient()

TGClient::~TGClient ( )
override

Closing down client: cleanup and close X connection.

Definition at line 622 of file TGClient.cxx.

Member Function Documentation

◆ AddIdleHandler()

void TGClient::AddIdleHandler ( TGIdleHandler h)

Add handler for idle events.

Definition at line 573 of file TGClient.cxx.

◆ AddUnknownWindowHandler()

void TGClient::AddUnknownWindowHandler ( TGUnknownWindowHandler h)

Add handler for unknown (i.e. unregistered) windows.

Definition at line 552 of file TGClient.cxx.

◆ CancelRedraw()

void TGClient::CancelRedraw ( TGWindow w)

Definition at line 386 of file TGClient.cxx.

◆ Class()

static TClass * TGClient::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

static const char * TGClient::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

static constexpr Version_t TGClient::Class_Version ( )
inlinestaticconstexpr
Returns
Version of this class

Definition at line 153 of file TGClient.h.

◆ DeclFileName()

static const char * TGClient::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 153 of file TGClient.h.

◆ DoRedraw()

Bool_t TGClient::DoRedraw ( )
protected

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.

Definition at line 795 of file TGClient.cxx.

◆ ForceRedraw()

void TGClient::ForceRedraw ( )
inline

Definition at line 98 of file TGClient.h.

◆ FreeColor()

void TGClient::FreeColor ( Pixel_t  color) const

Free color.

Definition at line 504 of file TGClient.cxx.

◆ FreeFont()

void TGClient::FreeFont ( const TGFont font)

Free a font.

Definition at line 364 of file TGClient.cxx.

◆ FreeGC() [1/2]

void TGClient::FreeGC ( const TGGC gc)

Free a graphics context.

Definition at line 328 of file TGClient.cxx.

◆ FreeGC() [2/2]

void TGClient::FreeGC ( GContext_t  gc)

Free a graphics context.

Definition at line 336 of file TGClient.cxx.

◆ FreePicture()

void TGClient::FreePicture ( const TGPicture pic)

Free picture resource.

Definition at line 308 of file TGClient.cxx.

◆ GetColorByName()

Bool_t TGClient::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.

Definition at line 395 of file TGClient.cxx.

◆ GetDefaultColormap()

Colormap_t TGClient::GetDefaultColormap ( ) const
inline

Definition at line 145 of file TGClient.h.

◆ GetDefaultRoot()

const TGWindow * TGClient::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.).

Definition at line 234 of file TGClient.cxx.

◆ GetDisplayHeight()

UInt_t TGClient::GetDisplayHeight ( ) const

Get display height.

Definition at line 275 of file TGClient.cxx.

◆ GetDisplayWidth()

UInt_t TGClient::GetDisplayWidth ( ) const

Get display width.

Definition at line 262 of file TGClient.cxx.

◆ GetFont() [1/2]

TGFont * TGClient::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.

Definition at line 348 of file TGClient.cxx.

◆ GetFont() [2/2]

TGFont * TGClient::GetFont ( const TGFont font)

Get again specified font. Will increase its usage count.

Definition at line 356 of file TGClient.cxx.

◆ GetFontByName()

FontStruct_t TGClient::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.

Definition at line 425 of file TGClient.cxx.

◆ GetFontPool()

TGFontPool * TGClient::GetFontPool ( ) const
inline

Definition at line 136 of file TGClient.h.

◆ GetGC()

TGGC * TGClient::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.

Definition at line 320 of file TGClient.cxx.

◆ GetGCPool()

TGGCPool * TGClient::GetGCPool ( ) const
inline

Definition at line 131 of file TGClient.h.

◆ GetHilite()

Pixel_t TGClient::GetHilite ( Pixel_t  base_color) const

Return pixel value of hilite color based on base_color.

Definition at line 450 of file TGClient.cxx.

◆ GetListOfPopups()

TList * TGClient::GetListOfPopups ( ) const
inline

Definition at line 149 of file TGClient.h.

◆ GetListOfWindows()

THashList * TGClient::GetListOfWindows ( ) const
inline

Definition at line 148 of file TGClient.h.

◆ GetMimeTypeList()

TGMimeTypes * TGClient::GetMimeTypeList ( ) const
inline

Definition at line 146 of file TGClient.h.

◆ GetPicture() [1/2]

const TGPicture * TGClient::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.

Definition at line 289 of file TGClient.cxx.

◆ GetPicture() [2/2]

const TGPicture * TGClient::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.

Definition at line 299 of file TGClient.cxx.

◆ GetPicturePool()

TGPicturePool * TGClient::GetPicturePool ( ) const
inline

Definition at line 126 of file TGClient.h.

◆ GetResourcePool()

const TGResourcePool * TGClient::GetResourcePool ( ) const
inline

Definition at line 124 of file TGClient.h.

◆ GetRoot()

const TGWindow * TGClient::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.

Definition at line 224 of file TGClient.cxx.

◆ GetShadow()

Pixel_t TGClient::GetShadow ( Pixel_t  base_color) const

Return pixel value of shadow color based on base_color.

Shadow is 60% of base_color intensity.

Definition at line 481 of file TGClient.cxx.

◆ GetStyle()

UInt_t TGClient::GetStyle ( ) const
inline

Definition at line 141 of file TGClient.h.

◆ GetWaitForEvent()

EGEventType TGClient::GetWaitForEvent ( ) const
inline

Definition at line 114 of file TGClient.h.

◆ GetWaitForWindow()

Window_t TGClient::GetWaitForWindow ( ) const
inline

Definition at line 115 of file TGClient.h.

◆ GetWindowById()

TGWindow * TGClient::GetWindowById ( Window_t  sw) const

Find a TGWindow via its handle. If window is not found return 0.

Definition at line 594 of file TGClient.cxx.

◆ GetWindowByName()

TGWindow * TGClient::GetWindowByName ( const char *  name) const

Find a TGWindow via its name (unique name used in TGWindow::SavePrimitive).

If window is not found return 0.

Definition at line 605 of file TGClient.cxx.

◆ HandleEvent()

Bool_t TGClient::HandleEvent ( Event_t event)

Handle a GUI event.

Definition at line 819 of file TGClient.cxx.

◆ HandleInput()

Bool_t TGClient::HandleInput ( )

Handles input from the display server.

Returns kTRUE if one or more events have been processed, kFALSE otherwise.

Definition at line 697 of file TGClient.cxx.

◆ HandleMaskEvent()

Bool_t TGClient::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.

Definition at line 856 of file TGClient.cxx.

◆ Instance()

TGClient * TGClient::Instance ( )
static

Returns global gClient (initialize graphics first, if not already done)

Definition at line 93 of file TGClient.cxx.

◆ IsA()

TClass * TGClient::IsA ( ) const
inlineoverridevirtual
Returns
TClass describing current object

Reimplemented from TObject.

Definition at line 153 of file TGClient.h.

◆ IsEditable()

Bool_t TGClient::IsEditable ( ) const
inline

Definition at line 89 of file TGClient.h.

◆ IsEditDisabled()

Bool_t TGClient::IsEditDisabled ( ) const

Returns kTRUE if edit/guibuilding is forbidden.

Definition at line 935 of file TGClient.cxx.

◆ NeedRedraw()

void TGClient::NeedRedraw ( TGWindow w,
Bool_t  force = kFALSE 
)

Set redraw flags.

Definition at line 372 of file TGClient.cxx.

◆ operator=()

TGClient & TGClient::operator= ( const TGClient )
protecteddelete

◆ ProcessedEvent()

void TGClient::ProcessedEvent ( Event_t event,
Window_t  wid 
)

Emits a signal when an event has been processed.

Used in TRecorder.

Definition at line 952 of file TGClient.cxx.

◆ ProcessEventsFor()

Bool_t TGClient::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.

Definition at line 773 of file TGClient.cxx.

◆ ProcessIdleEvent()

Bool_t TGClient::ProcessIdleEvent ( )
protected

Process one idle event.

Definition at line 680 of file TGClient.cxx.

◆ ProcessLine()

void TGClient::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.

Definition at line 914 of file TGClient.cxx.

◆ ProcessOneEvent()

Bool_t TGClient::ProcessOneEvent ( )
protected

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.

Definition at line 646 of file TGClient.cxx.

◆ RegisteredWindow()

void TGClient::RegisteredWindow ( Window_t  w)

Emits a signal when a Window has been registered in TGClient.

Used in TRecorder.

Definition at line 965 of file TGClient.cxx.

◆ RegisterPopup()

void TGClient::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()).

Definition at line 533 of file TGClient.cxx.

◆ RegisterWindow()

void TGClient::RegisterWindow ( TGWindow w)

Add a TGWindow to the clients list of windows.

Definition at line 512 of file TGClient.cxx.

◆ RemoveIdleHandler()

void TGClient::RemoveIdleHandler ( TGIdleHandler h)

Remove handler for idle events.

Definition at line 586 of file TGClient.cxx.

◆ RemoveUnknownWindowHandler()

void TGClient::RemoveUnknownWindowHandler ( TGUnknownWindowHandler h)

Remove handler for unknown (i.e. unregistered) windows.

Definition at line 565 of file TGClient.cxx.

◆ ResetWaitFor()

void TGClient::ResetWaitFor ( TGWindow w)

reset waiting

Definition at line 763 of file TGClient.cxx.

◆ SetEditDisabled()

void TGClient::SetEditDisabled ( Bool_t  on = kTRUE)

If on is kTRUE editting/guibuilding is forbidden.

Definition at line 943 of file TGClient.cxx.

◆ SetRoot()

void TGClient::SetRoot ( TGWindow root = nullptr)

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.

Definition at line 244 of file TGClient.cxx.

◆ SetStyle() [1/2]

void TGClient::SetStyle ( const char *  style)

Set the button style (modern or classic).

Definition at line 252 of file TGClient.cxx.

◆ SetStyle() [2/2]

void TGClient::SetStyle ( UInt_t  newstyle)
inline

Definition at line 142 of file TGClient.h.

◆ SetWaitForWindow()

void TGClient::SetWaitForWindow ( Window_t  wid)
inline

Definition at line 116 of file TGClient.h.

◆ Streamer()

void TGClient::Streamer ( TBuffer R__b)
overridevirtual

Stream an object of class TObject.

Reimplemented from TObject.

◆ StreamerNVirtual()

void TGClient::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 153 of file TGClient.h.

◆ UnregisterPopup()

void TGClient::UnregisterPopup ( TGWindow w)

Remove a popup menu from the list of popups.

Definition at line 544 of file TGClient.cxx.

◆ UnregisterWindow()

void TGClient::UnregisterWindow ( TGWindow w)

Remove a TGWindow from the list of windows.

Definition at line 523 of file TGClient.cxx.

◆ WaitFor()

void TGClient::WaitFor ( TGWindow w)

Wait for window to be destroyed.

Definition at line 709 of file TGClient.cxx.

◆ WaitForUnmap()

void TGClient::WaitForUnmap ( TGWindow w)

Wait for window to be unmapped.

Definition at line 737 of file TGClient.cxx.

Friends And Related Symbol Documentation

◆ TGCocoa

friend class TGCocoa
friend

Definition at line 39 of file TGClient.h.

Member Data Documentation

◆ fBackColor

Pixel_t TGClient::fBackColor
protected

default background color

Definition at line 42 of file TGClient.h.

◆ fBlack

Pixel_t TGClient::fBlack
protected

black color index

Definition at line 49 of file TGClient.h.

◆ fDefaultColormap

Colormap_t TGClient::fDefaultColormap
protected

default colormap

Definition at line 58 of file TGClient.h.

◆ fDefaultRoot

TGWindow* TGClient::fDefaultRoot
protected

default root window (base window of display)

Definition at line 50 of file TGClient.h.

◆ fFontPool

TGFontPool* TGClient::fFontPool
protected

font pool

Definition at line 55 of file TGClient.h.

◆ fForceRedraw

Bool_t TGClient::fForceRedraw
protected

redraw widgets as soon as possible

Definition at line 60 of file TGClient.h.

◆ fForeColor

Pixel_t TGClient::fForeColor
protected

default foreground color

Definition at line 43 of file TGClient.h.

◆ fGCPool

TGGCPool* TGClient::fGCPool
protected

graphics context pool

Definition at line 54 of file TGClient.h.

◆ fGlobalNeedRedraw

std::atomic<Bool_t> TGClient::fGlobalNeedRedraw
protected

true if at least one window needs to be redrawn

Definition at line 59 of file TGClient.h.

◆ fHilite

Pixel_t TGClient::fHilite
protected

default highlight color

Definition at line 44 of file TGClient.h.

◆ fIdleHandlers

TList* TGClient::fIdleHandlers
protected

list of idle handlers

Definition at line 64 of file TGClient.h.

◆ fMimeTypeList

TGMimeTypes* TGClient::fMimeTypeList
protected

mimetype list

Definition at line 57 of file TGClient.h.

◆ fPicturePool

TGPicturePool* TGClient::fPicturePool
protected

pixmap pool

Definition at line 56 of file TGClient.h.

◆ fPlist

TList* TGClient::fPlist
protected

list of popup windows used in HandleMaskEvent()

Definition at line 62 of file TGClient.h.

◆ fResourcePool

TGResourcePool* TGClient::fResourcePool
protected

global GUI resource pool

Definition at line 53 of file TGClient.h.

◆ fRoot

TGWindow* TGClient::fRoot
protected

current root window (changing root window allows embedding)

Definition at line 51 of file TGClient.h.

◆ fSelBackColor

Pixel_t TGClient::fSelBackColor
protected

default selection background color

Definition at line 46 of file TGClient.h.

◆ fSelForeColor

Pixel_t TGClient::fSelForeColor
protected

default selection foreground color

Definition at line 47 of file TGClient.h.

◆ fShadow

Pixel_t TGClient::fShadow
protected

default shadow color

Definition at line 45 of file TGClient.h.

◆ fStyle

UInt_t TGClient::fStyle
protected

GUI style (modern or classic)

Definition at line 67 of file TGClient.h.

◆ fUWHandlers

TList* TGClient::fUWHandlers
protected

list of event handlers for unknown windows

Definition at line 63 of file TGClient.h.

◆ fWaitForEvent

EGEventType TGClient::fWaitForEvent
protected

event to wait for

Definition at line 65 of file TGClient.h.

◆ fWaitForWindow

Window_t TGClient::fWaitForWindow
protected

window in which to wait for event

Definition at line 66 of file TGClient.h.

◆ fWhite

Pixel_t TGClient::fWhite
protected

white color index

Definition at line 48 of file TGClient.h.

◆ fWlist

THashList* TGClient::fWlist
protected

list of frames

Definition at line 61 of file TGClient.h.

◆ fXfd

Int_t TGClient::fXfd
protected

file descriptor of connection to server

Definition at line 52 of file TGClient.h.

Libraries for TGClient:

The documentation for this class was generated from the following files: