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
30
31
32////////////////////////////////////////////////////////////////////////////////
33/// Create a splitter.
34
36 UInt_t options, Pixel_t back) :
37 TGFrame(p, w, h, options, back),
38 fDragging (kFALSE),
39 fExternalHandler (kFALSE),
40 fSplitterPic (0)
41{
44}
45
46////////////////////////////////////////////////////////////////////////////////
47/// Emit DragStarted signal.
48
50{
51 Emit("DragStarted()");
52}
53
54////////////////////////////////////////////////////////////////////////////////
55/// Emit Moved signal.
56
58{
59 Emit("Moved(Int_t)", delta);
60}
61
62////////////////////////////////////////////////////////////////////////////////
63/// Create a vertical splitter.
64
66 UInt_t options, Pixel_t back) : TGSplitter(p, w, h, options, back)
67{
69 fSplitterPic = fClient->GetPicture("splitterv.xpm");
71 fFrameWidth = w;
72 fLeft = kTRUE;
73 fMax = fMin = 0;
74 fStartX = 0;
75 fFrame = 0;
76
77 if (!fSplitterPic)
78 Error("TGVSplitter", "splitterv.xpm not found");
79
80 if (p && !p->InheritsFrom(TGCompositeFrame::Class())) {
81 Error("TGVSplitter", "parent must inherit from a TGCompositeFrame");
82 return;
83 }
84 if (p && !(((TGCompositeFrame*)p)->GetOptions() & kHorizontalFrame)) {
85 Error("TGVSplitter", "parent must have a horizontal layout manager");
86 return;
87 }
88
89 fSplitCursor = gVirtualX->CreateCursor(kArrowHor);
90
94
96}
97
98////////////////////////////////////////////////////////////////////////////////
99/// Create a vertical splitter.
100
102 TGSplitter(p, w, h, kChildFrame, GetDefaultFrameBackground())
103{
105
107 fSplitterPic = fClient->GetPicture("splitterv.xpm");
108
109 if (!fSplitterPic)
110 Error("TGVSplitter", "splitterv.xpm not found");
111
112 fSplitCursor = gVirtualX->CreateCursor(kArrowHor);
113 fFrame = 0;
114 fFrameHeight = h;
115 fFrameWidth = w;
116 fLeft = kTRUE;
117 fMax = fMin = 0;
118 fStartX = 0;
119
120 gVirtualX->GrabButton(fId, kAnyButton, kAnyModifier,
123
125}
126
127////////////////////////////////////////////////////////////////////////////////
128/// Delete vertical splitter widget.
129
134
135////////////////////////////////////////////////////////////////////////////////
136/// Set frame to be resized. If frame is on the left of the splitter
137/// set left to true.
138
140{
141 fFrame = frame;
142 fLeft = left;
143
145 Error("SetFrame", "resize frame must have kFixedWidth option set");
146}
147
148////////////////////////////////////////////////////////////////////////////////
149/// Handle mouse button event in vertical splitter.
150
152{
153 if (fSplitCursor == kNone) return kTRUE;
154
155 if (!fExternalHandler && !fFrame) {
156 Error("HandleButton", "frame to be resized not set");
157 return kTRUE;
158 }
159
160 if (event->fType == kButtonPress) {
161 fStartX = event->fXRoot;
163
164 if (fExternalHandler) {
165 fMin = 0;
166 fMax = 99999;
167 DragStarted();
168 } else {
169 Int_t x, y;
170 gVirtualX->GetWindowSize(fFrame->GetId(), x, y, fFrameWidth, fFrameHeight);
171
172 // get fMin and fMax in root coordinates
174 UInt_t w, h;
176 gVirtualX->GetWindowSize(fParent->GetId(), x, y, w, h);
177 gVirtualX->TranslateCoordinates(fParent->GetParent()->GetId(),
178 fClient->GetDefaultRoot()->GetId(),
179 x, y, xroot, yroot, wdum);
180 fMin = xroot;
181 fMax = xroot + w - 2;
182 }
183
184 // last argument kFALSE forces all specified events to this window
187 kTRUE, kFALSE);
188 } else {
190 gVirtualX->GrabPointer(0, 0, 0, 0, kFALSE); // ungrab pointer
191 }
192 return kTRUE;
193}
194
195////////////////////////////////////////////////////////////////////////////////
196/// Handle mouse motion event in vertical splitter.
197
199{
200 if (fDragging) {
201 Int_t xr = event->fXRoot;
202 if (xr > fMax) xr = fMax;
203 if (xr < fMin) xr = fMin;
204 Int_t delta = xr - fStartX;
205 if (fExternalHandler) {
206 if (delta != 0) {
207 Moved(delta);
208 fStartX = xr;
209 }
210 } else {
212 if (fLeft)
213 w += delta;
214 else
215 w -= delta;
216 if (w < 0) w = 0;
217 fStartX = xr;
218
219 if (delta != 0) {
220 fFrameWidth = w;
222
224 p->Layout();
225 }
226 }
227 }
228 return kTRUE;
229}
230
231////////////////////////////////////////////////////////////////////////////////
232/// Handle mouse motion event in vertical splitter.
233
235{
236 if (event->fType == kEnterNotify)
237 gVirtualX->SetCursor(fId, fSplitCursor);
238 else
239 gVirtualX->SetCursor(fId, kNone);
240
241 return kTRUE;
242}
243
244////////////////////////////////////////////////////////////////////////////////
245/// Draw vertical splitter.
246
248{
249 if (fSplitterPic) {
250 Int_t posx = (fWidth/2)-(fSplitterPic->GetWidth()/2);
251 Int_t posy = (fHeight/2)-(fSplitterPic->GetHeight()/2);
252 fSplitterPic->Draw(fId, GetBckgndGC()(), posx, posy);
253 }
254}
255
256
257////////////////////////////////////////////////////////////////////////////////
258/// Create a horizontal splitter.
259
261 UInt_t options, Pixel_t back) : TGSplitter(p, w, h, options, back)
262{
264 fSplitterPic = 0;
265 fSplitCursor = 0;
266 fFrame = 0;
267 fFrameHeight = h;
268 fFrameWidth = w;
269 fAbove = kTRUE;
270 fMax = fMin = 0;
271 fStartY = 0;
272
273 if (p && !p->InheritsFrom(TGCompositeFrame::Class())) {
274 Error("TGHSplitter", "parent must inherit from a TGCompositeFrame");
275 return;
276 }
277 if (p && !(((TGCompositeFrame*)p)->GetOptions() & kVerticalFrame)) {
278 Error("TGHSplitter", "parent must have a vertical layout manager");
279 return;
280 }
281
282 fSplitterPic = fClient->GetPicture("splitterh.xpm");
283
284 if (!fSplitterPic)
285 Error("TGHSplitter", "splitterh.xpm not found");
286
287 fSplitCursor = gVirtualX->CreateCursor(kArrowVer);
288
289 gVirtualX->GrabButton(fId, kAnyButton, kAnyModifier,
292
294}
295
296////////////////////////////////////////////////////////////////////////////////
297/// Create a horizontal splitter.
298
300 TGSplitter(p, w, h, kChildFrame, GetDefaultFrameBackground())
301{
303
305
306 fSplitterPic = fClient->GetPicture("splitterh.xpm");
307
308 if (!fSplitterPic)
309 Error("TGHSplitter", "splitterh.xpm not found");
310
311 fSplitCursor = gVirtualX->CreateCursor(kArrowVer);
312 fFrame = 0;
313 fFrameHeight = h;
314 fFrameWidth = w;
315 fAbove = kTRUE;
316 fMax = fMin = 0;
317 fStartY = 0;
318
319 gVirtualX->GrabButton(fId, kAnyButton, kAnyModifier,
322
324}
325
326////////////////////////////////////////////////////////////////////////////////
327/// Delete horizontal splitter widget.
328
333
334////////////////////////////////////////////////////////////////////////////////
335/// Set frame to be resized. If frame is above the splitter
336/// set above to true.
337
339{
340 fFrame = frame;
341 fAbove = above;
342
344 Error("SetFrame", "resize frame must have kFixedHeight option set");
345}
346
347////////////////////////////////////////////////////////////////////////////////
348/// Handle mouse button event in horizontal splitter.
349
351{
352 if (fSplitCursor == kNone) return kTRUE;
353
354 if (!fExternalHandler && !fFrame) {
355 Error("HandleButton", "frame to be resized not set");
356 return kTRUE;
357 }
358
359 if (event->fType == kButtonPress) {
360 fStartY = event->fYRoot;
362
363 if (fExternalHandler) {
364 fMin = 0;
365 fMax = 99999;
366 DragStarted();
367 } else {
368 Int_t x, y;
369 gVirtualX->GetWindowSize(fFrame->GetId(), x, y, fFrameWidth, fFrameHeight);
370
371 // get fMin and fMax in root coordinates
373 UInt_t w, h;
375 gVirtualX->GetWindowSize(fParent->GetId(), x, y, w, h);
376 gVirtualX->TranslateCoordinates(fParent->GetParent()->GetId(),
377 fClient->GetDefaultRoot()->GetId(),
378 x, y, xroot, yroot, wdum);
379 fMin = yroot;
380 fMax = yroot + h - 2;
381 }
382
383 // last argument kFALSE forces all specified events to this window
386 kTRUE, kFALSE);
387 } else {
389 gVirtualX->GrabPointer(0, 0, 0, 0, kFALSE); // ungrab pointer
390 }
391 return kTRUE;
392}
393
394////////////////////////////////////////////////////////////////////////////////
395/// Handle mouse motion event in horizontal splitter.
396
398{
399 if (fDragging) {
400 Int_t yr = event->fYRoot;
401 if (yr > fMax) yr = fMax;
402 if (yr < fMin) yr = fMin;
403 Int_t delta = yr - fStartY;
404 if (fExternalHandler) {
405 if (delta != 0) {
406 Moved(delta);
407 fStartY = yr;
408 }
409 } else {
411 if (fAbove)
412 h += delta;
413 else
414 h -= delta;
415 if (h < 0) h = 0;
416 fStartY = yr;
417
418 if (delta != 0) {
419 fFrameHeight = h;
421
423 p->Layout();
424 }
425 }
426 }
427 return kTRUE;
428}
429
430////////////////////////////////////////////////////////////////////////////////
431/// Handle mouse motion event in horizontal splitter.
432
434{
435 if (event->fType == kEnterNotify)
436 gVirtualX->SetCursor(fId, fSplitCursor);
437 else
438 gVirtualX->SetCursor(fId, kNone);
439
440 return kTRUE;
441}
442
443////////////////////////////////////////////////////////////////////////////////
444/// Draw horizontal splitter.
445
447{
448 if (fSplitterPic) {
449 Int_t posx = (fWidth/2)-(fSplitterPic->GetWidth()/2);
450 Int_t posy = (fHeight/2)-(fSplitterPic->GetHeight()/2);
451 fSplitterPic->Draw(fId, GetBckgndGC()(), posx, posy);
452 }
453}
454
455////////////////////////////////////////////////////////////////////////////////
456/// fSplitterPic = fClient->GetPicture("filesplitterv.xpm");
457
459 UInt_t options, Pixel_t back):
460 TGVSplitter(p, w, h, options, back)
461{
462// if (!fSplitterPic)
463// Error("TGVFileSplitter", "filesplitterv.xpm not found");
464}
465
466////////////////////////////////////////////////////////////////////////////////
467/// if (fSplitterPic) fClient->FreePicture(fSplitterPic);
468
472
473////////////////////////////////////////////////////////////////////////////////
474/// Handle mouse motion event in vertical splitter.
475
477{
478 fMin = 30;
479
480 if (fDragging) {
481 Int_t xr = event->fXRoot;
482 if (xr > fMax) xr = fMax;
483 if (xr < fMin) xr = fMin;
484 Int_t delta = xr - fStartX;
486 if (fLeft)
487 w += delta;
488 else
489 w -= delta;
490
491 if (w < 0) w = 0;
492 fStartX = xr;
493
494 if (delta != 0) {
495 delta = w - fFrameWidth;
496 fFrameWidth = w;
497
499 p->Resize( p->GetWidth() + delta, p->GetHeight() );
500
502
503 p->Layout();
505 }
506 }
507 return kTRUE;
508}
509
510////////////////////////////////////////////////////////////////////////////////
511/// Handle mouse button event in vertical splitter.
512
514{
515 if ( event->fType == kButtonPress) {
517 } else if ( event->fType == kButtonRelease) {
518 LayoutHeader(0);
521 } else if ( event->fType == kButtonDoubleClick ) {
522 DoubleClicked(this);
523 }
524 return TGVSplitter::HandleButton(event);
525}
526
527////////////////////////////////////////////////////////////////////////////////
528/// Emit LayoutFeader() signal.
529
531{
532 Emit("LayoutHeader(TGFrame*)", (Longptr_t)f);
533}
534
535////////////////////////////////////////////////////////////////////////////////
536/// Emit LayoutListView() signal.
537
539{
540 Emit("LayoutListView()");
541}
542
543////////////////////////////////////////////////////////////////////////////////
544/// Emit ButtonPressed() signal.
545
547{
548 Emit("ButtonPressed()");
549}
550
551////////////////////////////////////////////////////////////////////////////////
552/// Emit ButtonReleased() signal.
553
555{
556 Emit("ButtonReleased()");
557}
558
559////////////////////////////////////////////////////////////////////////////////
560/// Emit DoubleClicked() signal.
561
563{
564 Emit("DoubleClicked(TGVFileSplitter*)", (Longptr_t) splitter);
565}
566
567////////////////////////////////////////////////////////////////////////////////
568/// Handle double click mouse event in splitter.
569
575
576////////////////////////////////////////////////////////////////////////////////
577/// Save a splitter widget as a C++ statement(s) on output stream out.
578
579void TGVSplitter::SavePrimitive(std::ostream &out, Option_t *option /*= ""*/)
580{
581 // save options and color if not default
582 auto extra_args = SaveCtorArgs(out);
583
584 out << " TGVSplitter *" << GetName() << " = new TGVSplitter(" << fParent->GetName() << ", " << GetWidth() << ", "
585 << GetHeight() << extra_args << ");\n";
586
587 if (option && strstr(option, "keep_names"))
588 out << " " << GetName() << "->SetName(\"" << GetName() << "\");\n";
589 // TGVSplitter->SetFrame( theframe ) can only be saved here
590 // if fFrame is the frame on the left (since the frame on the
591 // right will only be saved afterwards)... The other case is
592 // handled in TGCompositeFrame::SavePrimitiveSubframes()
593 if (GetLeft())
594 out << " " << GetName() << "->SetFrame(" << GetFrame()->GetName() << ", kTRUE);\n";
595}
596
597////////////////////////////////////////////////////////////////////////////////
598/// Save a splitter widget as a C++ statement(s) on output stream out.
599
600void TGHSplitter::SavePrimitive(std::ostream &out, Option_t *option /*= ""*/)
601{
602 // save options and color if not default
603 auto extra_args = SaveCtorArgs(out);
604
605 out << " TGHSplitter *" << GetName() << " = new TGHSplitter(" << fParent->GetName() << ", " << GetWidth() << ", "
606 << GetHeight() << extra_args << ");\n";
607
608 if (option && strstr(option, "keep_names"))
609 out << " " << GetName() << "->SetName(\"" << GetName() << "\");\n";
610 // TGHSplitter->SetFrame( theframe ) can only be saved here
611 // if fFrame is the frame above (since the frame below will
612 // only be saved afterwards)... The other case is handled in
613 // TGCompositeFrame::SavePrimitiveSubframes()
614 if (GetAbove())
615 out << " " << GetName() << "->SetFrame(" << GetFrame()->GetName() << ", kTRUE);\n";
616}
617
618////////////////////////////////////////////////////////////////////////////////
619/// Save a splitter widget as a C++ statement(s) on output stream out.
620
621void TGVFileSplitter::SavePrimitive(std::ostream &out, Option_t *option /*= ""*/)
622{
623 auto extra_args = SaveCtorArgs(out);
624
625 out << " TGVFileSplitter *" << GetName() << " = new TGVFileSplitter(" << fParent->GetName() << "," << GetWidth()
626 << "," << GetHeight() << extra_args << ");\n";
627
628 if (option && strstr(option, "keep_names"))
629 out << " " << GetName() << "->SetName(\"" << GetName() << "\");\n";
630
631 out << " " << GetName() << "->SetFrame(" << GetFrame()->GetName() << ", " << (GetLeft() ? "kTRUE" : "kFALSE")
632 << ");\n";
633}
@ 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
Signed integer 4 bytes (int)
Definition RtypesCore.h:59
long Longptr_t
Integer large enough to hold a pointer (platform-dependent)
Definition RtypesCore.h:89
constexpr Bool_t kFALSE
Definition RtypesCore.h:108
constexpr Bool_t kTRUE
Definition RtypesCore.h:107
const char Option_t
Option string (const char)
Definition RtypesCore.h:80
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Definition TError.cxx:208
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t option
#define gVirtualX
Definition TVirtualX.h:337
const TGWindow * GetDefaultRoot() const
Returns the root (i.e.
Definition TGClient.cxx:233
const TGPicture * GetPicture(const char *name)
Get picture from the picture pool.
Definition TGClient.cxx:288
void FreePicture(const TGPicture *pic)
Free picture resource.
Definition TGClient.cxx:316
The base class for composite widgets (menu bars, list boxes, etc.).
Definition TGFrame.h:289
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:331
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
Definition TGFrame.cxx:597
UInt_t fHeight
frame height
Definition TGFrame.h:88
virtual UInt_t GetOptions() const
Definition TGFrame.h:199
UInt_t fWidth
frame width
Definition TGFrame.h:87
UInt_t GetHeight() const
Definition TGFrame.h:227
TString SaveCtorArgs(std::ostream &out, UInt_t dflt_options=kChildFrame, Bool_t check_white_pixel=kFALSE)
Return options and custom color as constructor args Used in the SavePrimitive methods,...
Definition TGFrame.cxx:2493
UInt_t GetWidth() const
Definition TGFrame.h:226
static const TGGC & GetBckgndGC()
Get background color graphics context.
Definition TGFrame.cxx:767
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
~TGHSplitter() override
Delete horizontal splitter widget.
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.
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
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.
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.
~TGVFileSplitter() override
if (fSplitterPic) fClient->FreePicture(fSplitterPic);
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
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
~TGVSplitter() override
Delete vertical splitter widget.
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:334
UInt_t fEditDisabled
flags used for "guibuilding"
Definition TGWindow.h:32
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
EGEventType fType
of event (see EGEventType)
Definition GuiTypes.h:175