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