TGX11
class description - source file - inheritance tree
private:
void ClearPixmap(Drawable* pix)
void CloseWindow1()
void CollectImageColors(ULong_t pixel, ULong_t*& orgcolors, Int_t& ncolors, Int_t& maxcolors)
void CopyWindowtoPixmap(Drawable* pix, Int_t xpos, Int_t ypos)
Int_t FindColor(ULong_t pixel, ULong_t* orgcolors, Int_t ncolors)
void ImgPickPalette(XImage* image, Int_t& ncol, Int_t*& R, Int_t*& G, Int_t*& B)
void MakeOpaqueColors(Int_t percent, ULong_t* orgcolors, Int_t ncolors)
void MapColorStruct(ColorStruct_t* color, XColor& xcolor)
void MapCursor(ECursor cursor, Int_t& xcursor)
void MapEvent(Event_t& ev, XEvent& xev, Bool_t tox = kTRUE)
void MapEventMask(UInt_t& emask, UInt_t& xemask, Bool_t tox = kTRUE)
void MapGCValues(GCValues_t& gval, ULong_t& xmask, XGCValues& xgval, Bool_t tox = kTRUE)
void MapKeySym(UInt_t& keysym, UInt_t& xkeysym, Bool_t tox = kTRUE)
void MapModifierState(UInt_t& state, UInt_t& xstate, Bool_t tox = kTRUE)
void MapPictureAttributes(PictureAttributes_t& attr, XpmAttributes& xpmattr, Bool_t toxpm = kTRUE)
void MapSetWindowAttributes(SetWindowAttributes_t* attr, ULong_t& xmask, XSetWindowAttributes& xattr)
void PutImage(Int_t offset, Int_t itran, Int_t x0, Int_t y0, Int_t nx, Int_t ny, Int_t xmin, Int_t ymin, Int_t xmax, Int_t ymax, UChar_t* image)
void RemovePixmap(Drawable* pix)
void SetColor(GC gc, Int_t ci)
void SetFillStyleIndex(Int_t style, Int_t fasi)
void SetInput(Int_t inp)
void SetMarkerType(Int_t type, Int_t n, XPoint* xy)
protected:
XWindow_t* GetCurrentWindow() const
GC* GetGC(Int_t which) const
public:
TGX11 TGX11()
TGX11 TGX11(const TGX11& org)
TGX11 TGX11(const Text_t* name, const Text_t* title)
virtual void ~TGX11()
virtual Bool_t AllocColor(Colormap_t cmap, ColorStruct_t& color)
virtual void Bell(Int_t percent)
virtual void ChangeGC(GContext_t gc, GCValues_t* gval)
virtual void ChangeWindowAttributes(Window_t id, SetWindowAttributes_t* attr)
virtual Bool_t CheckEvent(Window_t id, EGEventType type, Event_t& ev)
TClass* Class()
virtual void ClearArea(Window_t id, Int_t x, Int_t y, UInt_t w, UInt_t h)
virtual void ClearWindow(Window_t id)
virtual void ClearWindow()
virtual void CloseDisplay()
virtual void ClosePixmap()
virtual void CloseWindow()
virtual void ConvertPrimarySelection(Window_t id, Time_t when)
virtual void CopyArea(Drawable_t src, Drawable_t dest, GContext_t gc, Int_t src_x, Int_t src_y, UInt_t width, UInt_t height, Int_t dest_x, Int_t dest_y)
virtual void CopyGC(GContext_t org, GContext_t dest, Mask_t mask)
virtual void CopyPixmap(Int_t wid, Int_t xpos, Int_t ypos)
virtual Pixmap_t CreateBitmap(Drawable_t id, const char* bitmap, UInt_t width, UInt_t height)
virtual Cursor_t CreateCursor(ECursor cursor)
virtual GContext_t CreateGC(Drawable_t id, GCValues_t* gval)
virtual Bool_t CreatePictureFromData(Drawable_t id, char** data, Pixmap_t& pict, Pixmap_t& pict_mask, PictureAttributes_t& attr)
virtual Bool_t CreatePictureFromFile(Drawable_t id, const char* filename, Pixmap_t& pict, Pixmap_t& pict_mask, PictureAttributes_t& attr)
virtual Pixmap_t CreatePixmap(Drawable_t id, const char* bitmap, UInt_t width, UInt_t height, ULong_t forecolor, ULong_t backcolor, Int_t depth)
virtual Pixmap_t CreatePixmap(Drawable_t id, UInt_t w, UInt_t h)
virtual Window_t CreateWindow(Window_t parent, Int_t x, Int_t y, UInt_t w, UInt_t h, UInt_t border, Int_t depth, UInt_t clss, void* visual, SetWindowAttributes_t* attr)
virtual void DeleteFont(FontStruct_t fs)
virtual void DeleteGC(GContext_t gc)
virtual void DeletePictureData(void* data)
virtual void DeletePixmap(Pixmap_t pmap)
virtual void DestroyWindow(Window_t id)
virtual const char* DisplayName(const char* dpyName = 0) const
virtual void DrawBox(Int_t x1, Int_t y1, Int_t x2, Int_t y2, TVirtualX::EBoxMode mode)
virtual void DrawCellArray(Int_t x1, Int_t y1, Int_t x2, Int_t y2, Int_t nx, Int_t ny, Int_t* ic)
virtual void DrawFillArea(Int_t n, TPoint* xy)
virtual void DrawLine(Int_t x1, Int_t y1, Int_t x2, Int_t y2)
virtual void DrawLine(Drawable_t id, GContext_t gc, Int_t x1, Int_t y1, Int_t x2, Int_t y2)
virtual void DrawPolyLine(Int_t n, TPoint* xy)
virtual void DrawPolyMarker(Int_t n, TPoint* xy)
virtual void DrawRectangle(Drawable_t id, GContext_t gc, Int_t x, Int_t y, UInt_t w, UInt_t h)
virtual void DrawSegments(Drawable_t id, GContext_t gc, Segment_t* seg, Int_t nseg)
virtual void DrawString(Drawable_t id, GContext_t gc, Int_t x, Int_t y, const char* s, Int_t len)
virtual void DrawText(Int_t x, Int_t y, Float_t angle, Float_t mgn, const char* text, TVirtualX::ETextMode mode)
virtual Int_t EventsPending()
virtual void FillPolygon(Window_t id, GContext_t gc, Point_t* points, Int_t npnt)
virtual void FillRectangle(Drawable_t id, GContext_t gc, Int_t x, Int_t y, UInt_t w, UInt_t h)
virtual void FreeFontStruct(FontStruct_t fs)
virtual void GetCharacterUp(Float_t& chupx, Float_t& chupy)
virtual Window_t GetDefaultRootWindow()
virtual Display_t GetDisplay()
virtual Int_t GetDoubleBuffer(Int_t wid)
virtual FontH_t GetFontHandle(FontStruct_t fs)
virtual void GetFontProperties(FontStruct_t font, Int_t& max_ascent, Int_t& max_descent)
virtual FontStruct_t GetFontStruct(FontH_t fh)
virtual void GetGCValues(GContext_t gc, GCValues_t& gval)
virtual void GetGeometry(Int_t wid, Int_t& x, Int_t& y, UInt_t& w, UInt_t& h)
virtual Window_t GetParent(Window_t id)
virtual void GetPasteBuffer(Window_t id, Atom_t atom, TString& text, Int_t& nchar, Bool_t del)
virtual void GetPlanes(Int_t& nplanes)
virtual Window_t GetPrimarySelectionOwner()
virtual void GetRGB(Int_t index, Float_t& r, Float_t& g, Float_t& b)
virtual void GetTextExtent(UInt_t& w, UInt_t& h, char* mess)
virtual Float_t GetTextMagnitude()
virtual void GetWindowAttributes(Window_t id, WindowAttributes_t& attr)
virtual Window_t GetWindowID(Int_t wid)
virtual void GetWindowSize(Drawable_t id, Int_t& x, Int_t& y, UInt_t& w, UInt_t& h)
virtual void GrabButton(Window_t id, EMouseButton button, UInt_t modifier, UInt_t evmask, Window_t confine, Cursor_t cursor, Bool_t grab = kTRUE)
virtual void GrabKey(Window_t id, Int_t keycode, UInt_t modifier, Bool_t grab = kTRUE)
virtual void GrabPointer(Window_t id, UInt_t evmask, Window_t confine, Cursor_t cursor, Bool_t grab = kTRUE)
virtual Bool_t HasTTFonts() const
virtual void IconifyWindow(Window_t id)
virtual Bool_t Init(void* display)
virtual Int_t InitWindow(ULong_t window)
virtual Atom_t InternAtom(const char* atom_name, Bool_t only_if_exist)
virtual TClass* IsA() const
virtual Int_t KeysymToKeycode(UInt_t keysym)
virtual FontStruct_t LoadQueryFont(const char* font_name)
virtual void LookupString(Event_t* event, char* buf, Int_t buflen, UInt_t& keysym)
virtual void LowerWindow(Window_t id)
virtual void MapRaised(Window_t id)
virtual void MapSubwindows(Window_t id)
virtual void MapWindow(Window_t id)
virtual void MoveResizeWindow(Window_t id, Int_t x, Int_t y, UInt_t w, UInt_t h)
virtual void MoveWindow(Int_t wid, Int_t x, Int_t y)
virtual void MoveWindow(Window_t id, Int_t x, Int_t y)
virtual void NextEvent(Event_t& event)
Int_t OpenDisplay(Display* display)
virtual Int_t OpenDisplay(const char* dpyName)
virtual Int_t OpenPixmap(UInt_t w, UInt_t h)
virtual Bool_t ParseColor(Colormap_t cmap, const char* cname, ColorStruct_t& color)
virtual void QueryColor(Colormap_t cmap, ColorStruct_t& color)
virtual void QueryPointer(Int_t& ix, Int_t& iy)
virtual void QueryPointer(Window_t id, Window_t& rootw, Window_t& childw, Int_t& root_x, Int_t& root_y, Int_t& win_x, Int_t& win_y, UInt_t& mask)
virtual void RaiseWindow(Window_t id)
virtual void ReadGIF(Int_t x0, Int_t y0, const char* file)
virtual Bool_t ReadPictureDataFromFile(const char* filename, char*** ret_data)
virtual Int_t RequestLocator(Int_t mode, Int_t ctyp, Int_t& x, Int_t& y)
virtual Int_t RequestString(Int_t x, Int_t y, char* text)
virtual void RescaleWindow(Int_t wid, UInt_t w, UInt_t h)
virtual Int_t ResizePixmap(Int_t wid, UInt_t w, UInt_t h)
virtual void ResizeWindow(Int_t wid)
virtual void ResizeWindow(Window_t id, UInt_t w, UInt_t h)
virtual void SelectInput(Window_t id, UInt_t evmask)
virtual void SelectWindow(Int_t wid)
virtual void SendEvent(Window_t id, Event_t* ev)
virtual void SetCharacterUp(Float_t chupx, Float_t chupy)
virtual void SetClassHints(Window_t id, char* className, char* resourceName)
virtual void SetClipOFF(Int_t wid)
virtual void SetClipRectangles(GContext_t gc, Int_t x, Int_t y, Rectangle_t* recs, Int_t n)
virtual void SetClipRegion(Int_t wid, Int_t x, Int_t y, UInt_t w, UInt_t h)
virtual void SetCursor(Window_t id, Cursor_t curid)
virtual void SetCursor(Int_t win, ECursor cursor)
virtual void SetDashes(GContext_t gc, Int_t offset, const char* dash_list, Int_t n)
virtual void SetDoubleBuffer(Int_t wid, Int_t mode)
virtual void SetDoubleBufferOFF()
virtual void SetDoubleBufferON()
virtual void SetDrawMode(TVirtualX::EDrawMode mode)
virtual void SetFillColor(Color_t cindex)
virtual void SetFillStyle(Style_t style)
virtual void SetForeground(GContext_t gc, ULong_t foreground)
virtual void SetIconName(Window_t id, char* name)
virtual void SetIconPixmap(Window_t id, Pixmap_t pic)
virtual void SetInputFocus(Window_t id)
virtual void SetKeyAutoRepeat(Bool_t on = kTRUE)
virtual void SetLineColor(Color_t cindex)
virtual void SetLineStyle(Style_t linestyle)
virtual void SetLineType(Int_t n, Int_t* dash)
virtual void SetLineWidth(Width_t width)
virtual void SetMarkerColor(Color_t cindex)
virtual void SetMarkerSize(Float_t markersize)
virtual void SetMarkerStyle(Style_t markerstyle)
virtual void SetMWMHints(Window_t id, UInt_t value, UInt_t funcs, UInt_t input)
virtual void SetOpacity(Int_t percent)
virtual void SetRGB(Int_t cindex, Float_t r, Float_t g, Float_t b)
virtual void SetTextAlign(Short_t talign = 11)
virtual void SetTextColor(Color_t cindex)
virtual Int_t SetTextFont(char* fontname, TVirtualX::ETextSetMode mode)
virtual void SetTextFont(Font_t fontnumber)
virtual void SetTextMagnitude(Float_t mgn = 1)
virtual void SetTextSize(Float_t textsize)
virtual void SetWindowBackground(Window_t id, ULong_t color)
virtual void SetWindowBackgroundPixmap(Window_t id, Pixmap_t pxm)
virtual void SetWindowName(Window_t id, char* name)
virtual void SetWMPosition(Window_t id, Int_t x, Int_t y)
virtual void SetWMSize(Window_t id, UInt_t w, UInt_t h)
virtual void SetWMSizeHints(Window_t id, UInt_t wmin, UInt_t hmin, UInt_t wmax, UInt_t hmax, UInt_t winc, UInt_t hinc)
virtual void SetWMState(Window_t id, EInitialState state)
virtual void SetWMTransientHint(Window_t id, Window_t main_id)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
void Sync(Int_t mode)
virtual Int_t TextWidth(FontStruct_t font, const char* s, Int_t len)
virtual void TranslateCoordinates(Window_t src, Window_t dest, Int_t src_x, Int_t src_y, Int_t& dest_x, Int_t& dest_y, Window_t& child)
virtual void UnmapWindow(Window_t id)
virtual void Update(Int_t mode = 0)
virtual void UpdateWindow(Int_t mode)
virtual void Warp(Int_t ix, Int_t iy)
virtual void WMDeleteNotify(Window_t id)
virtual void WriteGIF(char* name)
virtual void WritePixmap(Int_t wid, UInt_t w, UInt_t h, char* pxname)
private:
Int_t fMaxNumberOfWindows Maximum number of windows
XWindow_t* fWindows List of windows
Cursor fCursors[18] List of cursors
protected:
Display* fDisplay Pointer to display
Colormap fColormap Default colormap, 0 if b/w
Int_t fScreenNumber Screen number
Bool_t fHasTTFonts True when TrueType fonts are used
Int_t fTextAlignH Text Alignment Horizontal
Int_t fTextAlignV Text Alignment Vertical
Int_t fTextAlign Text alignment (set in SetTextAlign)
Float_t fCharacterUpX Character Up vector along X
Float_t fCharacterUpY Character Up vector along Y
Float_t fTextMagnitude Text Magnitude
See also
-
TGX11TTF
TGX11
This class is the basic interface to the X11 graphics system. It is
an implementation of the abstract TVirtualX class. The companion class
for Win32 is TGWin32.
This code was initially developed in the context of HIGZ and PAW
by Olivier Couet (package X11INT).
TGX11()
Default constructor.
TGX11(const Text_t *name, const Text_t *title) : TVirtualX(name, title)
Normal Constructor.
TGX11(const TGX11 &org)
Copy constructor. Currently only used by TGX11TTF.
~TGX11()
Destructor.
Bool_t Init(void *display)
Initialize X11 system. Returns kFALSE in case of failure.
void ClearPixmap(Drawable *pix)
Clear the pixmap pix.
void ClearWindow()
Clear current window.
void ClosePixmap()
Delete current pixmap.
void CloseWindow()
Delete current window.
void CloseWindow1()
Delete current window.
void CopyPixmap(int wid, int xpos, int ypos)
Copy the pixmap wid at the position xpos, ypos in the current window.
void CopyWindowtoPixmap(Drawable *pix, int xpos, int ypos )
Copy area of current window in the pixmap pix.
void DrawBox(int x1, int y1, int x2, int y2, EBoxMode mode)
Draw a box.
mode=0 hollow (kHollow)
mode=1 solid (kSolid)
void DrawCellArray(int x1, int y1, int x2, int y2, int nx, int ny, int *ic)
Draw a cell array.
x1,y1 : left down corner
x2,y2 : right up corner
nx,ny : array size
ic : array
Draw a cell array. The drawing is done with the pixel presicion
if (X2-X1)/NX (or Y) is not a exact pixel number the position of
the top rigth corner may be wrong.
void DrawFillArea(int n, TPoint *xyt)
Fill area described by polygon.
n : number of points
xy(2,n) : list of points
void DrawLine(int x1, int y1, int x2, int y2)
Draw a line.
x1,y1 : begin of line
x2,y2 : end of line
void DrawPolyLine(int n, TPoint *xyt)
Draw a line through all points.
n : number of points
xy : list of points
void DrawPolyMarker(int n, TPoint *xyt)
Draw n markers with the current attributes at position x, y.
n : number of markers to draw
xy : x,y coordinates of markers
void DrawText(int x, int y, float angle, float mgn,
const char *text, ETextMode mode)
Draw a text string using current font.
mode : drawing mode
mode=0 : the background is not drawn (kClear)
mode=1 : the background is drawn (kOpaque)
x,y : text position
angle : text angle
mgn : magnification factor
text : text string
void GetCharacterUp(Float_t &chupx, Float_t &chupy)
Return character up vector.
XWindow_t* GetCurrentWindow() const
Return current window pointer. Protected method used by TGX11TTF.
GC* GetGC(Int_t which) const
Return desired Graphics Context ("which" maps directly on gGCList[]).
Protected method used by TGX11TTF.
Int_t GetDoubleBuffer(int wid)
Query the double buffer value for the window wid.
void GetGeometry(int wid, int &x, int &y, unsigned int &w, unsigned int &h)
Return position and size of window wid.
wid : window identifier
x,y : window position (output)
w,h : window size (output)
if wid < 0 the size of the display is returned
const char* DisplayName(const char *dpyName)
Return hostname on which the display is opened.
void GetPlanes(int &nplanes)
Get maximum number of planes.
void GetRGB(int index, float &r, float &g, float &b)
Get rgb values for color "index".
void GetTextExtent(unsigned int &w, unsigned int &h, char *mess)
Return the size of a character string.
iw : text width
ih : text height
mess : message
Window_t GetWindowID(int wid)
Return the X11 window identifier.
wid : Workstation identifier (input)
void MoveWindow(int wid, int x, int y)
Move the window wid.
wid : Window identifier.
x : x new window position
y : y new window position
Int_t OpenDisplay(Display *disp)
Open the display. Return -1 if the opening fails, 0 when ok.
Int_t OpenPixmap(unsigned int w, unsigned int h)
Open a new pixmap.
w,h : Width and height of the pixmap.
Int_t InitWindow(ULong_t win)
Open window and return window number.
Return -1 if window initialization fails.
void QueryPointer(int &ix, int &iy)
Query pointer position.
ix : X coordinate of pointer
iy : Y coordinate of pointer
(both coordinates are relative to the origin of the root window)
void RemovePixmap(Drawable *pix)
Remove the pixmap pix.
Int_t RequestLocator(int mode, int ctyp, int &x, int &y)
Request Locator position.
x,y : cursor position at moment of button press (output)
ctyp : cursor type (input)
ctyp=1 tracking cross
ctyp=2 cross-hair
ctyp=3 rubber circle
ctyp=4 rubber band
ctyp=5 rubber rectangle
mode : input mode
mode=0 request
mode=1 sample
Request locator:
return button number 1 = left is pressed
2 = middle is pressed
3 = right is pressed
in sample mode:
11 = left is released
12 = middle is released
13 = right is released
-1 = nothing is pressed or released
-2 = leave the window
else = keycode (keyboard is pressed)
Int_t RequestString(int x, int y, char *text)
Request a string.
x,y : position where text is displayed
text : text displayed (input), edited text (output)
Request string:
text is displayed and can be edited with Emacs-like keybinding
return termination code (0 for ESC, 1 for RETURN)
void RescaleWindow(int wid, unsigned int w, unsigned int h)
Rescale the window wid.
wid : Window identifier
w : Width
h : Heigth
int ResizePixmap(int wid, unsigned int w, unsigned int h)
Resize a pixmap.
wid : pixmap to be resized
w,h : Width and height of the pixmap
void ResizeWindow(int wid)
Resize the current window if necessary.
void SelectWindow(int wid)
Select window to which subsequent output is directed.
void SetCharacterUp(Float_t chupx, Float_t chupy)
Set character up vector.
void SetClipOFF(int wid)
Turn off the clipping for the window wid.
void SetClipRegion(int wid, int x, int y, unsigned int w, unsigned int h)
Set clipping region for the window wid.
wid : Window indentifier
x,y : origin of clipping rectangle
w,h : size of clipping rectangle;
void SetColor(GC gc, int ci)
Set the foreground color in GC.
void SetCursor(int wid, ECursor cursor)
Set the cursor.
void SetDoubleBuffer(int wid, int mode)
Set the double buffer on/off on window wid.
wid : Window identifier.
999 means all the opened windows.
mode : 1 double buffer is on
0 double buffer is off
void SetDoubleBufferOFF()
Turn double buffer mode off.
void SetDoubleBufferON()
Turn double buffer mode on.
void SetDrawMode(EDrawMode mode)
Set the drawing mode.
mode : drawing mode
mode=1 copy
mode=2 xor
mode=3 invert
mode=4 set the suitable mode for cursor echo according to
the vendor
void SetFillColor(Color_t cindex)
Set color index for fill areas.
void SetFillStyle(Style_t fstyle)
Set fill area style.
fstyle : compound fill area interior style
fstyle = 1000*interiorstyle + styleindex
void SetFillStyleIndex(Int_t style, Int_t fasi)
Set fill area style index.
void SetInput(int inp)
Set input on or off.
void SetLineColor(Color_t cindex)
Set color index for lines.
void SetLineType(int n, int *dash)
Set line type.
n : length of dash list
dash(n) : dash segment lengths
if n <= 0 use solid lines
if n > 0 use dashed lines described by DASH(N)
e.g. N=4,DASH=(6,3,1,3) gives a dashed-dotted line with dash length 6
and a gap of 7 between dashes
void SetLineStyle(Style_t lstyle)
Set line style.
void SetLineWidth(Width_t width )
Set line width.
width : line width in pixels
void SetMarkerColor(Color_t cindex)
Set color index for markers.
void SetMarkerSize(Float_t msize)
Set marker size index.
msize : marker scale factor
void SetMarkerType(int type, int n, XPoint *xy)
Set marker type.
type : marker type
n : length of marker description
xy : list of points describing marker shape
if n == 0 marker is a single point
if TYPE == 0 marker is hollow circle of diameter N
if TYPE == 1 marker is filled circle of diameter N
if TYPE == 2 marker is a hollow polygon describe by line XY
if TYPE == 3 marker is a filled polygon describe by line XY
if TYPE == 4 marker is described by segmented line XY
e.g. TYPE=4,N=4,XY=(-3,0,3,0,0,-3,0,3) sets a plus shape of 7x7 pixels
void SetMarkerStyle(Style_t markerstyle)
Set marker style.
void SetOpacity(Int_t percent)
Set opacity of a window. This image manipulation routine works
by adding to a percent amount of neutral to each pixels RGB.
Since it requires quite some additional color map entries is it
only supported on displays with more than > 8 color planes (> 256
colors).
void CollectImageColors(ULong_t pixel, ULong_t *&orgcolors, Int_t &ncolors,
Int_t &maxcolors)
Collect in orgcolors all different original image colors.
void MakeOpaqueColors(Int_t percent, ULong_t *orgcolors, Int_t ncolors)
Get RGB values for orgcolors, add percent neutral to the RGB and
allocate new_colors.
Int_t FindColor(ULong_t pixel, ULong_t *orgcolors, Int_t ncolors)
Returns index in orgcolors (and new_colors) for pixel.
void SetRGB(int cindex, float r, float g, float b)
Set color intensities for given color index.
cindex : color index
r,g,b : red, green, blue intensities between 0.0 and 1.0
void SetTextAlign(Short_t talign)
Set text alignment.
txalh : horizontal text alignment
txalv : vertical text alignment
void SetTextColor(Color_t cindex)
Set color index for text.
Int_t SetTextFont(char *fontname, ETextSetMode mode)
Set text font to specified name.
mode : loading flag
mode=0 : search if the font exist (kCheck)
mode=1 : search the font and load it if it exists (kLoad)
font : font name
Set text font to specified name. This function returns 0 if
the specified font is found, 1 if not.
void SetTextFont(Font_t fontnumber)
Set current text font number.
void SetTextSize(Float_t textsize)
Set current text size.
void Sync(int mode)
Set synchronisation on or off.
mode : synchronisation on/off
mode=1 on
mode<>0 off
void UpdateWindow(int mode)
Update display.
mode : (1) update
(0) sync
Synchronise client and server once (not permanent).
Copy the pixmap gCws->drawing on the window gCws->window
if the double buffer is on.
void Warp(int ix, int iy)
Set pointer position.
ix : New X coordinate of pointer
iy : New Y coordinate of pointer
(both coordinates are relative to the origin of the current window)
void WritePixmap(int wid, unsigned int w, unsigned int h, char *pxname)
Write the pixmap wid in the bitmap file pxname.
wid : Pixmap address
w,h : Width and height of the pixmap.
lenname : pixmap name length
pxname : pixmap name
void ImgPickPalette(XImage *image, Int_t &ncol, Int_t *&R, Int_t *&G, Int_t *&B)
Returns in R G B the ncol colors of the palette used by the image.
The image pixels are changed to index values in these R G B arrays.
This produces a colormap with only the used colors (so even on displays
with more than 8 planes we will be able to create GIF's when the image
contains no more than 256 different colors). If it does contain more
colors we will have to use GIFquantize to reduce the number of colors.
The R G B arrays must be deleted by the caller.
void WriteGIF(char *name)
Writes the current window into GIF file.
void PutImage(int offset,int itran,int x0,int y0,int nx,int ny,
int xmin,int ymin,int xmax,int ymax, unsigned char *image)
Draw image.
void ReadGIF(int x0, int y0, const char *file)
Load the gif a file in the current active window.
Inline Functions
void MapGCValues(GCValues_t& gval, ULong_t& xmask, XGCValues& xgval, Bool_t tox = kTRUE)
void MapSetWindowAttributes(SetWindowAttributes_t* attr, ULong_t& xmask, XSetWindowAttributes& xattr)
void MapCursor(ECursor cursor, Int_t& xcursor)
void MapColorStruct(ColorStruct_t* color, XColor& xcolor)
void MapPictureAttributes(PictureAttributes_t& attr, XpmAttributes& xpmattr, Bool_t toxpm = kTRUE)
void MapModifierState(UInt_t& state, UInt_t& xstate, Bool_t tox = kTRUE)
void MapEvent(Event_t& ev, XEvent& xev, Bool_t tox = kTRUE)
void MapEventMask(UInt_t& emask, UInt_t& xemask, Bool_t tox = kTRUE)
void MapKeySym(UInt_t& keysym, UInt_t& xkeysym, Bool_t tox = kTRUE)
Float_t GetTextMagnitude()
Bool_t HasTTFonts() const
void SetTextMagnitude(Float_t mgn = 1)
void GetWindowAttributes(Window_t id, WindowAttributes_t& attr)
void MapWindow(Window_t id)
void MapSubwindows(Window_t id)
void MapRaised(Window_t id)
void UnmapWindow(Window_t id)
void DestroyWindow(Window_t id)
void RaiseWindow(Window_t id)
void LowerWindow(Window_t id)
void MoveWindow(Window_t id, Int_t x, Int_t y)
void MoveResizeWindow(Window_t id, Int_t x, Int_t y, UInt_t w, UInt_t h)
void ResizeWindow(Window_t id, UInt_t w, UInt_t h)
void IconifyWindow(Window_t id)
void SetWindowBackground(Window_t id, ULong_t color)
void SetWindowBackgroundPixmap(Window_t id, Pixmap_t pxm)
Window_t CreateWindow(Window_t parent, Int_t x, Int_t y, UInt_t w, UInt_t h, UInt_t border, Int_t depth, UInt_t clss, void* visual, SetWindowAttributes_t* attr)
Int_t OpenDisplay(const char* dpyName)
void CloseDisplay()
Display_t GetDisplay()
Atom_t InternAtom(const char* atom_name, Bool_t only_if_exist)
Window_t GetDefaultRootWindow()
Window_t GetParent(Window_t id)
FontStruct_t LoadQueryFont(const char* font_name)
FontH_t GetFontHandle(FontStruct_t fs)
void DeleteFont(FontStruct_t fs)
GContext_t CreateGC(Drawable_t id, GCValues_t* gval)
void ChangeGC(GContext_t gc, GCValues_t* gval)
void CopyGC(GContext_t org, GContext_t dest, Mask_t mask)
void DeleteGC(GContext_t gc)
Cursor_t CreateCursor(ECursor cursor)
void SetCursor(Window_t id, Cursor_t curid)
Pixmap_t CreatePixmap(Drawable_t id, UInt_t w, UInt_t h)
Pixmap_t CreatePixmap(Drawable_t id, const char* bitmap, UInt_t width, UInt_t height, ULong_t forecolor, ULong_t backcolor, Int_t depth)
Pixmap_t CreateBitmap(Drawable_t id, const char* bitmap, UInt_t width, UInt_t height)
void DeletePixmap(Pixmap_t pmap)
Bool_t CreatePictureFromFile(Drawable_t id, const char* filename, Pixmap_t& pict, Pixmap_t& pict_mask, PictureAttributes_t& attr)
Bool_t CreatePictureFromData(Drawable_t id, char** data, Pixmap_t& pict, Pixmap_t& pict_mask, PictureAttributes_t& attr)
Bool_t ReadPictureDataFromFile(const char* filename, char*** ret_data)
void DeletePictureData(void* data)
void SetDashes(GContext_t gc, Int_t offset, const char* dash_list, Int_t n)
Bool_t ParseColor(Colormap_t cmap, const char* cname, ColorStruct_t& color)
Bool_t AllocColor(Colormap_t cmap, ColorStruct_t& color)
void QueryColor(Colormap_t cmap, ColorStruct_t& color)
Int_t EventsPending()
void NextEvent(Event_t& event)
void Bell(Int_t percent)
void CopyArea(Drawable_t src, Drawable_t dest, GContext_t gc, Int_t src_x, Int_t src_y, UInt_t width, UInt_t height, Int_t dest_x, Int_t dest_y)
void ChangeWindowAttributes(Window_t id, SetWindowAttributes_t* attr)
void DrawLine(Drawable_t id, GContext_t gc, Int_t x1, Int_t y1, Int_t x2, Int_t y2)
void ClearArea(Window_t id, Int_t x, Int_t y, UInt_t w, UInt_t h)
Bool_t CheckEvent(Window_t id, EGEventType type, Event_t& ev)
void SendEvent(Window_t id, Event_t* ev)
void WMDeleteNotify(Window_t id)
void SetKeyAutoRepeat(Bool_t on = kTRUE)
void GrabKey(Window_t id, Int_t keycode, UInt_t modifier, Bool_t grab = kTRUE)
void GrabButton(Window_t id, EMouseButton button, UInt_t modifier, UInt_t evmask, Window_t confine, Cursor_t cursor, Bool_t grab = kTRUE)
void GrabPointer(Window_t id, UInt_t evmask, Window_t confine, Cursor_t cursor, Bool_t grab = kTRUE)
void SetWindowName(Window_t id, char* name)
void SetIconName(Window_t id, char* name)
void SetIconPixmap(Window_t id, Pixmap_t pic)
void SetClassHints(Window_t id, char* className, char* resourceName)
void SetMWMHints(Window_t id, UInt_t value, UInt_t funcs, UInt_t input)
void SetWMPosition(Window_t id, Int_t x, Int_t y)
void SetWMSize(Window_t id, UInt_t w, UInt_t h)
void SetWMSizeHints(Window_t id, UInt_t wmin, UInt_t hmin, UInt_t wmax, UInt_t hmax, UInt_t winc, UInt_t hinc)
void SetWMState(Window_t id, EInitialState state)
void SetWMTransientHint(Window_t id, Window_t main_id)
void DrawString(Drawable_t id, GContext_t gc, Int_t x, Int_t y, const char* s, Int_t len)
Int_t TextWidth(FontStruct_t font, const char* s, Int_t len)
void GetFontProperties(FontStruct_t font, Int_t& max_ascent, Int_t& max_descent)
void GetGCValues(GContext_t gc, GCValues_t& gval)
FontStruct_t GetFontStruct(FontH_t fh)
void FreeFontStruct(FontStruct_t fs)
void ClearWindow(Window_t id)
Int_t KeysymToKeycode(UInt_t keysym)
void FillRectangle(Drawable_t id, GContext_t gc, Int_t x, Int_t y, UInt_t w, UInt_t h)
void DrawRectangle(Drawable_t id, GContext_t gc, Int_t x, Int_t y, UInt_t w, UInt_t h)
void DrawSegments(Drawable_t id, GContext_t gc, Segment_t* seg, Int_t nseg)
void SelectInput(Window_t id, UInt_t evmask)
void SetInputFocus(Window_t id)
Window_t GetPrimarySelectionOwner()
void ConvertPrimarySelection(Window_t id, Time_t when)
void LookupString(Event_t* event, char* buf, Int_t buflen, UInt_t& keysym)
void GetPasteBuffer(Window_t id, Atom_t atom, TString& text, Int_t& nchar, Bool_t del)
void TranslateCoordinates(Window_t src, Window_t dest, Int_t src_x, Int_t src_y, Int_t& dest_x, Int_t& dest_y, Window_t& child)
void GetWindowSize(Drawable_t id, Int_t& x, Int_t& y, UInt_t& w, UInt_t& h)
void FillPolygon(Window_t id, GContext_t gc, Point_t* points, Int_t npnt)
void QueryPointer(Window_t id, Window_t& rootw, Window_t& childw, Int_t& root_x, Int_t& root_y, Int_t& win_x, Int_t& win_y, UInt_t& mask)
void SetForeground(GContext_t gc, ULong_t foreground)
void SetClipRectangles(GContext_t gc, Int_t x, Int_t y, Rectangle_t* recs, Int_t n)
void Update(Int_t mode = 0)
TClass* Class()
TClass* IsA() const
void ShowMembers(TMemberInspector& insp, char* parent)
void Streamer(TBuffer& b)
Author: Rene Brun, Olivier Couet, Fons Rademakers 28/11/94
Last update: 2.23/04 06/10/99 11.50.05 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.