library: libGQt
#include "TGQt.h"

TGQt


class description - source file - inheritance tree (.pdf)

class TGQt : public TVirtualX

Inheritance Chart:
TObject
<-
TNamed
TAttLine
TAttFill
TAttText
TAttMarker
<-
TVirtualX
<-
TGQt
<-
TQtThread
    private:
static Bool_t IsRegistered(QPaintDevice* wid) TGQt& operator=(const TGQt&) static Int_t RegisterWid(QPaintDevice* wid) static Int_t UnRegisterWid(QPaintDevice* wid) public:
TGQt() TGQt(const TGQt& vx) TGQt(const Text_t* name, const Text_t* title) virtual ~TGQt() virtual Int_t AddWindow(ULong_t qwid, UInt_t w, UInt_t h) 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 ChangeProperty(Window_t id, Atom_t property, Atom_t type, UChar_t* data, Int_t len) virtual void ChangeWindowAttributes(Window_t id, SetWindowAttributes_t* attr) virtual Bool_t CheckEvent(Window_t id, EGEventType type, Event_t& ev) static TClass* Class() virtual void ClearArea(Window_t id, Int_t x, Int_t y, UInt_t w, UInt_t h) virtual void ClearWindow() virtual void ClearWindow(Window_t id) virtual void CloseDisplay() virtual void ClosePixmap() virtual void CloseWindow() static int CoinFlag() virtual void ConvertPrimarySelection(Window_t id, Atom_t clipboard, 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 Drawable_t CreateImage(UInt_t width, UInt_t height) virtual void CreateOpenGLContext(Int_t wid = 0) 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, UInt_t w, UInt_t h) 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 CreatePixmapFromData(unsigned char* bits, UInt_t width, UInt_t height) virtual Region_t CreateRegion() 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, UInt_t wtype) virtual void DeleteFont(FontStruct_t fs) virtual void DeleteGC(GContext_t gc) virtual void DeleteImage(Drawable_t img) virtual void DeleteOpenGLContext(Int_t wid = 0) virtual void DeletePictureData(void* data) virtual void DeletePixmap(Pixmap_t pmap) virtual void DestroyRegion(Region_t reg) virtual void DestroyWindow(Window_t id) virtual const char* DisplayName(const char* = "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 Bool_t EmptyRegion(Region_t reg) virtual Bool_t EqualRegion(Region_t rega, Region_t regb) virtual Int_t EventsPending() virtual UInt_t ExecCommand(TGWin32Command* code) 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 FreeColor(Colormap_t cmap, ULong_t pixel) virtual void FreeFontNames(char** fontlist) virtual void FreeFontStruct(FontStruct_t fs) virtual void GetCharacterUp(Float_t& chupx, Float_t& chupy) virtual unsigned char* GetColorBits(Drawable_t wid, Int_t x = 0, Int_t y = 0, UInt_t w = 0, UInt_t h = 0) virtual Colormap_t GetColormap() const virtual Window_t GetCurrentWindow() const virtual Window_t GetDefaultRootWindow() const virtual Int_t GetDepth() const virtual Display_t GetDisplay() const 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 void GetImageSize(Drawable_t id, UInt_t& width, UInt_t& height) virtual Window_t GetInputFocus() virtual Handle_t GetNativeEvent() const virtual Window_t GetParent(Window_t id) const virtual void GetPasteBuffer(Window_t id, Atom_t atom, TString& text, Int_t& nchar, Bool_t del) virtual ULong_t GetPixel(Color_t cindex) virtual void GetPlanes(Int_t& nplanes) virtual Window_t GetPrimarySelectionOwner() virtual void GetRegionBox(Region_t reg, Rectangle_t* rect) virtual void GetRGB(Int_t index, Float_t& r, Float_t& g, Float_t& b) virtual Int_t GetScreen() const virtual void GetTextExtent(UInt_t& w, UInt_t& h, char* mess) virtual Float_t GetTextMagnitude() virtual Visual_t GetVisual() const 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, Bool_t owner_events = kTRUE) virtual Bool_t HasTTFonts() const virtual void IconifyWindow(Window_t id) virtual Bool_t Init(void* display = 0) virtual Int_t InitWindow(ULong_t window) virtual Atom_t InternAtom(const char* atom_name, Bool_t only_if_exist) virtual void IntersectRegion(Region_t rega, Region_t regb, Region_t result) virtual TClass* IsA() const static Int_t IsCoinLoaded() virtual Int_t KeysymToKeycode(UInt_t keysym) virtual char** ListFonts(const char* fontname, Int_t max, Int_t& count) virtual Int_t LoadQt(const char* shareLibFileName) 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) 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 Bool_t PointInRegion(Int_t x, Int_t y, Region_t reg) virtual Region_t PolygonRegion(Point_t* points, Int_t np, Bool_t winding) static void PostQtEvent(QObject* receiver, QEvent* event) virtual Int_t processQtEvents(Int_t maxtime = 300) virtual void PutImage(Drawable_t id, GContext_t gc, Drawable_t img, Int_t dx, Int_t dy, Int_t x, Int_t y, UInt_t w, UInt_t h) virtual void PutPixel(Drawable_t id, Int_t x, Int_t y, ULong_t pixel) 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 Pixmap_t ReadGIF(Int_t x0, Int_t y0, const char* file, Window_t id = 0) virtual Bool_t ReadPictureDataFromFile(const char* filename, char*** ret_data) virtual void RemoveWindow(ULong_t qwid) 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 SelectPixmap(Int_t qpixid) virtual void SelectWindow(Int_t wid) virtual void SendEvent(Window_t id, Event_t* ev) virtual void SetBackground(GContext_t gc, ULong_t background) 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) static void SetCoinFlag(int flag) static void SetCoinLoaded() virtual void SetCursor(Int_t win, ECursor cursor) virtual void SetCursor(Window_t id, Cursor_t curid) 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 pix) 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 SetPrimarySelectionOwner(Window_t id) 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) 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 StreamerNVirtual(TBuffer& b) virtual void SubtractRegion(Region_t rega, Region_t regb, Region_t result) 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 UnionRectWithRegion(Rectangle_t* rect, Region_t src, Region_t dest) virtual void UnionRegion(Region_t rega, Region_t regb, Region_t result) 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 Warp(Int_t ix, Int_t iy, Window_t id) virtual void WMDeleteNotify(Window_t id) virtual Int_t WriteGIF(char* name) virtual void WritePixmap(Int_t wid, UInt_t w, UInt_t h, char* pxname) virtual void XorRegion(Region_t rega, Region_t regb, Region_t result)

Data Members

    private:
static int fgCoinFlag no coin viewer; static int fgCoinLoaded no coin viewer;

Class Description

                                                                      
 TGQt                                                                 
                                                                      
 This class is the basic interface to the Qt graphics system. It is   
 an implementation of the abstract TVirtualX class.                   
                                                                      


int CoinFlag()
 return the Coin/QGL viewer flag safely

void SetCoinFlag(int flag)
 Set the Coin/QGL viewer flag safely

void SetCoinLoaded()

Int_t IsCoinLoaded()

void PostQtEvent(QObject *receiver, QEvent *event)
 Qt announced that QThread::postEvent to become obsolete and
 we have to switch to the QAppication instead.

TGQt() : TVirtualX(),fDisplayOpened(kFALSE),fQPainter(0),fQClientFilterBuffer(0) ,fCodec(0),fSymbolFontFamily("Symbol")
*-*-*-*-*-*-*-*-*-*-*-*Default Constructor *-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                    ===================

TGQt(const char *name, const char *title) : TVirtualX(name,title),fDisplayOpened(kFALSE) ,fQPainter(0),fCursors(kNumCursors),fQClientFilter(0),fQClientFilterBuffer(0),fPointerGrabber(0) ,fCodec(0),fSymbolFontFamily("Symbol")
*-*-*-*-*-*-*-*-*-*-*-*-*-*Normal Constructor*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                        ==================                              *-*

~TGQt()
*-*-*-*-*-*-*-*-*-*-*-*Default Destructor*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                    ==================

Bool_t Init(void* /*display*/)
*-*-*-*-*-*-*-*-*-*-*-*-*-*Qt GUI initialization-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                        ========================                      *-*

Int_t RegisterWid(QPaintDevice *wid)
 register QWidget for the embedded TCanvas

Int_t UnRegisterWid(QPaintDevice *wid)
 unregister QWidget to the TCanvas
 return  = Root registration Id or zero if the wid was not registered

Bool_t IsRegistered(QPaintDevice *wid)
 Check whether the object has been registered

Int_t InitWindow(ULong_t window)
*-*
*-*  if window == 0 InitWindow creates his own instance of  TQtWindowsObject object
*-*
*-*  Create a new windows
*-*
 window is QWidget

Int_t OpenPixmap(UInt_t w, UInt_t h)
*-*  Create a new pixmap object

UInt_t ExecCommand(TGWin32Command* /*command*/)
 deprecated

void SetDoubleBufferOFF()
 deprecated

void SetDoubleBufferON()
 deprecated

void GetPlanes(Int_t &nplanes)
*-*-*-*-*-*-*-*-*-*-*-*Get maximum number of planes*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                    ============================
*-*  nplanes     : number of bit planes
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

void ClearWindow()
 Clear current window.
 fprintf(stderr,"TGQt::ClearWindow() %p\n",fSelectedWindow);

void ClosePixmap()
 Delete the current pixmap.

void CloseWindow()
 Delete the current window.

void CopyPixmap(int wid, int xpos, int ypos)
 Copy the pixmap wid at the position xpos, ypos in the current window.

void CreateOpenGLContext(int wid)
 Create OpenGL context for win windows (for "selected" Window by default)
 printf(" TGQt::CreateOpenGLContext for wid = %x fSelected= %x, threadID= %d \n",wid,fSelectedWindow,
    GetCurrentThreadId());

void DeleteOpenGLContext(int wid)
 Delete OpenGL context for win windows (for "selected" Window by default)

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 *xy)
 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 *xy)
 Draw a line through all points.
 n         : number of points
 xy        : list of points

