00001 // @(#)root/base:$Id: TVirtualX.cxx 35197 2010-09-08 12:34:39Z rdm $ 00002 // Author: Fons Rademakers 3/12/95 00003 00004 /************************************************************************* 00005 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * 00006 * All rights reserved. * 00007 * * 00008 * For the licensing terms see $ROOTSYS/LICENSE. * 00009 * For the list of contributors see $ROOTSYS/README/CREDITS. * 00010 *************************************************************************/ 00011 00012 ////////////////////////////////////////////////////////////////////////// 00013 // // 00014 // TVirtualX // 00015 // // 00016 // Semi-Abstract base class defining a generic interface to the // 00017 // underlying, low level, graphics system (X11, Win32, MacOS). // 00018 // An instance of TVirtualX itself defines a batch interface to the // 00019 // graphics system. // 00020 // // 00021 ////////////////////////////////////////////////////////////////////////// 00022 00023 #include "TVirtualX.h" 00024 #include "TString.h" 00025 00026 00027 Atom_t gWM_DELETE_WINDOW; 00028 Atom_t gMOTIF_WM_HINTS; 00029 Atom_t gROOT_MESSAGE; 00030 00031 00032 TVirtualX *gGXBatch; //Global pointer to batch graphics interface 00033 TVirtualX* (*gPtr2VirtualX)() = 0; // returns pointer to global object 00034 00035 00036 ClassImp(TVirtualX) 00037 00038 00039 //______________________________________________________________________________ 00040 TVirtualX::TVirtualX(const char *name, const char *title) : TNamed(name, title), 00041 TAttLine(1,1,1),TAttFill(1,1),TAttText(11,0,1,62,0.01), TAttMarker(1,1,1), 00042 fDrawMode() 00043 { 00044 // Ctor of ABC 00045 } 00046 00047 //______________________________________________________________________________ 00048 TVirtualX *&TVirtualX::Instance() 00049 { 00050 // Returns gVirtualX global 00051 00052 static TVirtualX *instance = 0; 00053 if (gPtr2VirtualX) instance = gPtr2VirtualX(); 00054 return instance; 00055 } 00056 00057 //______________________________________________________________________________ 00058 void TVirtualX::GetWindowAttributes(Window_t /*id*/, WindowAttributes_t &attr) 00059 { 00060 // The WindowAttributes_t structure is set to default. 00061 00062 attr.fX = attr.fY = 0; 00063 attr.fWidth = attr.fHeight = 0; 00064 attr.fVisual = 0; 00065 attr.fMapState = kIsUnmapped; 00066 attr.fScreen = 0; 00067 } 00068 00069 //______________________________________________________________________________ 00070 Bool_t TVirtualX::ParseColor(Colormap_t /*cmap*/, const char * /*cname*/, 00071 ColorStruct_t &color) 00072 { 00073 // Looks up the string name of a color "cname" with respect to the screen 00074 // associated with the specified colormap. It returns the exact color value. 00075 // If the color name is not in the Host Portable Character Encoding, 00076 // the result is implementation dependent. 00077 // 00078 // cmap - the colormap 00079 // cname - the color name string; use of uppercase or lowercase 00080 // does not matter 00081 // color - returns the exact color value for later use 00082 // 00083 // The ColorStruct_t structure is set to default. Let system think we 00084 // could parse color. 00085 00086 color.fPixel = 0; 00087 color.fRed = 0; 00088 color.fGreen = 0; 00089 color.fBlue = 0; 00090 color.fMask = kDoRed | kDoGreen | kDoBlue; 00091 00092 return kTRUE; 00093 } 00094 00095 //______________________________________________________________________________ 00096 Bool_t TVirtualX::AllocColor(Colormap_t /*cmap*/, ColorStruct_t &color) 00097 { 00098 // Allocates a read-only colormap entry corresponding to the closest RGB 00099 // value supported by the hardware. If no cell could be allocated it 00100 // returns kFALSE, otherwise kTRUE. 00101 // 00102 // The pixel value is set to default. Let system think we could allocate 00103 // color. 00104 // 00105 // cmap - the colormap 00106 // color - specifies and returns the values actually used in the cmap 00107 00108 color.fPixel = 0; 00109 return kTRUE; 00110 } 00111 00112 //______________________________________________________________________________ 00113 void TVirtualX::QueryColor(Colormap_t /*cmap*/, ColorStruct_t &color) 00114 { 00115 // Returns the current RGB value for the pixel in the "color" structure 00116 // 00117 // The color components are set to default. 00118 // 00119 // cmap - the colormap 00120 // color - specifies and returns the RGB values for the pixel specified 00121 // in the structure 00122 00123 color.fRed = color.fGreen = color.fBlue = 0; 00124 } 00125 00126 //______________________________________________________________________________ 00127 void TVirtualX::NextEvent(Event_t &event) 00128 { 00129 // The "event" is set to default event. 00130 // This method however, should never be called. 00131 00132 event.fType = kButtonPress; 00133 event.fWindow = 0; 00134 event.fTime = 0; 00135 event.fX = 0; 00136 event.fY = 0; 00137 event.fXRoot = 0; 00138 event.fYRoot = 0; 00139 event.fState = 0; 00140 event.fCode = 0; 00141 event.fWidth = 0; 00142 event.fHeight = 0; 00143 event.fCount = 0; 00144 } 00145 00146 //______________________________________________________________________________ 00147 void TVirtualX::GetPasteBuffer(Window_t /*id*/, Atom_t /*atom*/, TString &text, 00148 Int_t &nchar, Bool_t /*del*/) 00149 { 00150 // Gets contents of the paste buffer "atom" into the string "text". 00151 // (nchar = number of characters) If "del" is true deletes the paste 00152 // buffer afterwards. 00153 00154 text = ""; 00155 nchar = 0; 00156 } 00157 00158 //______________________________________________________________________________ 00159 Bool_t TVirtualX::Init(void * /*display*/) 00160 { 00161 // Initializes the X system. Returns kFALSE in case of failure. 00162 // It is implementation dependent. 00163 00164 return kFALSE; 00165 } 00166 00167 //______________________________________________________________________________ 00168 void TVirtualX::ClearWindow() 00169 { 00170 // Clears the entire area of the current window. 00171 } 00172 00173 //______________________________________________________________________________ 00174 void TVirtualX::CloseWindow() 00175 { 00176 // Deletes current window. 00177 } 00178 00179 //______________________________________________________________________________ 00180 void TVirtualX::ClosePixmap() 00181 { 00182 // Deletes current pixmap. 00183 } 00184 00185 //______________________________________________________________________________ 00186 void TVirtualX::CopyPixmap(Int_t /*wid*/, Int_t /*xpos*/, Int_t /*ypos*/) 00187 { 00188 // Copies the pixmap "wid" at the position [xpos,ypos] in the current window. 00189 } 00190 00191 //______________________________________________________________________________ 00192 void TVirtualX::CreateOpenGLContext(Int_t /*wid*/) 00193 { 00194 // Creates OpenGL context for window "wid" 00195 } 00196 00197 //______________________________________________________________________________ 00198 void TVirtualX::DeleteOpenGLContext(Int_t /*wid*/) 00199 { 00200 // Deletes OpenGL context for window "wid" 00201 } 00202 00203 //______________________________________________________________________________ 00204 void TVirtualX::DrawBox(Int_t /*x1*/, Int_t /*y1*/, Int_t /*x2*/, Int_t /*y2*/, 00205 EBoxMode /*mode*/) 00206 { 00207 // Draws a box between [x1,y1] and [x2,y2] according to the "mode". 00208 // 00209 // mode - drawing mode: 00210 // mode = 0 hollow (kHollow) 00211 // mode = 1 solid (kSolid) 00212 00213 } 00214 00215 //______________________________________________________________________________ 00216 void TVirtualX::DrawCellArray(Int_t /*x1*/, Int_t /*y1*/, 00217 Int_t /*x2*/, Int_t /*y2*/, 00218 Int_t /*nx*/, Int_t /*ny*/, Int_t * /*ic*/) 00219 { 00220 // Draws a cell array. The drawing is done with the pixel presicion 00221 // if (x2-x1)/nx (or y) is not a exact pixel number the position of 00222 // the top rigth corner may be wrong. 00223 // 00224 // x1,y1 - left down corner 00225 // x2,y2 - right up corner 00226 // nx,ny - array size 00227 // ic - array 00228 } 00229 00230 //______________________________________________________________________________ 00231 void TVirtualX::DrawFillArea(Int_t /*n*/, TPoint * /*xy*/) 00232 { 00233 // Fills area described by the polygon. 00234 // 00235 // n - number of points 00236 // xy(2,n) - list of points 00237 } 00238 00239 //______________________________________________________________________________ 00240 void TVirtualX::DrawLine(Int_t /*x1*/, Int_t /*y1*/, Int_t /*x2*/, Int_t /*y2*/) 00241 { 00242 // Draws a line. 00243 // 00244 // x1,y1 - begin of line 00245 // x2,y2 - end of line 00246 } 00247 00248 //______________________________________________________________________________ 00249 void TVirtualX::DrawPolyLine(Int_t /*n*/, TPoint * /*xy*/) 00250 { 00251 // Draws a line through all points in the list. 00252 // 00253 // n - number of points 00254 // xy - list of points 00255 } 00256 00257 //______________________________________________________________________________ 00258 void TVirtualX::DrawPolyMarker(Int_t /*n*/, TPoint * /*xy*/) 00259 { 00260 // Draws "n" markers with the current attributes at position [x,y]. 00261 // 00262 // n - number of markers to draw 00263 // xy - an array of x,y marker coordinates 00264 00265 } 00266 00267 //______________________________________________________________________________ 00268 void TVirtualX::DrawText(Int_t /*x*/, Int_t /*y*/, Float_t /*angle*/, 00269 Float_t /*mgn*/, const char * /*text*/, 00270 ETextMode /*mode*/) 00271 { 00272 // Draws a text string using current font. 00273 // 00274 // x,y - text position 00275 // angle - text angle 00276 // mgn - magnification factor 00277 // text - text string 00278 // mode - drawing mode: 00279 // mode = 0 the background is not drawn (kClear) 00280 // mode = 1 the background is drawn (kOpaque) 00281 00282 } 00283 00284 //______________________________________________________________________________ 00285 UInt_t TVirtualX::ExecCommand(TGWin32Command * /*code*/) 00286 { 00287 // Executes the command "code" coming from the other threads (Win32) 00288 00289 return 0; 00290 } 00291 00292 //______________________________________________________________________________ 00293 Int_t TVirtualX::GetDoubleBuffer(Int_t /*wid*/) 00294 { 00295 // Queries the double buffer value for the window "wid". 00296 00297 return 0; 00298 } 00299 00300 //______________________________________________________________________________ 00301 void TVirtualX::GetCharacterUp(Float_t &chupx, Float_t &chupy) 00302 { 00303 // Returns character up vector. 00304 00305 chupx = chupy = 0; 00306 } 00307 00308 //______________________________________________________________________________ 00309 void TVirtualX::GetGeometry(Int_t /*wid*/, Int_t &x, Int_t &y, 00310 UInt_t &w, UInt_t &h) 00311 { 00312 // Returns position and size of window "wid". 00313 // 00314 // wid - window identifier 00315 // if wid < 0 the size of the display is returned 00316 // x, y - returned window position 00317 // w, h - returned window size 00318 00319 x = y = 0; 00320 w = h = 0; 00321 } 00322 00323 //______________________________________________________________________________ 00324 const char *TVirtualX::DisplayName(const char *) 00325 { 00326 // Returns hostname on which the display is opened. 00327 00328 return "batch"; 00329 } 00330 00331 //______________________________________________________________________________ 00332 Handle_t TVirtualX::GetNativeEvent() const 00333 { 00334 // Returns the current native event handle. 00335 00336 return 0; 00337 } 00338 00339 //______________________________________________________________________________ 00340 ULong_t TVirtualX::GetPixel(Color_t /*cindex*/) 00341 { 00342 // Returns pixel value associated to specified ROOT color number "cindex". 00343 00344 return 0; 00345 } 00346 00347 //______________________________________________________________________________ 00348 void TVirtualX::GetPlanes(Int_t &nplanes) 00349 { 00350 // Returns the maximum number of planes. 00351 00352 nplanes = 0; 00353 } 00354 00355 //______________________________________________________________________________ 00356 void TVirtualX::GetRGB(Int_t /*index*/, Float_t &r, Float_t &g, Float_t &b) 00357 { 00358 // Returns RGB values for color "index". 00359 00360 r = g = b = 0; 00361 } 00362 00363 //______________________________________________________________________________ 00364 void TVirtualX::GetTextExtent(UInt_t &w, UInt_t &h, char * /*mess*/) 00365 { 00366 // Returns the size of the specified character string "mess". 00367 // 00368 // w - the text width 00369 // h - the text height 00370 // mess - the string 00371 00372 w = h = 0; 00373 } 00374 //______________________________________________________________________________ 00375 Int_t TVirtualX::GetFontAscent() const 00376 { 00377 // Returns the ascent of the current font (in pixels). 00378 // The ascent of a font is the distance from the baseline 00379 // to the highest position characters extend to 00380 return 0; 00381 } 00382 //______________________________________________________________________________ 00383 Int_t TVirtualX::GetFontDescent() const 00384 { 00385 // Returns the descent of the current font (in pixels. 00386 // The descent is the distance from the base line 00387 // to the lowest point characters extend to. 00388 return 0; 00389 } 00390 00391 //______________________________________________________________________________ 00392 Float_t TVirtualX::GetTextMagnitude() 00393 { 00394 // Returns the current font magnification factor 00395 00396 return 0; 00397 } 00398 00399 //______________________________________________________________________________ 00400 Bool_t TVirtualX::HasTTFonts() const 00401 { 00402 // Returns True when TrueType fonts are used 00403 00404 return kFALSE; 00405 } 00406 00407 //______________________________________________________________________________ 00408 Window_t TVirtualX::GetWindowID(Int_t /*wid*/) 00409 { 00410 // Returns the X11 window identifier. 00411 // 00412 // wid - workstation identifier (input) 00413 00414 return 0; 00415 } 00416 00417 //______________________________________________________________________________ 00418 Int_t TVirtualX::InitWindow(ULong_t /*window*/) 00419 { 00420 // Creates a new window and return window number. 00421 // Returns -1 if window initialization fails. 00422 00423 return 0; 00424 } 00425 00426 //______________________________________________________________________________ 00427 Int_t TVirtualX::AddWindow(ULong_t /*qwid*/, UInt_t /*w*/, UInt_t /*h*/) 00428 { 00429 // Registers a window created by Qt as a ROOT window 00430 // 00431 // w, h - the width and height, which define the window size 00432 00433 return 0; 00434 } 00435 00436 //______________________________________________________________________________ 00437 Int_t TVirtualX::AddPixmap(ULong_t /*pixind*/, UInt_t /*w*/, UInt_t /*h*/) 00438 { 00439 // Registers a pixmap created by TGLManager as a ROOT pixmap 00440 // 00441 // w, h - the width and height, which define the pixmap size 00442 00443 return 0; 00444 } 00445 00446 00447 //______________________________________________________________________________ 00448 void TVirtualX::RemoveWindow(ULong_t /*qwid*/) 00449 { 00450 // Removes the created by Qt window "qwid". 00451 } 00452 00453 //______________________________________________________________________________ 00454 void TVirtualX::MoveWindow(Int_t /*wid*/, Int_t /*x*/, Int_t /*y*/) 00455 { 00456 // Moves the window "wid" to the specified x and y coordinates. 00457 // It does not change the window's size, raise the window, or change 00458 // the mapping state of the window. 00459 // 00460 // x, y - coordinates, which define the new position of the window 00461 // relative to its parent. 00462 } 00463 00464 //______________________________________________________________________________ 00465 Int_t TVirtualX::OpenPixmap(UInt_t /*w*/, UInt_t /*h*/) 00466 { 00467 // Creates a pixmap of the width "w" and height "h" you specified. 00468 00469 return 0; 00470 } 00471 00472 //______________________________________________________________________________ 00473 void TVirtualX::QueryPointer(Int_t &ix, Int_t &iy) 00474 { 00475 // Returns the pointer position. 00476 00477 ix = iy = 0; 00478 } 00479 00480 //______________________________________________________________________________ 00481 Pixmap_t TVirtualX::ReadGIF(Int_t /*x0*/, Int_t /*y0*/, const char * /*file*/, 00482 Window_t /*id*/) 00483 { 00484 // If id is NULL - loads the specified gif file at position [x0,y0] in the 00485 // current window. Otherwise creates pixmap from gif file 00486 00487 return 0; 00488 } 00489 00490 //______________________________________________________________________________ 00491 Int_t TVirtualX::RequestLocator(Int_t /*mode*/, Int_t /*ctyp*/, 00492 Int_t &x, Int_t &y) 00493 { 00494 // Requests Locator position. 00495 // x,y - cursor position at moment of button press (output) 00496 // ctyp - cursor type (input) 00497 // ctyp = 1 tracking cross 00498 // ctyp = 2 cross-hair 00499 // ctyp = 3 rubber circle 00500 // ctyp = 4 rubber band 00501 // ctyp = 5 rubber rectangle 00502 // 00503 // mode - input mode 00504 // mode = 0 request 00505 // mode = 1 sample 00506 // 00507 // The returned value is: 00508 // in request mode: 00509 // 1 = left is pressed 00510 // 2 = middle is pressed 00511 // 3 = right is pressed 00512 // in sample mode: 00513 // 11 = left is released 00514 // 12 = middle is released 00515 // 13 = right is released 00516 // -1 = nothing is pressed or released 00517 // -2 = leave the window 00518 // else = keycode (keyboard is pressed) 00519 00520 x = y = 0; 00521 return 0; 00522 } 00523 00524 //______________________________________________________________________________ 00525 Int_t TVirtualX::RequestString(Int_t /*x*/, Int_t /*y*/, char *text) 00526 { 00527 // Requests string: text is displayed and can be edited with Emacs-like 00528 // keybinding. Returns termination code (0 for ESC, 1 for RETURN) 00529 // 00530 // x,y - position where text is displayed 00531 // text - displayed text (as input), edited text (as output) 00532 00533 if (text) *text = 0; 00534 return 0; 00535 } 00536 00537 //______________________________________________________________________________ 00538 void TVirtualX::RescaleWindow(Int_t /*wid*/, UInt_t /*w*/, UInt_t /*h*/) 00539 { 00540 // Rescales the window "wid". 00541 // 00542 // wid - window identifier 00543 // w - the width 00544 // h - the heigth 00545 00546 } 00547 00548 //______________________________________________________________________________ 00549 Int_t TVirtualX::ResizePixmap(Int_t /*wid*/, UInt_t /*w*/, UInt_t /*h*/) 00550 { 00551 // Resizes the specified pixmap "wid". 00552 // 00553 // w, h - the width and height which define the pixmap dimensions 00554 00555 return 0; 00556 } 00557 00558 //______________________________________________________________________________ 00559 void TVirtualX::ResizeWindow(Int_t /*wid*/) 00560 { 00561 // Resizes the window "wid" if necessary. 00562 } 00563 00564 //______________________________________________________________________________ 00565 void TVirtualX::SelectWindow(Int_t /*wid*/) 00566 { 00567 // Selects the window "wid" to which subsequent output is directed. 00568 } 00569 00570 //______________________________________________________________________________ 00571 void TVirtualX::SelectPixmap(Int_t /*qpixid*/) 00572 { 00573 // Selects the pixmap "qpixid". 00574 } 00575 00576 //______________________________________________________________________________ 00577 void TVirtualX::SetCharacterUp(Float_t /*chupx*/, Float_t /*chupy*/) 00578 { 00579 // Sets character up vector. 00580 } 00581 00582 //______________________________________________________________________________ 00583 void TVirtualX::SetClipOFF(Int_t /*wid*/) 00584 { 00585 // Turns off the clipping for the window "wid". 00586 } 00587 00588 //______________________________________________________________________________ 00589 void TVirtualX::SetClipRegion(Int_t /*wid*/, Int_t /*x*/, Int_t /*y*/, 00590 UInt_t /*w*/, UInt_t /*h*/) 00591 { 00592 // Sets clipping region for the window "wid". 00593 // 00594 // wid - window indentifier 00595 // x, y - origin of clipping rectangle 00596 // w, h - the clipping rectangle dimensions 00597 00598 } 00599 00600 //______________________________________________________________________________ 00601 void TVirtualX::SetCursor(Int_t /*win*/, ECursor /*cursor*/) 00602 { 00603 // The cursor "cursor" will be used when the pointer is in the 00604 // window "wid". 00605 } 00606 00607 //______________________________________________________________________________ 00608 void TVirtualX::SetDoubleBuffer(Int_t /*wid*/, Int_t /*mode*/) 00609 { 00610 // Sets the double buffer on/off on the window "wid". 00611 // wid - window identifier. 00612 // 999 means all opened windows. 00613 // mode - the on/off switch 00614 // mode = 1 double buffer is on 00615 // mode = 0 double buffer is off 00616 00617 } 00618 00619 //______________________________________________________________________________ 00620 void TVirtualX::SetDoubleBufferOFF() 00621 { 00622 // Turns double buffer mode off. 00623 } 00624 00625 //______________________________________________________________________________ 00626 void TVirtualX::SetDoubleBufferON() 00627 { 00628 // Turns double buffer mode on. 00629 } 00630 00631 //______________________________________________________________________________ 00632 void TVirtualX::SetDrawMode(EDrawMode /*mode*/) 00633 { 00634 // Sets the drawing mode. 00635 // 00636 // mode = 1 copy 00637 // mode = 2 xor 00638 // mode = 3 invert 00639 // mode = 4 set the suitable mode for cursor echo according to the vendor 00640 } 00641 00642 //______________________________________________________________________________ 00643 void TVirtualX::SetFillColor(Color_t /*cindex*/) 00644 { 00645 // Sets color index "cindex" for fill areas. 00646 } 00647 00648 //______________________________________________________________________________ 00649 void TVirtualX::SetFillStyle(Style_t /*style*/) 00650 { 00651 // Sets fill area style. 00652 // 00653 // style - compound fill area interior style 00654 // style = 1000 * interiorstyle + styleindex 00655 00656 } 00657 00658 //______________________________________________________________________________ 00659 void TVirtualX::SetLineColor(Color_t /*cindex*/) 00660 { 00661 // Sets color index "cindex" for drawing lines. 00662 } 00663 00664 //______________________________________________________________________________ 00665 void TVirtualX::SetLineType(Int_t /*n*/, Int_t * /*dash*/) 00666 { 00667 // Sets the line type. 00668 // 00669 // n - length of the dash list 00670 // n <= 0 use solid lines 00671 // n > 0 use dashed lines described by dash(n) 00672 // e.g. n = 4,dash = (6,3,1,3) gives a dashed-dotted line 00673 // with dash length 6 and a gap of 7 between dashes 00674 // dash(n) - dash segment lengths 00675 } 00676 00677 //______________________________________________________________________________ 00678 void TVirtualX::SetLineStyle(Style_t /*linestyle*/) 00679 { 00680 // Sets the line style. 00681 // 00682 // linestyle <= 1 solid 00683 // linestyle = 2 dashed 00684 // linestyle = 3 dotted 00685 // linestyle = 4 dashed-dotted 00686 } 00687 00688 //______________________________________________________________________________ 00689 void TVirtualX::SetLineWidth(Width_t /*width*/) 00690 { 00691 // Sets the line width. 00692 // 00693 // width - the line width in pixels 00694 } 00695 00696 //______________________________________________________________________________ 00697 void TVirtualX::SetMarkerColor(Color_t /*cindex*/) 00698 { 00699 // Sets color index "cindex" for markers. 00700 } 00701 00702 //______________________________________________________________________________ 00703 void TVirtualX::SetMarkerSize(Float_t /*markersize*/) 00704 { 00705 // Sets marker size index. 00706 // 00707 // markersize - the marker scale factor 00708 } 00709 00710 //______________________________________________________________________________ 00711 void TVirtualX::SetMarkerStyle(Style_t /*markerstyle*/) 00712 { 00713 // Sets marker style. 00714 } 00715 00716 //______________________________________________________________________________ 00717 void TVirtualX::SetOpacity(Int_t /*percent*/) 00718 { 00719 // Sets opacity of the current window. This image manipulation routine 00720 // works by adding to a percent amount of neutral to each pixels RGB. 00721 // Since it requires quite some additional color map entries is it 00722 // only supported on displays with more than > 8 color planes (> 256 00723 // colors). 00724 } 00725 00726 //______________________________________________________________________________ 00727 void TVirtualX::SetRGB(Int_t /*cindex*/, Float_t /*r*/, Float_t /*g*/, 00728 Float_t /*b*/) 00729 { 00730 // Sets color intensities the specified color index "cindex". 00731 // 00732 // cindex - color index 00733 // r, g, b - the red, green, blue intensities between 0.0 and 1.0 00734 } 00735 00736 //______________________________________________________________________________ 00737 void TVirtualX::SetTextAlign(Short_t /*talign*/) 00738 { 00739 // Sets the text alignment. 00740 // 00741 // talign = txalh horizontal text alignment 00742 // talign = txalv vertical text alignment 00743 } 00744 00745 //______________________________________________________________________________ 00746 void TVirtualX::SetTextColor(Color_t /*cindex*/) 00747 { 00748 // Sets the color index "cindex" for text. 00749 } 00750 00751 //______________________________________________________________________________ 00752 Int_t TVirtualX::SetTextFont(char * /*fontname*/, ETextSetMode /*mode*/) 00753 { 00754 // Sets text font to specified name "fontname".This function returns 0 if 00755 // the specified font is found, 1 if it is not. 00756 // 00757 // mode - loading flag 00758 // mode = 0 search if the font exist (kCheck) 00759 // mode = 1 search the font and load it if it exists (kLoad) 00760 00761 return 0; 00762 } 00763 00764 //______________________________________________________________________________ 00765 void TVirtualX::SetTextFont(Font_t /*fontnumber*/) 00766 { 00767 // Sets the current text font number. 00768 } 00769 00770 //______________________________________________________________________________ 00771 void TVirtualX::SetTextMagnitude(Float_t /*mgn*/) 00772 { 00773 // Sets the current text magnification factor to "mgn" 00774 } 00775 00776 //______________________________________________________________________________ 00777 void TVirtualX::SetTextSize(Float_t /*textsize*/) 00778 { 00779 // Sets the current text size to "textsize" 00780 } 00781 00782 //______________________________________________________________________________ 00783 void TVirtualX::UpdateWindow(Int_t /*mode*/) 00784 { 00785 // Updates or synchronises client and server once (not permanent). 00786 // according to "mode". 00787 // mode = 1 update 00788 // mode = 0 sync 00789 } 00790 00791 //______________________________________________________________________________ 00792 void TVirtualX::Warp(Int_t /*ix*/, Int_t /*iy*/, Window_t /*id*/) 00793 { 00794 // Sets the pointer position. 00795 // ix - new X coordinate of pointer 00796 // iy - new Y coordinate of pointer 00797 // Coordinates are relative to the origin of the window id 00798 // or to the origin of the current window if id == 0. 00799 } 00800 00801 //______________________________________________________________________________ 00802 Int_t TVirtualX::WriteGIF(char * /*name*/) 00803 { 00804 // Writes the current window into GIF file. 00805 // Returns 1 in case of success, 0 otherwise. 00806 00807 return 0; 00808 } 00809 00810 //______________________________________________________________________________ 00811 void TVirtualX::WritePixmap(Int_t /*wid*/, UInt_t /*w*/, UInt_t /*h*/, 00812 char * /*pxname*/) 00813 { 00814 // Writes the pixmap "wid" in the bitmap file "pxname". 00815 // 00816 // wid - the pixmap address 00817 // w, h - the width and height of the pixmap. 00818 // pxname - the file name 00819 } 00820 00821 00822 //---- Methods used for GUI ----- 00823 //______________________________________________________________________________ 00824 void TVirtualX::MapWindow(Window_t /*id*/) 00825 { 00826 // Maps the window "id" and all of its subwindows that have had map 00827 // requests. This function has no effect if the window is already mapped. 00828 } 00829 00830 //______________________________________________________________________________ 00831 void TVirtualX::MapSubwindows(Window_t /*id*/) 00832 { 00833 // Maps all subwindows for the specified window "id" in top-to-bottom 00834 // stacking order. 00835 } 00836 00837 //______________________________________________________________________________ 00838 void TVirtualX::MapRaised(Window_t /*id*/) 00839 { 00840 // Maps the window "id" and all of its subwindows that have had map 00841 // requests on the screen and put this window on the top of of the 00842 // stack of all windows. 00843 } 00844 00845 //______________________________________________________________________________ 00846 void TVirtualX::UnmapWindow(Window_t /*id*/) 00847 { 00848 // Unmaps the specified window "id". If the specified window is already 00849 // unmapped, this function has no effect. Any child window will no longer 00850 // be visible (but they are still mapped) until another map call is made 00851 // on the parent. 00852 } 00853 00854 //______________________________________________________________________________ 00855 void TVirtualX::DestroyWindow(Window_t /*id*/) 00856 { 00857 // Destroys the window "id" as well as all of its subwindows. 00858 // The window should never be referenced again. If the window specified 00859 // by the "id" argument is mapped, it is unmapped automatically. 00860 } 00861 00862 //______________________________________________________________________________ 00863 void TVirtualX::DestroySubwindows(Window_t /*id*/) 00864 { 00865 // The DestroySubwindows function destroys all inferior windows of the 00866 // specified window, in bottom-to-top stacking order. 00867 } 00868 00869 //______________________________________________________________________________ 00870 void TVirtualX::RaiseWindow(Window_t /*id*/) 00871 { 00872 // Raises the specified window to the top of the stack so that no 00873 // sibling window obscures it. 00874 } 00875 00876 //______________________________________________________________________________ 00877 void TVirtualX::LowerWindow(Window_t /*id*/) 00878 { 00879 // Lowers the specified window "id" to the bottom of the stack so 00880 // that it does not obscure any sibling windows. 00881 } 00882 00883 //______________________________________________________________________________ 00884 void TVirtualX::MoveWindow(Window_t /*id*/, Int_t /*x*/, Int_t /*y*/) 00885 { 00886 // Moves the specified window to the specified x and y coordinates. 00887 // It does not change the window's size, raise the window, or change 00888 // the mapping state of the window. 00889 // 00890 // x, y - coordinates, which define the new position of the window 00891 // relative to its parent. 00892 } 00893 00894 //______________________________________________________________________________ 00895 void TVirtualX::MoveResizeWindow(Window_t /*id*/, Int_t /*x*/, Int_t /*y*/, 00896 UInt_t /*w*/, UInt_t /*h*/) 00897 { 00898 // Changes the size and location of the specified window "id" without 00899 // raising it. 00900 // 00901 // x, y - coordinates, which define the new position of the window 00902 // relative to its parent. 00903 // w, h - the width and height, which define the interior size of 00904 // the window 00905 } 00906 00907 //______________________________________________________________________________ 00908 void TVirtualX::ResizeWindow(Window_t /*id*/, UInt_t /*w*/, UInt_t /*h*/) 00909 { 00910 // Changes the width and height of the specified window "id", not 00911 // including its borders. This function does not change the window's 00912 // upper-left coordinate. 00913 // 00914 // w, h - the width and height, which are the interior dimensions of 00915 // the window after the call completes. 00916 } 00917 00918 //______________________________________________________________________________ 00919 void TVirtualX::IconifyWindow(Window_t /*id*/) 00920 { 00921 // Iconifies the window "id". 00922 } 00923 //______________________________________________________________________________ 00924 Bool_t TVirtualX::NeedRedraw(ULong_t /*tgwindow*/, Bool_t /*force*/) 00925 { 00926 // Notify the low level GUI layer ROOT requires "tgwindow" to be 00927 // updated 00928 // 00929 // Returns kTRUE if the notification was desirable and it was sent 00930 // 00931 // At the moment only Qt4 layer needs that 00932 // 00933 // One needs explicitly cast the first parameter to TGWindow to make 00934 // it working in the implementation. 00935 // 00936 // One needs to process the notification to confine 00937 // all paint operations within "expose" / "paint" like low level event 00938 // or equivalent 00939 00940 return kFALSE; 00941 } 00942 00943 //______________________________________________________________________________ 00944 void TVirtualX::ReparentWindow(Window_t /*id*/, Window_t /*pid*/, 00945 Int_t /*x*/, Int_t /*y*/) 00946 { 00947 // If the specified window is mapped, ReparentWindow automatically 00948 // performs an UnmapWindow request on it, removes it from its current 00949 // position in the hierarchy, and inserts it as the child of the specified 00950 // parent. The window is placed in the stacking order on top with respect 00951 // to sibling windows. 00952 } 00953 00954 //______________________________________________________________________________ 00955 void TVirtualX::SetWindowBackground(Window_t /*id*/, ULong_t /*color*/) 00956 { 00957 // Sets the background of the window "id" to the specified color value 00958 // "color". Changing the background does not cause the window contents 00959 // to be changed. 00960 } 00961 00962 //______________________________________________________________________________ 00963 void TVirtualX::SetWindowBackgroundPixmap(Window_t /*id*/, Pixmap_t /*pxm*/) 00964 { 00965 // Sets the background pixmap of the window "id" to the specified 00966 // pixmap "pxm". 00967 } 00968 00969 //______________________________________________________________________________ 00970 Window_t TVirtualX::CreateWindow(Window_t /*parent*/, Int_t /*x*/, Int_t /*y*/, 00971 UInt_t /*w*/, UInt_t /*h*/, 00972 UInt_t /*border*/, Int_t /*depth*/, 00973 UInt_t /*clss*/, void * /*visual*/, 00974 SetWindowAttributes_t * /*attr*/, 00975 UInt_t /*wtype*/) 00976 { 00977 // Creates an unmapped subwindow for a specified parent window and returns 00978 // the created window. The created window is placed on top in the stacking 00979 // order with respect to siblings. The coordinate system has the X axis 00980 // horizontal and the Y axis vertical with the origin [0,0] at the 00981 // upper-left corner. Each window and pixmap has its own coordinate system. 00982 // 00983 // parent - the parent window 00984 // x, y - coordinates, the top-left outside corner of the window's 00985 // borders; relative to the inside of the parent window's borders 00986 // w, h - width and height of the created window; do not include the 00987 // created window's borders 00988 // border - the border pixel value of the window 00989 // depth - the window's depth 00990 // clss - the created window's class; can be InputOutput, InputOnly, or 00991 // CopyFromParent 00992 // visual - the visual type 00993 // attr - the structure from which the values are to be taken. 00994 // wtype - the window type 00995 00996 return 0; 00997 } 00998 00999 //______________________________________________________________________________ 01000 Int_t TVirtualX::OpenDisplay(const char * /*dpyName*/) 01001 { 01002 // Opens connection to display server (if such a thing exist on the 01003 // current platform). The encoding and interpretation of the display 01004 // name 01005 // On X11 this method returns on success the X display socket descriptor 01006 // >0, 0 in case of batch mode, and <0 in case of failure (cannot connect 01007 // to display dpyName). 01008 01009 return 0; 01010 } 01011 01012 //______________________________________________________________________________ 01013 void TVirtualX::CloseDisplay() 01014 { 01015 // Closes connection to display server and destroys all windows. 01016 } 01017 01018 //______________________________________________________________________________ 01019 Display_t TVirtualX::GetDisplay() const 01020 { 01021 // Returns handle to display (might be usefull in some cases where 01022 // direct X11 manipulation outside of TVirtualX is needed, e.g. GL 01023 // interface). 01024 01025 return 0; 01026 } 01027 01028 //______________________________________________________________________________ 01029 Visual_t TVirtualX::GetVisual() const 01030 { 01031 // Returns handle to visual. 01032 // 01033 // Might be usefull in some cases where direct X11 manipulation outside 01034 // of TVirtualX is needed, e.g. GL interface. 01035 01036 return 0; 01037 } 01038 01039 //______________________________________________________________________________ 01040 Int_t TVirtualX::GetScreen() const 01041 { 01042 // Returns screen number. 01043 // 01044 // Might be usefull in some cases where direct X11 manipulation outside 01045 // of TVirtualX is needed, e.g. GL interface. 01046 01047 return 0; 01048 } 01049 01050 //______________________________________________________________________________ 01051 Int_t TVirtualX::GetDepth() const 01052 { 01053 // Returns depth of screen (number of bit planes). 01054 // Equivalent to GetPlanes(). 01055 01056 return 0; 01057 } 01058 01059 //______________________________________________________________________________ 01060 Colormap_t TVirtualX::GetColormap() const 01061 { 01062 // Returns handle to colormap. 01063 // 01064 // Might be usefull in some cases where direct X11 manipulation outside 01065 // of TVirtualX is needed, e.g. GL interface. 01066 01067 return 0; 01068 } 01069 01070 //______________________________________________________________________________ 01071 Window_t TVirtualX::GetDefaultRootWindow() const 01072 { 01073 // Returns handle to the default root window created when calling 01074 // XOpenDisplay(). 01075 01076 return 0; 01077 } 01078 01079 //______________________________________________________________________________ 01080 Atom_t TVirtualX::InternAtom(const char * /*atom_name*/, 01081 Bool_t /*only_if_exist*/) 01082 { 01083 // Returns the atom identifier associated with the specified "atom_name" 01084 // string. If "only_if_exists" is False, the atom is created if it does 01085 // not exist. If the atom name is not in the Host Portable Character 01086 // Encoding, the result is implementation dependent. Uppercase and 01087 // lowercase matter; the strings "thing", "Thing", and "thinG" all 01088 // designate different atoms. 01089 01090 return 0; 01091 } 01092 01093 //______________________________________________________________________________ 01094 Window_t TVirtualX::GetParent(Window_t /*id*/) const 01095 { 01096 // Returns the parent of the window "id". 01097 01098 return 0; 01099 } 01100 01101 //______________________________________________________________________________ 01102 FontStruct_t TVirtualX::LoadQueryFont(const char * /*font_name*/) 01103 { 01104 // Provides the most common way for accessing a font: opens (loads) the 01105 // specified font and returns a pointer to the appropriate FontStruct_t 01106 // structure. If the font does not exist, it returns NULL. 01107 01108 return 0; 01109 } 01110 01111 //______________________________________________________________________________ 01112 FontH_t TVirtualX::GetFontHandle(FontStruct_t /*fs*/) 01113 { 01114 // Returns the font handle of the specified font structure "fs". 01115 01116 return 0; 01117 } 01118 01119 //______________________________________________________________________________ 01120 void TVirtualX::DeleteFont(FontStruct_t /*fs*/) 01121 { 01122 // Explicitely deletes the font structure "fs" obtained via LoadQueryFont(). 01123 } 01124 01125 //______________________________________________________________________________ 01126 GContext_t TVirtualX::CreateGC(Drawable_t /*id*/, GCValues_t * /*gval*/) 01127 { 01128 // Creates a graphics context using the provided GCValues_t *gval structure. 01129 // The mask data member of gval specifies which components in the GC are 01130 // to be set using the information in the specified values structure. 01131 // It returns a graphics context handle GContext_t that can be used with any 01132 // destination drawable or O if the creation falls. 01133 01134 return 0; 01135 } 01136 01137 //______________________________________________________________________________ 01138 void TVirtualX::ChangeGC(GContext_t /*gc*/, GCValues_t * /*gval*/) 01139 { 01140 // Changes the components specified by the mask in gval for the specified GC. 01141 // 01142 // GContext_t gc - specifies the GC to be changed 01143 // GCValues_t gval - specifies the mask and the values to be set 01144 // (see also the GCValues_t structure) 01145 } 01146 01147 //______________________________________________________________________________ 01148 void TVirtualX::CopyGC(GContext_t /*org*/, GContext_t /*dest*/, Mask_t /*mask*/) 01149 { 01150 // Copies the specified components from the source GC "org" to the 01151 // destination GC "dest". The "mask" defines which component to copy 01152 // and it is a data member of GCValues_t. 01153 } 01154 01155 //______________________________________________________________________________ 01156 void TVirtualX::DeleteGC(GContext_t /*gc*/) 01157 { 01158 // Deletes the specified GC "gc". 01159 } 01160 01161 //______________________________________________________________________________ 01162 Cursor_t TVirtualX::CreateCursor(ECursor /*cursor*/) 01163 { 01164 // Creates the specified cursor. (just return cursor from cursor pool). 01165 // The cursor can be: 01166 // 01167 // kBottomLeft, kBottomRight, kTopLeft, kTopRight, 01168 // kBottomSide, kLeftSide, kTopSide, kRightSide, 01169 // kMove, kCross, kArrowHor, kArrowVer, 01170 // kHand, kRotate, kPointer, kArrowRight, 01171 // kCaret, kWatch 01172 01173 return 0; 01174 } 01175 01176 //______________________________________________________________________________ 01177 void TVirtualX::SetCursor(Window_t /*id*/, Cursor_t /*curid*/) 01178 { 01179 // Sets the cursor "curid" to be used when the pointer is in the 01180 // window "id". 01181 } 01182 01183 //______________________________________________________________________________ 01184 Pixmap_t TVirtualX::CreatePixmap(Drawable_t /*id*/, UInt_t /*w*/, UInt_t /*h*/) 01185 { 01186 // Creates a pixmap of the specified width and height and returns 01187 // a pixmap ID that identifies it. 01188 01189 return kNone; 01190 } 01191 //______________________________________________________________________________ 01192 Pixmap_t TVirtualX::CreatePixmap(Drawable_t /*id*/, const char * /*bitmap*/, 01193 UInt_t /*width*/, UInt_t /*height*/, 01194 ULong_t /*forecolor*/, ULong_t /*backcolor*/, 01195 Int_t /*depth*/) 01196 { 01197 // Creates a pixmap from bitmap data of the width, height, and depth you 01198 // specified and returns a pixmap that identifies it. The width and height 01199 // arguments must be nonzero. The depth argument must be one of the depths 01200 // supported by the screen of the specified drawable. 01201 // 01202 // id - specifies which screen the pixmap is created on 01203 // bitmap - the data in bitmap format 01204 // width, height - define the dimensions of the pixmap 01205 // forecolor - the foreground pixel values to use 01206 // backcolor - the background pixel values to use 01207 // depth - the depth of the pixmap 01208 01209 return 0; 01210 } 01211 01212 //______________________________________________________________________________ 01213 Pixmap_t TVirtualX::CreateBitmap(Drawable_t /*id*/, const char * /*bitmap*/, 01214 UInt_t /*width*/, UInt_t /*height*/) 01215 { 01216 // Creates a bitmap (i.e. pixmap with depth 1) from the bitmap data. 01217 // 01218 // id - specifies which screen the pixmap is created on 01219 // bitmap - the data in bitmap format 01220 // width, height - define the dimensions of the pixmap 01221 01222 return 0; 01223 } 01224 01225 //______________________________________________________________________________ 01226 void TVirtualX::DeletePixmap(Pixmap_t /*pmap*/) 01227 { 01228 // Explicitely deletes the pixmap resource "pmap". 01229 } 01230 01231 //______________________________________________________________________________ 01232 Bool_t TVirtualX::CreatePictureFromFile(Drawable_t /*id*/, 01233 const char * /*filename*/, 01234 Pixmap_t &/*pict*/, 01235 Pixmap_t &/*pict_mask*/, 01236 PictureAttributes_t &/*attr*/) 01237 { 01238 // Creates a picture pict from data in file "filename". The picture 01239 // attributes "attr" are used for input and output. Returns kTRUE in 01240 // case of success, kFALSE otherwise. If the mask "pict_mask" does not 01241 // exist it is set to kNone. 01242 01243 return kFALSE; 01244 } 01245 01246 //______________________________________________________________________________ 01247 Bool_t TVirtualX::CreatePictureFromData(Drawable_t /*id*/, char ** /*data*/, 01248 Pixmap_t &/*pict*/, 01249 Pixmap_t &/*pict_mask*/, 01250 PictureAttributes_t & /*attr*/) 01251 { 01252 // Creates a picture pict from data in bitmap format. The picture 01253 // attributes "attr" are used for input and output. Returns kTRUE in 01254 // case of success, kFALSE otherwise. If the mask "pict_mask" does not 01255 // exist it is set to kNone. 01256 01257 return kFALSE; 01258 } 01259 //______________________________________________________________________________ 01260 Bool_t TVirtualX::ReadPictureDataFromFile(const char * /*filename*/, 01261 char *** /*ret_data*/) 01262 { 01263 // Reads picture data from file "filename" and store it in "ret_data". 01264 // Returns kTRUE in case of success, kFALSE otherwise. 01265 01266 return kFALSE; 01267 } 01268 01269 //______________________________________________________________________________ 01270 void TVirtualX::DeletePictureData(void * /*data*/) 01271 { 01272 // Delete picture data created by the function ReadPictureDataFromFile. 01273 } 01274 01275 //______________________________________________________________________________ 01276 void TVirtualX::SetDashes(GContext_t /*gc*/, Int_t /*offset*/, 01277 const char * /*dash_list*/, Int_t /*n*/) 01278 { 01279 // Sets the dash-offset and dash-list attributes for dashed line styles 01280 // in the specified GC. There must be at least one element in the 01281 // specified dash_list. The initial and alternating elements (second, 01282 // fourth, and so on) of the dash_list are the even dashes, and the 01283 // others are the odd dashes. Each element in the "dash_list" array 01284 // specifies the length (in pixels) of a segment of the pattern. 01285 // 01286 // gc - specifies the GC (see GCValues_t structure) 01287 // offset - the phase of the pattern for the dashed line-style you 01288 // want to set for the specified GC. 01289 // dash_list - the dash-list for the dashed line-style you want to set 01290 // for the specified GC 01291 // n - the number of elements in dash_list 01292 // (see also the GCValues_t structure) 01293 } 01294 01295 //______________________________________________________________________________ 01296 void TVirtualX::FreeColor(Colormap_t /*cmap*/, ULong_t /*pixel*/) 01297 { 01298 // Frees color cell with specified pixel value. 01299 } 01300 01301 //______________________________________________________________________________ 01302 Int_t TVirtualX::EventsPending() 01303 { 01304 // Returns the number of events that have been received from the X server 01305 // but have not been removed from the event queue. 01306 01307 return 0; 01308 } 01309 01310 //______________________________________________________________________________ 01311 void TVirtualX::Bell(Int_t /*percent*/) 01312 { 01313 // Sets the sound bell. Percent is loudness from -100% .. 100%. 01314 } 01315 01316 //______________________________________________________________________________ 01317 void TVirtualX::CopyArea(Drawable_t /*src*/, Drawable_t /*dest*/, 01318 GContext_t /*gc*/, Int_t /*src_x*/, Int_t /*src_y*/, 01319 UInt_t /*width*/, UInt_t /*height*/, 01320 Int_t /*dest_x*/, Int_t /*dest_y*/) 01321 { 01322 // Combines the specified rectangle of "src" with the specified rectangle 01323 // of "dest" according to the "gc". 01324 // 01325 // src_x, src_y - specify the x and y coordinates, which are relative 01326 // to the origin of the source rectangle and specify 01327 // upper-left corner. 01328 // width, height - the width and height, which are the dimensions of both 01329 // the source and destination rectangles // 01330 // dest_x, dest_y - specify the upper-left corner of the destination 01331 // rectangle 01332 // 01333 // GC components in use: function, plane-mask, subwindow-mode, 01334 // graphics-exposure, clip-x-origin, clip-y-origin, and clip-mask. 01335 // (see also the GCValues_t structure) 01336 } 01337 01338 //______________________________________________________________________________ 01339 void TVirtualX::ChangeWindowAttributes(Window_t /*id*/, 01340 SetWindowAttributes_t * /*attr*/) 01341 { 01342 // Changes the attributes of the specified window "id" according the 01343 // values provided in "attr". The mask data member of "attr" specifies 01344 // which window attributes are defined in the attributes argument. 01345 // This mask is the bitwise inclusive OR of the valid attribute mask 01346 // bits; if it is zero, the attributes are ignored. 01347 } 01348 01349 //______________________________________________________________________________ 01350 void TVirtualX::ChangeProperty(Window_t /*id*/, Atom_t /*property*/, 01351 Atom_t /*type*/, UChar_t * /*data*/, 01352 Int_t /*len*/) 01353 { 01354 // Alters the property for the specified window and causes the X server 01355 // to generate a PropertyNotify event on that window. 01356 // 01357 // id - the window whose property you want to change 01358 // property - specifies the property name 01359 // type - the type of the property; the X server does not 01360 // interpret the type but simply passes it back to 01361 // an application that might ask about the window 01362 // properties 01363 // data - the property data 01364 // len - the length of the specified data format 01365 } 01366 01367 //______________________________________________________________________________ 01368 void TVirtualX::DrawLine(Drawable_t /*id*/, GContext_t /*gc*/, 01369 Int_t /*x1*/, Int_t /*y1*/, Int_t /*x2*/, Int_t /*y2*/) 01370 { 01371 // Uses the components of the specified GC to draw a line between the 01372 // specified set of points (x1, y1) and (x2, y2). 01373 // 01374 // GC components in use: function, plane-mask, line-width, line-style, 01375 // cap-style, fill-style, subwindow-mode, clip-x-origin, clip-y-origin, 01376 // and clip-mask. 01377 // GC mode-dependent components: foreground, background, tile, stipple, 01378 // tile-stipple-x-origin, tile-stipple-y-origin, dash-offset, dash-list. 01379 // (see also the GCValues_t structure) 01380 } 01381 01382 //______________________________________________________________________________ 01383 void TVirtualX::ClearArea(Window_t /*id*/, Int_t /*x*/, Int_t /*y*/, 01384 UInt_t /*w*/, UInt_t /*h*/) 01385 { 01386 // Paints a rectangular area in the specified window "id" according to 01387 // the specified dimensions with the window's background pixel or pixmap. 01388 // 01389 // id - specifies the window 01390 // x, y - coordinates, which are relative to the origin 01391 // w, h - the width and height which define the rectangle dimensions 01392 } 01393 01394 //______________________________________________________________________________ 01395 Bool_t TVirtualX::CheckEvent(Window_t /*id*/, EGEventType /*type*/, 01396 Event_t &/*ev*/) 01397 { 01398 // Check if there is for window "id" an event of type "type". If there 01399 // is it fills in the event structure and return true. If no such event 01400 // return false. 01401 01402 return kFALSE; 01403 } 01404 01405 //______________________________________________________________________________ 01406 void TVirtualX::SendEvent(Window_t /*id*/, Event_t * /*ev*/) 01407 { 01408 // Specifies the event "ev" is to be sent to the window "id". 01409 // This function requires you to pass an event mask. 01410 } 01411 01412 //______________________________________________________________________________ 01413 void TVirtualX::WMDeleteNotify(Window_t /*id*/) 01414 { 01415 // Tells WM to send message when window is closed via WM. 01416 } 01417 01418 //______________________________________________________________________________ 01419 void TVirtualX::SetKeyAutoRepeat(Bool_t /*on = kTRUE*/) 01420 { 01421 // Turns key auto repeat on (kTRUE) or off (kFALSE). 01422 } 01423 01424 //______________________________________________________________________________ 01425 void TVirtualX::GrabKey(Window_t /*id*/, Int_t /*keycode*/, UInt_t /*modifier*/, 01426 Bool_t /*grab = kTRUE*/) 01427 { 01428 // Establishes a passive grab on the keyboard. In the future, the 01429 // keyboard is actively grabbed, the last-keyboard-grab time is set 01430 // to the time at which the key was pressed (as transmitted in the 01431 // KeyPress event), and the KeyPress event is reported if all of the 01432 // following conditions are true: 01433 // - the keyboard is not grabbed and the specified key (which can 01434 // itself be a modifier key) is logically pressed when the 01435 // specified modifier keys are logically down, and no other 01436 // modifier keys are logically down; 01437 // - either the grab window "id" is an ancestor of (or is) the focus 01438 // window, or "id" is a descendant of the focus window and contains 01439 // the pointer; 01440 // - a passive grab on the same key combination does not exist on any 01441 // ancestor of grab_window 01442 // 01443 // id - window id 01444 // keycode - specifies the KeyCode or AnyKey 01445 // modifier - specifies the set of keymasks or AnyModifier; the mask is 01446 // the bitwise inclusive OR of the valid keymask bits 01447 // grab - a switch between grab/ungrab key 01448 // grab = kTRUE grab the key and modifier 01449 // grab = kFALSE ungrab the key and modifier 01450 } 01451 01452 //______________________________________________________________________________ 01453 void TVirtualX::GrabButton(Window_t /*id*/, EMouseButton /*button*/, 01454 UInt_t /*modifier*/, UInt_t /*evmask*/, 01455 Window_t /*confine*/, Cursor_t /*cursor*/, 01456 Bool_t /*grab = kTRUE*/) 01457 { 01458 // Establishes a passive grab on a certain mouse button. That is, when a 01459 // certain mouse button is hit while certain modifier's (Shift, Control, 01460 // Meta, Alt) are active then the mouse will be grabed for window id. 01461 // When grab is false, ungrab the mouse button for this button and modifier. 01462 } 01463 01464 //______________________________________________________________________________ 01465 void TVirtualX::GrabPointer(Window_t /*id*/, UInt_t /*evmask*/, 01466 Window_t /*confine*/, Cursor_t /*cursor*/, 01467 Bool_t /*grab = kTRUE*/, 01468 Bool_t /*owner_events = kTRUE*/) 01469 { 01470 // Establishes an active pointer grab. While an active pointer grab is in 01471 // effect, further pointer events are only reported to the grabbing 01472 // client window. 01473 } 01474 01475 //______________________________________________________________________________ 01476 void TVirtualX::SetWindowName(Window_t /*id*/, char * /*name*/) 01477 { 01478 // Sets the window name. 01479 } 01480 01481 //______________________________________________________________________________ 01482 void TVirtualX::SetIconName(Window_t /*id*/, char * /*name*/) 01483 { 01484 // Sets the window icon name. 01485 } 01486 01487 //______________________________________________________________________________ 01488 void TVirtualX::SetIconPixmap(Window_t /*id*/, Pixmap_t /*pix*/) 01489 { 01490 // Sets the icon name pixmap. 01491 } 01492 01493 //______________________________________________________________________________ 01494 void TVirtualX::SetClassHints(Window_t /*id*/, char * /*className*/, 01495 char * /*resourceName*/) 01496 { 01497 // Sets the windows class and resource name. 01498 } 01499 01500 //______________________________________________________________________________ 01501 void TVirtualX::SetMWMHints(Window_t /*id*/, UInt_t /*value*/, UInt_t /*funcs*/, 01502 UInt_t /*input*/) 01503 { 01504 // Sets decoration style. 01505 } 01506 01507 //______________________________________________________________________________ 01508 void TVirtualX::SetWMPosition(Window_t /*id*/, Int_t /*x*/, Int_t /*y*/) 01509 { 01510 // Tells the window manager the desired position [x,y] of window "id". 01511 } 01512 01513 //______________________________________________________________________________ 01514 void TVirtualX::SetWMSize(Window_t /*id*/, UInt_t /*w*/, UInt_t /*h*/) 01515 { 01516 // Tells window manager the desired size of window "id". 01517 // 01518 // w - the width 01519 // h - the height 01520 } 01521 01522 //______________________________________________________________________________ 01523 void TVirtualX::SetWMSizeHints(Window_t /*id*/, UInt_t /*wmin*/, UInt_t /*hmin*/, 01524 UInt_t /*wmax*/, UInt_t /*hmax*/, 01525 UInt_t /*winc*/, UInt_t /*hinc*/) 01526 { 01527 // Gives the window manager minimum and maximum size hints of the window 01528 // "id". Also specify via "winc" and "hinc" the resize increments. 01529 // 01530 // wmin, hmin - specify the minimum window size 01531 // wmax, hmax - specify the maximum window size 01532 // winc, hinc - define an arithmetic progression of sizes into which 01533 // the window to be resized (minimum to maximum) 01534 } 01535 01536 //______________________________________________________________________________ 01537 void TVirtualX::SetWMState(Window_t /*id*/, EInitialState /*state*/) 01538 { 01539 // Sets the initial state of the window "id": either kNormalState 01540 // or kIconicState. 01541 } 01542 01543 //______________________________________________________________________________ 01544 void TVirtualX::SetWMTransientHint(Window_t /*id*/, Window_t /*main_id*/) 01545 { 01546 // Tells window manager that the window "id" is a transient window 01547 // of the window "main_id". A window manager may decide not to decorate 01548 // a transient window or may treat it differently in other ways. 01549 } 01550 01551 //______________________________________________________________________________ 01552 void TVirtualX::DrawString(Drawable_t /*id*/, GContext_t /*gc*/, Int_t /*x*/, 01553 Int_t /*y*/, const char * /*s*/, Int_t /*len*/) 01554 { 01555 // Each character image, as defined by the font in the GC, is treated as an 01556 // additional mask for a fill operation on the drawable. 01557 // 01558 // id - the drawable 01559 // gc - the GC 01560 // x, y - coordinates, which are relative to the origin of the specified 01561 // drawable and define the origin of the first character 01562 // s - the character string 01563 // len - the number of characters in the string argument 01564 // 01565 // GC components in use: function, plane-mask, fill-style, font, 01566 // subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask. 01567 // GC mode-dependent components: foreground, background, tile, stipple, 01568 // tile-stipple-x-origin, and tile-stipple-y-origin. 01569 // (see also the GCValues_t structure) 01570 01571 } 01572 01573 //______________________________________________________________________________ 01574 Int_t TVirtualX::TextWidth(FontStruct_t /*font*/, const char * /*s*/, 01575 Int_t /*len*/) 01576 { 01577 // Return lenght of the string "s" in pixels. Size depends on font. 01578 01579 return 5; 01580 } 01581 01582 //______________________________________________________________________________ 01583 void TVirtualX::GetFontProperties(FontStruct_t /*font*/, Int_t &max_ascent, 01584 Int_t &max_descent) 01585 { 01586 // Returns the font properties. 01587 01588 max_ascent = 5; 01589 max_descent = 5; 01590 } 01591 01592 //______________________________________________________________________________ 01593 void TVirtualX::GetGCValues(GContext_t /*gc*/, GCValues_t &gval) 01594 { 01595 // Returns the components specified by the mask in "gval" for the 01596 // specified GC "gc" (see also the GCValues_t structure) 01597 01598 gval.fMask = 0; 01599 } 01600 01601 //______________________________________________________________________________ 01602 FontStruct_t TVirtualX::GetFontStruct(FontH_t /*fh*/) 01603 { 01604 // Retrieves the associated font structure of the font specified font 01605 // handle "fh". 01606 // 01607 // Free returned FontStruct_t using FreeFontStruct(). 01608 01609 return 0; 01610 } 01611 01612 //______________________________________________________________________________ 01613 void TVirtualX::FreeFontStruct(FontStruct_t /*fs*/) 01614 { 01615 // Frees the font structure "fs". The font itself will be freed when 01616 // no other resource references it. 01617 } 01618 01619 //______________________________________________________________________________ 01620 void TVirtualX::ClearWindow(Window_t /*id*/) 01621 { 01622 // Clears the entire area in the specified window and it is equivalent to 01623 // ClearArea(id, 0, 0, 0, 0) 01624 } 01625 01626 //______________________________________________________________________________ 01627 Int_t TVirtualX::KeysymToKeycode(UInt_t /*keysym*/) 01628 { 01629 // Converts the "keysym" to the appropriate keycode. For example, 01630 // keysym is a letter and keycode is the matching keyboard key (which 01631 // is dependend on the current keyboard mapping). If the specified 01632 // "keysym" is not defined for any keycode, returns zero. 01633 01634 return 0; 01635 } 01636 01637 //______________________________________________________________________________ 01638 void TVirtualX::FillRectangle(Drawable_t /*id*/, GContext_t /*gc*/, 01639 Int_t /*x*/, Int_t /*y*/, 01640 UInt_t /*w*/, UInt_t /*h*/) 01641 { 01642 // Fills the specified rectangle defined by [x,y] [x+w,y] [x+w,y+h] [x,y+h]. 01643 // using the GC you specify. 01644 // 01645 // GC components in use are: function, plane-mask, fill-style, 01646 // subwindow-mode, clip-x-origin, clip-y-origin, clip-mask. 01647 // GC mode-dependent components: foreground, background, tile, stipple, 01648 // tile-stipple-x-origin, and tile-stipple-y-origin. 01649 // (see also the GCValues_t structure) 01650 } 01651 01652 //______________________________________________________________________________ 01653 void TVirtualX::DrawRectangle(Drawable_t /*id*/, GContext_t /*gc*/, 01654 Int_t /*x*/, Int_t /*y*/, 01655 UInt_t /*w*/, UInt_t /*h*/) 01656 { 01657 // Draws rectangle outlines of [x,y] [x+w,y] [x+w,y+h] [x,y+h] 01658 // 01659 // GC components in use: function, plane-mask, line-width, line-style, 01660 // cap-style, join-style, fill-style, subwindow-mode, clip-x-origin, 01661 // clip-y-origin, clip-mask. 01662 // GC mode-dependent components: foreground, background, tile, stipple, 01663 // tile-stipple-x-origin, tile-stipple-y-origin, dash-offset, dash-list. 01664 // (see also the GCValues_t structure) 01665 } 01666 01667 //______________________________________________________________________________ 01668 void TVirtualX::DrawSegments(Drawable_t /*id*/, GContext_t /*gc*/, 01669 Segment_t * /*seg*/, Int_t /*nseg*/) 01670 { 01671 // Draws multiple line segments. Each line is specified by a pair of points. 01672 // Segment_t *seg - specifies an array of segments 01673 // Int_t nseg - specifies the number of segments in the array 01674 // 01675 // GC components in use: function, plane-mask, line-width, line-style, 01676 // cap-style, join-style, fill-style, subwindow-mode, clip-x-origin, 01677 // clip-y-origin, clip-mask. 01678 // GC mode-dependent components: foreground, background, tile, stipple, 01679 // tile-stipple-x-origin, tile-stipple-y-origin, dash-offset, and dash-list. 01680 // (see also the GCValues_t structure) 01681 } 01682 01683 //______________________________________________________________________________ 01684 void TVirtualX::SelectInput(Window_t /*id*/, UInt_t /*evmask*/) 01685 { 01686 // Defines which input events the window is interested in. By default 01687 // events are propageted up the window stack. This mask can also be 01688 // set at window creation time via the SetWindowAttributes_t::fEventMask 01689 // attribute. 01690 } 01691 01692 //______________________________________________________________________________ 01693 Window_t TVirtualX::GetInputFocus() 01694 { 01695 // Returns the window id of the window having the input focus. 01696 01697 return kNone; 01698 } 01699 01700 //______________________________________________________________________________ 01701 void TVirtualX::SetInputFocus(Window_t /*id*/) 01702 { 01703 // Changes the input focus to specified window "id". 01704 } 01705 01706 //______________________________________________________________________________ 01707 Window_t TVirtualX::GetPrimarySelectionOwner() 01708 { 01709 // Returns the window id of the current owner of the primary selection. 01710 // That is the window in which, for example some text is selected. 01711 01712 return kNone; 01713 } 01714 01715 //______________________________________________________________________________ 01716 void TVirtualX::SetPrimarySelectionOwner(Window_t /*id*/) 01717 { 01718 // Makes the window "id" the current owner of the primary selection. 01719 // That is the window in which, for example some text is selected. 01720 } 01721 01722 //______________________________________________________________________________ 01723 void TVirtualX::ConvertPrimarySelection(Window_t /*id*/, Atom_t /*clipboard*/, 01724 Time_t /*when*/) 01725 { 01726 // Causes a SelectionRequest event to be sent to the current primary 01727 // selection owner. This event specifies the selection property 01728 // (primary selection), the format into which to convert that data before 01729 // storing it (target = XA_STRING), the property in which the owner will 01730 // place the information (sel_property), the window that wants the 01731 // information (id), and the time of the conversion request (when). 01732 // The selection owner responds by sending a SelectionNotify event, which 01733 // confirms the selected atom and type. 01734 } 01735 01736 //______________________________________________________________________________ 01737 void TVirtualX::LookupString(Event_t * /*event*/, char * /*buf*/, 01738 Int_t /*buflen*/, UInt_t &keysym) 01739 { 01740 // Converts the keycode from the event structure to a key symbol (according 01741 // to the modifiers specified in the event structure and the current 01742 // keyboard mapping). In "buf" a null terminated ASCII string is returned 01743 // representing the string that is currently mapped to the key code. 01744 // 01745 // event - specifies the event structure to be used 01746 // buf - returns the translated characters 01747 // buflen - the length of the buffer 01748 // keysym - returns the "keysym" computed from the event 01749 // if this argument is not NULL 01750 01751 keysym = 0; 01752 } 01753 01754 //______________________________________________________________________________ 01755 void TVirtualX::TranslateCoordinates(Window_t /*src*/, Window_t /*dest*/, 01756 Int_t /*src_x*/, Int_t /*src_y*/, 01757 Int_t &dest_x, Int_t &dest_y, 01758 Window_t &child) 01759 { 01760 // Translates coordinates in one window to the coordinate space of another 01761 // window. It takes the "src_x" and "src_y" coordinates relative to the 01762 // source window's origin and returns these coordinates to "dest_x" and 01763 // "dest_y" relative to the destination window's origin. 01764 // 01765 // src - the source window 01766 // dest - the destination window 01767 // src_x, src_y - coordinates within the source window 01768 // dest_x, dest_y - coordinates within the destination window 01769 // child - returns the child of "dest" if the coordinates 01770 // are contained in a mapped child of the destination 01771 // window; otherwise, child is set to 0 01772 01773 dest_x = dest_y = 0; 01774 child = 0; 01775 } 01776 01777 //______________________________________________________________________________ 01778 void TVirtualX::GetWindowSize(Drawable_t /*id*/, Int_t &x, Int_t &y, 01779 UInt_t &w, UInt_t &h) 01780 { 01781 // Returns the location and the size of window "id" 01782 // 01783 // x, y - coordinates of the upper-left outer corner relative to the 01784 // parent window's origin 01785 // w, h - the inside size of the window, not including the border 01786 01787 x = y = 0; 01788 w = h = 1; 01789 } 01790 01791 //______________________________________________________________________________ 01792 void TVirtualX::FillPolygon(Window_t /*id*/, GContext_t /*gc*/, Point_t * 01793 /*points*/, Int_t /*npnt*/) { 01794 // Fills the region closed by the specified path. The path is closed 01795 // automatically if the last point in the list does not coincide with the 01796 // first point. 01797 // 01798 // Point_t *points - specifies an array of points 01799 // Int_t npnt - specifies the number of points in the array 01800 // 01801 // GC components in use: function, plane-mask, fill-style, fill-rule, 01802 // subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask. GC 01803 // mode-dependent components: foreground, background, tile, stipple, 01804 // tile-stipple-x-origin, and tile-stipple-y-origin. 01805 // (see also the GCValues_t structure) 01806 } 01807 01808 //______________________________________________________________________________ 01809 void TVirtualX::QueryPointer(Window_t /*id*/, Window_t &rootw, Window_t &childw, 01810 Int_t &root_x, Int_t &root_y, Int_t &win_x, 01811 Int_t &win_y, UInt_t &mask) 01812 { 01813 // Returns the root window the pointer is logically on and the pointer 01814 // coordinates relative to the root window's origin. 01815 // 01816 // id - specifies the window 01817 // rotw - the root window that the pointer is in 01818 // childw - the child window that the pointer is located in, if any 01819 // root_x, root_y - the pointer coordinates relative to the root window's 01820 // origin 01821 // win_x, win_y - the pointer coordinates relative to the specified 01822 // window "id" 01823 // mask - the current state of the modifier keys and pointer 01824 // buttons 01825 01826 rootw = childw = kNone; 01827 root_x = root_y = win_x = win_y = 0; 01828 mask = 0; 01829 } 01830 01831 //______________________________________________________________________________ 01832 void TVirtualX::SetForeground(GContext_t /*gc*/, ULong_t /*foreground*/) 01833 { 01834 // Sets the foreground color for the specified GC (shortcut for ChangeGC 01835 // with only foreground mask set). 01836 // 01837 // gc - specifies the GC 01838 // foreground - the foreground you want to set 01839 // (see also the GCValues_t structure) 01840 } 01841 01842 //______________________________________________________________________________ 01843 void TVirtualX::SetClipRectangles(GContext_t /*gc*/, Int_t /*x*/, Int_t /*y*/, 01844 Rectangle_t * /*recs*/, Int_t /*n*/) 01845 { 01846 // Sets clipping rectangles in graphics context. [x,y] specify the origin 01847 // of the rectangles. "recs" specifies an array of rectangles that define 01848 // the clipping mask and "n" is the number of rectangles. 01849 // (see also the GCValues_t structure) 01850 } 01851 01852 //______________________________________________________________________________ 01853 void TVirtualX::Update(Int_t /*mode = 0*/) 01854 { 01855 // Flushes (mode = 0, default) or synchronizes (mode = 1) X output buffer. 01856 // Flush flushes output buffer. Sync flushes buffer and waits till all 01857 // requests have been processed by X server. 01858 } 01859 01860 //______________________________________________________________________________ 01861 Region_t TVirtualX::CreateRegion() 01862 { 01863 // Creates a new empty region. 01864 01865 return 0; 01866 } 01867 01868 //______________________________________________________________________________ 01869 void TVirtualX::DestroyRegion(Region_t /*reg*/) 01870 { 01871 // Destroys the region "reg". 01872 } 01873 01874 //______________________________________________________________________________ 01875 void TVirtualX::UnionRectWithRegion(Rectangle_t * /*rect*/, Region_t /*src*/, 01876 Region_t /*dest*/) 01877 { 01878 // Updates the destination region from a union of the specified rectangle 01879 // and the specified source region. 01880 // 01881 // rect - specifies the rectangle 01882 // src - specifies the source region to be used 01883 // dest - returns the destination region 01884 } 01885 01886 //______________________________________________________________________________ 01887 Region_t TVirtualX::PolygonRegion(Point_t * /*points*/, Int_t /*np*/, 01888 Bool_t /*winding*/) 01889 { 01890 // Returns a region for the polygon defined by the points array. 01891 // 01892 // points - specifies an array of points 01893 // np - specifies the number of points in the polygon 01894 // winding - specifies the winding-rule is set (kTRUE) or not(kFALSE) 01895 01896 return 0; 01897 } 01898 01899 //______________________________________________________________________________ 01900 void TVirtualX::UnionRegion(Region_t /*rega*/, Region_t /*regb*/, 01901 Region_t /*result*/) 01902 { 01903 // Computes the union of two regions. 01904 // 01905 // rega, regb - specify the two regions with which you want to perform 01906 // the computation 01907 // result - returns the result of the computation 01908 01909 } 01910 01911 //______________________________________________________________________________ 01912 void TVirtualX::IntersectRegion(Region_t /*rega*/, Region_t /*regb*/, 01913 Region_t /*result*/) 01914 { 01915 // Computes the intersection of two regions. 01916 // 01917 // rega, regb - specify the two regions with which you want to perform 01918 // the computation 01919 // result - returns the result of the computation 01920 } 01921 01922 //______________________________________________________________________________ 01923 void TVirtualX::SubtractRegion(Region_t /*rega*/, Region_t /*regb*/, 01924 Region_t /*result*/) 01925 { 01926 // Subtracts regb from rega and stores the results in result. 01927 } 01928 01929 //______________________________________________________________________________ 01930 void TVirtualX::XorRegion(Region_t /*rega*/, Region_t /*regb*/, 01931 Region_t /*result*/) 01932 { 01933 // Calculates the difference between the union and intersection of 01934 // two regions. 01935 // 01936 // rega, regb - specify the two regions with which you want to perform 01937 // the computation 01938 // result - returns the result of the computation 01939 01940 } 01941 01942 //______________________________________________________________________________ 01943 Bool_t TVirtualX::EmptyRegion(Region_t /*reg*/) 01944 { 01945 // Returns kTRUE if the region reg is empty. 01946 01947 return kFALSE; 01948 } 01949 01950 //______________________________________________________________________________ 01951 Bool_t TVirtualX::PointInRegion(Int_t /*x*/, Int_t /*y*/, Region_t /*reg*/) 01952 { 01953 // Returns kTRUE if the point [x, y] is contained in the region reg. 01954 01955 return kFALSE; 01956 } 01957 01958 //______________________________________________________________________________ 01959 Bool_t TVirtualX::EqualRegion(Region_t /*rega*/, Region_t /*regb*/) 01960 { 01961 // Returns kTRUE if the two regions have the same offset, size, and shape. 01962 01963 return kFALSE; 01964 } 01965 01966 //______________________________________________________________________________ 01967 void TVirtualX::GetRegionBox(Region_t /*reg*/, Rectangle_t * /*rect*/) 01968 { 01969 // Returns smallest enclosing rectangle. 01970 } 01971 01972 //______________________________________________________________________________ 01973 char **TVirtualX::ListFonts(const char * /*fontname*/, Int_t /*max*/, Int_t &/*count*/) 01974 { 01975 // Returns list of font names matching fontname regexp, like "-*-times-*". 01976 // The pattern string can contain any characters, but each asterisk (*) 01977 // is a wildcard for any number of characters, and each question mark (?) 01978 // is a wildcard for a single character. If the pattern string is not in 01979 // the Host Portable Character Encoding, the result is implementation 01980 // dependent. Use of uppercase or lowercase does not matter. Each returned 01981 // string is null-terminated. 01982 // 01983 // fontname - specifies the null-terminated pattern string that can 01984 // contain wildcard characters 01985 // max - specifies the maximum number of names to be returned 01986 // count - returns the actual number of font names 01987 01988 return 0; 01989 } 01990 01991 //______________________________________________________________________________ 01992 void TVirtualX::FreeFontNames(char ** /*fontlist*/) 01993 { 01994 // Frees the specified the array of strings "fontlist". 01995 } 01996 01997 //______________________________________________________________________________ 01998 Drawable_t TVirtualX::CreateImage(UInt_t /*width*/, UInt_t /*height*/) 01999 { 02000 // Allocates the memory needed for an drawable. 02001 // 02002 // width - the width of the image, in pixels 02003 // height - the height of the image, in pixels 02004 02005 return 0; 02006 } 02007 02008 //______________________________________________________________________________ 02009 void TVirtualX::GetImageSize(Drawable_t /*id*/, UInt_t &/*width*/, 02010 UInt_t &/*height*/) 02011 { 02012 // Returns the width and height of the image id 02013 } 02014 02015 //______________________________________________________________________________ 02016 void TVirtualX::PutPixel(Drawable_t /*id*/, Int_t /*x*/, Int_t /*y*/, 02017 ULong_t /*pixel*/) 02018 { 02019 // Overwrites the pixel in the image with the specified pixel value. 02020 // The image must contain the x and y coordinates. 02021 // 02022 // id - specifies the image 02023 // x, y - coordinates 02024 // pixel - the new pixel value 02025 } 02026 02027 //______________________________________________________________________________ 02028 void TVirtualX::PutImage(Drawable_t /*id*/, GContext_t /*gc*/, 02029 Drawable_t /*img*/, Int_t /*dx*/, Int_t /*dy*/, 02030 Int_t /*x*/, Int_t /*y*/, UInt_t /*w*/, UInt_t /*h*/) 02031 { 02032 // Combines an image with a rectangle of the specified drawable. The 02033 // section of the image defined by the x, y, width, and height arguments 02034 // is drawn on the specified part of the drawable. 02035 // 02036 // id - the drawable 02037 // gc - the GC 02038 // img - the image you want combined with the rectangle 02039 // dx - the offset in X from the left edge of the image 02040 // dy - the offset in Y from the top edge of the image 02041 // x, y - coordinates, which are relative to the origin of the 02042 // drawable and are the coordinates of the subimage 02043 // w, h - the width and height of the subimage, which define the 02044 // rectangle dimensions 02045 // 02046 // GC components in use: function, plane-mask, subwindow-mode, 02047 // clip-x-origin, clip-y-origin, and clip-mask. 02048 // GC mode-dependent components: foreground and background. 02049 // (see also the GCValues_t structure) 02050 } 02051 02052 //______________________________________________________________________________ 02053 void TVirtualX::DeleteImage(Drawable_t /*img*/) 02054 { 02055 // Deallocates the memory associated with the image img 02056 } 02057 02058 //______________________________________________________________________________ 02059 Window_t TVirtualX::GetCurrentWindow() const 02060 { 02061 // pointer to the current internal window used in canvas graphics 02062 02063 return (Window_t)0; 02064 } 02065 02066 //______________________________________________________________________________ 02067 unsigned char *TVirtualX::GetColorBits(Drawable_t /*wid*/, Int_t /*x*/, Int_t /*y*/, 02068 UInt_t /*w*/, UInt_t /*h*/) 02069 { 02070 // Returns an array of pixels created from a part of drawable (defined by x, y, w, h) 02071 // in format: 02072 // b1, g1, r1, 0, b2, g2, r2, 0 ... bn, gn, rn, 0 .. 02073 // 02074 // Pixels are numbered from left to right and from top to bottom. 02075 // By default all pixels from the whole drawable are returned. 02076 // 02077 // Note that return array is 32-bit aligned 02078 02079 return 0; 02080 } 02081 02082 //______________________________________________________________________________ 02083 Pixmap_t TVirtualX::CreatePixmapFromData(unsigned char * /*bits*/, UInt_t /*width*/, 02084 UInt_t /*height*/) 02085 { 02086 // create pixmap from RGB data. RGB data is in format : 02087 // b1, g1, r1, 0, b2, g2, r2, 0 ... bn, gn, rn, 0 .. 02088 // 02089 // Pixels are numbered from left to right and from top to bottom. 02090 // Note that data must be 32-bit aligned 02091 02092 return (Pixmap_t)0; 02093 } 02094 02095 //______________________________________________________________________________ 02096 void TVirtualX::ShapeCombineMask(Window_t, Int_t, Int_t, Pixmap_t) 02097 { 02098 // The Nonrectangular Window Shape Extension adds nonrectangular 02099 // windows to the System. 02100 // This allows for making shaped (partially transparent) windows 02101 02102 } 02103 02104 //______________________________________________________________________________ 02105 UInt_t TVirtualX::ScreenWidthMM() const 02106 { 02107 // Returns the width of the screen in millimeters. 02108 02109 return 400; 02110 } 02111 02112 //______________________________________________________________________________ 02113 void TVirtualX::DeleteProperty(Window_t, Atom_t&) 02114 { 02115 // Deletes the specified property only if the property was defined on the 02116 // specified window and causes the X server to generate a PropertyNotify 02117 // event on the window unless the property does not exist. 02118 02119 } 02120 02121 //______________________________________________________________________________ 02122 Int_t TVirtualX::GetProperty(Window_t, Atom_t, Long_t, Long_t, Bool_t, Atom_t, 02123 Atom_t*, Int_t*, ULong_t*, ULong_t*, unsigned char**) 02124 { 02125 // Returns the actual type of the property; the actual format of the property; 02126 // the number of 8-bit, 16-bit, or 32-bit items transferred; the number of 02127 // bytes remaining to be read in the property; and a pointer to the data 02128 // actually returned. 02129 02130 return 0; 02131 } 02132 02133 //______________________________________________________________________________ 02134 void TVirtualX::ChangeActivePointerGrab(Window_t, UInt_t, Cursor_t) 02135 { 02136 // Changes the specified dynamic parameters if the pointer is actively 02137 // grabbed by the client and if the specified time is no earlier than the 02138 // last-pointer-grab time and no later than the current X server time. 02139 02140 } 02141 02142 //______________________________________________________________________________ 02143 void TVirtualX::ConvertSelection(Window_t, Atom_t&, Atom_t&, Atom_t&, Time_t&) 02144 { 02145 // Requests that the specified selection be converted to the specified 02146 // target type. 02147 02148 } 02149 02150 //______________________________________________________________________________ 02151 Bool_t TVirtualX::SetSelectionOwner(Window_t, Atom_t&) 02152 { 02153 // Changes the owner and last-change time for the specified selection. 02154 02155 return kFALSE; 02156 } 02157 02158 //______________________________________________________________________________ 02159 void TVirtualX::ChangeProperties(Window_t, Atom_t, Atom_t, Int_t, UChar_t *, Int_t) 02160 { 02161 // Alters the property for the specified window and causes the X server 02162 // to generate a PropertyNotify event on that window. 02163 02164 } 02165 02166 //______________________________________________________________________________ 02167 void TVirtualX::SetDNDAware(Window_t, Atom_t *) 02168 { 02169 // Add XdndAware property and the list of drag and drop types to the 02170 // Window win. 02171 02172 } 02173 02174 //______________________________________________________________________________ 02175 void TVirtualX::SetTypeList(Window_t, Atom_t, Atom_t *) 02176 { 02177 // Add the list of drag and drop types to the Window win. 02178 02179 } 02180 02181 //______________________________________________________________________________ 02182 Window_t TVirtualX::FindRWindow(Window_t, Window_t, Window_t, int, int, int) 02183 { 02184 // Recursively search in the children of Window for a Window which is at 02185 // location x, y and is DND aware, with a maximum depth of maxd. 02186 02187 return kNone; 02188 } 02189 02190 //______________________________________________________________________________ 02191 Bool_t TVirtualX::IsDNDAware(Window_t, Atom_t *) 02192 { 02193 // Checks if the Window is DND aware, and knows any of the DND formats 02194 // passed in argument. 02195 02196 return kFALSE; 02197 } 02198 02199 //______________________________________________________________________________ 02200 Int_t TVirtualX::SupportsExtension(const char *) const 02201 { 02202 // Returns 1 if window system server supports extension given by the 02203 // argument, returns 0 in case extension is not supported and returns -1 02204 // in case of error (like server not initialized). 02205 02206 return -1; 02207 }