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