void DrawPolyMarker(int n, TPoint *xy)
 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, TVirtualX::ETextMode /*mode*/)

void GetCharacterUp(Float_t &chupx, Float_t &chupy)
 Return character up vector.

QPaintDevice* GetDoubleBuffer(QPaintDevice *dev)
 Query the pointer to the dev offscrenn buffer if any

Int_t GetDoubleBuffer(Int_t wid)
 Query the double buffer value for the window wid.
 return pointer to the off-screen buffer if any

void GetGeometry(int wid, int &x, int &y, unsigned int &w, unsigned int &h)
 Returns the global cooordinate of the window "wid"

const char* DisplayName(const char *)

ULong_t GetPixel(Color_t cindex)
 Return pixel value associated to specified ROOT color number.
 see: GQTGUI.cxx:QtColor() also

void GetRGB(int index, float &r, float &g, float &b)
 Get rgb values for color "index".

Float_t GetTextMagnitude()

void SetTextMagnitude(Float_t mgn)

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

Bool_t HasTTFonts() const

void MoveWindow(Int_t wid, Int_t x, Int_t y)
 Move the window wid.
 wid  : Window identifier.
 x    : x new window position
 y    : y new window position

void QueryPointer(int &ix, int &iy)
 deprecated

Pixmap_t ReadGIF(Int_t x0, Int_t y0, const char *file, Window_t id)
 If id is NULL - loads the specified gif file at position [x0,y0] in the
 current window. Otherwise creates pixmap from gif file

