It is now possible to run this entire test program in the interpreter. Do either:
#include <cstdlib>
enum ETestCommandIdentifiers {
M_FILE_OPEN,
M_FILE_SAVE,
M_FILE_SAVEAS,
M_FILE_PRINT,
M_FILE_PRINTSETUP,
M_FILE_EXIT,
M_TEST_DLG,
M_TEST_MSGBOX,
M_TEST_SLIDER,
M_TEST_SHUTTER,
M_TEST_DIRLIST,
M_TEST_FILELIST,
M_TEST_PROGRESS,
M_TEST_NUMBERENTRY,
M_TEST_FONTDIALOG,
M_TEST_NEWMENU,
M_VIEW_ENBL_DOCK,
M_VIEW_ENBL_HIDE,
M_VIEW_DOCK,
M_VIEW_UNDOCK,
M_HELP_CONTENTS,
M_HELP_SEARCH,
M_HELP_ABOUT,
M_CASCADE_1,
M_CASCADE_2,
M_CASCADE_3,
M_NEW_REMOVEMENU,
VId1,
HId1,
VId2,
HId2,
VSId1,
HSId1,
VSId2,
HSId2
};
const char *filetypes[] = {"All files", "*", "ROOT files", "*.root", "ROOT macros",
"*.C", "Text files", "*.[tT][xX][tT]", nullptr, nullptr};
struct shutterData_t {
const char *pixmap_name;
const char *tip_text;
};
shutterData_t histo_data[] = {{"h1_s.xpm", "TH1", 1001, nullptr},
{"h2_s.xpm", "TH2", 1002, nullptr},
{"h3_s.xpm", "TH3", 1003, nullptr},
{"profile_s.xpm", "TProfile", 1004, nullptr},
{nullptr, nullptr, 0, nullptr}};
shutterData_t function_data[] = {
{"f1_s.xpm", "TF1", 2001, nullptr}, {"f2_s.xpm", "TF2", 2002, nullptr}, {nullptr, nullptr, 0, nullptr}};
shutterData_t tree_data[] = {{"ntuple_s.xpm", "TNtuple", 3001, nullptr},
{"tree_s.xpm", "TTree", 3002, nullptr},
{"chain_s.xpm", "TChain", 3003, nullptr},
{nullptr, nullptr, 0, nullptr}};
const char *editortxt1 = "This is the ROOT text edit widget TGTextEdit. It is not intended as\n"
"a full developers editor, but it is relatively complete and can ideally\n"
"be used to edit scripts or to present users editable config files, etc.\n\n"
"The text edit widget supports standard emacs style ctrl-key navigation\n"
"in addition to the arrow keys. By default the widget has under the right\n"
"mouse button a popup menu giving access to several built-in functions.\n\n"
"Cut, copy and paste between different editor windows and any other\n"
"standard text handling application is supported.\n\n"
"Text can be selected with the mouse while holding the left button\n"
"or with the arrow keys while holding the shift key pressed. Use the\n"
"middle mouse button to paste text at the current mouse location.";
const char *editortxt2 = "Mice with scroll-ball are properly supported.\n\n"
"This are the currently defined key bindings:\n"
"Left Arrow\n"
" Move the cursor one character leftwards.\n"
" Scroll when cursor is out of frame.\n"
"Right Arrow\n"
" Move the cursor one character rightwards.\n"
" Scroll when cursor is out of frame.\n"
"Backspace\n"
" Deletes the character on the left side of the text cursor and moves the\n"
" cursor one position to the left. If a text has been marked by the user";
const char *editortxt3 = " (e.g. by clicking and dragging) the cursor will be put at the beginning\n"
" of the marked text and the marked text will be removed.\n"
"Home\n"
" Moves the text cursor to the left end of the line. If mark is TRUE text\n"
" will be marked towards the first position, if not any marked text will\n"
" be unmarked if the cursor is moved.\n"
"End\n"
" Moves the text cursor to the right end of the line. If mark is TRUE text\n"
" will be marked towards the last position, if not any marked text will\n"
" be unmarked if the cursor is moved.\n"
"Delete";
const char *editortxt4 = " Deletes the character on the right side of the text cursor. If a text\n"
" has been marked by the user (e.g. by clicking and dragging) the cursor\n"
" will be put at the beginning of the marked text and the marked text will\n"
" be removed.\n"
"Shift - Left Arrow\n"
" Mark text one character leftwards.\n"
"Shift - Right Arrow\n"
" Mark text one character rightwards.\n"
"Control-A\n"
" Select the whole text.\n"
"Control-B\n"
" Move the cursor one character leftwards.";
const char *editortxt5 = "Control-C\n"
" Copy the marked text to the clipboard.\n"
"Control-D\n"
" Delete the character to the right of the cursor.\n"
"Control-E\n"
" Move the cursor to the end of the line.\n"
"Control-F\n"
" Start Search Dialog.\n"
"Control-H\n"
" Delete the character to the left of the cursor.\n"
"Control-K\n"
" Delete marked text if any or delete all\n"
" characters to the right of the cursor.\n"
"Control-L\n"
" Start GoTo Line Dialog";
const char *editortxt6 = "Control-U\n"
" Delete all characters on the line.\n"
"Control-V\n"
" Paste the clipboard text into line edit.\n"
"Control-X\n"
" Cut the marked text, copy to clipboard.\n"
"Control-Y\n"
" Paste the clipboard text into line edit.\n"
"Control-Z\n"
" Undo action.\n\n"
"All other keys with valid ASCII codes insert themselves into the line.";
class TileFrame;
class TestMainFrame {
private:
TileFrame *fContainer;
TGPopupMenu *fMenuFile, *fMenuTest, *fMenuView, *fMenuHelp;
TGPopupMenu *fCascadeMenu, *fCascade1Menu, *fCascade2Menu;
TGLayoutHints *fMenuBarLayout, *fMenuBarItemLayout, *fMenuBarHelpLayout;
public:
virtual ~TestMainFrame();
void CloseWindow();
void DoButton();
void HandleMenu(
Int_t id);
void HandlePopup() { printf("menu popped up\n"); }
void HandlePopdown() { printf("menu popped down\n"); }
void Created() { Emit("Created()"); }
void Welcome() { printf("TestMainFrame has been created. Welcome!\n"); }
};
class TestDialog {
private:
TGButton *fOkButton, *fCancelButton, *fStartB, *fStopB;
TGButton *fBtn1, *fBtn2, *fChk1, *fChk2, *fRad1, *fRad2;
void FillHistos();
public:
virtual ~TestDialog();
void DoClose();
void CloseWindow();
void DoOK();
void DoCancel();
void HandleButtons(
Int_t id = -1);
};
class TestMsgBox {
private:
public:
virtual ~TestMsgBox();
void TryToClose();
void CloseWindow();
void DoClose();
void DoRadio();
void DoTest();
};
class TestSliders {
private:
public:
virtual ~TestSliders();
void CloseWindow();
void DoText(const
char *
text);
void DoSlider(
Int_t pos = 0);
};
class TestShutter {
private:
public:
~TestShutter();
void AddShutterItem(const
char *
name, shutterData_t *
data);
void CloseWindow();
void HandleButtons();
};
class TestDirList {
protected:
public:
virtual ~TestDirList();
void CloseWindow();
};
class TestFileList {
protected:
void DisplayFile(const
TString &fname);
void DisplayDirectory(const
TString &fname);
public:
virtual ~TestFileList();
void CloseWindow();
};
class TestProgress {
private:
public:
virtual ~TestProgress();
void CloseWindow();
void DoClose();
void DoGo();
};
class EntryTestDlg {
private:
public:
virtual ~EntryTestDlg();
void CloseWindow();
void SetLimits();
void DoOK();
};
class Editor {
private:
public:
virtual ~Editor();
void LoadFile(const char *file);
void LoadBuffer(const char *buffer);
void AddBuffer(const char *buffer);
void SetTitle();
void Popup();
void CloseWindow();
void DoOK();
void DoOpen();
void DoSave();
void DoClose();
};
class TileFrame {
private:
public:
virtual ~TileFrame() { delete fFrame; }
TGFrame *GetFrame()
const {
return fFrame; }
void SetCanvas(
TGCanvas *canvas) { fCanvas = canvas; }
void HandleMouseWheel(
Event_t *event);
};
{
fFrame->Connect("ProcessedEvent(Event_t*)", "TileFrame", this, "HandleMouseWheel(Event_t*)");
fCanvas = nullptr;
}
void TileFrame::HandleMouseWheel(
Event_t *event)
{
return;
if (!fCanvas)
return;
if (fCanvas->GetContainer()->GetHeight())
page =
Int_t(
Float_t(fCanvas->GetViewPort()->GetHeight() * fCanvas->GetViewPort()->GetHeight()) /
fCanvas->GetContainer()->GetHeight());
}
Int_t newpos = fCanvas->GetVsbPosition() - page;
if (newpos < 0)
newpos = 0;
fCanvas->SetVsbPosition(newpos);
}
Int_t newpos = fCanvas->GetVsbPosition() + page;
fCanvas->SetVsbPosition(newpos);
}
}
{
fMain->Connect("CloseWindow()", "TestMainFrame", this, "CloseWindow()");
fMenuDock->SetWindowName("GuiTest Menu");
fMenuFile->AddEntry("&Open...", M_FILE_OPEN);
fMenuFile->AddEntry("&Save", M_FILE_SAVE);
fMenuFile->AddEntry("S&ave as...", M_FILE_SAVEAS);
fMenuFile->AddEntry("&Close", -1);
fMenuFile->AddSeparator();
fMenuFile->AddEntry("&Print", M_FILE_PRINT);
fMenuFile->AddEntry("P&rint setup...", M_FILE_PRINTSETUP);
fMenuFile->AddSeparator();
fMenuFile->AddEntry("E&xit", M_FILE_EXIT);
fMenuFile->DisableEntry(M_FILE_SAVEAS);
fMenuFile->HideEntry(M_FILE_PRINT);
fCascade2Menu->AddEntry("ID = 2&3", M_CASCADE_1);
fCascade2Menu->AddEntry("ID = 2&4", M_CASCADE_2);
fCascade2Menu->AddEntry("ID = 2&5", M_CASCADE_3);
fCascade1Menu->AddEntry("ID = 4&1", 41);
fCascade1Menu->AddEntry("ID = 4&2", 42);
fCascade1Menu->AddEntry("ID = 4&3", 43);
fCascade1Menu->AddSeparator();
fCascade1Menu->AddPopup("Cascade&d 2", fCascade2Menu);
fCascadeMenu->AddEntry("ID = 5&1", 51);
fCascadeMenu->AddEntry("ID = 5&2", 52);
fCascadeMenu->AddEntry("ID = 5&3", 53);
fCascadeMenu->AddSeparator();
fCascadeMenu->AddPopup("&Cascaded 1", fCascade1Menu);
fMenuTest->AddLabel("Test different features...");
fMenuTest->AddSeparator();
fMenuTest->AddEntry("&Dialog...", M_TEST_DLG);
fMenuTest->AddEntry("&Message Box...", M_TEST_MSGBOX);
fMenuTest->AddEntry("&Sliders...", M_TEST_SLIDER);
fMenuTest->AddEntry("Sh&utter...", M_TEST_SHUTTER);
fMenuTest->AddEntry("&List Directory...", M_TEST_DIRLIST);
fMenuTest->AddEntry("&File List...", M_TEST_FILELIST);
fMenuTest->AddEntry("&Progress...", M_TEST_PROGRESS);
fMenuTest->AddEntry("&Number Entry...", M_TEST_NUMBERENTRY);
fMenuTest->AddEntry("F&ont Dialog...", M_TEST_FONTDIALOG);
fMenuTest->AddSeparator();
fMenuTest->AddEntry("Add New Menus", M_TEST_NEWMENU);
fMenuTest->AddSeparator();
fMenuTest->AddPopup("&Cascaded menus", fCascadeMenu);
fMenuView->AddEntry("&Dock", M_VIEW_DOCK);
fMenuView->AddEntry("&Undock", M_VIEW_UNDOCK);
fMenuView->AddSeparator();
fMenuView->AddEntry("Enable U&ndock", M_VIEW_ENBL_DOCK);
fMenuView->AddEntry("Enable &Hide", M_VIEW_ENBL_HIDE);
fMenuView->DisableEntry(M_VIEW_DOCK);
fMenuDock->EnableUndock(
kTRUE);
fMenuDock->EnableHide(
kTRUE);
fMenuView->CheckEntry(M_VIEW_ENBL_DOCK);
fMenuView->CheckEntry(M_VIEW_ENBL_HIDE);
fMenuDock->Connect("Undocked()", "TestMainFrame", this, "HandleMenu(=M_VIEW_UNDOCK)");
fMenuHelp->AddEntry("&Contents", M_HELP_CONTENTS);
fMenuHelp->AddEntry("&Search...", M_HELP_SEARCH);
fMenuHelp->AddSeparator();
fMenuHelp->AddEntry("&About", M_HELP_ABOUT);
fMenuNew1->AddEntry("Remove New Menus", M_NEW_REMOVEMENU);
fMenuNew2->AddEntry("Remove New Menus", M_NEW_REMOVEMENU);
fMenuFile->Connect("Activated(Int_t)", "TestMainFrame", this, "HandleMenu(Int_t)");
fMenuFile->Connect("PoppedUp()", "TestMainFrame", this, "HandlePopup()");
fMenuFile->Connect("PoppedDown()", "TestMainFrame", this, "HandlePopdown()");
fMenuTest->Connect("Activated(Int_t)", "TestMainFrame", this, "HandleMenu(Int_t)");
fMenuView->Connect("Activated(Int_t)", "TestMainFrame", this, "HandleMenu(Int_t)");
fMenuHelp->Connect("Activated(Int_t)", "TestMainFrame", this, "HandleMenu(Int_t)");
fCascadeMenu->Connect("Activated(Int_t)", "TestMainFrame", this, "HandleMenu(Int_t)");
fCascade1Menu->Connect("Activated(Int_t)", "TestMainFrame", this, "HandleMenu(Int_t)");
fCascade2Menu->Connect("Activated(Int_t)", "TestMainFrame", this, "HandleMenu(Int_t)");
fMenuNew1->Connect("Activated(Int_t)", "TestMainFrame", this, "HandleMenu(Int_t)");
fMenuNew2->Connect("Activated(Int_t)", "TestMainFrame", this, "HandleMenu(Int_t)");
fMenuBar->AddPopup("&File", fMenuFile, fMenuBarItemLayout);
fMenuBar->AddPopup("&Test", fMenuTest, fMenuBarItemLayout);
fMenuBar->AddPopup("&View", fMenuView, fMenuBarItemLayout);
fMenuBar->AddPopup("&Help", fMenuHelp, fMenuBarHelpLayout);
fMenuDock->AddFrame(fMenuBar, fMenuBarLayout);
fCanvasWindow =
new TGCanvas(fMain, 400, 240);
fContainer = new TileFrame(fCanvasWindow->GetViewPort());
fContainer->SetCanvas(fCanvasWindow);
fCanvasWindow->SetContainer(fContainer->GetFrame());
for (int i = 0; i < 256; ++i)
fCanvasWindow->AddFrame(
fTestButton =
new TGTextButton(fStatusFrame,
"&Open editor...", 150);
fTestButton->
Connect(
"Clicked()",
"TestMainFrame",
this,
"DoButton()");
fTestText->SetToolTipText("This is a text entry widget");
fTestText->Resize(300, fTestText->GetDefaultHeight());
gClient->GetColorByName(
"yellow", yellow);
fMain->SetWindowName("GuiTest Signal/Slots");
fMain->MapSubwindows();
fMain->Resize();
fMain->MapWindow();
fMain->Print();
Connect("Created()", "TestMainFrame", this, "Welcome()");
Created();
}
TestMainFrame::~TestMainFrame()
{
delete fMenuFile;
delete fMenuTest;
delete fMenuView;
delete fMenuHelp;
delete fCascadeMenu;
delete fCascade1Menu;
delete fCascade2Menu;
delete fMenuNew1;
delete fMenuNew2;
delete fContainer;
delete fMain;
}
void TestMainFrame::CloseWindow()
{
}
void TestMainFrame::DoButton()
{
Editor *ed = new Editor(fMain, 600, 400);
ed->LoadBuffer(editortxt1);
ed->AddBuffer(editortxt2);
ed->AddBuffer(editortxt3);
ed->AddBuffer(editortxt4);
ed->AddBuffer(editortxt5);
ed->AddBuffer(editortxt6);
ed->Popup();
}
void TestMainFrame::HandleMenu(
Int_t id)
{
switch (id) {
case M_FILE_OPEN: {
printf(
"fIniDir = %s\n", fi.
fIniDir);
} break;
case M_FILE_SAVE: printf("M_FILE_SAVE\n"); break;
case M_FILE_PRINT:
printf("M_FILE_PRINT\n");
printf("Hiding itself, select \"Print Setup...\" to enable again\n");
fMenuFile->HideEntry(M_FILE_PRINT);
break;
case M_FILE_PRINTSETUP:
printf("M_FILE_PRINTSETUP\n");
printf("Enabling \"Print\"\n");
fMenuFile->EnableEntry(M_FILE_PRINT);
break;
case M_FILE_EXIT:
CloseWindow();
break;
case M_TEST_DLG:
new TestDialog(
gClient->GetRoot(), fMain, 400, 200);
break;
case M_TEST_MSGBOX:
new TestMsgBox(
gClient->GetRoot(), fMain, 400, 200);
break;
case M_TEST_SLIDER:
new TestSliders(
gClient->GetRoot(), fMain, 400, 200);
break;
case M_TEST_SHUTTER:
new TestShutter(
gClient->GetRoot(), fMain, 400, 200);
break;
case M_TEST_DIRLIST:
new TestDirList(
gClient->GetRoot(), fMain, 400, 200);
break;
case M_TEST_FILELIST:
new TestFileList(
gClient->GetRoot(), fMain, 400, 200);
break;
case M_TEST_PROGRESS:
new TestProgress(
gClient->GetRoot(), fMain, 600, 300);
break;
case M_TEST_NUMBERENTRY:
new EntryTestDlg(
gClient->GetRoot(), fMain);
break;
case M_TEST_FONTDIALOG: {
printf(
"Selected font: %s, size %d, italic %s, bold %s, color 0x%lx, align %u\n",
prop.fName.Data(),
} break;
case M_TEST_NEWMENU: {
if (fMenuTest->IsEntryChecked(M_TEST_NEWMENU)) {
HandleMenu(M_NEW_REMOVEMENU);
return;
}
fMenuTest->CheckEntry(M_TEST_NEWMENU);
fMenuBar->AddPopup(
"New 1", fMenuNew1, fMenuBarItemLayout,
p);
p = fMenuBar->GetPopup(
"Help");
fMenuBar->AddPopup(
"New 2", fMenuNew2, fMenuBarItemLayout,
p);
fMenuBar->MapSubwindows();
fMenuBar->Layout();
fMenuTest->AddEntry(
"Remove New Menus", M_NEW_REMOVEMENU,
nullptr,
nullptr,
e);
} break;
case M_NEW_REMOVEMENU: {
fMenuBar->RemovePopup("New 1");
fMenuBar->RemovePopup("New 2");
fMenuBar->Layout();
fMenuTest->DeleteEntry(M_NEW_REMOVEMENU);
fMenuTest->UnCheckEntry(M_TEST_NEWMENU);
} break;
case M_VIEW_ENBL_DOCK:
fMenuDock->EnableUndock(!fMenuDock->EnableUndock());
if (fMenuDock->EnableUndock()) {
fMenuView->CheckEntry(M_VIEW_ENBL_DOCK);
fMenuView->EnableEntry(M_VIEW_UNDOCK);
} else {
fMenuView->UnCheckEntry(M_VIEW_ENBL_DOCK);
fMenuView->DisableEntry(M_VIEW_UNDOCK);
}
break;
case M_VIEW_ENBL_HIDE:
fMenuDock->EnableHide(!fMenuDock->EnableHide());
if (fMenuDock->EnableHide()) {
fMenuView->CheckEntry(M_VIEW_ENBL_HIDE);
} else {
fMenuView->UnCheckEntry(M_VIEW_ENBL_HIDE);
}
break;
case M_VIEW_DOCK:
fMenuDock->DockContainer();
fMenuView->EnableEntry(M_VIEW_UNDOCK);
fMenuView->DisableEntry(M_VIEW_DOCK);
break;
case M_VIEW_UNDOCK:
fMenuDock->UndockContainer();
fMenuView->EnableEntry(M_VIEW_DOCK);
fMenuView->DisableEntry(M_VIEW_UNDOCK);
break;
default: printf("Menu item %d selected\n", id); break;
}
}
{
fMain->Connect("CloseWindow()", "TestDialog", this, "DoClose()");
fMain->DontCallClose();
fOkButton->
Connect(
"Clicked()",
"TestDialog",
this,
"DoOK()");
fCancelButton->
Connect(
"Clicked()",
"TestDialog",
this,
"DoCancel()");
fMain->AddFrame(fFrame1, fL2);
fTab =
new TGTab(fMain, 300, 300);
fTab->
Connect(
"Selected(Int_t)",
"TestDialog",
this,
"DoTab(Int_t)");
int i;
for (i = 0; i < 20; i++) {
}
fBtn1->
Connect(
"Clicked()",
"TestDialog",
this,
"HandleButtons()");
fBtn2->
Connect(
"Clicked()",
"TestDialog",
this,
"HandleButtons()");
fChk1->
Connect(
"Clicked()",
"TestDialog",
this,
"HandleButtons()");
fChk2->
Connect(
"Clicked()",
"TestDialog",
this,
"HandleButtons()");
fRad1->
Connect(
"Clicked()",
"TestDialog",
this,
"HandleButtons()");
fRad2->
Connect(
"Clicked()",
"TestDialog",
this,
"HandleButtons()");
fHpx = nullptr;
fHpxpy = nullptr;
fStartB =
new TGTextButton(fF3,
"Start &Filling Hists", 40);
fStartB->
Connect(
"Clicked()",
"TestDialog",
this,
"HandleButtons()");
fStopB->
Connect(
"Clicked()",
"TestDialog",
this,
"HandleButtons()");
fEc1->
GetCanvas()->
Connect(
"ProcessedEvent(Int_t,Int_t,Int_t,TObject*)",
"TestDialog",
this,
"HandleEmbeddedCanvas(Int_t,Int_t,Int_t,TObject*)");
gClient->GetColorByName(
"yellow", yellow);
bt->
Connect(
"Clicked()",
"TestDialog",
this,
"HandleButtons()");
bt->
Connect(
"Clicked()",
"TestDialog",
this,
"HandleButtons()");
fCheckMulti->
Connect(
"Clicked()",
"TestDialog",
this,
"HandleButtons()");
for (i = 0; i < 20; ++i) {
}
fFirstEntry = 0;
fLastEntry = 20;
char buff[100];
int j;
for (j = 0; j < 4; j++) {
snprintf(buff, 100,
"Module %i", j + 1);
tent->
SetFont(
"-adobe-courier-bold-r-*-*-14-*-*-*-*-*-iso8859-1");
}
bt->
Connect(
"Clicked()",
"TestDialog",
this,
"HandleButtons()");
bt->
Connect(
"Clicked()",
"TestDialog",
this,
"HandleButtons()");
bt->
Connect(
"Clicked()",
"TestDialog",
this,
"HandleButtons()");
fMain->AddFrame(fTab, fL5);
fMain->MapSubwindows();
fMain->Resize();
fMain->CenterOnParent();
fMain->SetWindowName("Dialog");
fMain->MapWindow();
}
TestDialog::~TestDialog()
{
fMain->DeleteWindow();
}
void TestDialog::FillHistos()
{
if (!fHpx) {
fHpx =
new TH1F(
"hpx",
"This is the px distribution", 100, -4, 4);
fHpxpy =
new TH2F(
"hpxpy",
"py vs px", 40, -4, 4, 40, -4, 4);
}
float px, py;
while (fFillHistos) {
}
}
}
}
void TestDialog::DoClose()
{
printf("\nTerminating dialog: via window manager\n");
if (fFillHistos) {
} else
CloseWindow();
}
void TestDialog::CloseWindow()
{
delete this;
}
void TestDialog::DoOK()
{
printf("\nTerminating dialog: OK pressed\n");
}
void TestDialog::DoCancel()
{
printf("\nTerminating dialog: Cancel pressed\n");
}
void TestDialog::HandleButtons(
Int_t id)
{
if (id == -1) {
}
printf("DoButton: id = %d\n", id);
static int newtab = 0;
switch (id) {
case 40:
FillHistos();
break;
case 41:
break;
case 61:
break;
case 62:
break;
case 90:
fLastEntry++;
snprintf(tmp, 20,
"Entry %i", fLastEntry);
break;
case 91:
if (fFirstEntry <= fLastEntry) {
fFirstEntry++;
}
break;
case 101:
{
if ((s ==
"Tab 3") && (fMain->MustCleanup() !=
kDeepCleanup)) {
delete fEc1;
fEc1 = nullptr;
delete fEc2;
fEc2 = nullptr;
}
} break;
case 102:
{
for (int i = 0; i < nt; i++) {
if (s == "Tab 5") {
break;
}
}
} break;
case 103:
snprintf(tmp, 20,
"New Tab %d", ++newtab);
break;
default: break;
}
}
void TestDialog::DoTab(
Int_t id)
{
printf("Tab item %d activated\n", id);
}
{
printf(
"event = %d, x = %d, y = %d, obj = %s::%s\n", event,
x,
y,
sel->IsA()->GetName(),
sel->GetName());
}
{
fMain->Connect("CloseWindow()", "TestMsgBox", this, "CloseWindow()");
fMain->DontCallClose();
gClient->GetColorByName(
"red", red);
int i;
fTestButton->
Connect(
"Clicked()",
"TestMsgBox",
this,
"DoTest()");
gClient->GetColorByName(
"green", green);
fCloseButton->
Connect(
"Clicked()",
"TestMsgBox",
this,
"DoClose()");
f1->AddFrame(fTestButton, fL1);
f1->AddFrame(fCloseButton, fL1);
f1->AddFrame(fPictButton, fL1);
fMain->AddFrame(
f1, fL21);
for (i = 0; i < 13; ++i)
for (i = 0; i < 4; ++i) {
fR[i]->
Connect(
"Clicked()",
"TestMsgBox",
this,
"DoRadio()");
}
fTbmsg->
AddText(0,
"This is a test message box.");
fMain->AddFrame(f2, fL2);
fMain->MapSubwindows();
fMain->Resize();
fMain->CenterOnParent();
fMain->SetWindowName("Message Box Test");
fMain->MapWindow();
}
TestMsgBox::~TestMsgBox()
{
fMain->DeleteWindow();
}
void TestMsgBox::CloseWindow()
{
delete this;
}
void TestMsgBox::DoClose()
{
CloseWindow();
}
void TestMsgBox::DoTest()
{
int i, buttons, retval;
buttons = 0;
for (i = 0; i < 13; i++)
buttons |= mb_button_id[i];
for (i = 0; i < 4; i++)
icontype = mb_icon[i];
break;
}
fMain->Disconnect("CloseWindow()");
fMain->Connect("CloseWindow()", "TestMsgBox", this, "TryToClose()");
fMain->Disconnect("CloseWindow()");
fMain->Connect("CloseWindow()", "TestMsgBox", this, "CloseWindow()");
}
void TestMsgBox::TryToClose()
{
printf("Can't close the window '%s' : a message box is still open\n", fMain->GetWindowName());
}
void TestMsgBox::DoRadio()
{
if (id >= 21 && id <= 24) {
for (int i = 0; i < 4; i++)
if (fR[i]->WidgetId() !=
id)
}
}
{
fMain->Connect("CloseWindow()", "TestSliders", this, "CloseWindow()");
fMain->DontCallClose();
fTeh1->
Connect(
"TextChanged(char*)",
"TestSliders",
this,
"DoText(char*)");
fTev1->
Connect(
"TextChanged(char*)",
"TestSliders",
this,
"DoText(char*)");
fHslider1->
Connect(
"PositionChanged(Int_t)",
"TestSliders",
this,
"DoSlider(Int_t)");
fVslider1->
Connect(
"PositionChanged(Int_t)",
"TestSliders",
this,
"DoSlider(Int_t)");
fTeh2->
Connect(
"TextChanged(char*)",
"TestSliders",
this,
"DoText(char*)");
fTev2->
Connect(
"TextChanged(char*)",
"TestSliders",
this,
"DoText(char*)");
fHslider2->
Connect(
"PositionChanged(Int_t)",
"TestSliders",
this,
"DoSlider(Int_t)");
fVslider2->
Connect(
"PositionChanged()",
"TestSliders",
this,
"DoSlider()");
fMain->AddFrame(fVframe2, fBfly1);
fMain->AddFrame(fVframe1, fBfly1);
fMain->SetWindowName("Slider Test");
fMain->SetWMSize(
size.fWidth,
size.fHeight);
fMain->SetWMSizeHints(
size.fWidth,
size.fHeight,
size.fWidth,
size.fHeight, 0, 0);
fMain->CenterOnParent();
fMain->MapSubwindows();
fMain->MapWindow();
}
TestSliders::~TestSliders()
{
fMain->DeleteWindow();
}
void TestSliders::CloseWindow()
{
delete this;
}
void TestSliders::DoText(const char * )
{
switch (id) {
default: break;
}
}
void TestSliders::DoSlider(
Int_t pos)
{
} else {
}
char buf[32];
#ifdef CINT_FIXED
switch (id) {
case HSId1:
#else
if (id == HSId1) {
#endif
#ifdef CINT_FIXED
break;
case VSId1:
#else
} else if (id == VSId1) {
#endif
#ifdef CINT_FIXED
break;
case HSId2:
#else
} else if (id == HSId2) {
#endif
#ifdef CINT_FIXED
break;
case VSId2:
#else
} else if (id == VSId2) {
#endif
#ifdef CINT_FIXED
break;
default: break;
#endif
}
}
{
fMain->Connect("CloseWindow()", "TestShutter", this, "CloseWindow()");
fMain->DontCallClose();
AddShutterItem("Histograms", histo_data);
AddShutterItem("Functions", function_data);
AddShutterItem("Trees", tree_data);
fMain->AddFrame(fShutter, fLayout);
fMain->MapSubwindows();
fMain->Resize(80, 300);
fMain->CenterOnParent();
fMain->SetWindowName("Shutter Test");
fMain->MapWindow();
}
void TestShutter::AddShutterItem(
const char *
name, shutterData_t *
data)
{
static int id = 5001;
for (
int i = 0;
data[i].pixmap_name !=
nullptr; i++) {
if (!buttonpic) {
printf(
"<TestShutter::AddShutterItem>: missing pixmap \"%s\", using default",
data[i].pixmap_name);
buttonpic = fDefaultPic;
}
button->Connect(
"Clicked()",
"TestShutter",
this,
"HandleButtons()");
}
}
TestShutter::~TestShutter()
{
fMain->DeleteWindow();
}
void TestShutter::CloseWindow()
{
delete this;
}
void TestShutter::HandleButtons()
{
printf(
"Shutter button %d\n", btn->
WidgetId());
}
{
fMain->Connect("CloseWindow()", "TestDirList", this, "CloseWindow()");
fMain->DontCallClose();
fMain->AddFrame(canvas, lo);
fContents->
Connect(
"DoubleClicked(TGListTreeItem*,Int_t)",
"TestDirList",
this,
"OnDoubleClick(TGListTreeItem*,Int_t)");
fContents->
Connect(
"Clicked(TGListTreeItem*,Int_t)",
"TestDirList",
this,
"OnDoubleClick(TGListTreeItem*,Int_t)");
#ifdef R__WIN32
#else
#endif
fMain->CenterOnParent();
fMain->SetWindowName("List Dir Test");
fMain->MapSubwindows();
fMain->Resize();
fMain->MapWindow();
}
TestDirList::~TestDirList()
{
delete fContents;
}
void TestDirList::CloseWindow()
{
delete this;
}
{
item = parent;
}
return dirname;
}
{
return;
TList *files = dir.GetListOfFiles();
if (files) {
if ((fname != "..") && (fname != ".")) {
}
fContents->
AddItem(item, fname, fIcon, fIcon);
}
}
delete files;
}
}
{
fMain->Connect("CloseWindow()", "TestDirList", this, "CloseWindow()");
fMain->DontCallClose();
fMain->AddFrame(mb, lo);
fMenu->AddSeparator();
fMenu->AddEntry("&Close", 10);
fMenu->Connect("Activated(Int_t)", "TestFileList", this, "DoMenu(Int_t)");
gClient->GetColorByName(
"white", white);
fContents->
Connect(
"DoubleClicked(TGFrame*,Int_t)",
"TestFileList",
this,
"OnDoubleClick(TGLVEntry*,Int_t)");
fMain->CenterOnParent();
fMain->SetWindowName("File List Test");
fMain->MapSubwindows();
fMain->MapWindow();
fContents->SetDefaultHeaders();
fContents->DisplayDirectory();
fContents->AddFile("..");
fContents->StopRefreshTimer();
}
TestFileList::~TestFileList()
{
delete fContents;
}
{
} else {
delete this;
}
}
void TestFileList::DisplayFile(
const TString &fname)
{
fContents->SetColHeaders("Name", "Title");
TIter next(file.GetListOfKeys());
while ((key = (
TKey *)next())) {
}
fMain->Resize();
}
void TestFileList::DisplayDirectory(
const TString &fname)
{
fContents->SetDefaultHeaders();
fContents->ChangeDirectory(fname);
fContents->DisplayDirectory();
fContents->AddFile("..");
}
{
static TFile *file =
nullptr;
if (file)
delete file;
if (obj) {
} else
}
}
{
return;
const char *fname = (
const char *)
f->GetUserData();
if (fname) {
DisplayObject(fname,
name);
}
else if (
name.EndsWith(
".root")) {
} else {
}
}
void TestFileList::CloseWindow()
{
delete this;
}
{
fMain->Connect("CloseWindow()", "TestProgress", this, "DoClose()");
fMain->DontCallClose();
fVProg1->SetBarColor("purple");
fVProg2->SetBarColor("green");
fHframe1->Resize(300, 300);
fHProg1->ShowPosition();
fHProg2->SetBarColor("lightblue");
fGO->Connect("Clicked()", "TestProgress", this, "DoGo()");
fHframe1->AddFrame(fVProg1, fHint1);
fHframe1->AddFrame(fVProg2, fHint1);
fMain->AddFrame(fHframe1, fHint4);
fMain->AddFrame(fVframe1, fHint5);
fMain->SetWindowName("Progress Test");
fMain->CenterOnParent();
fMain->MapSubwindows();
fMain->MapWindow();
}
TestProgress::~TestProgress()
{
fMain->DeleteWindow();
}
void TestProgress::CloseWindow()
{
delete this;
}
void TestProgress::DoClose()
{
if (fClose)
CloseWindow();
else {
}
}
void TestProgress::DoGo()
{
fVProg1->Reset();
fVProg2->Reset();
fHProg1->Reset();
fHProg2->Reset();
fHProg3->Reset();
fVProg2->SetBarColor("green");
int cnt1 = 0, cnt2 = 0, cnt3 = 0, cnt4 = 0;
int inc1 = 4, inc2 = 3, inc3 = 2, inc4 = 1;
while (cnt1 < 100 || cnt2 < 100 || cnt3 < 100 || cnt4 < 100) {
if (cnt1 < 100) {
cnt1 += inc1;
fVProg1->Increment(inc1);
}
if (cnt2 < 100) {
cnt2 += inc2;
fVProg2->Increment(inc2);
if (cnt2 > 75)
fVProg2->SetBarColor("red");
}
if (cnt3 < 100) {
cnt3 += inc3;
fHProg1->Increment(inc3);
}
if (cnt4 < 100) {
cnt4 += inc4;
fHProg2->Increment(inc4);
fHProg3->Increment(inc4);
}
if (fClose)
return;
}
}
const char *numlabel[] = {
"Integer", "One digit real", "Two digit real", "Three digit real", "Four digit real", "Real", "Degree.min.sec",
"Min:sec", "Hour:min", "Hour:min:sec", "Day/month/year", "Month/day/year", "Hex"};
1.0,
1.00,
1.000,
1.0000,
1.2E-12,
90 * 3600,
120 * 60,
12 * 60,
12 * 3600 + 15 * 60,
19991121,
19991121,
{
fMain->Connect("CloseWindow()", "EntryTestDlg", this, "CloseWindow()");
fMain->DontCallClose();
TGFont *myfont =
gClient->GetFont(
"-adobe-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1");
if (myfont)
fMain->AddFrame(fF1, fL1);
for (int i = 0; i < 13; i++) {
fF[i]->AddFrame(fNumericEntries[i], fL2);
fF[i]->AddFrame(fLabel[i], fL2);
}
fMain->AddFrame(fF2, fL3);
fLimits[0]->SetLogStep(
kFALSE);
fLimits[1]->SetLogStep(
kFALSE);
fSetButton->Connect("Clicked()", "EntryTestDlg", this, "SetLimits()");
fExitButton->Connect("Clicked()", "EntryTestDlg", this, "DoOK()");
fMain->SetWindowName("Number Entry Test");
fMain->SetIconName("Number Entry Test");
fMain->SetClassHints("NumberEntryDlg", "NumberEntryDlg");
fMain->MapSubwindows();
fMain->CenterOnParent();
fMain->MapWindow();
}
EntryTestDlg::~EntryTestDlg()
{
fMain->DeleteWindow();
}
void EntryTestDlg::CloseWindow()
{
delete this;
}
void EntryTestDlg::DoOK()
{
fMain->SendCloseMessage();
}
void EntryTestDlg::SetLimits()
{
if (low && high) {
} else if (low) {
} else if (high) {
} else {
}
if (pos) {
} else if (nneg) {
} else {
}
for (int i = 0; i < 13; i++) {
fNumericEntries[i]->SetFormat(fNumericEntries[i]->GetNumStyle(),
attr);
fNumericEntries[i]->SetLimits(lim, min, max);
}
}
{
fMain->Connect("CloseWindow()", "Editor", this, "CloseWindow()");
fMain->DontCallClose();
fMain->AddFrame(fEdit, fL1);
fEdit->Connect("Opened()", "Editor", this, "DoOpen()");
fEdit->Connect("Saved()", "Editor", this, "DoSave()");
fEdit->Connect("Closed()", "Editor", this, "DoClose()");
gClient->GetColorByName(
"#3399ff", pxl);
fEdit->SetSelectBack(pxl);
fOK->Connect("Clicked()", "Editor", this, "DoOK()");
fMain->AddFrame(fOK, fL2);
SetTitle();
fMain->MapSubwindows();
fMain->Resize();
}
Editor::~Editor()
{
fMain->DeleteWindow();
}
void Editor::SetTitle()
{
TGText *txt = GetEditor()->GetText();
char title[256];
if (untitled)
snprintf(title, 256,
"ROOT Editor - Untitled");
else
fMain->SetWindowName(title);
fMain->SetIconName(title);
}
void Editor::Popup()
{
fMain->MapWindow();
}
void Editor::LoadBuffer(const char *buffer)
{
fEdit->LoadBuffer(buffer);
}
void Editor::LoadFile(const char *file)
{
fEdit->LoadFile(file);
}
void Editor::AddBuffer(const char *buffer)
{
fEdit->AddText(&txt);
}
void Editor::CloseWindow()
{
delete this;
}
void Editor::DoOK()
{
CloseWindow();
}
void Editor::DoOpen()
{
SetTitle();
}
void Editor::DoSave()
{
SetTitle();
}
void Editor::DoClose()
{
CloseWindow();
}
void guitest()
{
new TestMainFrame(
gClient->GetRoot(), 400, 220);
}
#ifdef STANDALONE
int main(
int argc,
char **argv)
{
fprintf(stderr, "%s: cannot run in batch mode\n", argv[0]);
return 1;
}
guitest();
theApp.Run();
return 0;
}
#endif
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
R__EXTERN TApplication * gApplication
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...
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
Bool_t InheritsFrom(const char *cl) const override
Return kTRUE if this class inherits from a class with name "classname".
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 SetLayoutManager(TGLayoutManager *l)
Set the layout manager for the composite frame.
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.
void RemoveAll() override
Remove all items from the container.
virtual void SetPagePosition(const TGPosition &pos)
Set page position.
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.
virtual Float_t GetMinPosition() const
virtual void SetRange(Float_t min, Float_t max)
virtual void SetPosition(Float_t min, Float_t max)
Dragging the slider will generate the event:
This class creates a file selection dialog.
char * fFilename
selected file name
const char ** fFileTypes
file types used to filter selectable files
char * fIniDir
on input: initial directory, on output: new directory
void SetIniDir(const char *inidir)
Set directory name.
Font selection dialog, allowing to select one in the list of available fonts in the system.
Encapsulate fonts used in the GUI system.
FontStruct_t GetFontStruct() const
FontH_t GetFontHandle() const
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 GetDefaultWidth() const
virtual UInt_t GetDefaultHeight() const
TClass * IsA() const override
virtual void DeleteWindow()
Delete window.
virtual void ChangeBackground(Pixel_t back)
Change frame background color.
Encapsulate a graphics context used in the low level graphics.
void SetFont(FontH_t v)
Set font.
void SetForeground(Pixel_t v)
Set foreground color.
A composite frame with a border and a title.
TGDimension GetDefaultSize() const override
Returns default size.
virtual void SetTitlePos(ETitlePos pos=kLeft)
Concrete class for horizontal slider.
A composite frame that layout their children in horizontal way.
TGHotString is a string with a "hot" character underlined.
virtual void SetSubnames(const char *n1="", const char *n2="", const char *n3="", const char *n4="", const char *n5="", const char *n6="", const char *n7="", const char *n8="", const char *n9="", const char *n10="", const char *n11="", const char *n12="")
Sets new subnames.
void SetUserData(void *userData)
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
TGListTreeItem * GetParent() const
virtual void * GetUserData() const =0
virtual void SetUserData(void *, Bool_t=kFALSE)
A list tree is a widget that can contain a number of items arranged in a tree structure.
void AddItem(TGListTreeItem *parent, TGListTreeItem *item)
Add given item to list tree.
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
TGFrame * GetContainer() 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.
virtual void SetPosition(Int_t pos)
Set slider position.
virtual void SetRange(Int_t min, Int_t max)
Set slider 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.
void AddText(Int_t pos, const char *text)
const char * GetString() const
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.
Int_t GetCursorPosition() const
void Deselect()
Deselects all text (i.e.
virtual void SetCursorPosition(Int_t pos)
Set the cursor position to newPos.
virtual void SetFont(TGFont *font, Bool_t local=kTRUE)
Changes text font specified by pointer to TGFont object.
A TGText is a multi line text buffer.
Bool_t LoadBuffer(const char *txtbuf)
Load a 0 terminated buffer. Lines will be split at ' '.
const char * GetFileName() const
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)
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
void Draw(Option_t *option="") override
Draw this histogram with options.
2-D histogram with a float per channel (see TH1 documentation)
Int_t Fill(Double_t) override
Invalid Fill method.
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.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void Print(Option_t *option="") const
This method must be overridden when a class wants to print itself.
void SetBorderMode(Short_t bordermode) override
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.
TCanvas * GetCanvas() const
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
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.
__device__ AFloat max(AFloat x, AFloat y)
EGEventType fType
of event (see EGEventType)
UInt_t fCode
key or button code