40 fUseSplitters (
kTRUE),
55 fUseSplitters (
kTRUE),
116 if (
el->fState &&
el->fSplitFE) {
119 if (
el->fSplitFE->fState == 0 ) {
120 el->fSplitFE->fState = 1;
121 el->fSplitFE->fFrame->MapWindow();
125 if (
el->fSplitFE->fState) {
126 el->fSplitFE->fState = 0;
127 el->fSplitFE->fFrame->UnmapWindow();
192 el->fFrame->Resize(
GetWidth(),
el->fFrame->GetHeight());
231 s->
Connect(
"Moved(Int_t)",
"TGPack",
this,
"HandleSplitterResize(Int_t)");
232 s->
Connect(
"DragStarted()",
"TGPack",
this,
"HandleSplitterStart()");
335 printf(
"--------------------------------------------------------------\n");
340 printf(
"idx[%d] visible(%d) %s \n",cnt,
el->fState,
el->fFrame->GetName());
343 printf(
"--------------------------------------------------------------\n");
356 el->fFrame->MapWindow();
360 el->fSplitFE->fFrame->MapWindow();
361 el->fSplitFE->fState = 1;
384 el->fFrame->UnmapWindow();
388 el->fSplitFE->fFrame->UnmapWindow();
389 el->fSplitFE->fState = 0;
419 if (
el->fFrame &&
el->fState) {
420 el->fFrame->MapWindow();
421 el->fFrame->MapSubwindows();
469 el->fFrame->Layout();
541 if (
l0 - 1 < -delta) {
546 if (
l1 - 1 < delta) {
584 while ( ! list.IsEmpty()) {
Handle_t Window_t
Window handle.
ULong_t Pixel_t
Pixel value.
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
R__EXTERN void * gTQSender
virtual Bool_t IsEmpty() const
const TGWindow * GetDefaultRoot() const
Returns the root (i.e.
The base class for composite widgets (menu bars, list boxes, etc.).
virtual TGFrameElement * FindFrameElement(TGFrame *f) const
Find frame-element holding frame f.
Int_t fMustCleanup
cleanup mode (see EFrameCleanup)
Bool_t fMapSubwindows
kTRUE - map subwindows
TList * fList
container of frame elements
void SetCleanup(Int_t mode=kLocalCleanup) override
Turn on automatic cleanup of child frames in dtor.
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
static TGLayoutHints * fgDefaultHints
A subclasses of TGWindow, and is used as base class for some simple widgets (buttons,...
UInt_t fHeight
frame height
void MapWindow() override
map window
void Move(Int_t x, Int_t y) override
Move frame.
virtual void SetCleanup(Int_t=kLocalCleanup)
This class describes layout hints used by the layout classes.
TGClient * fClient
Connection to display server.
Stack of frames in horizontal (default) or vertical stack.
void MapSubwindows() override
Virtual method of TGcompositeFrame.
void RemoveFrameInternal(TGFrame *f)
Remove frame f.
void ResizeExistingFrames()
Resize (shrink or expand) existing frames by amount in total.
void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0) override
Move and resize the pack.
Int_t GetAvailableLength() const
Return length of entire frame without splitters.
void Dump() const override
Print sub frame info.
virtual void DeleteFrame(TGFrame *f)
Remove frame f and refit existing frames to pack size.
Int_t GetFrameLength(const TGFrame *f) const
virtual void AddFrameWithWeight(TGFrame *f, TGLayoutHints *l, Float_t w)
Add frame f at the end with given weight.
void RefitFramesToPack()
Refit existing frames to pack size.
void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr) override
Add frame f at the end with default weight.
~TGPack() override
Destructor.
void EqualizeFrames()
Refit existing frames so that their lengths are equal.
void HandleSplitterStart()
Called when splitter drag starts.
Float_t fWeightSum
total sum of sub frame weights
void RemoveFrame(TGFrame *f) override
Remove frame f and refit existing frames to pack size.
TGPack(const TGPack &)=delete
void AddFrameInternal(TGFrame *f, TGLayoutHints *l=nullptr, Float_t weight=1)
Add frame f at the end.
void SetVertical(Bool_t x)
Sets the vertical flag and reformats the back to new stacking direction.
void HandleSplitterResize(Int_t delta)
Handle resize events from splitters.
void SetFrameLength(TGFrame *f, Int_t len)
Set pack-wise length of frame f.
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the pack.
void SetFramePosition(TGFrame *f, Int_t pos)
Set pack-wise position of frame f.
void CheckSplitterVisibility()
Check if splitter of first visible frame is hidden.
Int_t fNVisible
number of visible frames
void Layout() override
Reposition the frames so that they fit correctly.
void ShowFrame(TGFrame *f) override
Show sub frame.
void HideFrame(TGFrame *f) override
Hide sub frame.
void FindFrames(TGFrame *splitter, TGFrameElementPack *&f0, TGFrameElementPack *&f1) const
Find frames around splitter and return them f0 (previous) and f1 (next).
A splitter allows the frames left and right or above and below of it to be resized.
ROOT GUI Window base class.
virtual void Resize(UInt_t w, UInt_t h)
Resize the window.
void Add(TObject *obj) override
TObject * At(Int_t idx) const override
Returns the object at position idx. Returns 0 if idx is out of range.
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot.
Int_t Nint(T x)
Round to nearest integer. Rounds half integers to the nearest even integer.
T1 Sign(T1 a, T2 b)
Returns a value with the magnitude of a and the sign of b.