Int_t RequestLocator(Int_t /*mode*/, Int_t /*ctyp*/, Int_t &/*x*/, Int_t &/*y*/)
 deprecated

Int_t RequestString(int x, int y, char *text)
*-*-*-*-*-*-*-*-*-*-*-*Request 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)
*-*
*-*  Return value:
*-*
*-*    0     -  input was canceled
*-*    1     -  input was Ok
*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

void RescaleWindow(int wid, UInt_t w, UInt_t h)
 Rescale the window wid.
 wid  : Window identifier
 w    : Width
 h    : Heigth

Int_t ResizePixmap(int wid, UInt_t w, UInt_t 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 SelectPixmap(Int_t qpixid)

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_t /*wid*/)
 Turn off the clipping for the window wid.
 deprecated
 fQPainter->setClipping(FALSE);

void SetClipRegion(int wid, int x, int y, UInt_t w, UInt_t h)
 Set clipping region for the window wid.
 wid        : Window indentifier
 x,y        : origin of clipping rectangle
 w,h        : size of clipping rectangle;

void SetCursor(Int_t 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 SetDrawMode(TVirtualX::EDrawMode mode)
 Set the drawing mode.
 mode : drawing mode

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 SetLineColor(Color_t cindex)
*-*-*-*-*-*-*-*-*-*-*Set color index for lines*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  =========================
*-*  cindex    : color index
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

void SetLineType(int n, int* /*dash*/)
*-*-*-*-*-*-*-*-*-*-*Set line style-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ==============
*-*    Set line style:
*-*    if n < 0 use pre-defined Windows style:
*-*         0 - solid lines
*-*        -1 - solid lines
*-*        -2 - dash line
*-*        -3 - dot  line
*-*        -4 - dash-dot line
*-*        -5 - dash-dot-dot line
*-*     < -6 - solid line
*-*
*-*    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 linestyle)
*-*-*-*-*-*-*-*-*-*-*Set line style-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ==============
*-*    Use pre-defined Windows style:
*-*    linestyle =
*-*         0 - solid lines
*-*        -1 - solid lines
*-*        -2 - dash line
*-*        -3 - dot  line
*-*        -4 - dash-dot line
*-*        -5 - dash-dot-dot line
*-*      < -6 - solid line
*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

