111const char *
filetypes[] = {
"All files", 
"*",          
"ROOT files",     
"*.root", 
"ROOT macros",
 
  112                           "*.C",       
"Text files", 
"*.[tT][xX][tT]", 
nullptr,  
nullptr};
 
  122                              {
"h2_s.xpm", 
"TH2", 1002, 
nullptr},
 
  123                              {
"h3_s.xpm", 
"TH3", 1003, 
nullptr},
 
  124                              {
"profile_s.xpm", 
"TProfile", 1004, 
nullptr},
 
  125                              {
nullptr, 
nullptr, 0, 
nullptr}};
 
  128   {
"f1_s.xpm", 
"TF1", 2001, 
nullptr}, {
"f2_s.xpm", 
"TF2", 2002, 
nullptr}, {
nullptr, 
nullptr, 0, 
nullptr}};
 
  131                             {
"tree_s.xpm", 
"TTree", 3002, 
nullptr},
 
  132                             {
"chain_s.xpm", 
"TChain", 3003, 
nullptr},
 
  133                             {
nullptr, 
nullptr, 0, 
nullptr}};
 
  135const char *
editortxt1 = 
"This is the ROOT text edit widget TGTextEdit. It is not intended as\n" 
  136                         "a full developers editor, but it is relatively complete and can ideally\n" 
  137                         "be used to edit scripts or to present users editable config files, etc.\n\n" 
  138                         "The text edit widget supports standard emacs style ctrl-key navigation\n" 
  139                         "in addition to the arrow keys. By default the widget has under the right\n" 
  140                         "mouse button a popup menu giving access to several built-in functions.\n\n" 
  141                         "Cut, copy and paste between different editor windows and any other\n" 
  142                         "standard text handling application is supported.\n\n" 
  143                         "Text can be selected with the mouse while holding the left button\n" 
  144                         "or with the arrow keys while holding the shift key pressed. Use the\n" 
  145                         "middle mouse button to paste text at the current mouse location.";
 
  146const char *
editortxt2 = 
"Mice with scroll-ball are properly supported.\n\n" 
  147                         "This are the currently defined key bindings:\n" 
  149                         "    Move the cursor one character leftwards.\n" 
  150                         "    Scroll when cursor is out of frame.\n" 
  152                         "    Move the cursor one character rightwards.\n" 
  153                         "    Scroll when cursor is out of frame.\n" 
  155                         "    Deletes the character on the left side of the text cursor and moves the\n" 
  156                         "    cursor one position to the left. If a text has been marked by the user";
 
  157const char *
editortxt3 = 
"    (e.g. by clicking and dragging) the cursor will be put at the beginning\n" 
  158                         "    of the marked text and the marked text will be removed.\n" 
  160                         "    Moves the text cursor to the left end of the line. If mark is TRUE text\n" 
  161                         "    will be marked towards the first position, if not any marked text will\n" 
  162                         "    be unmarked if the cursor is moved.\n" 
  164                         "    Moves the text cursor to the right end of the line. If mark is TRUE text\n" 
  165                         "    will be marked towards the last position, if not any marked text will\n" 
  166                         "    be unmarked if the cursor is moved.\n" 
  168const char *
editortxt4 = 
"    Deletes the character on the right side of the text cursor. If a text\n" 
  169                         "    has been marked by the user (e.g. by clicking and dragging) the cursor\n" 
  170                         "    will be put at the beginning of the marked text and the marked text will\n" 
  172                         "Shift - Left Arrow\n" 
  173                         "    Mark text one character leftwards.\n" 
  174                         "Shift - Right Arrow\n" 
  175                         "    Mark text one character rightwards.\n" 
  177                         "    Select the whole text.\n" 
  179                         "    Move the cursor one character leftwards.";
 
  181                         "    Copy the marked text to the clipboard.\n" 
  183                         "    Delete the character to the right of the cursor.\n" 
  185                         "    Move the cursor to the end of the line.\n" 
  187                         "    Start Search Dialog.\n" 
  189                         "    Delete the character to the left of the cursor.\n" 
  191                         "    Delete marked text if any or delete all\n" 
  192                         "    characters to the right of the cursor.\n" 
  194                         "    Start GoTo Line Dialog";
 
  196                         "    Delete all characters on the line.\n" 
  198                         "    Paste the clipboard text into line edit.\n" 
  200                         "    Cut the marked text, copy to clipboard.\n" 
  202                         "    Paste the clipboard text into line edit.\n" 
  205                         "All other keys with valid ASCII codes insert themselves into the line.";
 
  227   TGLayoutHints *fMenuBarLayout, *fMenuBarItemLayout, *fMenuBarHelpLayout;
 
  236   void HandleMenu(
Int_t id);
 
  240   void Created() { Emit(
"Created()"); } 
 
  241   void Welcome() { 
printf(
"TestMainFrame has been created. Welcome!\n"); }
 
  280   void DoTab(
Int_t id);
 
  281   void HandleButtons(
Int_t id = -1);
 
  336   void DoSlider(
Int_t pos = 0);
 
  357   void HandleButtons();
 
  470   void LoadFile(
const char *file);
 
  471   void LoadBuffer(
const char *buffer);
 
  474   TGTextEdit *GetEditor()
 const { 
return fEdit; }
 
  499   TGFrame *GetFrame()
 const { 
return fFrame; }
 
  501   void SetCanvas(
TGCanvas *canvas) { fCanvas = canvas; }
 
  502   void HandleMouseWheel(
Event_t *event);
 
  510   fFrame->Connect(
"ProcessedEvent(Event_t*)", 
"TileFrame", 
this, 
"HandleMouseWheel(Event_t*)");
 
  518void TileFrame::HandleMouseWheel(
Event_t *event)
 
  529      if (fCanvas->GetContainer()->GetHeight())
 
  530         page = 
