Logo ROOT  
Reference Guide
TGView.cxx
Go to the documentation of this file.
1 // @(#)root/gui:$Id$
2 // Author: Fons Rademakers 30/6/2000
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 /**************************************************************************
12 
13  This source is based on Xclass95, a Win95-looking GUI toolkit.
14  Copyright (C) 1996, 1997 David Barth, Ricky Ralston, Hector Peraza.
15 
16  Xclass95 is free software; you can redistribute it and/or
17  modify it under the terms of the GNU Library General Public
18  License as published by the Free Software Foundation; either
19  version 2 of the License, or (at your option) any later version.
20 
21 **************************************************************************/
22 
23 //////////////////////////////////////////////////////////////////////////
24 // //
25 // TGView //
26 // //
27 // A TGView provides the infrastructure for text viewer and editor //
28 // widgets. It provides a canvas (TGViewFrame) and (optionally) a //
29 // vertical and horizontal scrollbar and methods for marking and //
30 // scrolling. //
31 // //
32 // The TGView (and derivatives) will generate the following //
33 // event messages: //
34 // kC_TEXTVIEW, kTXT_ISMARKED, widget id, [true|false] //
35 // kC_TEXTVIEW, kTXT_DATACHANGE, widget id, 0 //
36 // kC_TEXTVIEW, kTXT_CLICK2, widget id, position (y << 16) | x) //
37 // kC_TEXTVIEW, kTXT_CLICK3, widget id, position (y << 16) | x) //
38 // kC_TEXTVIEW, kTXT_F3, widget id, true //
39 // kC_TEXTVIEW, kTXT_OPEN, widget id, 0 //
40 // kC_TEXTVIEW, kTXT_CLOSE, widget id, 0 //
41 // kC_TEXTVIEW, kTXT_SAVE, widget id, 0 //
42 // //
43 //////////////////////////////////////////////////////////////////////////
44 
45 #include "TGView.h"
46 #include "TGScrollBar.h"
47 #include "TGResourcePool.h"
48 #include "TMath.h"
49 #include "KeySymbols.h"
50 #include "RConfigure.h"
51 #include "TVirtualX.h"
52 
54 
55 ////////////////////////////////////////////////////////////////////////////////
56 /// Create a editor frame.
57 
59  ULong_t back) :
60  TGCompositeFrame(v, w, h, options | kOwnBackground, back)
61 {
62  fView = v;
63 
64  SetBackgroundColor(back);
65 
66  gVirtualX->GrabButton(fId, kAnyButton, kAnyModifier,
69 
72 
75  wattr.fBitGravity = 1; // NorthWestGravity
76  wattr.fWinGravity = 1;
77  gVirtualX->ChangeWindowAttributes(fId, &wattr);
78 
79  // guibuiding settings
81 }
82 
83 
85 
86 ////////////////////////////////////////////////////////////////////////////////
87 /// Create an editor view, containing an TGEditorFrame and (optionally)
88 /// a horizontal and vertical scrollbar.
89 
91  UInt_t xMargin, UInt_t yMargin, UInt_t options,
92  UInt_t sboptions, ULong_t back)
93  : TGCompositeFrame(p, w, h, options, GetDefaultFrameBackground())
94 {
95  fWidgetId = id;
96  fMsgWindow = p;
98 
99  fXMargin = xMargin;
100  fYMargin = yMargin;
101  fScrollVal.fX = 1;
102  fScrollVal.fY = 1;
104 
106 
107  fCanvas = new TGViewFrame(this, 10, 10, kChildFrame | kOwnBackground, back);
108  AddFrame(fCanvas);
109 
110  if (!(sboptions & kNoHSB)) {
111  fHsb = new TGHScrollBar(this, 10, 10, kChildFrame);
112  AddFrame(fHsb);
113  fHsb->Associate(this);
114  } else {
115  fHsb = 0;
116  }
117 
118  if (!(sboptions & kNoVSB)) {
119  fVsb = new TGVScrollBar(this, 10, 10, kChildFrame);
120  AddFrame(fVsb);
121  fVsb->Associate(this);
122  } else {
123  fVsb = 0;
124  }
125 
127  fWhiteGC.SetBackground(back);
128 
129  // sets for guibuilding
130  if (fVsb) {
132  }
133  if (fHsb) {
135  }
136 
138 
139  // layout manager is not used
140  delete fLayoutManager;
141  fLayoutManager = 0;
142 }
143 
144 ////////////////////////////////////////////////////////////////////////////////
145 /// Delete view.
146 
148 {
149  if (!MustCleanup()) {
150  delete fCanvas;
151  delete fHsb;
152  delete fVsb;
153  }
154 }
155 
156 ////////////////////////////////////////////////////////////////////////////////
157 /// Clear view.
158 
160 {
161  fScrolling = -1;
162 
163  fMousePos.fX = fMousePos.fY = -1;
164  fVisible.fX = fVisible.fY = 0;
166  fVirtualSize = TGDimension(0, 0);
167 
168  gVirtualX->ClearArea(fCanvas->GetId(), 0, 0,
170  Layout();
171 }
172 
173 ////////////////////////////////////////////////////////////////////////////////
174 /// Scroll view in specified direction to make newTop the visible location.
175 
176 void TGView::SetVisibleStart(Int_t newTop, Int_t direction)
177 {
178  if (direction == kHorizontal) {
179  if (newTop / fScrollVal.fX == fVisible.fX / fScrollVal.fX) {
180  return;
181  }
182  ScrollCanvas(newTop, kHorizontal);
183  } else {
184  if (newTop / fScrollVal.fY == fVisible.fY / fScrollVal.fY) {
185  return;
186  }
187  ScrollCanvas(newTop, kVertical);
188  }
189 }
190 
191 ////////////////////////////////////////////////////////////////////////////////
192 /// Draw region.
193 
195 {
196  return;
197 }
198 
199 ////////////////////////////////////////////////////////////////////////////////
200 /// update a part of view
201 
203 {
204  x = x < 0 ? 0 : x;
205  y = y < 0 ? 0 : y;
206 
207  w = x + w > fCanvas->GetWidth() ? fCanvas->GetWidth() - x : w;
208  h = y + h > fCanvas->GetHeight() ? fCanvas->GetHeight() - y : h;
209 
210  if (fExposedRegion.IsEmpty()) {
211  fExposedRegion.fX = x;
212  fExposedRegion.fY = y;
213  fExposedRegion.fW = w;
214  fExposedRegion.fH = h;
215  } else {
216  TGRectangle r(x, y, w, h);
218  }
219 
220  fClient->NeedRedraw(this);
221 }
222 
223 ////////////////////////////////////////////////////////////////////////////////
224 /// set some gc values
225 
227 {
230 }
231 
232 ////////////////////////////////////////////////////////////////////////////////
233 /// handle button
234 
236 {
237  if (event->fType == kButtonPress) {
238  int amount, ch;
239 
240  ch = fCanvas->GetHeight();
241 
242  if (fScrollVal.fY == 1) {
243  amount = fScrollVal.fY * TMath::Max(ch/6, 1);
244  } else {
245  amount = fScrollVal.fY * 5;
246  }
247 
248  if (event->fState & kKeyShiftMask) {
249  amount = fScrollVal.fY;
250  } else if (event->fState & kKeyControlMask) {
251  amount = ch - TMath::Max(ch / 20, 1);
252  }
253 
254  if (event->fCode == kButton4) {
255  ScrollDown(amount);
256  return kTRUE;
257  } else if (event->fCode == kButton5) {
258  ScrollUp(amount);
259  return kTRUE;
260  }
261  }
262  return kFALSE;
263 }
264 
265 ////////////////////////////////////////////////////////////////////////////////
266 /// redraw
267 
269 {
270  DrawBorder();
271 
272  if (!fExposedRegion.IsEmpty()) {
276  }
277 }
278 
279 ////////////////////////////////////////////////////////////////////////////////
280 /// Handle expose events.
281 
283 {
284  if (event->fWindow == fCanvas->GetId()) {
285 
286  TGPosition pos(event->fX, event->fY);
287  TGDimension dim(event->fWidth, event->fHeight);
288  TGRectangle rect(pos, dim);
289 
290  if (fExposedRegion.IsEmpty()) {
291  fExposedRegion = rect;
292  } else {
293  if (((!rect.fX && !fExposedRegion.fY) ||
294  (!rect.fY && !fExposedRegion.fX)) &&
295  ((rect.fX >= (int)fExposedRegion.fW) ||
296  (rect.fY >= (int)fExposedRegion.fH))) {
297  DrawRegion(rect.fX, rect.fY, rect.fW, rect.fY);
298  } else {
299  fExposedRegion.Merge(rect);
300  }
301  }
302 
303  fClient->NeedRedraw(this);
304  } else {
305  return TGCompositeFrame::HandleExpose(event);
306  }
307 
308  return kTRUE;
309 }
310 
311 ////////////////////////////////////////////////////////////////////////////////
312 /// Process scrollbar messages.
313 
315 {
316  switch(GET_MSG(msg)) {
317  case kC_HSCROLL:
318  switch(GET_SUBMSG(msg)) {
319  case kSB_SLIDERTRACK:
320  case kSB_SLIDERPOS:
322  break;
323  }
324  break;
325 
326  case kC_VSCROLL:
327  switch(GET_SUBMSG(msg)) {
328  case kSB_SLIDERTRACK:
329  case kSB_SLIDERPOS:
331  break;
332  }
333  break;
334 
335  default:
336  break;
337  }
338  return kTRUE;
339 }
340 
341 ////////////////////////////////////////////////////////////////////////////////
342 /// layout view
343 
345 {
346  Bool_t need_vsb, need_hsb;
347  Int_t cw, ch;
348 
349  need_vsb = need_hsb = kFALSE;
350 
351  // test whether we need scrollbars
352  cw = fWidth - (fBorderWidth << 1) - fXMargin - 1;
353  ch = fHeight - (fBorderWidth << 1) - fYMargin - 1;
354 
355  fCanvas->SetWidth(cw);
356  fCanvas->SetHeight(ch);
357  ItemLayout();
358 
359  if ((Int_t)fVirtualSize.fWidth > cw) {
360  if (fHsb) {
361  need_hsb = kTRUE;
362  if (fVsb) ch -= fVsb->GetDefaultWidth();
363  if (ch < 0) ch = 0;
364  fCanvas->SetHeight(ch);
365  ItemLayout();
366  }
367  }
368 
369  if ((Int_t)fVirtualSize.fHeight > ch) {
370  if (fVsb) {
371  need_vsb = kTRUE;
372  if (fHsb) cw -= fHsb->GetDefaultHeight();
373  if (cw < 0) cw = 0;
374  fCanvas->SetWidth(cw);
375  ItemLayout();
376  }
377  }
378 
379  // re-check again (putting the scrollbar could have changed things)
380 
381  if ((Int_t)fVirtualSize.fWidth > cw) {
382  if (!need_hsb) {
383  need_hsb = kTRUE;
384  if (fVsb) ch -= fVsb->GetDefaultWidth();
385  if (ch < 0) ch = 0;
386  fCanvas->SetHeight(ch);
387  ItemLayout();
388  }
389  }
390 
391  if (fHsb) {
392  if (need_hsb) {
394  cw, fHsb->GetDefaultHeight());
395  fHsb->MapRaised();
396  } else {
397  fHsb->UnmapWindow();
398  fHsb->SetPosition(0);
399  }
400  }
401 
402  if (fVsb) {
403  if (need_vsb) {
405  fVsb->GetDefaultWidth(), ch);
406  fVsb->MapWindow();
407  } else {
408  fVsb->UnmapWindow();
409  fVsb->SetPosition(0);
410  }
411  }
413 
414  if (fHsb) {
416  }
417 
418  if (fVsb) {
420  }
421 }
422 
423 ////////////////////////////////////////////////////////////////////////////////
424 /// Draw the border of the text edit widget.
425 
427 {
430  if (gClient->GetStyle() < 2) {
431  gVirtualX->DrawLine(fId, GetShadowGC()(), 0, 0, fWidth-2, 0);
432  gVirtualX->DrawLine(fId, GetShadowGC()(), 0, 0, 0, fHeight-2);
433  gVirtualX->DrawLine(fId, GetBlackGC()(), 1, 1, fWidth-3, 1);
434  gVirtualX->DrawLine(fId, GetBlackGC()(), 1, 1, 1, fHeight-3);
435 
436  gVirtualX->DrawLine(fId, GetHilightGC()(), 0, fHeight-1, fWidth-1, fHeight-1);
437  gVirtualX->DrawLine(fId, GetHilightGC()(), fWidth-1, fHeight-1, fWidth-1, 0);
438  gVirtualX->DrawLine(fId, GetBckgndGC()(), 1, fHeight-2, fWidth-2, fHeight-2);
439  gVirtualX->DrawLine(fId, GetBckgndGC()(), fWidth-2, 1, fWidth-2, fHeight-2);
440  break;
441  }
442  default:
444  break;
445  }
446 }
447 
448 ////////////////////////////////////////////////////////////////////////////////
449 /// Scroll the canvas to pos.
450 
452 {
453  if (pos.fX < 0) pos.fX = 0;
454  if (pos.fY < 0) pos.fY = 0;
455  if (pos.fX != fHsb->GetPosition()) fHsb->SetPosition(pos.fX / fScrollVal.fX);
456  if (pos.fY != fVsb->GetPosition()) fVsb->SetPosition(pos.fY / fScrollVal.fY);
457 }
458 
459 ////////////////////////////////////////////////////////////////////////////////
460 /// Scroll the canvas to new_top in the kVertical or kHorizontal direction.
461 
462 void TGView::ScrollCanvas(Int_t new_top, Int_t direction)
463 {
464  Point_t points[4];
465  Int_t xsrc, ysrc, xdest, ydest, cpyheight, cpywidth;
466 
467  if (new_top < 0) {
468  return;
469  }
470 
471  if (direction == kVertical) {
472  if (new_top == fVisible.fY) {
473  return;
474  }
475 
476  points[0].fX = points[3].fX = 0;
477  points[1].fX = points[2].fX = fCanvas->GetWidth();
478  xsrc = xdest = 0;
479  cpywidth = 0;
480  if (new_top < fVisible.fY) {
481  ysrc = 0;
482  ydest = Int_t(fVisible.fY - new_top);
483  cpyheight = ydest;
484  if (ydest > (Int_t)fCanvas->GetHeight()) {
485  ydest = fCanvas->GetHeight();
486  }
487 
488  points[1].fY = points[0].fY = 0;
489  points[3].fY = points[2].fY = ydest; // -1;
490  } else {
491  ydest = 0;
492  ysrc = Int_t(new_top - fVisible.fY);
493  cpyheight= ysrc;
494  if (ysrc > (Int_t)fCanvas->GetHeight()) {
495  ysrc = fCanvas->GetHeight();
496  }
497  points[1].fY = points[0].fY = fCanvas->GetHeight()-ysrc; // +1;
498  points[3].fY = points[2].fY = fCanvas->GetHeight();
499  }
500  fVisible.fY = new_top;
501 
502  if (fVisible.fY < 0) {
503  fVisible.fY = 0;
504  }
505  } else {
506  if (new_top == fVisible.fX) {
507  return;
508  }
509 
510  points[0].fY = points[1].fY = 0;
511  points[2].fY = points[3].fY = fCanvas->GetHeight();
512  ysrc = ydest = 0;
513  cpyheight = 0;
514 
515  if (new_top < fVisible.fX) {
516  xsrc = 0;
517  xdest = Int_t(fVisible.fX - new_top);
518  cpywidth = xdest;
519  if (xdest < 0) {
520  xdest = fCanvas->GetWidth();
521  }
522  points[0].fX = points[3].fX = 0;
523  points[1].fX = points[2].fX = xdest ; // -1;
524  } else {
525  xdest = 0;
526  xsrc = Int_t(new_top - fVisible.fX);
527  cpywidth = xsrc;
528  if (xsrc > (Int_t)fCanvas->GetWidth()) {
529  xsrc = fCanvas->GetWidth();
530  }
531  points[0].fX = points[3].fX = fCanvas->GetWidth()-xsrc; // +1;
532  points[1].fX = points[2].fX = fCanvas->GetWidth();
533  }
534  fVisible.fX = new_top;
535  if (fVisible.fX < 0) {
536  fVisible.fX = 0;
537  }
538  }
539 
541 
542 #ifdef R__HAS_COCOA
543  //With QuartzView it's quite tough to copy window's pixels to window.
544  //TODO: non-optimal solution.
545  DrawRegion(0, 0, GetWidth(), GetHeight());
546 #else
547  // Copy the scrolled region to its new position
548  gVirtualX->CopyArea(fCanvas->GetId(), fCanvas->GetId(), fWhiteGC(),
549  xsrc, ysrc, fCanvas->GetWidth()-cpywidth,
550  fCanvas->GetHeight()-cpyheight, xdest, ydest);
551 
552  UInt_t xdiff = points[2].fX - points[0].fX;
553  UInt_t ydiff = points[2].fY - points[0].fY;
554 
555  // under windows we need to redraw larger area (why?)
556 #ifdef WIN32
557  xdiff = xdiff << 1;
558  ydiff = ydiff << 1;
559 #endif
560 
561  DrawRegion(points[0].fX, points[0].fY, xdiff, ydiff);
562 #endif
563 }
564 
565 ////////////////////////////////////////////////////////////////////////////////
566 /// Change background color of the canvas frame.
567 
569 {
571  fWhiteGC.SetBackground(col);
572  fWhiteGC.SetForeground(col);
574 }
575 
576 ////////////////////////////////////////////////////////////////////////////////
577 /// Set background color of the canvas frame.
578 
580 {
582  fWhiteGC.SetBackground(col);
583  fWhiteGC.SetForeground(col);
584 }
585 
586 ////////////////////////////////////////////////////////////////////////////////
587 /// Set backgound pixmap
588 
590 {
592 }
Event_t::fType
EGEventType fType
Definition: GuiTypes.h:174
TGViewFrame::TGViewFrame
TGViewFrame(const TGViewFrame &)
Event_t::fState
UInt_t fState
Definition: GuiTypes.h:180
GET_MSG
Int_t GET_MSG(Long_t val)
Definition: WidgetMessageTypes.h:112
TGFrame::fY
Int_t fY
Definition: TGFrame.h:111
TGFrame::GetHeight
UInt_t GetHeight() const
Definition: TGFrame.h:250
TGView::fClipboard
Atom_t fClipboard
Definition: TGView.h:59
TGVScrollBar::SetRange
virtual void SetRange(Int_t range, Int_t page_size)
Set range of vertical scrollbar.
Definition: TGScrollBar.cxx:884
Event_t::fY
Int_t fY
Definition: GuiTypes.h:177
SetWindowAttributes_t::fBitGravity
Int_t fBitGravity
Definition: GuiTypes.h:98
Event_t::fX
Int_t fX
Definition: GuiTypes.h:177
TGWindow
Definition: TGWindow.h:31
kSB_SLIDERPOS
@ kSB_SLIDERPOS
Definition: WidgetMessageTypes.h:55
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
Pixmap_t
Handle_t Pixmap_t
Definition: GuiTypes.h:29
TGView::kNoHSB
@ kNoHSB
Definition: TGView.h:48
TGVScrollBar
Definition: TGScrollBar.h:183
kSB_SLIDERTRACK
@ kSB_SLIDERTRACK
Definition: WidgetMessageTypes.h:54
TGView::fWhiteGC
TGGC fWhiteGC
Definition: TGView.h:66
TGView::fScrolling
Int_t fScrolling
Definition: TGView.h:58
kAnyModifier
const Mask_t kAnyModifier
Definition: GuiTypes.h:209
TGDimension
Definition: TGDimension.h:27
TGFrame::SetBackgroundColor
virtual void SetBackgroundColor(Pixel_t back)
Set background color (override from TGWindow base class).
Definition: TGFrame.cxx:297
TGView::ScrollDown
void ScrollDown(Int_t pixels)
Definition: TGView.h:100
TGView::kVertical
@ kVertical
Definition: TGView.h:49
TMath::Max
Short_t Max(Short_t a, Short_t b)
Definition: TMathBase.h:212
TGView::~TGView
virtual ~TGView()
Delete view.
Definition: TGView.cxx:147
gVirtualX
#define gVirtualX
Definition: TVirtualX.h:338
kAnyButton
@ kAnyButton
Definition: GuiTypes.h:213
Pixel_t
ULong_t Pixel_t
Definition: GuiTypes.h:39
TGGC::SetTileStipXOrigin
void SetTileStipXOrigin(Int_t v)
X offset for tile or stipple operations.
Definition: TGGC.cxx:388
Point_t
Definition: GuiTypes.h:355
ClassImp
#define ClassImp(name)
Definition: Rtypes.h:364
TGRectangle::IsEmpty
Bool_t IsEmpty() const
Definition: TGDimension.h:133
Event_t::fHeight
UInt_t fHeight
Definition: GuiTypes.h:181
TGFrame::fWidth
UInt_t fWidth
Definition: TGFrame.h:112
TGView::HandleExpose
virtual Bool_t HandleExpose(Event_t *event)
Handle expose events.
Definition: TGView.cxx:282
r
ROOT::R::TRInterface & r
Definition: Object.C:4
TGWindow::kEditDisableLayout
@ kEditDisableLayout
Definition: TGWindow.h:61
TGScrollBar::MoveResize
virtual void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0)
Move and/or resize the frame.
Definition: TGScrollBar.h:136
TGFrame::GetDefaultHeight
virtual UInt_t GetDefaultHeight() const
Definition: TGFrame.h:216
kButton4
@ kButton4
Definition: GuiTypes.h:214
TGView::fScrollVal
TGLongPosition fScrollVal
Definition: TGView.h:54
TGView::fXMargin
UInt_t fXMargin
Definition: TGView.h:60
TGLongPosition::fY
Long_t fY
Definition: TGDimension.h:66
TGFrame::fOptions
UInt_t fOptions
Definition: TGFrame.h:119
TGView::SetBackgroundColor
virtual void SetBackgroundColor(Pixel_t)
Set background color of the canvas frame.
Definition: TGView.cxx:579
TGGC::SetGraphicsExposures
void SetGraphicsExposures(Bool_t v)
True if graphics exposure should be generated.
Definition: TGGC.cxx:432
Int_t
int Int_t
Definition: RtypesCore.h:45
TGRectangle::fY
Int_t fY
Definition: TGDimension.h:101
TGVScrollBar::SetPosition
virtual void SetPosition(Int_t pos)
Set logical slider position of vertical scrollbar.
Definition: TGScrollBar.cxx:919
TGView::DoRedraw
virtual void DoRedraw()
redraw
Definition: TGView.cxx:268
TGView::ScrollToPosition
virtual void ScrollToPosition(TGLongPosition newPos)
Scroll the canvas to pos.
Definition: TGView.cxx:451
TGView::fVsb
TGVScrollBar * fVsb
Definition: TGView.h:64
x
Double_t x[n]
Definition: legend1.C:17
TGView.h
TVirtualX.h
TGView::fExposedRegion
TGRectangle fExposedRegion
Definition: TGView.h:56
TGWindow::SetBackgroundPixmap
virtual void SetBackgroundPixmap(Pixmap_t pixmap)
set background pixmap
Definition: TGWindow.cxx:229
TGClient::GetResourcePool
const TGResourcePool * GetResourcePool() const
Definition: TGClient.h:133
TGFrame::GetBlackGC
static const TGGC & GetBlackGC()
Get black graphics context.
Definition: TGFrame.cxx:720
TGFrame::DrawBorder
virtual void DrawBorder()
Draw frame border.
Definition: TGFrame.cxx:406
kButtonPressMask
const Mask_t kButtonPressMask
Definition: GuiTypes.h:160
SetWindowAttributes_t::fMask
Mask_t fMask
Definition: GuiTypes.h:109
TGView::Clear
virtual void Clear(Option_t *="")
Clear view.
Definition: TGView.cxx:159
TGObject::GetId
Handle_t GetId() const
Definition: TGObject.h:47
kC_VSCROLL
@ kC_VSCROLL
Definition: WidgetMessageTypes.h:49
TGView::fCanvas
TGViewFrame * fCanvas
Definition: TGView.h:62
kDoubleBorder
@ kDoubleBorder
Definition: GuiTypes.h:385
TGWindow::HandleExpose
virtual Bool_t HandleExpose(Event_t *event)
Definition: TGWindow.h:102
TGFrame::SetHeight
virtual void SetHeight(UInt_t h)
Definition: TGFrame.h:272
v
@ v
Definition: rootcling_impl.cxx:3635
kOwnBackground
@ kOwnBackground
Definition: GuiTypes.h:391
TGView::HandleButton
virtual Bool_t HandleButton(Event_t *event)
handle button
Definition: TGView.cxx:235
TGView::TGView
TGView(const TGView &)
TGFrame::MapWindow
virtual void MapWindow()
map window
Definition: TGFrame.h:229
bool
kLeaveWindowMask
const Mask_t kLeaveWindowMask
Definition: GuiTypes.h:167
TGFrame::GetWidth
UInt_t GetWidth() const
Definition: TGFrame.h:249
id
XFontStruct * id
Definition: TGX11.cxx:109
TGView::ItemLayout
virtual Bool_t ItemLayout()
Definition: TGView.h:71
TGWindow::kEditDisableBtnEnable
@ kEditDisableBtnEnable
Definition: TGWindow.h:65
kWABitGravity
const Mask_t kWABitGravity
Definition: GuiTypes.h:143
TGView::ScrollCanvas
virtual void ScrollCanvas(Int_t newTop, Int_t direction)
Scroll the canvas to new_top in the kVertical or kHorizontal direction.
Definition: TGView.cxx:462
gClient
#define gClient
Definition: TGClient.h:166
TGHScrollBar::SetRange
virtual void SetRange(Int_t range, Int_t page_size)
Set range of horizontal scrollbar.
Definition: TGScrollBar.cxx:624
TGRectangle
Definition: TGDimension.h:98
TGFrame::AddInput
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
Definition: TGFrame.cxx:324
kNone
const Handle_t kNone
Definition: GuiTypes.h:87
TGFrame::GetHilightGC
static const TGGC & GetHilightGC()
Get highlight color graphics context.
Definition: TGFrame.cxx:740
TGScrollBar::GetPosition
virtual Int_t GetPosition() const
Definition: TGScrollBar.h:132
Option_t
const typedef char Option_t
Definition: RtypesCore.h:66
kSunkenFrame
@ kSunkenFrame
Definition: GuiTypes.h:383
TGView::ProcessMessage
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process scrollbar messages.
Definition: TGView.cxx:314
TGWindow::kEditDisableGrab
@ kEditDisableGrab
Definition: TGWindow.h:60
TGView::SetBackgroundPixmap
virtual void SetBackgroundPixmap(Pixmap_t p)
Set backgound pixmap.
Definition: TGView.cxx:589
TGDimension::fHeight
UInt_t fHeight
Definition: TGDimension.h:36
SetWindowAttributes_t::fWinGravity
Int_t fWinGravity
Definition: GuiTypes.h:99
TGGC::SetTileStipYOrigin
void SetTileStipYOrigin(Int_t v)
Y offset for tile or stipple operations.
Definition: TGGC.cxx:399
h
#define h(i)
Definition: RSha256.hxx:124
TGWidget::fMsgWindow
const TGWindow * fMsgWindow
Definition: TGWidget.h:60
TGView::fYMargin
UInt_t fYMargin
Definition: TGView.h:61
TGWidget::Associate
virtual void Associate(const TGWindow *w)
Definition: TGWidget.h:84
TGHScrollBar
Definition: TGScrollBar.h:160
TGHScrollBar::SetPosition
virtual void SetPosition(Int_t pos)
Set logical slider position of horizontal scrollbar.
Definition: TGScrollBar.cxx:657
TGObject::fId
Handle_t fId
Definition: TGObject.h:36
TGView::UpdateBackgroundStart
virtual void UpdateBackgroundStart()
set some gc values
Definition: TGView.cxx:226
TGLongPosition::fX
Long_t fX
Definition: TGDimension.h:65
Event_t::fCode
UInt_t fCode
Definition: GuiTypes.h:179
kWAWinGravity
const Mask_t kWAWinGravity
Definition: GuiTypes.h:144
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
Event_t::fWidth
UInt_t fWidth
Definition: GuiTypes.h:181
TGView::fVisible
TGLongPosition fVisible
Definition: TGView.h:52
TGWidget::fWidgetFlags
Int_t fWidgetFlags
Definition: TGWidget.h:59
TGFrame::fBorderWidth
Int_t fBorderWidth
Definition: TGFrame.h:118
kButtonPress
@ kButtonPress
Definition: GuiTypes.h:59
Long_t
long Long_t
Definition: RtypesCore.h:54
TGView::kNoVSB
@ kNoVSB
Definition: TGView.h:48
kButtonReleaseMask
const Mask_t kButtonReleaseMask
Definition: GuiTypes.h:161
TGDimension::fWidth
UInt_t fWidth
Definition: TGDimension.h:35
TGRectangle::fX
Int_t fX
Definition: TGDimension.h:100
TGFrame::MapRaised
virtual void MapRaised()
map raised
Definition: TGFrame.h:230
TGView::Layout
virtual void Layout()
layout view
Definition: TGView.cxx:344
y
Double_t y[n]
Definition: legend1.C:17
TGView::ChangeBackground
virtual void ChangeBackground(Pixel_t)
Change background color of the canvas frame.
Definition: TGView.cxx:568
ULong_t
unsigned long ULong_t
Definition: RtypesCore.h:55
TGWindow::kEditDisableKeyEnable
@ kEditDisableKeyEnable
Definition: TGWindow.h:66
TGCompositeFrame::MustCleanup
virtual Int_t MustCleanup() const
Definition: TGFrame.h:398
KeySymbols.h
kFocusChangeMask
const Mask_t kFocusChangeMask
Definition: GuiTypes.h:168
TGFrame::GetBckgndGC
static const TGGC & GetBckgndGC()
Get background color graphics context.
Definition: TGFrame.cxx:760
TGView::DrawRegion
virtual void DrawRegion(Int_t x, Int_t y, UInt_t width, UInt_t height)
Draw region.
Definition: TGView.cxx:194
Event_t::fWindow
Window_t fWindow
Definition: GuiTypes.h:175
kKeyPressMask
const Mask_t kKeyPressMask
Definition: GuiTypes.h:158
TGView::DrawBorder
virtual void DrawBorder()
Draw the border of the text edit widget.
Definition: TGView.cxx:426
TGView::fMousePos
TGLongPosition fMousePos
Definition: TGView.h:53
kRaisedFrame
@ kRaisedFrame
Definition: GuiTypes.h:384
TGView::fVirtualSize
TGDimension fVirtualSize
Definition: TGView.h:55
unsigned int
TGView::SetVisibleStart
virtual void SetVisibleStart(Int_t newTop, Int_t direction)
Scroll view in specified direction to make newTop the visible location.
Definition: TGView.cxx:176
TGLongPosition
Definition: TGDimension.h:63
TGFrame::fX
Int_t fX
Definition: TGFrame.h:110
TGRectangle::fW
UInt_t fW
Definition: TGDimension.h:102
kKeyControlMask
const Mask_t kKeyControlMask
Definition: GuiTypes.h:196
TGWidget::fWidgetId
Int_t fWidgetId
Definition: TGWidget.h:58
TGClient::NeedRedraw
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
Definition: TGClient.cxx:373
TGFrame::UnmapWindow
virtual void UnmapWindow()
unmap window
Definition: TGFrame.h:231
TGFrame::SetWidth
virtual void SetWidth(UInt_t w)
Definition: TGFrame.h:271
TGObject::fClient
TGClient * fClient
Definition: TGObject.h:37
TGFrame::MoveResize
virtual void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0)
Move and/or resize the frame.
Definition: TGFrame.cxx:614
TGGC::SetBackground
void SetBackground(Pixel_t v)
Set background color.
Definition: TGGC.cxx:288
points
point * points
Definition: X3DBuffer.c:22
TGGC::SetForeground
void SetForeground(Pixel_t v)
Set foreground color.
Definition: TGGC.cxx:277
TGCompositeFrame::fLayoutManager
TGLayoutManager * fLayoutManager
Definition: TGFrame.h:328
TGView::kHorizontal
@ kHorizontal
Definition: TGView.h:49
TGWindow::SetEditDisabled
virtual void SetEditDisabled(UInt_t on=kEditDisable)
Definition: TGWindow.h:114
Event_t
Definition: GuiTypes.h:173
GET_SUBMSG
Int_t GET_SUBMSG(Long_t val)
Definition: WidgetMessageTypes.h:113
kButton5
@ kButton5
Definition: GuiTypes.h:214
TGView::fHsb
TGHScrollBar * fHsb
Definition: TGView.h:63
TGFrame::GetShadowGC
static const TGGC & GetShadowGC()
Get shadow color graphics context.
Definition: TGFrame.cxx:750
kC_HSCROLL
@ kC_HSCROLL
Definition: WidgetMessageTypes.h:48
TGViewFrame
Definition: TGView.h:129
TGResourcePool.h
TGRectangle::Empty
void Empty()
Definition: TGDimension.h:132
TGFrame::fHeight
UInt_t fHeight
Definition: TGFrame.h:113
kEnterWindowMask
const Mask_t kEnterWindowMask
Definition: GuiTypes.h:166
TGViewFrame::fView
TGView * fView
Definition: TGView.h:131
TGWindow::fEditDisabled
UInt_t fEditDisabled
Definition: TGWindow.h:40
TGPosition
Definition: TGDimension.h:45
TGView::ScrollUp
void ScrollUp(Int_t pixels)
Definition: TGView.h:98
TGCompositeFrame
Definition: TGFrame.h:324
TGCompositeFrame::AddFrame
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
Definition: TGFrame.cxx:1102
TGView::UpdateRegion
virtual void UpdateRegion(Int_t x, Int_t y, UInt_t w, UInt_t h)
update a part of view
Definition: TGView.cxx:202
TGFrame::GetDefaultWidth
virtual UInt_t GetDefaultWidth() const
Definition: TGFrame.h:215
TGScrollBar.h
TGRectangle::fH
UInt_t fH
Definition: TGDimension.h:103
kWidgetWantFocus
@ kWidgetWantFocus
Definition: TGWidget.h:46
TGView
Definition: TGView.h:43
kKeyShiftMask
const Mask_t kKeyShiftMask
Definition: GuiTypes.h:194
TGRectangle::Merge
void Merge(const TGRectangle &r)
Definition: TGDimension.cxx:36
TGResourcePool::GetClipboard
Atom_t GetClipboard() const
Definition: TGResourcePool.h:182
kButtonMotionMask
const Mask_t kButtonMotionMask
Definition: GuiTypes.h:163
TMath.h
kChildFrame
@ kChildFrame
Definition: GuiTypes.h:379
int
SetWindowAttributes_t
Definition: GuiTypes.h:92
TGView::TGViewFrame
friend class TGViewFrame
Definition: TGView.h:45