void SetLineWidth(Width_t width)
*-*-*-*-*-*-*-*-*-*-*Set line width*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ==============
*-*  width   : line width in pixels
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

void SetMarkerColor( Color_t cindex)
*-*-*-*-*-*-*-*-*-*-*Set color index for markers*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ===========================
*-*  cindex : color index defined my IXSETCOL
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

void SetMarkerSize(Float_t markersize)
*-*-*-*-*-*-*-*-*-*-*Set marker size index for markers*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  =================================
*-*  msize  : marker scale factor
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

void SetMarkerStyle(Style_t markerstyle)
*-*-*-*-*-*-*-*-*-*-*Set marker style*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ================

void SetRGB(int cindex, float r, float g, float b)
  if (fSelectedWindow == NoOperation) return;

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*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ========================
*-*  cindex    : color index defined my IXSETCOL
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

Int_t SetTextFont(char* /*fontname*/, TVirtualX::ETextSetMode /*mode*/)
 Set text font to specified name.
 mode       : loading flag
 mode=kCheck = 0     : search if the font exist (kCheck)
 mode= kLoad = 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(const char *fontname, int italic, int bold)

void SetTextFont(Font_t fontnumber)
*-*-*-*-*-*-*-*-*-*-*-*-*Set current text font number*-*-*-*-*-*-*-*-*-*-*-*
*-*                      ===========================
*-*  List of the currently supported fonts (screen and PostScript)
*-*  =============================================================
*-*   Font ID       X11                       Win32 TTF       lfItalic  lfWeight x 10
*-*        1 : times-medium-i-normal      "Times New Roman"      1           5
*-*        2 : times-bold-r-normal        "Times New Roman"      0           8
*-*        3 : times-bold-i-normal        "Times New Roman"      1           8
*-*        4 : helvetica-medium-r-normal  "Arial"                0           5
*-*        5 : helvetica-medium-o-normal  "Arial"                1           5
*-*        6 : helvetica-bold-r-normal    "Arial"                0           8
*-*        7 : helvetica-bold-o-normal    "Arial"                1           8
*-*        8 : courier-medium-r-normal    "Courier New"          0           5
*-*        9 : courier-medium-o-normal    "Courier New"          1           5
*-*       10 : courier-bold-r-normal      "Courier New"          0           8
*-*       11 : courier-bold-o-normal      "Courier New"          1           8
*-*       12 : symbol-medium-r-normal     "Symbol"               0           6
*-*       13 : times-medium-r-normal      "Times New Roman"      0           5
*-*       14 :                            "Wingdings"            0           5

void SetTextSize(Float_t textsize)
*-*-*-*-*-*-*-*-*-*-*-*-*Set current text size*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                      =====================

void UpdateWindow(int mode)
 Update display.
 mode : (1) update
        (0) sync

Int_t WriteGIF(char *name)
 Writes the current active window into pixmap file.
 The format is defined by the file name extension
 like "png","jpg","bmp"  . . .
 If no extension is provided the "png" format is used by default

 Returns 1 in case of success,
         0 otherwise
 Note: this method may not produce the expected result been called
 ----  from the ROOT prompt by simple reason:
       The active window will be console window
       rather the last selected ROOT canvas.


void WritePixmap(int wid, UInt_t w, UInt_t h, char *pxname)
 Write the pixmap wid in the bitmap file pxname in JPEG.
 wid         : Pixmap address
 w,h         : Width and height of the pixmap.
               if w = h = -1 the size of the pimxap is equal the size the wid size
 pxname      : pixmap file name
               The format is defined by the file name extension
               like "png","jpg","bmp"  . . .
               If no or some unknown extension is provided then
               the "png" format is used by default