Int_t(
Float_t(fCanvas->GetViewPort()->GetHeight() * fCanvas->GetViewPort()->GetHeight()) /
 
  531                      fCanvas->GetContainer()->GetHeight());
 
  539      fCanvas->SetVsbPosition(
newpos);
 
  544      fCanvas->SetVsbPosition(
newpos);
 
  557   fMain->Connect(
"CloseWindow()", 
"TestMainFrame", 
this, 
"CloseWindow()");
 
  563   fMenuDock->SetWindowName(
"GuiTest Menu");
 
  573   fMenuFile->AddEntry(
"&Close", -1);
 
  574   fMenuFile->AddSeparator();
 
  577   fMenuFile->AddSeparator();
 
  603   fMenuTest->AddLabel(
"Test different features...");
 
  634   fMenuDock->Connect(
"Undocked()", 
"TestMainFrame", 
this, 
"HandleMenu(=M_VIEW_UNDOCK)");
 
  639   fMenuHelp->AddSeparator();
 
  650   fMenuFile->Connect(
"Activated(Int_t)", 
"TestMainFrame", 
this, 
"HandleMenu(Int_t)");
 
  651   fMenuFile->Connect(
"PoppedUp()", 
"TestMainFrame", 
this, 
"HandlePopup()");
 
  652   fMenuFile->Connect(
"PoppedDown()", 
"TestMainFrame", 
this, 
"HandlePopdown()");
 
  653   fMenuTest->Connect(
"Activated(Int_t)", 
"TestMainFrame", 
this, 
"HandleMenu(Int_t)");
 
  654   fMenuView->Connect(
"Activated(Int_t)", 
"TestMainFrame", 
this, 
"HandleMenu(Int_t)");
 
  655   fMenuHelp->Connect(
"Activated(Int_t)", 
"TestMainFrame", 
this, 
"HandleMenu(Int_t)");
 
  656   fCascadeMenu->Connect(
"Activated(Int_t)", 
"TestMainFrame", 
this, 
"HandleMenu(Int_t)");
 
  657   fCascade1Menu->Connect(
"Activated(Int_t)", 
"TestMainFrame", 
this, 
"HandleMenu(Int_t)");
 
  658   fCascade2Menu->Connect(
"Activated(Int_t)", 
"TestMainFrame", 
this, 
"HandleMenu(Int_t)");
 
  659   fMenuNew1->Connect(
"Activated(Int_t)", 
"TestMainFrame", 
this, 
"HandleMenu(Int_t)");
 
  660   fMenuNew2->Connect(
"Activated(Int_t)", 
"TestMainFrame", 
this, 
"HandleMenu(Int_t)");
 
  663   fMenuBar->AddPopup(
"&File", fMenuFile, fMenuBarItemLayout);
 
  664   fMenuBar->AddPopup(
"&Test", 
fMenuTest, fMenuBarItemLayout);
 
  665   fMenuBar->AddPopup(
"&View", 
fMenuView, fMenuBarItemLayout);
 
  666   fMenuBar->AddPopup(
"&Help", fMenuHelp, fMenuBarHelpLayout);
 
  668   fMenuDock->AddFrame(fMenuBar, fMenuBarLayout);
 
  671   fCanvasWindow = 
new TGCanvas(fMain, 400, 240);
 
  672   fContainer = 
