GUI MDI features.
#include <cstdio>
#include <cstdlib>
};
};
void HandleButtons();
};
void InitMenu();
void CloseWindow();
void HandleMenu(
Int_t id);
};
{
InitMenu();
fMain->SetWindowName("MDI test");
fMain->SetClassHints("mdi test", "mdi test");
if (
pbg &&
pbg->GetWidth() > 600 &&
pbg->GetHeight() > 400)
fMain->Resize(
pbg->GetWidth(),
pbg->GetHeight() + 25);
else
fMain->Resize(640, 400);
fMain->MapSubwindows();
fMain->MapWindow();
fMain->Layout();
}
void TGAppMainFrame::HandleMenu(
Int_t id)
{
switch (id) {
} else {
}
break;
}
}
void TGAppMainFrame::InitMenu()
{
fMenuFile->
Connect(
"Activated(Int_t)",
"TGAppMainFrame",
this,
"HandleMenu(Int_t)");
fMenuWindow->
Connect(
"Activated(Int_t)",
"TGAppMainFrame",
this,
"HandleMenu(Int_t)");
fMenuHelp->
Connect(
"Activated(Int_t)",
"TGAppMainFrame",
this,
"HandleMenu(Int_t)");
}
void TGAppMainFrame::CloseWindow()
{
}
{
fMdiFrame->Connect(
"CloseWindow()",
"TGMdiTestSubclass",
this,
"CloseWindow()");
fContainer->SetLayoutManager(
new TGTileLayout(fContainer, 8));
fCanvasWindow->SetContainer(fContainer);
for (int i = 0; i < 256; ++i)
fCanvasWindow->AddFrame(
new TGFrame(fCanvasWindow->GetContainer(), 32, 32,
kOwnBackground, (i + 1) & 255),
}
Bool_t TGMdiTestSubclass::CloseWindow()
{
}
{
fClose->
Connect(
"Clicked()",
"TGMdiHintTest",
this,
"HandleButtons()");
fMenu->
Connect(
"Clicked()",
"TGMdiHintTest",
this,
"HandleButtons()");
fMin->
Connect(
"Clicked()",
"TGMdiHintTest",
this,
"HandleButtons()");
fMax->
Connect(
"Clicked()",
"TGMdiHintTest",
this,
"HandleButtons()");
fSize->Connect(
"Clicked()",
"TGMdiHintTest",
this,
"HandleButtons()");
fHelp->
Connect(
"Clicked()",
"TGMdiHintTest",
this,
"HandleButtons()");
fWName->GetBuffer()->AddText(0,
"MDI hints test");
fWName->Connect(
"TextChanged(char*)",
"TGMdiHintTest",
this,
"HandleText(char*)");
}
void TGMdiHintTest::HandleButtons()
{
}
void TGMdiHintTest::HandleText(const char *)
{
}
{
}
#ifdef STANDALONE
{
return 0;
}
#endif
#define RQ_OBJECT(sender_class)
R__EXTERN TApplication * gApplication
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
winID h TVirtualViewer3D TVirtualGLPainter p
This class creates the ROOT Application Environment that interfaces to the windowing system eventloop...
virtual void Terminate(Int_t status=0)
Terminate the application by call TSystem::Exit() unless application has been told to return from Run...
A frame containing two scrollbars (a horizontal and a vertical) and a viewport.
The base class for composite widgets (menu bars, list boxes, etc.).
A subclasses of TGWindow, and is used as base class for some simple widgets (buttons,...
Concrete class for horizontal slider.
TGHotString is a string with a "hot" character underlined.
This class describes layout hints used by the layout classes.
A listbox is a box, possibly with scrollbar, containing entries.
void Resize(UInt_t w, UInt_t h) override
Resize the listbox widget.
virtual void AddEntry(TGString *s, Int_t id)
Add entry with specified string and id to listbox.
virtual void SetMultipleSelections(Bool_t multi=kTRUE)
Defines top level windows that interact with the system Window Manager.
This file contains the TGMdiFrame class.
This file contains the TGMdiMainFrame class.
Bool_t SetCurrent(TGMdiFrameList *newcurrent)
Set current (active) MDI child window (by frame list).
void SetResizeMode(Int_t mode=kMdiDefaultResizeMode)
Set MDI windows resize mode (opaque or transparent).
TGMdiFrame * GetCurrent() const
Return pointer on current (active) MDI child window.
virtual void ArrangeMinimized()
This is an attempt to an "smart" minimized window re-arrangement.
TGPopupMenu * GetWinListMenu() const
virtual void TileHorizontal()
virtual void TileVertical()
virtual Int_t Close(TGMdiFrame *frame)
Close MDI child window mdiframe.
TGFrame * GetContainer() const
The TGPicture class implements pictures and icons used in the different GUI elements and widgets.
Yield an action as soon as it is clicked.
A TGTextEntry is a one line text input widget.
This is a layout manager for the TGListView widget.
ROOT GUI Window base class.
virtual void SetBackgroundPixmap(Pixmap_t pixmap)
set background pixmap
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.