Int_t LoadQt(const char *shareLibFileName)
 Make sure we load the GUI DLL from the gui thread

Int_t processQtEvents(Int_t maxtime)
 Force processing the Qt events only without entering the ROOT event loop



Inline Functions


                 TGQt& operator=(const TGQt&)
                  TGQt TGQt(const Text_t* name, const Text_t* title)
              Handle_t GetNativeEvent() const
              Window_t GetWindowID(Int_t wid)
                 Int_t AddWindow(ULong_t qwid, UInt_t w, UInt_t h)
                  void RemoveWindow(ULong_t qwid)
                  void SetOpacity(Int_t percent)
                  void Warp(Int_t ix, Int_t iy)
                  void Warp(Int_t ix, Int_t iy, Window_t id)
                  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, UInt_t wtype)
                 Int_t OpenDisplay(const char* dpyName)
                  void CloseDisplay()
             Display_t GetDisplay() const
              Visual_t GetVisual() const
                 Int_t GetScreen() const
                 Int_t GetDepth() const
            Colormap_t GetColormap() const
                Atom_t InternAtom(const char* atom_name, Bool_t only_if_exist)
              Window_t GetDefaultRootWindow() const
              Window_t GetParent(Window_t id) const
          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)
                  void FreeColor(Colormap_t cmap, ULong_t pixel)
                 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 ChangeProperty(Window_t id, Atom_t property, Atom_t type, UChar_t* data, Int_t len)
                  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, Bool_t owner_events = kTRUE)
                  void SetWindowName(Window_t id, char* name)
                  void SetIconName(Window_t id, char* name)
                  void SetIconPixmap(Window_t id, Pixmap_t pix)
                  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)
              Window_t GetInputFocus()
                  void SetInputFocus(Window_t id)
              Window_t GetPrimarySelectionOwner()
                  void SetPrimarySelectionOwner(Window_t id)
                  void ConvertPrimarySelection(Window_t id, Atom_t clipboard, 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 SetBackground(GContext_t gc, ULong_t background)
                  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)
              Region_t CreateRegion()
                  void DestroyRegion(Region_t reg)
                  void UnionRectWithRegion(Rectangle_t* rect, Region_t src, Region_t dest)
              Region_t PolygonRegion(Point_t* points, Int_t np, Bool_t winding)
                  void UnionRegion(Region_t rega, Region_t regb, Region_t result)
                  void IntersectRegion(Region_t rega, Region_t regb, Region_t result)
                  void SubtractRegion(Region_t rega, Region_t regb, Region_t result)
                  void XorRegion(Region_t rega, Region_t regb, Region_t result)
                Bool_t EmptyRegion(Region_t reg)
                Bool_t PointInRegion(Int_t x, Int_t y, Region_t reg)
                Bool_t EqualRegion(Region_t rega, Region_t regb)
                  void GetRegionBox(Region_t reg, Rectangle_t* rect)
                char** ListFonts(const char* fontname, Int_t max, Int_t& count)
                  void FreeFontNames(char** fontlist)
            Drawable_t CreateImage(UInt_t width, UInt_t height)
                  void GetImageSize(Drawable_t id, UInt_t& width, UInt_t& height)
                  void PutPixel(Drawable_t id, Int_t x, Int_t y, ULong_t pixel)
                  void PutImage(Drawable_t id, GContext_t gc, Drawable_t img, Int_t dx, Int_t dy, Int_t x, Int_t y, UInt_t w, UInt_t h)
                  void DeleteImage(Drawable_t img)
        unsigned char* GetColorBits(Drawable_t wid, Int_t x = 0, Int_t y = 0, UInt_t w = 0, UInt_t h = 0)
              Pixmap_t CreatePixmapFromData(unsigned char* bits, UInt_t width, UInt_t height)
              Window_t GetCurrentWindow() const
               TClass* Class()
               TClass* IsA() const
                  void ShowMembers(TMemberInspector& insp, char* parent)
                  void Streamer(TBuffer& b)
                  void StreamerNVirtual(TBuffer& b)


Author: Valeri Fine 21/01/2002
Last update: root/qt:$Name: $:$Id: TGQt.cxx,v 1.25 2005/08/17 20:08:37 brun Exp $
Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.