59 fRectGC.SetForeground(0x99ff99);
75 if (
f)
Resize(
f->GetWidth()/10,
f->GetHeight()/10);
134 Int_t px = 0, py = 0;
140 if (
rect->Contains(event->
fX, event->
fY)) {
143 gClient->GetDefaultRoot()->GetId(),
144 event->
fX, event->
fY, px, py, wtarget);
165 if (
rect->Contains(event->
fX, event->
fY)) {
167 if (
rect != oldrect) {
170 oldrect->fY, oldrect->fW, oldrect->fH);
172 oldrect->fW, oldrect->fH);
185 oldrect->fY, oldrect->fW, oldrect->fH);
187 oldrect->fW, oldrect->fH);
244 fClient->GetResourcePool()->GetGrabCursor(),
375 fUndocked->Connect(
"CloseWindow()",
"TGSplitFrame",
this,
"SwallowBack()");
437 fSplitter->Connect(
"ProcessedEvent(Event_t*)",
"TGSplitFrame",
this,
438 "OnSplitterClicked(Event_t*)");
466 fSplitter->Connect(
"ProcessedEvent(Event_t*)",
"TGSplitFrame",
this,
467 "OnSplitterClicked(Event_t*)");
481 Int_t px = 0, py = 0;
482 Int_t rx = 0, ry = 0;
483 Int_t cx, cy, cw, ch;
487 if (parent && parent->
fSecond ==
this) {
494 fX,
fY, px, py, wtarget);
503 fFirst->MapToSPlitTool(top);
513 Int_t px = 0, py = 0;
520 gClient->GetDefaultRoot()->GetId(),
521 event->
fX, event->
fY, px, py, wtarget);
540 "In which side the actual frame has to be kept (top / bottom)",
542 if ( strcmp(side,
"") == 0 )
557 frame->UnmapWindow();
558 frame->ReparentWindow(
gClient->GetDefaultRoot());
561 if (!strcmp(side,
"top")) {
565 else if (!strcmp(side,
"bottom")) {
588 "In which side the actual frame has to be kept (left / right)",
590 if ( strcmp(side,
"") == 0 )
605 frame->UnmapWindow();
606 frame->ReparentWindow(
gClient->GetDefaultRoot());
609 if (!strcmp(side,
"left")) {
613 else if (!strcmp(side,
"right")) {
636 if (!el || !el->
fFrame)
return;
638 frame->UnmapWindow();
640 frame->ReparentWindow(
this);
666 dest->RemoveFrame(prev);
671 frame->UnmapWindow();
675 frame->ReparentWindow(
dest);
679 frame->Resize(
dest->GetDefaultSize());
680 dest->MapSubwindows();
702 if ((source != prev) && (source !=
dest))
722 if (!strcmp(which,
"first")) {
726 else if (!strcmp(which,
"second")) {
730 if (!kframe || !dframe)
755 out <<
"\n // splittable frame\n";
756 out <<
" TGSplitFrame *" <<
GetName() <<
" = new TGSplitFrame(" <<
fParent->GetName() <<
"," <<
GetWidth() <<
","
760 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");\n";
768 out <<
" " <<
GetName() <<
"->SetLayoutManager(";
const Mask_t kWAOverrideRedirect
const Mask_t kButtonPressMask
Handle_t Window_t
Window handle.
const Mask_t kWASaveUnder
const Mask_t kPointerMotionMask
const Mask_t kStructureNotifyMask
const Mask_t kButtonReleaseMask
bool Bool_t
Boolean (0=false, 1=true) (bool).
int Int_t
Signed integer 4 bytes (int).
long Longptr_t
Integer large enough to hold a pointer (platform-dependent).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
float Float_t
Float 4 bytes (float).
const char Option_t
Option string (const char).
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t dest
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void w
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 rect
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t attr
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
TClass instances represent classes, structs and namespaces in the ROOT type system.
TList * GetMenuList() const
Return the list of menu items associated with the class.
void MakeCustomMenuList()
Makes a customizable version of the popup menu list, i.e.
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
TGDimension GetDefaultSize() const override
std::cout << fWidth << "x" << fHeight << std::endl;
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
virtual TGLayoutManager * GetLayoutManager() const
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
virtual void SavePrimitiveSubframes(std::ostream &out, Option_t *option="")
Auxiliary protected method used to save subframes.
void MapSubwindows() override
Map all sub windows that are part of the composite frame.
TGCompositeFrame(const TGCompositeFrame &)=delete
void Layout() override
Layout the elements of the composite frame.
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.
void ChangeOptions(UInt_t options) override
Change composite frame options. Options is an OR of the EFrameTypes.
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
static const TGGC & GetBlackGC()
Get black graphics context.
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
TGFrame(const TGFrame &)=delete
UInt_t fHeight
frame height
void ReparentWindow(const TGWindow *p, Int_t x=0, Int_t y=0) override
Reparent window, make p the new parent and position the window at position (x,y) in new parent.
void SetBackgroundColor(Pixel_t back) override
Set background color (override from TGWindow base class).
void MapWindow() override
map window
void Move(Int_t x, Int_t y) override
Move frame.
virtual UInt_t GetOptions() const
void UnmapWindow() override
unmap window
static const TGGC & GetShadowGC()
Get shadow color graphics context.
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,...
static const TGGC & GetBckgndGC()
Get background color graphics context.
This class describes layout hints used by the layout classes.
TGClient * fClient
Connection to display server.
Handle_t fId
X11/Win32 Window identifier.
void MapToSPlitTool(TGSplitFrame *top)
Map this split frame in the small overview tooltip.
Bool_t HandleConfigureNotify(Event_t *) override
Handles resize events for this frame.
virtual void VSplit(UInt_t w=0)
Vertically split the frame.
void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr) override
Add a frame in the split frame using layout hints l.
TGSplitFrame * GetFirst() const
void Cleanup() override
Recursively cleanup child frames.
void OnSplitterClicked(Event_t *event)
Handle mouse click events on the splitter.
void SplitVertical(const char *side="left")
Vertically split the frame, and if it contains a child frame, ask the user where to keep it (left or ...
void SwitchToMain()
Switch the actual embedded frame to the main (first) split frame.
void SetHRatio(Float_t r)
TGSplitFrame * fSecond
Pointer to the second child (if any).
TGSplitTool * GetSplitTool() const
virtual void HSplit(UInt_t h=0)
Horizontally split the frame.
TGSplitFrame * GetTopFrame()
Return the top level split frame.
void SetWRatio(Float_t r)
TGSplitFrame(const TGSplitFrame &)=delete
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a splittable frame as a C++ statement(s) on output stream out.
void SwallowBack()
Swallow back the child frame previously extracted, and close its parent (transient frame).
TGFrame * GetFrame() const
TGSplitTool * fSplitTool
SplitFrame Tool.
void RemoveFrame(TGFrame *f) override
Add a frame in the split frame using layout hints l.
TGTransientFrame * fUndocked
Main frame used when "undocking" frame.
TGSplitter * fSplitter
Pointer to the (H/V) Splitter (if any).
void Docked(TGFrame *frame)
Emit Undocked() signal.
void Undocked(TGFrame *frame)
Emit Undocked() signal.
TGFrame * fFrame
Pointer to the embedded frame (if any).
static void SwitchFrames(TGFrame *frame, TGCompositeFrame *dest, TGFrame *prev)
Switch (exchange) two frames.
void Close()
Close (unmap and remove from the list of frames) the frame contained in this split frame.
TGSplitFrame * fFirst
Pointer to the first child (if any).
Float_t fHRatio
Height ratio between the first child and this.
void SplitHorizontal(const char *side="top")
Horizontally split the frame, and if it contains a child frame, ask the user where to keep it (top or...
Float_t fWRatio
Width ratio between the first child and this.
~TGSplitFrame() override
Destructor. Make cleanup.
TGSplitFrame * GetSecond() const
void ExtractFrame()
Extract the frame contained in this split frame an reparent it in a transient frame.
void SplitVer()
Vertically split the frame, and if it contains a child frame, ask the user where to keep it (left or ...
void UnSplit(const char *which)
Close (unmap and remove from the list of frames) the frame contained in this split frame.
void CloseAndCollapse()
Close (unmap, remove from the list of frames and destroy) the frame contained in this split frame.
void SplitHor()
Horizontally split the frame, and if it contains a child frame, ask the user where to keep it (top or...
Defines transient windows that typically are used for dialogs windows.
virtual const TGWindow * GetMainFrame() const
Returns top level main frame.
const TGWindow * fParent
Parent window.
const TGWindow * GetParent() const
virtual void RaiseWindow()
raise window
const char * GetName() const override
Return unique name, used in SavePrimitive methods.
TObject * At(Int_t idx) const override
Returns the object at position idx. Returns 0 if idx is out of range.
Mother of all ROOT objects.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
TQObject(const TQObject &)=delete
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
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.
EGEventType fType
of event (see EGEventType)
Int_t fY
pointer x, y coordinates in event window
Window_t fWindow
window reported event is relative to
UInt_t fCode
key or button code
Attributes that can be used when creating or changing a window.