Logo ROOT  
Reference Guide
TGSplitter.cxx
Go to the documentation of this file.
1 // @(#)root/gui:$Id$
2 // Author: Fons Rademakers 6/09/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 /** \class TGSplitter
14  \ingroup guiwidgets
15 
16 A splitter allows the frames left and right or above and below of
17 it to be resized. The frame to be resized must have the kFixedWidth
18 or kFixedHeight property set.
19 
20 */
21 
22 
23 #include "TGSplitter.h"
24 #include "TGPicture.h"
25 #include "TVirtualX.h"
26 
27 #include <iostream>
28 
29 
34 
35 
36 ////////////////////////////////////////////////////////////////////////////////
37 /// Create a splitter.
38 
40  UInt_t options, ULong_t back) :
41  TGFrame(p, w, h, options, back),
42  fDragging (kFALSE),
43  fExternalHandler (kFALSE),
44  fSplitterPic (0)
45 {
48 }
49 
50 ////////////////////////////////////////////////////////////////////////////////
51 /// Emit DragStarted signal.
52 
54 {
55  Emit("DragStarted()");
56 }
57 
58 ////////////////////////////////////////////////////////////////////////////////
59 /// Emit Moved signal.
60 
62 {
63  Emit("Moved(Int_t)", delta);
64 }
65 
66 ////////////////////////////////////////////////////////////////////////////////
67 /// Create a vertical splitter.
68 
70  UInt_t options, ULong_t back) : TGSplitter(p, w, h, options, back)
71 {
73  fSplitterPic = fClient->GetPicture("splitterv.xpm");
74  fFrameHeight = h;
75  fFrameWidth = w;
76  fLeft = kTRUE;
77  fMax = fMin = 0;
78  fStartX = 0;
79  fFrame = 0;
80 
81  if (!fSplitterPic)
82  Error("TGVSplitter", "splitterv.xpm not found");
83 
84  if (p && !p->InheritsFrom(TGCompositeFrame::Class())) {
85  Error("TGVSplitter", "parent must inherit from a TGCompositeFrame");
86  return;
87  }
88  if (p && !(((TGCompositeFrame*)p)->GetOptions() & kHorizontalFrame)) {
89  Error("TGVSplitter", "parent must have a horizontal layout manager");
90  return;
91  }
92 
93  fSplitCursor = gVirtualX->CreateCursor(kArrowHor);
94 
95  gVirtualX->GrabButton(fId, kAnyButton, kAnyModifier,
98 
100 }
101 
102 ////////////////////////////////////////////////////////////////////////////////
103 /// Create a vertical splitter.
104 
106  TGSplitter(p, w, h, kChildFrame, GetDefaultFrameBackground())
107 {
108  fExternalHandler = external;
109 
111  fSplitterPic = fClient->GetPicture("splitterv.xpm");
112 
113  if (!fSplitterPic)
114  Error("TGVSplitter", "splitterv.xpm not found");
115 
116  fSplitCursor = gVirtualX->CreateCursor(kArrowHor);
117  fFrame = 0;
118  fFrameHeight = h;
119  fFrameWidth = w;
120  fLeft = kTRUE;
121  fMax = fMin = 0;
122  fStartX = 0;
123 
124  gVirtualX->GrabButton(fId, kAnyButton, kAnyModifier,
127 
129 }
130 
131 ////////////////////////////////////////////////////////////////////////////////
132 /// Delete vertical splitter widget.
133 
135 {
137 }
138 
139 ////////////////////////////////////////////////////////////////////////////////
140 /// Set frame to be resized. If frame is on the left of the splitter
141 /// set left to true.
142 
144 {
145  fFrame = frame;
146  fLeft = left;
147 
149  Error("SetFrame", "resize frame must have kFixedWidth option set");
150 }
151 
152 ////////////////////////////////////////////////////////////////////////////////
153 /// Handle mouse button event in vertical splitter.
154 
156 {
157  if (fSplitCursor == kNone) return kTRUE;
158 
159  if (!fExternalHandler && !fFrame) {
160  Error("HandleButton", "frame to be resized not set");
161  return kTRUE;
162  }
163 
164  if (event->fType == kButtonPress) {
165  fStartX = event->fXRoot;
166  fDragging = kTRUE;
167 
168  if (fExternalHandler) {
169  fMin = 0;
170  fMax = 99999;
171  DragStarted();
172  } else {
173  Int_t x, y;
174  gVirtualX->GetWindowSize(fFrame->GetId(), x, y, fFrameWidth, fFrameHeight);
175 
176  // get fMin and fMax in root coordinates
177  Int_t xroot, yroot;
178  UInt_t w, h;
179  Window_t wdum;
180  gVirtualX->GetWindowSize(fParent->GetId(), x, y, w, h);
181  gVirtualX->TranslateCoordinates(fParent->GetParent()->GetId(),
183  x, y, xroot, yroot, wdum);
184  fMin = xroot;
185  fMax = xroot + w - 2;
186  }
187 
188  // last argument kFALSE forces all specified events to this window
191  kTRUE, kFALSE);
192  } else {
193  fDragging = kFALSE;
194  gVirtualX->GrabPointer(0, 0, 0, 0, kFALSE); // ungrab pointer
195  }
196  return kTRUE;
197 }
198 
199 ////////////////////////////////////////////////////////////////////////////////
200 /// Handle mouse motion event in vertical splitter.
201 
203 {
204  if (fDragging) {
205  Int_t xr = event->fXRoot;
206  if (xr > fMax) xr = fMax;
207  if (xr < fMin) xr = fMin;
208  Int_t delta = xr - fStartX;
209  if (fExternalHandler) {
210  if (delta != 0) {
211  Moved(delta);
212  fStartX = xr;
213  }
214  } else {
215  Int_t w = (Int_t) fFrameWidth;
216  if (fLeft)
217  w += delta;
218  else
219  w -= delta;
220  if (w < 0) w = 0;
221  fStartX = xr;
222 
223  if (delta != 0) {
224  fFrameWidth = w;
226 
228  p->Layout();
229  }
230  }
231  }
232  return kTRUE;
233 }
234 
235 ////////////////////////////////////////////////////////////////////////////////
236 /// Handle mouse motion event in vertical splitter.
237 
239 {
240  if (event->fType == kEnterNotify)
241  gVirtualX->SetCursor(fId, fSplitCursor);
242  else
243  gVirtualX->SetCursor(fId, kNone);
244 
245  return kTRUE;
246 }
247 
248 ////////////////////////////////////////////////////////////////////////////////
249 /// Draw vertical splitter.
250 
252 {
253  if (fSplitterPic) {
254  Int_t posx = (fWidth/2)-(fSplitterPic->GetWidth()/2);
255  Int_t posy = (fHeight/2)-(fSplitterPic->GetHeight()/2);
256  fSplitterPic->Draw(fId, GetBckgndGC()(), posx, posy);
257  }
258 }
259 
260 
261 ////////////////////////////////////////////////////////////////////////////////
262 /// Create a horizontal splitter.
263 
265  UInt_t options, ULong_t back) : TGSplitter(p, w, h, options, back)
266 {
268  fSplitterPic = 0;
269  fSplitCursor = 0;
270  fFrame = 0;
271  fFrameHeight = h;
272  fFrameWidth = w;
273  fAbove = kTRUE;
274  fMax = fMin = 0;
275  fStartY = 0;
276 
277  if (p && !p->InheritsFrom(TGCompositeFrame::Class())) {
278  Error("TGHSplitter", "parent must inherit from a TGCompositeFrame");
279  return;
280  }
281  if (p && !(((TGCompositeFrame*)p)->GetOptions() & kVerticalFrame)) {
282  Error("TGHSplitter", "parent must have a vertical layout manager");
283  return;
284  }
285 
286  fSplitterPic = fClient->GetPicture("splitterh.xpm");
287 
288  if (!fSplitterPic)
289  Error("TGHSplitter", "splitterh.xpm not found");
290 
291  fSplitCursor = gVirtualX->CreateCursor(kArrowVer);
292 
293  gVirtualX->GrabButton(fId, kAnyButton, kAnyModifier,
296 
298 }
299 
300 ////////////////////////////////////////////////////////////////////////////////
301 /// Create a horizontal splitter.
302 
304  TGSplitter(p, w, h, kChildFrame, GetDefaultFrameBackground())
305 {
306  fExternalHandler = external;
307 
309 
310  fSplitterPic = fClient->GetPicture("splitterh.xpm");
311 
312  if (!fSplitterPic)
313  Error("TGHSplitter", "splitterh.xpm not found");
314 
315  fSplitCursor = gVirtualX->CreateCursor(kArrowVer);
316  fFrame = 0;
317  fFrameHeight = h;
318  fFrameWidth = w;
319  fAbove = kTRUE;
320  fMax = fMin = 0;
321  fStartY = 0;
322 
323  gVirtualX->GrabButton(fId, kAnyButton, kAnyModifier,
326 
328 }
329 
330 ////////////////////////////////////////////////////////////////////////////////
331 /// Delete horizontal splitter widget.
332 
334 {
336 }
337 
338 ////////////////////////////////////////////////////////////////////////////////
339 /// Set frame to be resized. If frame is above the splitter
340 /// set above to true.
341 
343 {
344  fFrame = frame;
345  fAbove = above;
346 
348  Error("SetFrame", "resize frame must have kFixedHeight option set");
349 }
350 
351 ////////////////////////////////////////////////////////////////////////////////
352 /// Handle mouse button event in horizontal splitter.
353 
355 {
356  if (fSplitCursor == kNone) return kTRUE;
357 
358  if (!fExternalHandler && !fFrame) {
359  Error("HandleButton", "frame to be resized not set");
360  return kTRUE;
361  }
362 
363  if (event->fType == kButtonPress) {
364  fStartY = event->fYRoot;
365  fDragging = kTRUE;
366 
367  if (fExternalHandler) {
368  fMin = 0;
369  fMax = 99999;
370  DragStarted();
371  } else {
372  Int_t x, y;
373  gVirtualX->GetWindowSize(fFrame->GetId(), x, y, fFrameWidth, fFrameHeight);
374 
375  // get fMin and fMax in root coordinates
376  Int_t xroot, yroot;
377  UInt_t w, h;
378  Window_t wdum;
379  gVirtualX->GetWindowSize(fParent->GetId(), x, y, w, h);
380  gVirtualX->TranslateCoordinates(fParent->GetParent()->GetId(),
382  x, y, xroot, yroot, wdum);
383  fMin = yroot;
384  fMax = yroot + h - 2;
385  }
386 
387  // last argument kFALSE forces all specified events to this window
390  kTRUE, kFALSE);
391  } else {
392  fDragging = kFALSE;
393  gVirtualX->GrabPointer(0, 0, 0, 0, kFALSE); // ungrab pointer
394  }
395  return kTRUE;
396 }
397 
398 ////////////////////////////////////////////////////////////////////////////////
399 /// Handle mouse motion event in horizontal splitter.
400 
402 {
403  if (fDragging) {
404  Int_t yr = event->fYRoot;
405  if (yr > fMax) yr = fMax;
406  if (yr < fMin) yr = fMin;
407  Int_t delta = yr - fStartY;
408  if (fExternalHandler) {
409  if (delta != 0) {
410  Moved(delta);
411  fStartY = yr;
412  }
413  } else {
415  if (fAbove)
416  h += delta;
417  else
418  h -= delta;
419  if (h < 0) h = 0;
420  fStartY = yr;
421 
422  if (delta != 0) {
423  fFrameHeight = h;
425 
427  p->Layout();
428  }
429  }
430  }
431  return kTRUE;
432 }
433 
434 ////////////////////////////////////////////////////////////////////////////////
435 /// Handle mouse motion event in horizontal splitter.
436 
438 {
439  if (event->fType == kEnterNotify)
440  gVirtualX->SetCursor(fId, fSplitCursor);
441  else
442  gVirtualX->SetCursor(fId, kNone);
443 
444  return kTRUE;
445 }
446 
447 ////////////////////////////////////////////////////////////////////////////////
448 /// Draw horizontal splitter.
449 
451 {
452  if (fSplitterPic) {
453  Int_t posx = (fWidth/2)-(fSplitterPic->GetWidth()/2);
454  Int_t posy = (fHeight/2)-(fSplitterPic->GetHeight()/2);
455  fSplitterPic->Draw(fId, GetBckgndGC()(), posx, posy);
456  }
457 }
458 
459 ////////////////////////////////////////////////////////////////////////////////
460 /// fSplitterPic = fClient->GetPicture("filesplitterv.xpm");
461 
463  UInt_t options, Pixel_t back):
464  TGVSplitter(p, w, h, options, back)
465 {
466 // if (!fSplitterPic)
467 // Error("TGVFileSplitter", "filesplitterv.xpm not found");
468 }
469 
470 ////////////////////////////////////////////////////////////////////////////////
471 /// if (fSplitterPic) fClient->FreePicture(fSplitterPic);
472 
474 {
475 }
476 
477 ////////////////////////////////////////////////////////////////////////////////
478 /// Handle mouse motion event in vertical splitter.
479 
481 {
482  fMin = 30;
483 
484  if (fDragging) {
485  Int_t xr = event->fXRoot;
486  if (xr > fMax) xr = fMax;
487  if (xr < fMin) xr = fMin;
488  Int_t delta = xr - fStartX;
489  Int_t w = (Int_t) fFrameWidth;
490  if (fLeft)
491  w += delta;
492  else
493  w -= delta;
494 
495  if (w < 0) w = 0;
496  fStartX = xr;
497 
498  if (delta != 0) {
499  delta = w - fFrameWidth;
500  fFrameWidth = w;
501 
503  p->Resize( p->GetWidth() + delta, p->GetHeight() );
504 
506 
507  p->Layout();
509  }
510  }
511  return kTRUE;
512 }
513 
514 ////////////////////////////////////////////////////////////////////////////////
515 /// Handle mouse button event in vertical splitter.
516 
518 {
519  if ( event->fType == kButtonPress) {
520  ButtonPressed();
521  } else if ( event->fType == kButtonRelease) {
522  LayoutHeader(0);
523  LayoutListView();
524  ButtonReleased();
525  } else if ( event->fType == kButtonDoubleClick ) {
526  DoubleClicked(this);
527  }
529 }
530 
531 ////////////////////////////////////////////////////////////////////////////////
532 /// Emit LayoutFeader() signal.
533 
535 {
536  Emit("LayoutHeader(TGFrame*)", (Long_t)f);
537 }
538 
539 ////////////////////////////////////////////////////////////////////////////////
540 /// Emit LayoutListView() signal.
541 
543 {
544  Emit("LayoutListView()");
545 }
546 
547 ////////////////////////////////////////////////////////////////////////////////
548 /// Emit ButtonPressed() signal.
549 
551 {
552  Emit("ButtonPressed()");
553 }
554 
555 ////////////////////////////////////////////////////////////////////////////////
556 /// Emit ButtonReleased() signal.
557 
559 {
560  Emit("ButtonReleased()");
561 }
562 
563 ////////////////////////////////////////////////////////////////////////////////
564 /// Emit DoubleClicked() signal.
565 
567 {
568  Emit("DoubleClicked(TGVFileSplitter*)", (Long_t) splitter);
569 }
570 
571 ////////////////////////////////////////////////////////////////////////////////
572 /// Handle double click mouse event in splitter.
573 
575 {
576  DoubleClicked(this);
577  return kTRUE;
578 }
579 
580 ////////////////////////////////////////////////////////////////////////////////
581 /// Save a splitter widget as a C++ statement(s) on output stream out.
582 
583 void TGVSplitter::SavePrimitive(std::ostream &out, Option_t *option /*= ""*/)
584 {
585  if (fBackground != GetDefaultFrameBackground()) SaveUserColor(out, option);
586 
587  out << " TGVSplitter *";
588  out << GetName() <<" = new TGVSplitter("<< fParent->GetName()
589  << "," << GetWidth() << "," << GetHeight();
590 
592  if (!GetOptions()) {
593  out <<");" << std::endl;
594  } else {
595  out << "," << GetOptionString() <<");" << std::endl;
596  }
597  } else {
598  out << "," << GetOptionString() << ",ucolor);" << std::endl;
599  }
600  if (option && strstr(option, "keep_names"))
601  out << " " << GetName() << "->SetName(\"" << GetName() << "\");" << std::endl;
602  // TGVSplitter->SetFrame( theframe ) can only be saved here
603  // if fFrame is the frame on the left (since the frame on the
604  // right will only be saved afterwards)... The other case is
605  // handled in TGCompositeFrame::SavePrimitiveSubframes()
606  if (GetLeft()) {
607  out << " " << GetName() << "->SetFrame(" << GetFrame()->GetName();
608  if (GetLeft()) out << ",kTRUE);" << std::endl;
609  else out << ",kFALSE);"<< std::endl;
610  }
611 }
612 
613 ////////////////////////////////////////////////////////////////////////////////
614 /// Save a splitter widget as a C++ statement(s) on output stream out.
615 
616 void TGHSplitter::SavePrimitive(std::ostream &out, Option_t *option /*= ""*/)
617 {
618  if (fBackground != GetDefaultFrameBackground()) SaveUserColor(out, option);
619 
620  out << " TGHSplitter *";
621  out << GetName() <<" = new TGHSplitter("<< fParent->GetName()
622  << "," << GetWidth() << "," << GetHeight();
623 
625  if (!GetOptions()) {
626  out <<");" << std::endl;
627  } else {
628  out << "," << GetOptionString() <<");" << std::endl;
629  }
630  } else {
631  out << "," << GetOptionString() << ",ucolor);" << std::endl;
632  }
633  if (option && strstr(option, "keep_names"))
634  out << " " << GetName() << "->SetName(\"" << GetName() << "\");" << std::endl;
635  // TGHSplitter->SetFrame( theframe ) can only be saved here
636  // if fFrame is the frame above (since the frame below will
637  // only be saved afterwards)... The other case is handled in
638  // TGCompositeFrame::SavePrimitiveSubframes()
639  if (GetAbove()) {
640  out << " " << GetName() << "->SetFrame(" << GetFrame()->GetName();
641  if (GetAbove()) out << ",kTRUE);" << std::endl;
642  else out << ",kFALSE);"<< std::endl;
643  }
644 }
645 
646 ////////////////////////////////////////////////////////////////////////////////
647 /// Save a splitter widget as a C++ statement(s) on output stream out.
648 
649 void TGVFileSplitter::SavePrimitive(std::ostream &out, Option_t *option /*= ""*/)
650 {
651  if (fBackground != GetDefaultFrameBackground()) SaveUserColor(out, option);
652 
653  out << " TGVFileSplitter *";
654  out << GetName() <<" = new TGVFileSplitter("<< fParent->GetName()
655  << "," << GetWidth() << "," << GetHeight();
656 
658  if (!GetOptions()) {
659  out <<");" << std::endl;
660  } else {
661  out << "," << GetOptionString() <<");" << std::endl;
662  }
663  } else {
664  out << "," << GetOptionString() << ",ucolor);" << std::endl;
665  }
666  if (option && strstr(option, "keep_names"))
667  out << " " << GetName() << "->SetName(\"" << GetName() << "\");" << std::endl;
668 
669  out << " " << GetName() << "->SetFrame(" << GetFrame()->GetName();
670  if (GetLeft()) out << ",kTRUE);" << std::endl;
671  else out << ",kFALSE);"<< std::endl;
672 }
673 
TGClient::GetDefaultRoot
const TGWindow * GetDefaultRoot() const
Returns the root (i.e.
Definition: TGClient.cxx:236
TGHSplitter::fMin
Int_t fMin
min y position frame can be resized to
Definition: TGSplitter.h:100
TGFrame::GetHeight
UInt_t GetHeight() const
Definition: TGFrame.h:225
TGWindow
ROOT GUI Window base class.
Definition: TGWindow.h:23
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:100
TGVSplitter::fMax
Int_t fMax
max x position frame can be resized to
Definition: TGSplitter.h:64
kFixedWidth
@ kFixedWidth
Definition: GuiTypes.h:387
TGVSplitter::SavePrimitive
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a splitter widget as a C++ statement(s) on output stream out.
Definition: TGSplitter.cxx:583
TGHSplitter::fFrameWidth
UInt_t fFrameWidth
width of frame to be resized
Definition: TGSplitter.h:98
TGVFileSplitter::ButtonPressed
void ButtonPressed()
Emit ButtonPressed() signal.
Definition: TGSplitter.cxx:550
TGSplitter::fSplitCursor
Cursor_t fSplitCursor
split cursor
Definition: TGSplitter.h:22
kAnyModifier
const Mask_t kAnyModifier
Definition: GuiTypes.h:210
f
#define f(i)
Definition: RSha256.hxx:104
TGVSplitter::DrawBorder
virtual void DrawBorder()
Draw vertical splitter.
Definition: TGSplitter.cxx:251
Option_t
const char Option_t
Definition: RtypesCore.h:66
TGVFileSplitter::SavePrimitive
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a splitter widget as a C++ statement(s) on output stream out.
Definition: TGSplitter.cxx:649
TGPicture::GetWidth
UInt_t GetWidth() const
Definition: TGPicture.h:52
kPointerMotionMask
const Mask_t kPointerMotionMask
Definition: GuiTypes.h:163
kArrowVer
@ kArrowVer
Definition: GuiTypes.h:374
gVirtualX
#define gVirtualX
Definition: TVirtualX.h:338
kAnyButton
@ kAnyButton
Definition: GuiTypes.h:214
Pixel_t
ULong_t Pixel_t
Pixel value.
Definition: GuiTypes.h:40
ClassImp
#define ClassImp(name)
Definition: Rtypes.h:364
TGVFileSplitter::LayoutListView
void LayoutListView()
Emit LayoutListView() signal.
Definition: TGSplitter.cxx:542
TGPicture.h
TGFrame::fWidth
UInt_t fWidth
frame width
Definition: TGFrame.h:87
TGSplitter::DragStarted
void DragStarted()
Emit DragStarted signal.
Definition: TGSplitter.cxx:53
kVerticalFrame
@ kVerticalFrame
Definition: GuiTypes.h:381
TGVSplitter::fStartX
Int_t fStartX
x position when dragging starts
Definition: TGSplitter.h:60
TGHSplitter::GetAbove
Bool_t GetAbove() const
Definition: TGSplitter.h:115
TObject::Error
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition: TObject.cxx:893
TGVFileSplitter::HandleButton
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event in vertical splitter.
Definition: TGSplitter.cxx:517
TGHSplitter::DrawBorder
virtual void DrawBorder()
Draw horizontal splitter.
Definition: TGSplitter.cxx:450
TGVSplitter::SetFrame
virtual void SetFrame(TGFrame *frame, Bool_t left)
Set frame to be resized.
Definition: TGSplitter.cxx:143
TGVFileSplitter
Definition: TGSplitter.h:126
Int_t
int Int_t
Definition: RtypesCore.h:45
TGSplitter::TGSplitter
TGSplitter(const TGSplitter &)=delete
event
Definition: triangle.c:553
kArrowHor
@ kArrowHor
Definition: GuiTypes.h:374
kEnterNotify
@ kEnterNotify
Definition: GuiTypes.h:61
TGPicture::Draw
void Draw(Option_t *="")
Default Draw method for all objects.
Definition: TGPicture.h:46
x
Double_t x[n]
Definition: legend1.C:17
TGHSplitter::fMax
Int_t fMax
max y position frame can be resized to
Definition: TGSplitter.h:101
TGFrame::GetDefaultFrameBackground
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:683
TVirtualX.h
TGClient::FreePicture
void FreePicture(const TGPicture *pic)
Free picture resource.
Definition: TGClient.cxx:310
kButtonDoubleClick
@ kButtonDoubleClick
Definition: GuiTypes.h:64
TGHSplitter::fFrame
TGFrame * fFrame
frame that should be resized
Definition: TGSplitter.h:102
TGFrame
A subclasses of TGWindow, and is used as base class for some simple widgets (buttons,...
Definition: TGFrame.h:80
kButtonPressMask
const Mask_t kButtonPressMask
Definition: GuiTypes.h:161
TGObject::GetId
Handle_t GetId() const
Definition: TGObject.h:37
TObject::InheritsFrom
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
Definition: TObject.cxx:445
bool
TGHSplitter::~TGHSplitter
virtual ~TGHSplitter()
Delete horizontal splitter widget.
Definition: TGSplitter.cxx:333
kLeaveWindowMask
const Mask_t kLeaveWindowMask
Definition: GuiTypes.h:168
TGFrame::GetWidth
UInt_t GetWidth() const
Definition: TGFrame.h:224
TGFrame::GetOptionString
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
Definition: TGFrame.cxx:2480
TGFrame::GetOptions
virtual UInt_t GetOptions() const
Definition: TGFrame.h:197
TGVSplitter::GetFrame
const TGFrame * GetFrame() const
Definition: TGSplitter.h:77
TGSplitter::fExternalHandler
Bool_t fExternalHandler
true when splitter movement is handled externally
Definition: TGSplitter.h:24
TGFrame::AddInput
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
Definition: TGFrame.cxx:339
kNone
const Handle_t kNone
Definition: GuiTypes.h:88
TGVFileSplitter::DoubleClicked
void DoubleClicked(TGVFileSplitter *frame)
Emit DoubleClicked() signal.
Definition: TGSplitter.cxx:566
TGVFileSplitter::~TGVFileSplitter
virtual ~TGVFileSplitter()
if (fSplitterPic) fClient->FreePicture(fSplitterPic);
Definition: TGSplitter.cxx:473
kFixedHeight
@ kFixedHeight
Definition: GuiTypes.h:389
TGSplitter::fSplitterPic
const TGPicture * fSplitterPic
picture to draw splitter
Definition: TGSplitter.h:25
TGVSplitter::~TGVSplitter
virtual ~TGVSplitter()
Delete vertical splitter widget.
Definition: TGSplitter.cxx:134
h
#define h(i)
Definition: RSha256.hxx:106
TGWindow::GetName
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
Definition: TGWindow.cxx:336
TGFrame::Resize
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
Definition: TGFrame.cxx:605
TGObject::fId
Handle_t fId
X11/Win32 Window identifier.
Definition: TGObject.h:26
TGVSplitter::TGVSplitter
TGVSplitter(const TGVSplitter &)=delete
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:101
kButtonPress
@ kButtonPress
Definition: GuiTypes.h:60
Long_t
long Long_t
Definition: RtypesCore.h:54
TGVFileSplitter::ButtonReleased
void ButtonReleased()
Emit ButtonReleased() signal.
Definition: TGSplitter.cxx:558
kButtonReleaseMask
const Mask_t kButtonReleaseMask
Definition: GuiTypes.h:162
kButtonRelease
@ kButtonRelease
Definition: GuiTypes.h:60
TGVSplitter::fFrameWidth
UInt_t fFrameWidth
width of frame to be resized
Definition: TGSplitter.h:61
TGHSplitter::TGHSplitter
TGHSplitter(const TGHSplitter &)=delete
TGHSplitter::fAbove
Bool_t fAbove
true if frame is above the splitter
Definition: TGSplitter.h:103
TGFrame::SaveUserColor
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
Definition: TGFrame.cxx:2453
TGClient::GetPicture
const TGPicture * GetPicture(const char *name)
Get picture from the picture pool.
Definition: TGClient.cxx:291
Window_t
Handle_t Window_t
Window handle.
Definition: GuiTypes.h:29
TGVSplitter::fFrame
TGFrame * fFrame
frame that should be resized
Definition: TGSplitter.h:65
y
Double_t y[n]
Definition: legend1.C:17
ULong_t
unsigned long ULong_t
Definition: RtypesCore.h:55
TGVFileSplitter::HandleMotion
virtual Bool_t HandleMotion(Event_t *event)
Handle mouse motion event in vertical splitter.
Definition: TGSplitter.cxx:480
TGVSplitter::fMin
Int_t fMin
min x position frame can be resized to
Definition: TGSplitter.h:63
TGFrame::GetBckgndGC
static const TGGC & GetBckgndGC()
Get background color graphics context.
Definition: TGFrame.cxx:775
TGSplitter
A splitter allows the frames left and right or above and below of it to be resized.
Definition: TGSplitter.h:19
unsigned int
kHorizontalFrame
@ kHorizontalFrame
Definition: GuiTypes.h:382
TGVSplitter::fFrameHeight
UInt_t fFrameHeight
height of frame to be resized
Definition: TGSplitter.h:62
TGWindow::GetParent
const TGWindow * GetParent() const
Definition: TGWindow.h:76
TGHSplitter
Definition: TGSplitter.h:90
TGHSplitter::fFrameHeight
UInt_t fFrameHeight
height of frame to be resized
Definition: TGSplitter.h:99
TGHSplitter::SetFrame
virtual void SetFrame(TGFrame *frame, Bool_t above)
Set frame to be resized.
Definition: TGSplitter.cxx:342
TGSplitter::fDragging
Bool_t fDragging
true if in dragging mode
Definition: TGSplitter.h:23
TGVSplitter::fLeft
Bool_t fLeft
true if frame is on the left of splitter
Definition: TGSplitter.h:66
TGVSplitter::HandleCrossing
virtual Bool_t HandleCrossing(Event_t *event)
Handle mouse motion event in vertical splitter.
Definition: TGSplitter.cxx:238
TGObject::fClient
TGClient * fClient
Connection to display server.
Definition: TGObject.h:27
TGSplitter.h
TGVFileSplitter::HandleDoubleClick
virtual Bool_t HandleDoubleClick(Event_t *)
Handle double click mouse event in splitter.
Definition: TGSplitter.cxx:574
TGVSplitter::HandleButton
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event in vertical splitter.
Definition: TGSplitter.cxx:155
Event_t
Event structure.
Definition: GuiTypes.h:174
TGHSplitter::fStartY
Int_t fStartY
y position when dragging starts
Definition: TGSplitter.h:97
TGHSplitter::HandleCrossing
virtual Bool_t HandleCrossing(Event_t *event)
Handle mouse motion event in horizontal splitter.
Definition: TGSplitter.cxx:437
TGFrame::fHeight
UInt_t fHeight
frame height
Definition: TGFrame.h:88
TGFrame::fBackground
Pixel_t fBackground
frame background color
Definition: TGFrame.h:95
kEnterWindowMask
const Mask_t kEnterWindowMask
Definition: GuiTypes.h:167
TGWindow::fEditDisabled
UInt_t fEditDisabled
flags used for "guibuilding"
Definition: TGWindow.h:32
TGVSplitter
Definition: TGSplitter.h:53
TGVFileSplitter::LayoutHeader
void LayoutHeader(TGFrame *f)
Emit LayoutFeader() signal.
Definition: TGSplitter.cxx:534
TGVSplitter::GetLeft
Bool_t GetLeft() const
Definition: TGSplitter.h:78
Class
void Class()
Definition: Class.C:29
TGCompositeFrame
The base class for composite widgets (menu bars, list boxes, etc.).
Definition: TGFrame.h:287
TGHSplitter::HandleButton
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event in horizontal splitter.
Definition: TGSplitter.cxx:354
TGPicture::GetHeight
UInt_t GetHeight() const
Definition: TGPicture.h:53
TGHSplitter::HandleMotion
virtual Bool_t HandleMotion(Event_t *event)
Handle mouse motion event in horizontal splitter.
Definition: TGSplitter.cxx:401
splitter
REAL splitter
Definition: triangle.c:617
TGCompositeFrame::Layout
virtual void Layout()
Layout the elements of the composite frame.
Definition: TGFrame.cxx:1257
TGSplitter::Moved
void Moved(Int_t delta)
Emit Moved signal.
Definition: TGSplitter.cxx:61
TGVSplitter::HandleMotion
virtual Bool_t HandleMotion(Event_t *event)
Handle mouse motion event in vertical splitter.
Definition: TGSplitter.cxx:202
TGWindow::fParent
const TGWindow * fParent
Parent window.
Definition: TGWindow.h:28
TGVFileSplitter::TGVFileSplitter
TGVFileSplitter(const TGVFileSplitter &)=delete
TGHSplitter::GetFrame
const TGFrame * GetFrame() const
Definition: TGSplitter.h:114
TQObject::Emit
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
Definition: TQObject.h:164
TGHSplitter::SavePrimitive
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a splitter widget as a C++ statement(s) on output stream out.
Definition: TGSplitter.cxx:616
kChildFrame
@ kChildFrame
Definition: GuiTypes.h:379
int