Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
16A splitter allows the frames left and right or above and below of
17it to be resized. The frame to be resized must have the kFixedWidth
18or 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, Pixel_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, Pixel_t back) : TGSplitter(p, w, h, options, back)
71{
73 fSplitterPic = fClient->GetPicture("splitterv.xpm");
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
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
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;
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 {
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 {
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, Pixel_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
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;
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 {
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;
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) {
521 } else if ( event->fType == kButtonRelease) {
522 LayoutHeader(0);
525 } else if ( event->fType == kButtonDoubleClick ) {
526 DoubleClicked(this);
527 }
529}
530
531////////////////////////////////////////////////////////////////////////////////
532/// Emit LayoutFeader() signal.
533
535{
536 Emit("LayoutHeader(TGFrame*)", (Longptr_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*)", (Longptr_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
583void TGVSplitter::SavePrimitive(std::ostream &out, Option_t *option /*= ""*/)
584{
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
616void TGHSplitter::SavePrimitive(std::ostream &out, Option_t *option /*= ""*/)
617{
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
649void TGVFileSplitter::SavePrimitive(std::ostream &out, Option_t *option /*= ""*/)
650{
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
@ kButtonRelease
Definition GuiTypes.h:60
@ kButtonPress
Definition GuiTypes.h:60
@ kButtonDoubleClick
Definition GuiTypes.h:64
@ kEnterNotify
Definition GuiTypes.h:61
@ kArrowVer
Definition GuiTypes.h:374
@ kArrowHor
Definition GuiTypes.h:374
const Mask_t kButtonPressMask
Definition GuiTypes.h:161
Handle_t Window_t
Window handle.
Definition GuiTypes.h:29
const Mask_t kAnyModifier
Definition GuiTypes.h:210
const Mask_t kPointerMotionMask
Definition GuiTypes.h:163
@ kChildFrame
Definition GuiTypes.h:379
@ kVerticalFrame
Definition GuiTypes.h:381
@ kFixedWidth
Definition GuiTypes.h:387
@ kHorizontalFrame
Definition GuiTypes.h:382
@ kFixedHeight
Definition GuiTypes.h:389
const Handle_t kNone
Definition GuiTypes.h:88
const Mask_t kLeaveWindowMask
Definition GuiTypes.h:168
const Mask_t kButtonReleaseMask
Definition GuiTypes.h:162
const Mask_t kEnterWindowMask
Definition GuiTypes.h:167
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:40
@ kAnyButton
Definition GuiTypes.h:214
#define f(i)
Definition RSha256.hxx:104
#define h(i)
Definition RSha256.hxx:106
int Int_t
Definition RtypesCore.h:45
long Longptr_t
Definition RtypesCore.h:82
constexpr Bool_t kFALSE
Definition RtypesCore.h:101
constexpr Bool_t kTRUE
Definition RtypesCore.h:100
const char Option_t
Definition RtypesCore.h:66
#define ClassImp(name)
Definition Rtypes.h:377
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Definition TError.cxx:197
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t option
#define gVirtualX
Definition TVirtualX.h:338
const TGWindow * GetDefaultRoot() const
Returns the root (i.e.
Definition TGClient.cxx:234
const TGPicture * GetPicture(const char *name)
Get picture from the picture pool.
Definition TGClient.cxx:289
void FreePicture(const TGPicture *pic)
Free picture resource.
Definition TGClient.cxx:308
The base class for composite widgets (menu bars, list boxes, etc.).
Definition TGFrame.h:287
static TClass * Class()
A subclasses of TGWindow, and is used as base class for some simple widgets (buttons,...
Definition TGFrame.h:80
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
Definition TGFrame.cxx:339
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
Definition TGFrame.cxx:605
UInt_t fHeight
frame height
Definition TGFrame.h:88
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition TGFrame.cxx:683
virtual UInt_t GetOptions() const
Definition TGFrame.h:197
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
Definition TGFrame.cxx:2506
UInt_t fWidth
frame width
Definition TGFrame.h:87
UInt_t GetHeight() const
Definition TGFrame.h:225
UInt_t GetWidth() const
Definition TGFrame.h:224
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
Definition TGFrame.cxx:2479
Pixel_t fBackground
frame background color
Definition TGFrame.h:95
static const TGGC & GetBckgndGC()
Get background color graphics context.
Definition TGFrame.cxx:775
Bool_t HandleButton(Event_t *event) override
Handle mouse button event in horizontal splitter.
TGHSplitter(const TGHSplitter &)=delete
const TGFrame * GetFrame() const
Definition TGSplitter.h:114
UInt_t fFrameHeight
height of frame to be resized
Definition TGSplitter.h:99
void DrawBorder() override
Draw horizontal splitter.
Bool_t HandleCrossing(Event_t *event) override
Handle mouse motion event in horizontal splitter.
TGFrame * fFrame
frame that should be resized
Definition TGSplitter.h:102
Bool_t GetAbove() const
Definition TGSplitter.h:115
void SetFrame(TGFrame *frame, Bool_t above) override
Set frame to be resized.
Bool_t fAbove
true if frame is above the splitter
Definition TGSplitter.h:103
Int_t fStartY
y position when dragging starts
Definition TGSplitter.h:97
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a splitter widget as a C++ statement(s) on output stream out.
Int_t fMin
min y position frame can be resized to
Definition TGSplitter.h:100
Bool_t HandleMotion(Event_t *event) override
Handle mouse motion event in horizontal splitter.
virtual ~TGHSplitter()
Delete horizontal splitter widget.
UInt_t fFrameWidth
width of frame to be resized
Definition TGSplitter.h:98
Int_t fMax
max y position frame can be resized to
Definition TGSplitter.h:101
TGClient * fClient
Connection to display server.
Definition TGObject.h:25
Handle_t GetId() const
Definition TGObject.h:41
Handle_t fId
X11/Win32 Window identifier.
Definition TGObject.h:24
void Draw(Option_t *="") override
Default Draw method for all objects.
Definition TGPicture.h:46
UInt_t GetHeight() const
Definition TGPicture.h:53
UInt_t GetWidth() const
Definition TGPicture.h:52
A splitter allows the frames left and right or above and below of it to be resized.
Definition TGSplitter.h:19
TGSplitter(const TGSplitter &)=delete
Cursor_t fSplitCursor
split cursor
Definition TGSplitter.h:22
void DragStarted()
Emit DragStarted signal.
void Moved(Int_t delta)
Emit Moved signal.
const TGPicture * fSplitterPic
picture to draw splitter
Definition TGSplitter.h:25
Bool_t fDragging
true if in dragging mode
Definition TGSplitter.h:23
Bool_t fExternalHandler
true when splitter movement is handled externally
Definition TGSplitter.h:24
void ButtonPressed()
Emit ButtonPressed() signal.
virtual ~TGVFileSplitter()
if (fSplitterPic) fClient->FreePicture(fSplitterPic);
void DoubleClicked(TGVFileSplitter *frame)
Emit DoubleClicked() signal.
void LayoutListView()
Emit LayoutListView() signal.
TGVFileSplitter(const TGVFileSplitter &)=delete
void ButtonReleased()
Emit ButtonReleased() signal.
Bool_t HandleMotion(Event_t *event) override
Handle mouse motion event in vertical splitter.
Bool_t HandleButton(Event_t *event) override
Handle mouse button event in vertical splitter.
void LayoutHeader(TGFrame *f)
Emit LayoutFeader() signal.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a splitter widget as a C++ statement(s) on output stream out.
Bool_t HandleDoubleClick(Event_t *) override
Handle double click mouse event in splitter.
Int_t fMin
min x position frame can be resized to
Definition TGSplitter.h:63
UInt_t fFrameHeight
height of frame to be resized
Definition TGSplitter.h:62
TGVSplitter(const TGVSplitter &)=delete
virtual ~TGVSplitter()
Delete vertical splitter widget.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a splitter widget as a C++ statement(s) on output stream out.
const TGFrame * GetFrame() const
Definition TGSplitter.h:77
void DrawBorder() override
Draw vertical splitter.
Bool_t HandleButton(Event_t *event) override
Handle mouse button event in vertical splitter.
Bool_t GetLeft() const
Definition TGSplitter.h:78
TGFrame * fFrame
frame that should be resized
Definition TGSplitter.h:65
Int_t fMax
max x position frame can be resized to
Definition TGSplitter.h:64
UInt_t fFrameWidth
width of frame to be resized
Definition TGSplitter.h:61
Int_t fStartX
x position when dragging starts
Definition TGSplitter.h:60
Bool_t fLeft
true if frame is on the left of splitter
Definition TGSplitter.h:66
Bool_t HandleMotion(Event_t *event) override
Handle mouse motion event in vertical splitter.
Bool_t HandleCrossing(Event_t *event) override
Handle mouse motion event in vertical splitter.
void SetFrame(TGFrame *frame, Bool_t left) override
Set frame to be resized.
ROOT GUI Window base class.
Definition TGWindow.h:23
const TGWindow * fParent
Parent window.
Definition TGWindow.h:28
const TGWindow * GetParent() const
Definition TGWindow.h:83
const char * GetName() const override
Return unique name, used in SavePrimitive methods.
Definition TGWindow.cxx:336
UInt_t fEditDisabled
flags used for "guibuilding"
Definition TGWindow.h:32
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
Definition TObject.cxx:525
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
Definition TQObject.h:164
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17
Event structure.
Definition GuiTypes.h:174
double splitter
Definition triangle.c:617