new TileFrame(fCanvasWindow->GetViewPort());
 
  673   fContainer->SetCanvas(fCanvasWindow);
 
  674   fCanvasWindow->SetContainer(fContainer->GetFrame());
 
  680   for (
int i = 0; i < 256; ++i)
 
  681      fCanvasWindow->AddFrame(
 
  691   fTestButton->Connect(
"Clicked()", 
"TestMainFrame", 
this, 
"DoButton()");
 
  692   fTestButton->SetToolTipText(
"Pops up\ntext editor");
 
  695   fTestText->SetToolTipText(
"This is a text entry widget");
 
  705   fMain->SetWindowName(
"GuiTest Signal/Slots");
 
  707   fMain->MapSubwindows();
 
  713   Connect(
"Created()", 
"TestMainFrame", 
this, 
"Welcome()");
 
  717TestMainFrame::~TestMainFrame()
 
  735void TestMainFrame::CloseWindow()
 
  742void TestMainFrame::DoButton()
 
  756void TestMainFrame::HandleMenu(
Int_t id)
 
  767      printf(
"fIniDir = %s\n", 
fi.fIniDir);
 
  769      printf(
"Open file: %s (dir: %s)\n", 
fi.fFilename, 
fi.fIniDir);
 
  777      printf(
"Hiding itself, select \"Print Setup...\" to enable again\n");
 
  782      printf(
"M_FILE_PRINTSETUP\n");
 
  783      printf(
"Enabling \"Print\"\n");
 
  810      if (
prop.fName != 
"")
 
  811         printf(
"Selected font: %s, size %d, italic %s, bold %s, color 0x%lx, align %u\n", 
prop.fName.Data(),
 
  822      fMenuBar->AddPopup(
"New 1", 
fMenuNew1, fMenuBarItemLayout, 
p);
 
  823      p = fMenuBar->GetPopup(
"Help");
 
  824      fMenuBar->AddPopup(
"New 2", 
fMenuNew2, fMenuBarItemLayout, 
p);
 
  825      fMenuBar->MapSubwindows();
 
  833      fMenuBar->RemovePopup(
"New 1");
 
  834      fMenuBar->RemovePopup(
"New 2");
 
  872   default: 
printf(
"Menu item %d selected\n", 
id); 
break;
 
  882   fMain->Connect(
"CloseWindow()", 
"TestDialog", 
this, 
"DoClose()");
 
  883   fMain->DontCallClose(); 
 
  891   fOkButton->Connect(
"Clicked()", 
"TestDialog", 
this, 
"DoOK()");
 
  893   fCancelButton->
Connect(
"Clicked()", 
"TestDialog", 
this, 
"DoCancel()");
 
  899   fFrame1->AddFrame(fCancelButton, fL1);
 
  906   fTab = 
new TGTab(fMain, 300, 300);
 
  907   fTab->
Connect(
"Selected(Int_t)", 
"TestDialog", 
this, 
"DoTab(Int_t)");
 
  916   tf->AddFrame(fF1, fL3);
 
  917   fTxt1->Resize(150, 
fTxt1->GetDefaultHeight());
 
  918   fTxt2->Resize(150, 
fTxt2->GetDefaultHeight());
 
  932   tf->AddFrame(fF2, fL3);
 
  936   for (i = 0; i < 20; i++) {
 
  938      snprintf(tmp, 20, 
"Entry %i", i + 1);
 
  944   fBtn1->Connect(
"Clicked()", 
"TestDialog", 
this, 
"HandleButtons()");
 
  945   fBtn2->Connect(
"Clicked()", 
"TestDialog", 
this, 
"HandleButtons()");
 
  946   fChk1->Connect(
"Clicked()", 
"TestDialog", 
this, 
"HandleButtons()");
 
  947   fChk2->Connect(
"Clicked()", 
"TestDialog", 
this, 
"HandleButtons()");
 
  948   fRad1->Connect(
"Clicked()", 
"TestDialog", 
this, 
"HandleButtons()");
 
  949   fRad2->Connect(
"Clicked()", 
"TestDialog", 
this, 
"HandleButtons()");
 
  960   fStartB->Connect(
"Clicked()", 
"TestDialog", 
this, 
"HandleButtons()");
 
  961   fStopB->Connect(
"Clicked()", 
"TestDialog", 
this, 
"HandleButtons()");
 
  973   tf->AddFrame(fF3, fL3);
 
  974   tf->AddFrame(fF5, fL4);
 
  976   fEc1->GetCanvas()->SetBorderMode(0);
 
  977   fEc2->GetCanvas()->SetBorderMode(0);
 
  979   fEc1->GetCanvas()->Connect(
"ProcessedEvent(Int_t,Int_t,Int_t,TObject*)", 
"TestDialog", 
this,
 
  980                              "HandleEmbeddedCanvas(Int_t,Int_t,Int_t,TObject*)");
 
  994   bt->Connect(
"Clicked()", 
"TestDialog", 
this, 
"HandleButtons()");
 
  997   bt->Connect(
"Clicked()", 
"TestDialog", 
this, 
"HandleButtons()");
 
 1001   fCheckMulti->Connect(
"Clicked()", 
"TestDialog", 
this, 
"HandleButtons()");
 
 1002   tf->AddFrame(fF4, fL3);
 
 1004   for (i = 0; i < 20; ++i) {
 
 1011   fListBox->
Resize(150, 80);
 
 1019   tf->AddFrame(
fF6, fL3);
 
 1025   for (
j = 0; 
j < 4; 
j++) {
 
 1030      tbuf->AddText(0, 
"0.0");
 
 1033      tent->Resize(50, 
tent->GetDefaultHeight());
 
 1034      tent->SetFont(
"-adobe-courier-bold-r-*-*-14-*-*-*-*-*-iso8859-1");
 
 1041   tf->AddFrame(
fF7, fL3);
 
 1046   bt->Connect(
"Clicked()", 
"TestDialog", 
this, 
"HandleButtons()");
 
 1047   bt->Resize(90, 
bt->GetDefaultHeight());
 
 1050   bt->Connect(
"Clicked()", 
"TestDialog", 
this, 
"HandleButtons()");
 
 1051   bt->Resize(90, 
bt->GetDefaultHeight());
 
 1054   bt->Connect(
"Clicked()", 
"TestDialog", 
this, 
"HandleButtons()");
 
 1055   bt->Resize(90, 
bt->GetDefaultHeight());
 
 1057   fF7->Resize(
fF6->GetDefaultSize());
 
 1062   fMain->AddFrame(fTab, fL5);
 
 1064   fMain->MapSubwindows();
 
 1068   fMain->CenterOnParent();
 
 1070   fMain->SetWindowName(
"Dialog");
 
 1076TestDialog::~TestDialog()
 
 1080   fMain->DeleteWindow(); 
 
 1083void TestDialog::FillHistos()
 
 1090      fHpx = 
new TH1F(
"hpx", 
"This is the px distribution", 100, -4, 4);
 
 1091      fHpxpy = 
new TH2F(
"hpxpy", 
"py vs px", 40, -4, 4, 40, -4, 4);
 
 1122void TestDialog::DoClose()
 
 1124   printf(
"\nTerminating dialog: via window manager\n");
 
 1136void TestDialog::CloseWindow()
 
 1143void TestDialog::DoOK()
 
 1146   printf(
"\nTerminating dialog: OK pressed\n");
 
 1167void TestDialog::DoCancel()
 
 1170   printf(
"\nTerminating dialog: Cancel pressed\n");
 
 1180void TestDialog::HandleButtons(
Int_t id)
 
 1186      id = 
btn->WidgetId();
 
 1189   printf(
"DoButton: id = %d\n", 
id);
 
 1210      snprintf(tmp, 20, 
"Entry %i", fLastEntry);
 
 1211      fListBox->
AddEntry(tmp, fLastEntry);
 
 1216      if (fFirstEntry <= fLastEntry) {
 
 1225      if ((s == 
"Tab 3") && (fMain->MustCleanup() != 
kDeepCleanup)) {
 
 1241      for (
int i = 0; i < 
nt; i++) {
 
 1263void TestDialog::DoTab(
Int_t id)
 
 1265   printf(
"Tab item %d activated\n", 
id);
 
 1273      printf(
"event = %d, x = %d, y = %d, obj = %s::%s\n", event, 
x, 
y, 
sel->IsA()->GetName(), 
sel->GetName());
 
 1284   fMain->Connect(
"CloseWindow()", 
"TestMsgBox", 
this, 
"CloseWindow()");
 
 1285   fMain->DontCallClose(); 
 
 1310   fTestButton->Connect(
"Clicked()", 
"TestMsgBox", 
this, 
"DoTest()");
 
 1318   fCloseButton->
Connect(
"Clicked()", 
"TestMsgBox", 
this, 
"DoClose()");
 
 1322   f1->Resize(
fTestButton->GetDefaultWidth() + 40, fMain->GetDefaultHeight());
 
 1329   f1->AddFrame(fCloseButton, fL1);
 
 1331   fMain->AddFrame(
f1, fL21);
 
 1355   for (i = 0; i < 13; ++i)
 
 1356      fG1->AddFrame(fC[i], fL4);
 
 1363   for (i = 0; i < 4; ++i) {
 
 1365      fR[i]->
Connect(
"Clicked()", 
"TestMsgBox", 
this, 
"DoRadio()");
 
 1381   fTbmsg->AddText(0, 
"This is a test message box.");
 
 1398   fMain->AddFrame(f2, fL2);
 
 1400   fMain->MapSubwindows();
 
 1404   fMain->CenterOnParent();
 
 1406   fMain->SetWindowName(
"Message Box Test");
 
 1415TestMsgBox::~TestMsgBox()
 
 1419   fMain->DeleteWindow(); 
 
 1422void TestMsgBox::CloseWindow()
 
 1429void TestMsgBox::DoClose()
 
 1436void TestMsgBox::DoTest()
 
 1444   for (i = 0; i < 13; i++)
 
 1448   for (i = 0; i < 4; i++)
 
 1457   fMain->Disconnect(
"CloseWindow()");
 
 1458   fMain->Connect(
"CloseWindow()", 
"TestMsgBox", 
this, 
"TryToClose()");
 
 1460   fMain->Disconnect(
"CloseWindow()");
 
 1461   fMain->Connect(
"CloseWindow()", 
"TestMsgBox", 
this, 
"CloseWindow()");
 
 1464void TestMsgBox::TryToClose()
 
 1468   printf(
"Can't close the window '%s' : a message box is still open\n", fMain->GetWindowName());
 
 1471void TestMsgBox::DoRadio()
 
 1478   if (
id >= 21 && 
id <= 24) {
 
 1479      for (
int i = 0; i < 4; i++)
 
 1480         if (fR[i]->WidgetId() != 
id)
 
 1490   fMain->Connect(
"CloseWindow()", 
"TestSliders", 
this, 
"CloseWindow()");
 
 1491   fMain->DontCallClose(); 
 
 1502   fTbh1->AddText(0, 
"0");
 
 1503   fTbv1->AddText(0, 
"0");
 
 1505   fTeh1->Connect(
"TextChanged(char*)", 
"TestSliders", 
this, 
"DoText(char*)");
 
 1506   fTev1->Connect(
"TextChanged(char*)", 
"TestSliders", 
this, 
"DoText(char*)");
 
 1509   fHslider1->Connect(
"PositionChanged(Int_t)", 
"TestSliders", 
this, 
"DoSlider(Int_t)");
 
 1513   fVslider1->Connect(
"PositionChanged(Int_t)", 
"TestSliders", 
this, 
"DoSlider(Int_t)");
 
 1521   fTbh2->AddText(0, 
"0");
 
 1522   fTbv2->AddText(0, 
"0");
 
 1524   fTeh2->Connect(
"TextChanged(char*)", 
"TestSliders", 
this, 
"DoText(char*)");
 
 1525   fTev2->Connect(
"TextChanged(char*)", 
"TestSliders", 
this, 
"DoText(char*)");
 
 1528   fHslider2->Connect(
"PositionChanged(Int_t)", 
"TestSliders", 
this, 
"DoSlider(Int_t)");
 
 1534   fVslider2->Connect(
"PositionChanged()", 
"TestSliders", 
this, 
"DoSlider()");
 
 1556   fMain->SetWindowName(
"Slider Test");
 
 1558   fMain->Resize(
size);
 
 1560   fMain->SetWMSize(
size.fWidth, 
size.fHeight);
 
 1561   fMain->SetWMSizeHints(
size.fWidth, 
size.fHeight, 
size.fWidth, 
size.fHeight, 0, 0);
 
 1566   fMain->CenterOnParent();
 
 1568   fMain->MapSubwindows();
 
 1574TestSliders::~TestSliders()
 
 1578   fMain->DeleteWindow(); 
 
 1581void TestSliders::CloseWindow()
 
 1588void TestSliders::DoText(
const char * )
 
 1604void TestSliders::DoSlider(
Int_t pos)
 
 1612      id = 
sl->WidgetId();
 
 1615      id = 
sd->WidgetId();
 
 1628      fTbh1->AddText(0, buf);
 
 1630      fTeh1->SetCursorPosition(
fTeh1->GetCursorPosition());
 
 1637   } 
else if (
id == 
VSId1) {
 
 1640      fTbv1->AddText(0, buf);
 
 1641      fTev1->SetCursorPosition(
fTev1->GetCursorPosition());
 
 1648   } 
else if (
id == 
HSId2) {
 
 1651      fTbh2->AddText(0, buf);
 
 1652      fTeh2->SetCursorPosition(
fTeh2->GetCursorPosition());
 
 1659   } 
else if (
id == 
VSId2) {
 
 1663      fTbv2->AddText(0, buf);
 
 1664      fTev2->SetCursorPosition(
fTev2->GetCursorPosition());
 
 1679   fMain->Connect(
"CloseWindow()", 
"TestShutter", 
this, 
"CloseWindow()");
 
 1680   fMain->DontCallClose(); 
 
 1693   fMain->AddFrame(fShutter, fLayout);
 
 1695   fMain->MapSubwindows();
 
 1696   fMain->Resize(80, 300);
 
 1699   fMain->CenterOnParent();
 
 1701   fMain->SetWindowName(
"Shutter Test");
 
 1713   static int id = 5001;
 
 1720   for (
int i = 0; 
data[i].pixmap_name != 
nullptr; i++) {
 
 1730      button->Connect(
"Clicked()", 
"TestShutter", 
this, 
"HandleButtons()");
 
 1738TestShutter::~TestShutter()
 
 1743   fMain->DeleteWindow(); 
 
 1746void TestShutter::CloseWindow()
 
 1751void TestShutter::HandleButtons()
 
 1754   printf(
"Shutter button %d\n", 
btn->WidgetId());
 
 1762   fMain->Connect(
"CloseWindow()", 
"TestDirList", 
this, 
"CloseWindow()");
 
 1763   fMain->DontCallClose(); 
 
 1774   fMain->AddFrame(canvas, lo);
 
 1775   fContents->Connect(
"DoubleClicked(TGListTreeItem*,Int_t)", 
"TestDirList", 
this,
 
 1776                      "OnDoubleClick(TGListTreeItem*,Int_t)");
 
 1777   fContents->Connect(
"Clicked(TGListTreeItem*,Int_t)", 
"TestDirList", 
this, 
"OnDoubleClick(TGListTreeItem*,Int_t)");
 
 1785   fMain->CenterOnParent();
 
 1787   fMain->SetWindowName(
"List Dir Test");
 
 1789   fMain->MapSubwindows();
 
 1794TestDirList::~TestDirList()
 
 1800   fMain->DeleteWindow(); 
 
 1803void TestDirList::CloseWindow()
 
 1815   while ((parent = 
item->GetParent())) {
 
 1831   item->SetUserData((
void *)1);
 
 1848         } 
else if (
fname.EndsWith(
".root")) { 
 
 1863   fMain->Connect(
"CloseWindow()", 
"TestDirList", 
this, 
"CloseWindow()");
 
 1864   fMain->DontCallClose(); 
 
 1871   fMain->AddFrame(
mb, lo);
 
 1873   fMenu = 
mb->AddPopup(
"&View");
 
 1876   fMenu->AddEntry(
"&List", 
kLVList);
 
 1878   fMenu->AddSeparator();
 
 1879   fMenu->AddEntry(
"&Close", 10);
 
 1880   fMenu->Connect(
"Activated(Int_t)", 
"TestFileList", 
this, 
"DoMenu(Int_t)");
 
 1884   fMain->AddFrame(
lv, lo);
 
 1889   fContents->Connect(
"DoubleClicked(TGFrame*,Int_t)", 
"TestFileList", 
this, 
"OnDoubleClick(TGLVEntry*,Int_t)");
 
 1892   fMain->CenterOnParent();
 
 1894   fMain->SetWindowName(
"File List Test");
 
 1895   fMain->MapSubwindows();
 
 1905TestFileList::~TestFileList()
 
 1910   fMain->DeleteWindow(); 
 
 1932   fContents->SetColHeaders(
"Name", 
"Title");
 
 1934   TIter next(file.GetListOfKeys());
 
 1937   while ((key = (
TKey *)next())) {
 
 1950void TestFileList::DisplayDirectory(
const TString &
fname)
 
 1968   static TFile *file = 
nullptr;
 
 1995   const char *
fname = (
const char *)
f->GetUserData();
 
 1999   } 
else if (
name.EndsWith(
".root")) {
 
 2002      DisplayDirectory(
name);
 
 2009void TestFileList::CloseWindow()
 
 2021   fMain->Connect(
"CloseWindow()", 
"TestProgress", 
this, 
"DoClose()");
 
 2022   fMain->DontCallClose();
 
 2032   fVProg1->SetBarColor(
"purple");
 
 2035   fVProg2->SetBarColor(
"green");
 
 2044   fHProg2->SetBarColor(
"lightblue");
 
 2050   fGO->Connect(
"Clicked()", 
"TestProgress", 
this, 
"DoGo()");
 
 2071   fMain->SetWindowName(
"Progress Test");
 
 2073   fMain->Resize(
size);
 
 2076   fMain->CenterOnParent();
 
 2078   fMain->MapSubwindows();
 
 2084TestProgress::~TestProgress()
 
 2088   fMain->DeleteWindow(); 
 
 2091void TestProgress::CloseWindow()
 
 2098void TestProgress::DoClose()
 
 2117void TestProgress::DoGo()
 
 2127   fVProg2->SetBarColor(
"green");
 
 2162   "Integer", 
"One digit real", 
"Two digit real", 
"Three digit real", 
"Four digit real", 
"Real", 
"Degree.min.sec",
 
 2163   "Min:sec", 
"Hour:min",       
"Hour:min:sec",   
"Day/month/year",   
"Month/day/year",  
"Hex"};
 
 2175                            12 * 3600 + 15 * 60,
 
 2184   fMain->Connect(
"CloseWindow()", 
"EntryTestDlg", 
this, 
"CloseWindow()");
 
 2185   fMain->DontCallClose(); 
 
 2197   fMain->AddFrame(fF1, fL1);
 
 2199   for (
int i = 0; i < 13; i++) {
 
 2205      fF[i]->AddFrame(fLabel[i], fL2);
 
 2209   fMain->AddFrame(fF2, fL3);
 
 2213   fLimits[0]->SetLogStep(
kFALSE);
 
 2218   fLimits[1]->SetLogStep(
kFALSE);
 
 2225   fSetButton->Connect(
"Clicked()", 
"EntryTestDlg", 
this, 
"SetLimits()");
 
 2228   fExitButton->Connect(
"Clicked()", 
"EntryTestDlg", 
this, 
"DoOK()");
 
 2232   fMain->SetWindowName(
"Number Entry Test");
 
 2233   fMain->SetIconName(
"Number Entry Test");
 
 2234   fMain->SetClassHints(
"NumberEntryDlg", 
"NumberEntryDlg");
 
 2236   fMain->MapSubwindows();
 
 2240   fMain->CenterOnParent();
 
 2251EntryTestDlg::~EntryTestDlg()
 
 2255   fMain->DeleteWindow();
 
 2258void EntryTestDlg::CloseWindow()
 
 2263void EntryTestDlg::DoOK()
 
 2267   fMain->SendCloseMessage();
 
 2270void EntryTestDlg::SetLimits()
 
 2272   Double_t min = fLimits[0]->GetNumber();
 
 2274   Double_t max = fLimits[1]->GetNumber();
 
 2296   for (
int i = 0; i < 13; i++) {
 
 2307   fMain->Connect(
"CloseWindow()", 
"Editor", 
this, 
"CloseWindow()");
 
 2308   fMain->DontCallClose(); 
 
 2315   fMain->AddFrame(fEdit, fL1);
 
 2316   fEdit->Connect(
"Opened()", 
"Editor", 
this, 
"DoOpen()");
 
 2317   fEdit->Connect(
"Saved()", 
"Editor", 
this, 
"DoSave()");
 
 2318   fEdit->Connect(
"Closed()", 
"Editor", 
this, 
"DoClose()");
 
 2323   fEdit->SetSelectBack(
pxl);
 
 2327   fOK->Connect(
"Clicked()", 
"Editor", 
this, 
"DoOK()");
 
 2329   fMain->AddFrame(fOK, fL2);
 
 2333   fMain->MapSubwindows();
 
 2345   fMain->DeleteWindow(); 
 
 2348void Editor::SetTitle()
 
 2357      snprintf(title, 256, 
"ROOT Editor - Untitled");
 
 2359      snprintf(title, 256, 
"ROOT Editor - %s", 
txt->GetFileName());
 
 2361   fMain->SetWindowName(title);
 
 2362   fMain->SetIconName(title);
 
 2372void Editor::LoadBuffer(
const char *buffer)
 
 2376   fEdit->LoadBuffer(buffer);
 
 2379void Editor::LoadFile(
const char *file)
 
 2383   fEdit->LoadFile(file);
 
 2386void Editor::AddBuffer(
const char *buffer)
 
 2391   txt.LoadBuffer(buffer);
 
 2392   fEdit->AddText(&
txt);
 
 2395void Editor::CloseWindow()
 
 2409void Editor::DoOpen()
 
 2414void Editor::DoSave()
 
 2419void Editor::DoClose()
 
 2437   if (
gROOT->IsBatch()) {
 
const Mask_t kButtonPressMask
 
const Mask_t kAnyModifier
 
const Mask_t kPointerMotionMask
 
const Mask_t kButtonReleaseMask
 
ULong_t Pixel_t
Pixel value.
 
#define RQ_OBJECT(sender_class)
 
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
 
bool Bool_t
Boolean (0=false, 1=true) (bool)
 
int Int_t
Signed integer 4 bytes (int)
 
unsigned long ULong_t
Unsigned long integer 4 bytes (unsigned long). Size depends on architecture.
 
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int)
 
float Float_t
Float 4 bytes (float)
 
double Double_t
Double 8 bytes.
 
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
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
 
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 sel
 
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 prop
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize id
 
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 cname
 
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 mode
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t button
 
Option_t Option_t TPoint TPoint const char text
 
R__EXTERN void * gTQSender
 
R__EXTERN TRandom * gRandom
 
char * StrDup(const char *str)
Duplicate the string str.
 
R__EXTERN TSystem * gSystem
 
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...
 
static ULong_t RGB2Pixel(Int_t r, Int_t g, Int_t b)
Convert r,g,b to graphics system dependent pixel value.
 
TObject * Get(const char *namecycle) override
Return pointer to object identified by namecycle.
 
Describe directory structure in memory.
 
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
 
A frame containing two scrollbars (a horizontal and a vertical) and a viewport.
 
Like a checkbutton but instead of the check mark there is color area with a little down arrow.
 
A combobox (also known as a drop down listbox) allows the selection of one item out of a list of item...
 
virtual void AddEntry(TGString *s, Int_t id)
 
virtual void Select(Int_t id, Bool_t emit=kTRUE)
Make the selected item visible in the combo box window and emit signals according to the second param...
 
The base class for composite widgets (menu bars, list boxes, etc.).
 
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
 
void MapSubwindows() override
Map all sub windows that are part of the composite frame.
 
void Layout() override
Layout the elements of the composite frame.
 
A frame with handles that allow it to be undocked (i.e.
 
DoubleSlider widgets allow easy selection of a min and a max value out of a range.
 
Dragging the slider will generate the event:
 
This class creates a file selection dialog.
 
Font selection dialog, allowing to select one in the list of available fonts in the system.
 
Encapsulate fonts used in the GUI system.
 
A subclasses of TGWindow, and is used as base class for some simple widgets (buttons,...
 
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
 
static Pixel_t GetWhitePixel()
Get white pixel value.
 
virtual UInt_t GetDefaultHeight() const
 
Encapsulate a graphics context used in the low level graphics.
 
A composite frame with a border and a title.
 
Concrete class for horizontal slider.
 
A composite frame that layout their children in horizontal way.
 
TGHotString is a string with a "hot" character underlined.
 
This class handles GUI labels.
 
This class describes layout hints used by the layout classes.
 
A listbox is a box, possibly with scrollbar, containing entries.
 
virtual void RemoveEntry(Int_t id=-1)
remove entry with id.
 
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.
 
void Layout() override
Layout the listbox components.
 
virtual void SetMultipleSelections(Bool_t multi=kTRUE)
 
virtual const char * GetText() const =0
 
A list tree is a widget that can contain a number of items arranged in a tree structure.
 
A list view is a widget that can contain a number of items arranged in a grid or list.
 
Defines top level windows that interact with the system Window Manager.
 
This layout managers does not make use of TGLayoutHints.
 
TGNumberEntry is a number entry input widget with up/down buttons.
 
The TGPicture class implements pictures and icons used in the different GUI elements and widgets.
 
Pixmap_t GetPicture() const
 
A shutter widget contains a set of shutter items that can be open and closed like a shutter.
 
virtual void AddItem(TGShutterItem *item)
Add shutter item to shutter frame.
 
Slider widgets allow easy selection of a range.
 
TGString wraps a TString and adds some graphics routines like drawing, size of string on screen depen...
 
Service classes of the tab widget.
 
const char * GetString() const
 
A tab widget contains a set of composite frames each with a little tab with a name (like a set of fol...
 
TGTabElement * GetTabTab(Int_t tabIndex) const
Return the tab element of tab with index tabIndex.
 
Int_t GetNumberOfTabs() const
Return number of tabs.
 
virtual void RemoveTab(Int_t tabIndex=-1, Bool_t storeRemoved=kTRUE)
Remove container and tab of tab with index tabIndex.
 
virtual TGCompositeFrame * AddTab(TGString *text)
Add a tab to the tab widget.
 
A text buffer is used in several widgets, like TGTextEntry, TGFileDialog, etc.
 
Yield an action as soon as it is clicked.
 
A TGTextEdit is a specialization of TGTextView.
 
A TGTextEntry is a one line text input widget.
 
A TGText is a multi line text buffer.
 
This is a layout manager for the TGListView widget.
 
Defines transient windows that typically are used for dialogs windows.
 
Concrete class for vertical slider.
 
A composite frame that layout their children in vertical way.
 
ROOT GUI Window base class.
 
1-D histogram with a float per channel (see TH1 documentation)
 
2-D histogram with a float per channel (see TH1 documentation)
 
Book space in a file, create I/O buffers, to fill them, (un)compress them.
 
const char * GetTitle() const override
Returns title (title can contain 32x32 xpm thumbnail/icon).
 
virtual const char * GetClassName() const
 
const char * GetName() const override
Returns name of object.
 
Mother of all ROOT objects.
 
virtual Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
 
virtual void Browse(TBrowser *b)
Browse object. May be overridden for another default action.
 
virtual void Print(Option_t *option="") const
This method must be overridden when a class wants to print itself.
 
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.
 
virtual void Rannor(Float_t &a, Float_t &b)
Return 2 numbers distributed following a gaussian with mean=0 and sigma=1.
 
This class creates a TGCanvas in which a TCanvas is created.
 
Describes an Operating System directory for the browser.
 
A TSystemFile describes an operating system file.
 
virtual Bool_t IsDirectory(const char *dir=nullptr) const
Check if object is a directory.
 
virtual const char * PrependPathName(const char *dir, TString &name)
Concatenate a directory and a file name.
 
virtual Bool_t ChangeDirectory(const char *path)
Change directory.
 
virtual void Sleep(UInt_t milliSec)
Sleep milliSec milli seconds.
 
virtual const char * WorkingDirectory()
Return working directory.
 
virtual Bool_t ProcessEvents()
Process pending events (GUI, timers, sockets).
 
static void SingleShot(Int_t milliSec, const char *receiver_class, void *receiver, const char *method)
This static function calls a slot after a given time interval.
 
static TVirtualPadEditor * GetPadEditor(Bool_t load=kTRUE)
Returns the pad editor dialog. Static method.
 
static void Terminate()
Close the global pad editor. Static method.
 
EGEventType fType
of event (see EGEventType)
 
UInt_t fCode
key or button code