49 if (fSelected) frame = fSelected;
55 f->AddFrame(
new TGLabel(
f,
"MDI Frame content"),
98 btn->
Connect(
"Clicked()",
"TGuiBldNameFrame",
this,
"UpdateName()");
100 fListTree->Connect(
"Clicked(TGListTreeItem*, Int_t)",
"TGuiBldNameFrame",
101 this,
"SelectFrameByItem(TGListTreeItem*, Int_t)");
147 else if ((
fListTree->GetFirstItem()->GetUserData()) !=
main) {
188 fBuilder->UpdateStatusBar(
"Variable name already exists.");
193 "Name conflict",
"Variable name already exists.",
197 fBuilder->GetManager()->SelectFrame(frame);
201 fBuilder->UpdateStatusBar(
"Variable name changed.");
225 while (p && (p !=
fClient->GetDefaultRoot()) ) {
357 if (fitem)
return fitem;
int Int_t
Signed integer 4 bytes (int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
A frame containing two scrollbars (a horizontal and a vertical) and a viewport.
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
TGCompositeFrame(const TGCompositeFrame &)=delete
void SetCleanup(Int_t mode=kLocalCleanup) override
Turn on automatic cleanup of child frames in dtor.
void SetEditable(Bool_t on=kTRUE) override
Switch ON/OFF edit mode.
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
TGFrame(const TGFrame &)=delete
void DoRedraw() override
Redraw the frame.
void SetEditable(Bool_t) override
A horizontal 3D line is a line that typically separates a toolbar from the menubar.
A composite frame that layout their children in horizontal way.
This class handles GUI labels.
This class describes layout hints used by the layout classes.
TGListTreeItem * GetFirstChild() const
virtual const char * GetText() const =0
TGListTreeItem * GetNextSibling() const
TGListTreeItem * GetParent() const
virtual void SetOpen(Bool_t o)
virtual void * GetUserData() const =0
A list tree is a widget that can contain a number of items arranged in a tree structure.
TGClient * fClient
Connection to display server.
Yield an action as soon as it is clicked.
A TGTextEntry is a one line text input widget.
A composite frame that layout their children in vertical way.
virtual void SetName(const char *name)
@ kEditDisable
disable edit of this window
const TGWindow * GetParent() const
const char * GetName() const override
Return unique name, used in SavePrimitive methods.
UInt_t fEditDisabled
flags used for "guibuilding"
void Reset()
Reset name frame.
Bool_t CheckItems(TGCompositeFrame *main)
Check if items are in the list tree and at the same place.
TGListTreeItem * FindItemByName(TGListTree *tree, const char *name, TGListTreeItem *item=nullptr)
Find item with GetText == name. Search tree downwards starting at item.
void UpdateName()
Set new name of frame, if it doesn't already exist in the same MDI frame.
void RemoveFrame(TGFrame *frame) override
Remove a frame.
TRootGuiBuilder * fBuilder
TGCompositeFrame * fTitleFrame
void MapItems(TGCompositeFrame *main)
Map all the frames and subframes in mdi frame to the list tree.
void SelectFrameByItem(TGListTreeItem *item, Int_t i=0)
When list tree item is clicked, frame with that name is selected.
TGuiBldNameFrame(const TGWindow *p, TGuiBldEditor *editor)
Constructor.
void DoRedraw() override
Redraw frame (just a prototype).
TGCompositeFrame * GetMdi(TGFrame *frame)
Find the parent mdi frame.
TGuiBldDragManager * fManager
void ChangeSelected(TGFrame *frame)
Change selected frame.
static TGuiBuilder * Instance()
return an instance of TGuiBuilder object
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
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 main(int argc, char **argv)