TGClient
class description - source file - inheritance tree
protected:
Bool_t DoRedraw()
Bool_t HandleEvent(Event_t* event)
Bool_t HandleMaskEvent(Event_t* event, Window_t wid)
Bool_t ProcessOneEvent()
public:
TGClient TGClient(char* dpyName = 0)
TGClient TGClient(TGClient&)
virtual void ~TGClient()
TClass* Class()
void FreePicture(TGPicture* pic)
Bool_t GetColorByName(char* name, ULong_t& pixel)
FontStruct_t GetFontByName(char* name)
ULong_t GetHilite(ULong_t base_color)
TGMimeTypes* GetMimeTypeList()
const TGPicture* GetPicture(char* name)
const TGPicture* GetPicture(char* name, UInt_t new_width, UInt_t new_height)
const TGPicturePool* GetPicturePool()
const TGWindow* GetRoot()
ULong_t GetShadow(ULong_t base_color)
TGWindow* GetWindowById(Window_t sw)
Bool_t HandleInput()
virtual TClass* IsA()
void NeedRedraw(TGWindow* w)
void ProcessLine(TString cmd, Long_t msg, Long_t parm1, Long_t parm2)
void RegisterWindow(TGWindow* w)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
void UnregisterWindow(TGWindow* w)
void WaitFor(TGWindow* w)
void WaitForUnmap(TGWindow* w)
protected:
ULong_t fBackColor default background color
ULong_t fForeColor default foreground color
ULong_t fHilite default hilite color
ULong_t fShadow default shadow color
ULong_t fSelBackColor default selection background color
ULong_t fSelForeColor default selection foreground color
ULong_t fWhite white color index
ULong_t fBlack black color index
TGWindow* fRoot root (base) window
Int_t fXfd file descriptor of connection to server
TGPicturePool* fPicturePool pixmap cache
TGMimeTypes* fMimeTypeList mimetype list
Bool_t fGlobalNeedRedraw true if at least one window needs to be redrawn
THashList* fWlist list of frames
EGEventType fWaitForEvent event to wait for
Window_t fWaitForWindow window in which to wait for event
TGClient
Window client. In client server windowing systems, like X11 this
class is used to make the initial connection to the window server.
It is the only GUI class that does not inherit from TGObject.
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.
const TGPicture* GetPicture(const char *name)
Get picture from 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.
void NeedRedraw(TGWindow *w)
Set redraw flags.
Bool_t GetColorByName(const char *name, ULong_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) 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.
ULong_t GetHilite(ULong_t base_color) const
Return pixel value of hilite color based on base_color.
ULong_t GetShadow(ULong_t base_color) const
Return pixel value of shadow color based on base_color.
Shadow is 60% of base_color intensity.
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.
TGWindow* GetWindowById(Window_t wid) const
Find a TGWindow via its handle. 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 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.
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.
Inline Functions
const TGWindow* GetRoot()
const TGPicturePool* GetPicturePool()
TGMimeTypes* GetMimeTypeList()
TClass* Class()
TClass* IsA()
void ShowMembers(TMemberInspector& insp, char* parent)
void Streamer(TBuffer& b)
TGClient TGClient(TGClient&)
Author: Fons Rademakers 27/12/97
Last update: 2.20/01 02/12/98 18.02.00 by Fons Rademakers
Copyright (c) 1995-1999, The ROOT System, All rights reserved. *
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.