Logo ROOT   6.08/07
Reference Guide
guitest.cpp
Go to the documentation of this file.
1 #include "guitest.h"
2 
3 
4 
7 
8 const char *filetypes1[] = { "All files", "*",
9  "ROOT files", "*.root",
10  "ROOT macros", "*.C",
11  0, 0 };
12 
13 
14 
18 
19 
21  { "h1_s.xpm", "TH1", 1001, 0 },
22  { "h2_s.xpm", "TH2", 1002, 0 },
23  { "h3_s.xpm", "TH3", 1003, 0 },
24  { "profile_s.xpm", "TProfile", 1004, 0 },
25  { 0, 0, 0, 0 }
26 };
27 
29  { "f1_s.xpm", "TF1", 2001, 0 },
30  { "f2_s.xpm", "TF2", 2002, 0 },
31  { 0, 0, 0, 0 }
32 };
33 
35  { "ntuple_s.xpm", "TNtuple", 3001, 0 },
36  { "tree_s.xpm", "TTree", 3002, 0 },
37  { "chain_s.xpm", "TChain", 3003, 0 },
38  { 0, 0, 0, 0 }
39 };
40 
41 const char *editortxt1 =
42 "This is the ROOT text edit widget TGTextEdit. It is not intended as\n"
43 "a full developers editor, but it is relatively complete and can ideally\n"
44 "be used to edit scripts or to present users editable config files, etc.\n\n"
45 "The text edit widget supports standard emacs style ctrl-key navigation\n"
46 "in addition to the arrow keys. By default the widget has under the right\n"
47 "mouse button a popup menu giving access to several built-in functions.\n\n"
48 "Cut, copy and paste between different editor windows and any other\n"
49 "standard X11 text handling application is supported.\n\n"
50 "Text can be selected with the mouse while holding the left button\n"
51 "or with the arrow keys while holding the shift key pressed. Use the\n"
52 "middle mouse button to paste text at the current mouse location.\n"
53 "Mice with scroll-ball are properly supported.\n\n"
54 "This are the currently defined key bindings:\n"
55 "Left Arrow\n"
56 " Move the cursor one character leftwards.\n"
57 " Scroll when cursor is out of frame.\n"
58 "Right Arrow\n"
59 " Move the cursor one character rightwards.\n"
60 " Scroll when cursor is out of frame.\n"
61 "Backspace\n"
62 " Deletes the character on the left side of the text cursor and moves the\n"
63 " cursor one position to the left. If a text has been marked by the user\n"
64 " (e.g. by clicking and dragging) the cursor will be put at the beginning\n"
65 " of the marked text and the marked text will be removed.\n"
66 "Home\n"
67 " Moves the text cursor to the left end of the line. If mark is TRUE text\n"
68 " will be marked towards the first position, if not any marked text will\n"
69 " be unmarked if the cursor is moved.\n"
70 "End\n"
71 " Moves the text cursor to the right end of the line. If mark is TRUE text\n"
72 " will be marked towards the last position, if not any marked text will\n"
73 " be unmarked if the cursor is moved.\n"
74 "Delete\n"
75 " Deletes the character on the right side of the text cursor. If a text\n"
76 " has been marked by the user (e.g. by clicking and dragging) the cursor\n"
77 " will be put at the beginning of the marked text and the marked text will\n"
78 " be removed.\n"
79 "Shift - Left Arrow\n"
80 " Mark text one character leftwards.\n"
81 "Shift - Right Arrow\n"
82 " Mark text one character rightwards.\n"
83 "Control-A\n"
84 " Move the cursor to the beginning of the line.\n"
85 "Control-B\n"
86 " Move the cursor one character leftwards.\n"
87 "Control-C\n"
88 " Copy the marked text to the clipboard.\n"
89 "Control-D\n"
90 " Delete the character to the right of the cursor.\n"
91 "Control-E\n"
92 " Move the cursor to the end of the line.\n"
93 "Control-F\n"
94 " Move the cursor one character rightwards.\n"
95 "Control-H\n"
96 " Delete the character to the left of the cursor.\n"
97 "Control-K\n"
98 " Delete marked text if any or delete all\n"
99 " characters to the right of the cursor.\n"
100 "Control-U\n"
101 " Delete all characters on the line.\n"
102 "Control-V\n"
103 " Paste the clipboard text into line edit.\n"
104 "Control-X\n"
105 " Cut the marked text, copy to clipboard.\n"
106 "Control-Y\n"
107 " Paste the clipboard text into line edit.\n"
108 "\n"
109 "All other keys with valid ASCII codes insert themselves into the line.";
110 
111 
112 
113 
114 
115 
117  TGCompositeFrame(p, 10, 10, kHorizontalFrame, GetWhitePixel())
118 {
119  // Create tile view container. Used to show colormap.
120 
121  fCanvas = 0;
122  SetLayoutManager(new TGTileLayout(this, 8));
123 
124  gVirtualX->GrabButton(fId, kAnyButton, kAnyModifier,
127 }
128 
130 {
131  // Handle wheel mouse to scroll.
132 
133  Int_t page = 0;
134  if (event->fCode == kButton4 || event->fCode == kButton5) {
135  if (!fCanvas) return kTRUE;
136  if (fCanvas->GetContainer()->GetHeight())
137  page = Int_t(Float_t(fCanvas->GetViewPort()->GetHeight() *
138  fCanvas->GetViewPort()->GetHeight()) /
140  }
141 
142  if (event->fCode == kButton4) {
143  //scroll up
144  Int_t newpos = fCanvas->GetVsbPosition() - page;
145  if (newpos < 0) newpos = 0;
146  fCanvas->SetVsbPosition(newpos);
147  return kTRUE;
148  }
149  if (event->fCode == kButton5) {
150  // scroll down
151  Int_t newpos = fCanvas->GetVsbPosition() + page;
152  fCanvas->SetVsbPosition(newpos);
153  return kTRUE;
154  }
155  return kTRUE;
156 }
157 
158 
160  : TGMainFrame(p, w, h)
161 {
162  // Create test main frame. A TGMainFrame is a top level window.
163 
164  // Create menubar and popup menus. The hint objects are used to place
165  // and group the different menu widgets with respect to eachother.
167  0, 0, 1, 1);
170 
172  fMenuFile->AddEntry("&Open...", M_FILE_OPEN);
173  fMenuFile->AddEntry("&Save", M_FILE_SAVE);
174  fMenuFile->AddEntry("S&ave as...", M_FILE_SAVEAS);
175  fMenuFile->AddEntry("&Close", -1);
177  fMenuFile->AddEntry("&Print", -1);
178  fMenuFile->AddEntry("P&rint setup...", -1);
180  fMenuFile->AddEntry("E&xit", M_FILE_EXIT);
181 
183 
185  fCascade2Menu->AddEntry("ID = 2&1", M_CASCADE_1);
186  fCascade2Menu->AddEntry("ID = 2&2", M_CASCADE_2);
187  fCascade2Menu->AddEntry("ID = 2&3", M_CASCADE_3);
188 
190  fCascade1Menu->AddEntry("ID = 4&1", 41);
191  fCascade1Menu->AddEntry("ID = 4&2", 42);
192  fCascade1Menu->AddEntry("ID = 4&3", 43);
194  fCascade1Menu->AddPopup("Cascade&d 2", fCascade2Menu);
195 
197  fCascadeMenu->AddEntry("ID = 5&1", 51);
198  fCascadeMenu->AddEntry("ID = 5&2", 52);
199  fCascadeMenu->AddEntry("ID = 5&3", 53);
201  fCascadeMenu->AddPopup("&Cascaded 1", fCascade1Menu);
202  fCascadeMenu->AddPopup("C&ascaded 2", fCascade2Menu);
203 
205  fMenuTest->AddLabel("Test different features...");
207  fMenuTest->AddEntry("&Dialog...", M_TEST_DLG);
208  fMenuTest->AddEntry("&Message Box...", M_TEST_MSGBOX);
209  fMenuTest->AddEntry("&Sliders...", M_TEST_SLIDER);
210  fMenuTest->AddEntry("Sh&utter...", M_TEST_SHUTTER);
211  fMenuTest->AddEntry("&Progress...", M_TEST_PROGRESS);
213  fMenuTest->AddPopup("&Cascaded menus", fCascadeMenu);
214 
216  fMenuHelp->AddEntry("&Contents", M_HELP_CONTENTS);
217  fMenuHelp->AddEntry("&Search...", M_HELP_SEARCH);
219  fMenuHelp->AddEntry("&About", M_HELP_ABOUT);
220 
221  // Menu button messages are handled by the main frame (i.e. "this")
222  // ProcessMessage() method.
223  fMenuFile->Associate(this);
224  fMenuTest->Associate(this);
225  fMenuHelp->Associate(this);
226  fCascadeMenu->Associate(this);
227  fCascade1Menu->Associate(this);
228  fCascade2Menu->Associate(this);
229 
230  fMenuBar = new TGMenuBar(this, 1, 1, kHorizontalFrame);
234 
236 
237  // Create TGCanvas and a canvas container which uses a tile layout manager
238  fCanvasWindow = new TGCanvas(this, 400, 240);
242 
243  // Fill canvas with 256 colored frames (notice that doing it this way
244  // causes a memory leak when deleting the canvas (i.e. the TGFrame's and
245  // TGLayoutHints are NOT adopted by the canvas).
246  // Best is to create a TList and store all frame and layout pointers
247  // in it. When deleting the canvas just delete contents of list.
248  for (int i=0; i < 256; ++i)
250  32, 32, 0, (i+1)&255),
252 
254  0, 0, 2, 2));
255 
256  // Create status frame containing a button and a text entry widget
257  fStatusFrame = new TGCompositeFrame(this, 60, 20, kHorizontalFrame |
258  kSunkenFrame);
259 
260  fTestButton = new TGTextButton(fStatusFrame, "&Open editor...", 150);
261  fTestButton->Associate(this);
262  fTestButton->SetToolTipText("Pops up editor");
264  kLHintsLeft, 2, 0, 2, 2));
266  fTestText->SetToolTipText("This is a text entry widget");
269  10, 2, 2, 2));
271  0, 0, 1, 0));
272 
273  SetWindowName("GuiTest");
274 
275  MapSubwindows();
276 
277  // we need to use GetDefault...() to initialize the layout algorithm...
279  //Resize(400, 200);
280 
281  MapWindow();
282 }
283 
285 {
286  // Delete all created widgets.
287 
288  delete fTestButton;
289  delete fTestText;
290 
291  delete fStatusFrame;
292  delete fContainer;
293  delete fCanvasWindow;
294 
295  delete fMenuBarLayout;
296  delete fMenuBarItemLayout;
297  delete fMenuBarHelpLayout;
298 
299  delete fMenuBar;
300  delete fMenuFile;
301  delete fMenuTest;
302  delete fMenuHelp;
303  delete fCascadeMenu;
304  delete fCascade1Menu;
305  delete fCascade2Menu;
306 }
307 
309 {
310  // Got close message for this MainFrame. Terminate the application
311  // or returns from the TApplication event loop (depending on the
312  // argument specified in TApplication::Run()).
313 
315 }
316 
318 {
319  // Handle messages send to the TestMainFrame object. E.g. all menu button
320  // messages.
321 
322  switch (GET_MSG(msg)) {
323 
324  case kC_COMMAND:
325  switch (GET_SUBMSG(msg)) {
326 
327  case kCM_BUTTON:
328  //printf("Button was pressed, id = %ld\n", parm1);
329  if (parm1 == 150) {
330  Editor *ed = new Editor(this, 600, 400);
331  ed->LoadBuffer(editortxt1);
332  ed->Popup();
333  }
334  break;
335 
336  case kCM_MENUSELECT:
337  //printf("Pointer over menu entry, id=%ld\n", parm1);
338  break;
339 
340  case kCM_MENU:
341  switch (parm1) {
342 
343  case M_FILE_OPEN:
344  {
345  static TString dir(".");
346  TGFileInfo fi;
347  fi.fFileTypes = filetypes1;
348  fi.fIniDir = StrDup(dir);
349  new TGFileDialog(fClient->GetRoot(), this, kFDOpen, &fi);
350  printf("Open file: %s (dir: %s)\n", fi.fFilename,
351  fi.fIniDir);
352  dir = fi.fIniDir;
353  }
354  break;
355 
356  case M_TEST_DLG:
357  new TestDialog(fClient->GetRoot(), this, 400, 200);
358  break;
359 
360  case M_FILE_SAVE:
361  printf("M_FILE_SAVE\n");
362  break;
363 
364  case M_FILE_EXIT:
365  CloseWindow(); // this also terminates theApp
366  break;
367 
368  case M_TEST_MSGBOX:
369  new TestMsgBox(fClient->GetRoot(), this, 400, 200);
370  break;
371 
372  case M_TEST_SLIDER:
373  new TestSliders(fClient->GetRoot(), this, 400, 200);
374  break;
375 
376  case M_TEST_SHUTTER:
377  new TestShutter(fClient->GetRoot(), this, 400, 200);
378  break;
379 
380  case M_TEST_PROGRESS:
381  new TestProgress(fClient->GetRoot(), this, 600, 300);
382  break;
383 
384  default:
385  break;
386  }
387  default:
388  break;
389  }
390  default:
391  break;
392  }
393  return kTRUE;
394 }
395 
397  UInt_t h, UInt_t options)
398  : TGTransientFrame(p, main, w, h, options)
399 {
400  // Create a dialog window. A dialog window pops up with respect to its
401  // "main" window.
402 
403  // Used to store GUI elements that need to be deleted in the ctor.
404  fCleanup = new TList;
405 
406  fFrame1 = new TGHorizontalFrame(this, 60, 20, kFixedWidth);
407 
408  fOkButton = new TGTextButton(fFrame1, "&Ok", 1);
409  fOkButton->Associate(this);
410  fCancelButton = new TGTextButton(fFrame1, "&Cancel", 2);
411  fCancelButton->Associate(this);
412 
414  2, 2, 2, 2);
415  fL2 = new TGLayoutHints(kLHintsBottom | kLHintsRight, 2, 2, 5, 1);
416 
419 
421  AddFrame(fFrame1, fL2);
422 
423  //--------- create Tab widget and some composite frames for Tab testing
424 
425  fTab = new TGTab(this, 300, 300);
426  fL3 = new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 5);
427 
428  TGCompositeFrame *tf = fTab->AddTab("Tab 1");
429  fF1 = new TGCompositeFrame(tf, 60, 20, kVerticalFrame);
430  fF1->AddFrame(new TGTextButton(fF1, "&Test button", 0), fL3);
431  fF1->AddFrame(fTxt1 = new TGTextEntry(fF1, new TGTextBuffer(100)), fL3);
432  fF1->AddFrame(fTxt2 = new TGTextEntry(fF1, new TGTextBuffer(100)), fL3);
433  tf->AddFrame(fF1, fL3);
436 
437  tf = fTab->AddTab("Tab 2");
439  200, 2, 2, 2);
440  fF2 = new TGCompositeFrame(tf, 60, 20, kVerticalFrame);
441  fF2->AddFrame(fBtn1 = new TGTextButton(fF2, "&Button 1", 0), fL1);
442  fF2->AddFrame(fBtn2 = new TGTextButton(fF2, "B&utton 2", 0), fL1);
443  fF2->AddFrame(fChk1 = new TGCheckButton(fF2, "C&heck 1", 0), fL1);
444  fF2->AddFrame(fChk2 = new TGCheckButton(fF2, "Chec&k 2", 0), fL1);
445  fF2->AddFrame(fRad1 = new TGRadioButton(fF2, "&Radio 1", 81), fL1);
446  fF2->AddFrame(fRad2 = new TGRadioButton(fF2, "R&adio 2", 82), fL1);
447  fCombo = new TGComboBox(fF2, 88);
448  fF2->AddFrame(fCombo, fL3);
449 
450  tf->AddFrame(fF2, fL3);
451 
452  int i;
453  for (i = 0; i < 20; i++) {
454  char tmp[20];
455 
456  sprintf(tmp, "Entry %i", i+1);
457  fCombo->AddEntry(tmp, i+1);
458  }
459 
460  fCombo->Resize(150, 20);
461 
462  fBtn1->Associate(this);
463  fBtn2->Associate(this);
464  fChk1->Associate(this);
465  fChk2->Associate(this);
466  fRad1->Associate(this);
467  fRad2->Associate(this);
468 
469  //-------------- embedded canvas demo
471  fHpx = 0;
472  fHpxpy = 0;
473 
474  tf = fTab->AddTab("Tab 3");
475  fF3 = new TGCompositeFrame(tf, 60, 20, kHorizontalFrame);
476  fStartB = new TGTextButton(fF3, "Start &Filling Hists", 40);
477  fStopB = new TGTextButton(fF3, "&Stop Filling Hists", 41);
478  fStartB->Associate(this);
479  fStopB->Associate(this);
480  fF3->AddFrame(fStartB, fL3);
481  fF3->AddFrame(fStopB, fL3);
482 
483  fF5 = new TGCompositeFrame(tf, 60, 60, kHorizontalFrame);
484 
486  kLHintsExpandY, 5, 5, 5, 5);
487  fEc1 = new TRootEmbeddedCanvas("ec1", fF5, 100, 100);
488  fF5->AddFrame(fEc1, fL4);
489  fEc2 = new TRootEmbeddedCanvas("ec2", fF5, 100, 100);
490  fF5->AddFrame(fEc2, fL4);
491 
492  tf->AddFrame(fF3, fL3);
493  tf->AddFrame(fF5, fL4);
494 
497 
498  // make tab yellow
499  ULong_t yellow;
500  fClient->GetColorByName("yellow", yellow);
501  TGTabElement *tabel = fTab->GetTabTab(2);
502  tabel->ChangeBackground(yellow);
503 
504  //-------------- end embedded canvas demo
505 
506  TGTextButton *bt;
507  tf = fTab->AddTab("Tab 4");
508  fF4 = new TGCompositeFrame(tf, 60, 20, kVerticalFrame);
509  fF4->AddFrame(bt = new TGTextButton(fF4, "A&dd Entry", 90), fL3);
510  bt->Associate(this);
511  fCleanup->Add(bt);
512  fF4->AddFrame(bt = new TGTextButton(fF4, "Remove &Entry", 91), fL3);
513  bt->Associate(this);
514  fCleanup->Add(bt);
515  fF4->AddFrame(fListBox = new TGListBox(fF4, 89), fL3);
516  fF4->AddFrame(fCheckMulti = new TGCheckButton(fF4, "&Mutli Selectable", 92), fL3);
517  fCheckMulti->Associate(this);
518  tf->AddFrame(fF4, fL3);
519 
520  for (i=0; i < 20; ++i) {
521  char tmp[20];
522 
523  sprintf(tmp, "Entry %i", i+1);
524  fListBox->AddEntry(tmp, i+1);
525  }
526  fFirstEntry = 1;
527  fLastEntry = 20;
528 
529  fListBox->Resize(150, 80);
530 
531  //--- tab 5
532  tf = fTab->AddTab("Tab 5");
534 
535  fF6 = new TGGroupFrame(tf, "Options", kVerticalFrame);
536  tf->AddFrame(fF6, fL3);
537 
538  // 2 column, n rows
539  fF6->SetLayoutManager(new TGMatrixLayout(fF6, 0, 2, 10));
540  char buff[100];
541  int j;
542  for (j = 0; j < 4; j++) {
543  sprintf(buff, "Module %i", j+1);
544  fF6->AddFrame(new TGLabel(fF6, new TGHotString(buff)));
545 
546  TGTextBuffer *tbuf = new TGTextBuffer(10);
547  tbuf->AddText(0, "0.0");
548 
549  TGTextEntry *tent = new TGTextEntry(fF6, tbuf);
550  tent->Resize(50, tent->GetDefaultHeight());
551  tent->SetFont("-adobe-courier-bold-r-*-*-14-*-*-*-*-*-iso8859-1");
552  fCleanup->Add(tent);
553  fF6->AddFrame(tent);
554  }
556 
557  // another matrix with text and buttons
558  fF7 = new TGGroupFrame(tf, "Tab Handling", kVerticalFrame);
559  tf->AddFrame(fF7, fL3);
560 
561  fF7->SetLayoutManager(new TGMatrixLayout(fF7, 0, 1, 10));
562 
563  fF7->AddFrame(bt = new TGTextButton(fF7, "Remove Tab", 101));
564  bt->Associate(this);
565  bt->Resize(90, bt->GetDefaultHeight());
566  fCleanup->Add(bt);
567 
568  fF7->AddFrame(bt = new TGTextButton(fF7, "Add Tab", 103));
569  bt->Associate(this);
570  bt->Resize(90, bt->GetDefaultHeight());
571  fCleanup->Add(bt);
572 
573  fF7->AddFrame(bt = new TGTextButton(fF7, "Remove Tab 5", 102));
574  bt->Associate(this);
575  bt->Resize(90, bt->GetDefaultHeight());
576  fCleanup->Add(bt);
577 
579 
580  //--- end of last tab
581 
583  kLHintsExpandY, 2, 2, 5, 1);
584  AddFrame(fTab, fL5);
585 
586  MapSubwindows();
588 
589  // position relative to the parent's window
590  Window_t wdum;
591  int ax, ay;
592  gVirtualX->TranslateCoordinates(main->GetId(), GetParent()->GetId(),
593  (((TGFrame *) main)->GetWidth() - fWidth) >> 1,
594  (((TGFrame *) main)->GetHeight() - fHeight) >> 1,
595  ax, ay, wdum);
596  Move(ax, ay);
597 
598  SetWindowName("Dialog");
599 
600  MapWindow();
601  //fClient->WaitFor(this); // otherwise canvas contextmenu does not work
602 }
603 
605 {
606  // Delete test dialog widgets.
607 
608  fCleanup->Delete();
609  delete fCleanup;
610  delete fOkButton;
611  delete fCancelButton;
612  delete fStartB; delete fStopB;
613  delete fFrame1;
614  delete fBtn1; delete fBtn2;
615  delete fChk1; delete fChk2;
616  delete fRad1; delete fRad2;
617  delete fTxt1; delete fTxt2;
618  delete fEc1; delete fEc2;
619  delete fListBox; delete fCheckMulti;
620  delete fF1; delete fF2; delete fF3; delete fF4; delete fF5;
621  delete fF6; delete fF7;
622  delete fCombo;
623  delete fTab;
624  delete fL3; delete fL4;
625  delete fL1; delete fL2;
626  delete fHpx; delete fHpxpy;
627 }
628 
630 {
631  // Fill histograms till user clicks "Stop Filling" button.
632 
633  static int cnt;
634 
635  if (!fHpx) {
636  fHpx = new TH1F("hpx","This is the px distribution",100,-4,4);
637  fHpxpy = new TH2F("hpxpy","py vs px",40,-4,4,40,-4,4);
639  cnt = 0;
640  }
641 
642  const int kUPDATE = 1000;
643  float px, py;
644  TCanvas *c1 = fEc1->GetCanvas();
645  TCanvas *c2 = fEc2->GetCanvas();
646 
647  while (fFillHistos) {
648  gRandom->Rannor(px,py); //px and py will be two gaussian random numbers
649  fHpx->Fill(px);
650  fHpxpy->Fill(px,py);
651  cnt++;
652  if (!(cnt % kUPDATE)) {
653  if (cnt == kUPDATE) {
654  c1->cd();
655  fHpx->Draw();
656  c2->cd();
657  fHpxpy->Draw("cont");
658  }
659  c1->Modified();
660  c1->Update();
661  c2->Modified();
662  c2->Update();
663  gSystem->ProcessEvents(); // handle GUI events
664  }
665  }
666 }
667 
669 {
670  // Called when window is closed via the window manager.
671 
672  delete this;
673 }
674 
676 {
677  // Process messages coming from widgets associated with the dialog.
678 
679  char tmp[20];
680  static int newtab = 0;
681 
682  switch (GET_MSG(msg)) {
683  case kC_COMMAND:
684 
685  switch (GET_SUBMSG(msg)) {
686  case kCM_BUTTON:
687  switch(parm1) {
688  case 1:
689  case 2:
690  printf("\nTerminating dialog: %s pressed\n",
691  (parm1 == 1) ? "OK" : "Cancel");
692  CloseWindow();
693  break;
694  case 40: // start histogram filling
695  fFillHistos = kTRUE;
696  FillHistos();
697  break;
698  case 41: // stop histogram filling
700  break;
701  case 90: // add one entry in list box
702  fLastEntry++;
703  sprintf(tmp, "Entry %i", fLastEntry);
706  fListBox->Layout();
707  break;
708  case 91: // remove one entry in list box
709  if (fFirstEntry < fLastEntry) {
711  fListBox->Layout();
712  fFirstEntry++;
713  }
714  break;
715  case 101: // remove tabs
716  {
717  TString s = fTab->GetTabTab(0)->GetString();
718  if (s == "Tab 3") {
719  // Need to delete the embedded canvases
720  // since RemoveTab() will Destroy the container
721  // window, which in turn will destroy the embedded
722  // canvas windows.
723  SafeDelete(fEc1);
724  SafeDelete(fEc2);
725  }
726  fTab->RemoveTab(0);
727  fTab->Layout();
728  }
729  break;
730  case 102: // remove tab 5
731  {
732  int nt = fTab->GetNumberOfTabs();
733  for (int i = 0 ; i < nt; i++) {
734  TString s = fTab->GetTabTab(i)->GetString();
735  if (s == "Tab 5") {
736  fTab->RemoveTab(i);
737  fTab->Layout();
738  }
739  }
740  }
741  break;
742  case 103: // add tabs
743  sprintf(tmp, "New Tab %d", ++newtab);
744  fTab->AddTab(tmp);
745  fTab->MapSubwindows();
746  fTab->Layout();
747  break;
748  default:
749  break;
750  }
751  break;
752  case kCM_RADIOBUTTON:
753  switch (parm1) {
754  case 81:
756  break;
757  case 82:
759  break;
760  }
761  break;
762  case kCM_CHECKBUTTON:
763  switch (parm1) {
764  case 92:
766  break;
767  default:
768  break;
769  }
770  break;
771  case kCM_TAB:
772  printf("Tab item %ld activated\n", parm1);
773  break;
774  default:
775  break;
776  }
777  break;
778 
779  default:
780  break;
781  }
782  return kTRUE;
783 }
784 
786  UInt_t w, UInt_t h, UInt_t options) :
787  TGTransientFrame(p, main, w, h, options),
788  fRedTextGC(TGButton::GetDefaultGC())
789 {
790  // Create message box test dialog. Use this dialog to select the different
791  // message dialog box styles and show the message dialog by clicking the
792  // "Test" button.
793 
794  //------------------------------
795  // Set foreground color in graphics context for drawing of
796  // TGlabel and TGButtons with text in red.
797 
798  ULong_t red;
799  fClient->GetColorByName("red", red);
801  //---------------------------------
802 
803  int i, ax, ay;
804 
806 
807  f1 = new TGCompositeFrame(this, 60, 20, kVerticalFrame | kFixedWidth);
808  f2 = new TGCompositeFrame(this, 60, 20, kVerticalFrame);
809  f3 = new TGCompositeFrame(f2, 60, 20, kHorizontalFrame);
810  f4 = new TGCompositeFrame(f2, 60, 20, kHorizontalFrame);
811  f5 = new TGCompositeFrame(f2, 60, 20, kHorizontalFrame);
812 
813  fTestButton = new TGTextButton(f1, "&Test", 1, fRedTextGC());
814 
815  // Change background of fTestButton to green
816  ULong_t green;
817  fClient->GetColorByName("green", green);
819 
820  fCloseButton = new TGTextButton(f1, "&Close", 2);
821  fPictButton = new TGPictureButton(f1, fClient->GetPicture("mb_stop_s.xpm"));
822 
824 
825  fTestButton->Associate(this);
826  fCloseButton->Associate(this);
827  fPictButton->Associate(this);
828 
830  2, 2, 3, 0);
832  2, 5, 0, 2);
834  2, 5, 10, 0);
835 
839  AddFrame(f1, fL21);
840 
841  //--------- create check and radio buttons groups
842 
843  fG1 = new TGGroupFrame(f3, new TGString("Buttons"));
844  fG2 = new TGGroupFrame(f3, new TGString("Icons"));
845 
848  2, 2, 2, 2);
850  0, 0, 5, 0);
851 
852  fC[0] = new TGCheckButton(fG1, new TGHotString("Yes"), -1);
853  fC[1] = new TGCheckButton(fG1, new TGHotString("No"), -1);
854  fC[2] = new TGCheckButton(fG1, new TGHotString("OK"), -1);
855  fC[3] = new TGCheckButton(fG1, new TGHotString("Apply"), -1);
856  fC[4] = new TGCheckButton(fG1, new TGHotString("Retry"), -1);
857  fC[5] = new TGCheckButton(fG1, new TGHotString("Ignore"), -1);
858  fC[6] = new TGCheckButton(fG1, new TGHotString("Cancel"), -1);
859  fC[7] = new TGCheckButton(fG1, new TGHotString("Close"), -1);
860  fC[8] = new TGCheckButton(fG1, new TGHotString("Dismiss"), -1);
861 
862  for (i=0; i<9; ++i) fG1->AddFrame(fC[i], fL4);
863 
864  fR[0] = new TGRadioButton(fG2, new TGHotString("Stop"), 21);
865  fR[1] = new TGRadioButton(fG2, new TGHotString("Question"), 22);
866  fR[2] = new TGRadioButton(fG2, new TGHotString("Exclamation"), 23);
867  fR[3] = new TGRadioButton(fG2, new TGHotString("Asterisk"), 24);
868 
869  for (i = 0; i < 4; ++i) {
870  fG2->AddFrame(fR[i], fL4);
871  fR[i]->Associate(this);
872  }
873 
874  fC[2]->SetState(kButtonDown);
875  fR[0]->SetState(kButtonDown);
876 
877  f3->AddFrame(fG1, fL3);
878  f3->AddFrame(fG2, fL3);
879 
880  fLtitle = new TGLabel(f4, new TGString("Title:"), fRedTextGC());
881  fLmsg = new TGLabel(f5, new TGString("Message:"));
882 
883  fTitle = new TGTextEntry(f4, fTbtitle = new TGTextBuffer(100));
884  fMsg = new TGTextEntry(f5, fTbmsg = new TGTextBuffer(100));
885 
886  fTbtitle->AddText(0, "MsgBox");
887  fTbmsg->AddText(0, "This is a test message box.");
888 
890  fMsg->Resize(300, fMsg->GetDefaultHeight());
891 
893  3, 5, 0, 0);
895  0, 2, 0, 0);
896 
897  f4->AddFrame(fLtitle, fL5);
898  f4->AddFrame(fTitle, fL6);
899  f5->AddFrame(fLmsg, fL5);
900  f5->AddFrame(fMsg, fL6);
901 
902  f2->AddFrame(f3, fL1);
903  f2->AddFrame(f4, fL1);
904  f2->AddFrame(f5, fL1);
905 
906  AddFrame(f2, fL2);
907 
908  MapSubwindows();
910 
911  // position relative to the parent's window
912  Window_t wdum;
913  gVirtualX->TranslateCoordinates(main->GetId(), GetParent()->GetId(),
914  (((TGFrame *) main)->GetWidth() - fWidth) >> 1,
915  (((TGFrame *) main)->GetHeight() - fHeight) >> 1,
916  ax, ay, wdum);
917  Move(ax, ay);
918 
919  SetWindowName("Message Box Test");
920 
921  MapWindow();
922  fClient->WaitFor(this);
923 }
924 
925 // Order is important when deleting frames. Delete children first,
926 // parents last.
927 
929 {
930  // Delete widgets created by dialog.
931 
932  delete fTestButton; delete fCloseButton;
933  delete fC[0]; delete fC[1]; delete fC[2]; delete fC[3];
934  delete fC[4]; delete fC[5]; delete fC[6]; delete fC[7]; delete fC[8];
935  delete fR[0]; delete fR[1]; delete fR[2]; delete fR[3];
936  delete fTitle; delete fLtitle;
937  delete fMsg; delete fLmsg;
938  delete f3; delete f4; delete f5; delete f2; delete f1;
939  delete fL1; delete fL2; delete fL3; delete fL4; delete fL5; delete fL6;
940  delete fL21;
941 }
942 
944 {
945  // Close dialog in response to window manager close.
946 
947  delete this;
948 }
949 
951 {
952  // Process messages sent to this dialog.
953 
954  int i, buttons, retval;
955  EMsgBoxIcon icontype = kMBIconStop;
956 
957  switch(GET_MSG(msg)) {
958  case kC_COMMAND:
959 
960  switch(GET_SUBMSG(msg)) {
961  case kCM_BUTTON:
962  switch(parm1) {
963  case 1:
964  buttons = 0;
965  for (i=0; i<9; ++i)
966  if (fC[i]->GetState() == kButtonDown)
967  buttons |= mb_button_id0[i];
968 
969  for (i=0; i<4; ++i)
970  if (fR[i]->GetState() == kButtonDown)
971  { icontype = mb_icon1[i]; break; }
972 
973  new TGMsgBox(fClient->GetRoot(), this,
975  icontype, buttons, &retval);
976  break;
977 
978  case 2:
979  CloseWindow();
980  break;
981 
982  }
983  break;
984 
985  case kCM_RADIOBUTTON:
986  case kCM_CHECKBUTTON:
987  if (parm1 >= 21 && parm1 <= 24) {
988  for (i=0; i<4; ++i)
989  if (fR[i]->WidgetId() != parm1)
990  fR[i]->SetState(kButtonUp);
991  }
992  break;
993 
994  default:
995  break;
996  }
997  break;
998 
999  default:
1000  break;
1001  }
1002 
1003  return kTRUE;
1004 }
1005 
1007  UInt_t w, UInt_t h) :
1008  TGTransientFrame(p, main, w, h)
1009 {
1010  // Dialog used to test the different supported sliders.
1011 
1013 
1014  fVframe1 = new TGVerticalFrame(this, 0, 0, 0);
1015 
1016  fTeh1 = new TGTextEntry(fVframe1, fTbh1 = new TGTextBuffer(10), HId1);
1017  fTev1 = new TGTextEntry(fVframe1, fTbv1 = new TGTextBuffer(10), VId1);
1018  fTbh1->AddText(0, "0");
1019  fTbv1->AddText(0, "0");
1020 
1021  fTeh1->Associate(this);
1022  fTev1->Associate(this);
1023 
1025  fHslider1->Associate(this);
1026  fHslider1->SetRange(0,50);
1027 
1029  fVslider1->Associate(this);
1030  fVslider1->SetRange(0,8);
1031 
1032  fVframe1->Resize(100, 100);
1033 
1034  fVframe2 = new TGVerticalFrame(this, 0, 0, 0);
1035  fTeh2 = new TGTextEntry(fVframe2, fTbh2 = new TGTextBuffer(10), HId2);
1036  fTev2 = new TGTextEntry(fVframe2, fTbv2 = new TGTextBuffer(10), VId2);
1037  fTbh2->AddText(0, "0");
1038  fTbv2->AddText(0, "0");
1039 
1040  fTeh2->Associate(this);
1041  fTev2->Associate(this);
1042 
1044  fHslider2->Associate(this);
1045  fHslider2->SetRange(0,3);
1046 
1048  fVslider2->Associate(this);
1049  fVslider2->SetRange(-10,10);
1050 
1051  fVframe2->Resize(100, 100);
1052 
1053  //--- layout for buttons: top align, equally expand horizontally
1054  fBly = new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX, 0, 0, 3, 0);
1055 
1056  //--- layout for the frame: place at bottom, right aligned
1057  fBfly1 = new TGLayoutHints(kLHintsTop | kLHintsRight, 20, 10, 15, 0);
1058 
1063 
1068 
1071 
1072  SetWindowName("Slider Test");
1073  TGDimension size = GetDefaultSize();
1074  Resize(size);
1075 
1076  SetWMSize(size.fWidth, size.fHeight);
1077  SetWMSizeHints(size.fWidth, size.fHeight, size.fWidth, size.fHeight, 0, 0);
1083 
1084  // position relative to the parent's window
1085  Window_t wdummy;
1086  int ax, ay;
1087  gVirtualX->TranslateCoordinates(main->GetId(), GetParent()->GetId(),
1088  (((TGFrame *) main)->GetWidth() - fWidth) >> 1,
1089  (((TGFrame *) main)->GetHeight() - fHeight) >> 1,
1090  ax, ay, wdummy);
1091  Move(ax, ay);
1092 
1093  MapSubwindows();
1094  MapWindow();
1095 
1096  fClient->WaitFor(this);
1097 }
1098 
1100 {
1101  // Delete dialog.
1102 
1103  delete fVframe1;
1104  delete fVframe2;
1105  delete fBfly1; delete fBly;
1106  delete fHslider1; delete fHslider2;
1107  delete fVslider1; delete fVslider2;
1108  delete fTeh1; delete fTeh2; delete fTev1; delete fTev2;
1109 }
1110 
1112 {
1113  // Called when window is closed via the window manager.
1114 
1115  delete this;
1116 }
1117 
1119 {
1120  // Process slider messages.
1121 
1122  char buf[10];
1123 
1124  switch (GET_MSG(msg)) {
1125  case kC_TEXTENTRY:
1126  switch (GET_SUBMSG(msg)) {
1127  case kTE_TEXTCHANGED:
1128  switch (parm1) {
1129  case HId1:
1130  fHslider1->SetPosition(atoi(fTbh1->GetString()));
1131  break;
1132  case VId1:
1133  fVslider1->SetPosition(atoi(fTbv1->GetString()));
1134  break;
1135  case HId2:
1136  fHslider2->SetPosition(atoi(fTbh2->GetString()));
1137  break;
1138  case VId2:
1140  atoi(fTbv2->GetString())+2);
1141  break;
1142  }
1143  break;
1144  }
1145  break;
1146  case kC_VSLIDER:
1147  case kC_HSLIDER:
1148  switch (GET_SUBMSG(msg)) {
1149  case kSL_POS:
1150  sprintf(buf, "%ld", parm2);
1151  switch (parm1) {
1152  case HSId1:
1153  fTbh1->Clear();
1154  fTbh1->AddText(0, buf);
1156  break;
1157  case VSId1:
1158  fTbv1->Clear();
1159  fTbv1->AddText(0, buf);
1161  break;
1162  case HSId2:
1163  fTbh2->Clear();
1164  fTbh2->AddText(0, buf);
1166  break;
1167  case VSId2:
1168  sprintf(buf, "%f", fVslider2->GetMinPosition());
1169  fTbv2->Clear();
1170  fTbv2->AddText(0, buf);
1172  break;
1173  }
1174  break;
1175  }
1176  break;
1177  default:
1178  break;
1179  }
1180  return kTRUE;
1181 }
1182 
1184  UInt_t w, UInt_t h) :
1185  TGTransientFrame(p, main, w, h)
1186 {
1187  // Create transient frame containing a shutter widget.
1188 
1189  fDefaultPic = fClient->GetPicture("folder_s.xpm");
1190  fShutter = new TGShutter(this, kSunkenFrame);
1191 
1192  fTrash = new TList;
1193 
1194  AddShutterItem("Histograms", histo_data0);
1195  AddShutterItem("Functions", function_data0);
1196  AddShutterItem("Trees", tree_data0);
1197 
1200 
1201  MapSubwindows();
1202  Resize(80, 300);
1203 
1204  // position relative to the parent's window
1205  Window_t wdum;
1206  int ax, ay;
1207  gVirtualX->TranslateCoordinates(main->GetId(), GetParent()->GetId(),
1208  (((TGFrame *) main)->GetWidth() - fWidth) >> 1,
1209  (((TGFrame *) main)->GetHeight() - fHeight) >> 1,
1210  ax, ay, wdum);
1211  Move(ax, ay);
1212 
1213  SetWindowName("Shutter Test");
1214 
1215  MapWindow();
1216  //fClient->WaitFor(this);
1217 }
1218 
1220 {
1221  TGShutterItem *item;
1222  TGCompositeFrame *container;
1223  TGButton *button;
1224  const TGPicture *buttonpic;
1225  static int id = 5001;
1226 
1228  5, 5, 5, 0);
1229  fTrash->Add(l);
1230 
1231  item = new TGShutterItem(fShutter, new TGHotString(name), id++);
1232  container = (TGCompositeFrame *) item->GetContainer();
1233  fTrash->Add(item);
1234 
1235  for (int i=0; data[i].pixmap_name != 0; i++) {
1236  buttonpic = fClient->GetPicture(data[i].pixmap_name);
1237  if (!buttonpic) {
1238  Warning("AddShutterItem", "missing pixmap \"%s\", using default",
1239  data[i].pixmap_name);
1240  buttonpic = fDefaultPic;
1241  }
1242 
1243  button = new TGPictureButton(container, buttonpic, data[i].id);
1244  fTrash->Add(button);
1245  container->AddFrame(button, l);
1246  button->Associate(this);
1247  button->SetToolTipText(data[i].tip_text);
1248  data[i].button = button;
1249  }
1250 
1251  fShutter->AddItem(item);
1252 }
1253 
1255 {
1256  delete fLayout;
1257  delete fShutter;
1258  fTrash->Delete();
1259  delete fTrash;
1260 }
1261 
1263 {
1264  delete this;
1265 }
1266 
1268 {
1269  // Process messages sent to this dialog.
1270 
1271  printf("Shutter button %d\n", (Int_t)parm1);
1272  return kTRUE;
1273 }
1274 
1276  UInt_t w, UInt_t h) :
1277  TGTransientFrame(p, main, w, h)
1278 {
1279  // Dialog used to test the different supported progress bars.
1280 
1282 
1283  fHframe1 = new TGHorizontalFrame(this, 0, 0, 0);
1284 
1286  fVProg1->SetBarColor("purple");
1289  fVProg2->SetBarColor("green");
1290 
1291  fHframe1->Resize(300, 300);
1292 
1293  fVframe1 = new TGVerticalFrame(this, 0, 0, 0);
1294 
1295  fHProg1 = new TGHProgressBar(fVframe1, 300);
1296  fHProg1->ShowPosition();
1298  fHProg2->SetBarColor("lightblue");
1299  fHProg2->ShowPosition(kTRUE, kFALSE, "%.0f events");
1302 
1303  fGO = new TGTextButton(fVframe1, "Go", 10);
1304  fGO->Associate(this);
1305 
1306  fVframe1->Resize(300, 300);
1307 
1308  fHint1 = new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandY, 5, 10, 5, 5);
1309  fHint2 = new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX, 5, 5, 5, 10);
1310  fHint3 = new TGLayoutHints(kLHintsTop | kLHintsRight, 0, 50, 50, 0);
1311  fHint4 = new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandY, 0, 0, 0, 0);
1312  fHint5 = new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX, 0, 0, 0, 0);
1313 
1316 
1321 
1324 
1325  SetWindowName("Progress Test");
1326  TGDimension size = GetDefaultSize();
1327  Resize(size);
1328 
1329  // position relative to the parent's window
1330  Window_t wdummy;
1331  int ax, ay;
1332  gVirtualX->TranslateCoordinates(main->GetId(), GetParent()->GetId(),
1333  (((TGFrame *) main)->GetWidth() - fWidth) >> 1,
1334  (((TGFrame *) main)->GetHeight() - fHeight) >> 1,
1335  ax, ay, wdummy);
1336  Move(ax, ay);
1337 
1338  MapSubwindows();
1339  MapWindow();
1340 
1341  fClient->WaitFor(this);
1342 }
1343 
1345 {
1346  // Delete dialog.
1347 
1348  delete fHframe1;
1349  delete fVframe1;
1350  delete fVProg1; delete fVProg2;
1351  delete fHProg1; delete fHProg2; delete fHProg3;
1352  delete fHint1; delete fHint2; delete fHint3; delete fHint4; delete fHint5;
1353  delete fGO; fGO = 0; // to get cleanly out of the loop in ProcessMessage
1354 }
1355 
1357 {
1358  // Called when window is closed via the window manager.
1359 
1360  delete this;
1361 }
1362 
1364 {
1365  // Process slider messages.
1366 
1367  switch (GET_MSG(msg)) {
1368  case kC_COMMAND:
1369  switch (GET_SUBMSG(msg)) {
1370  case kCM_BUTTON:
1371  switch (parm1) {
1372  case 10:
1373  {
1374  fVProg1->Reset(); fVProg2->Reset();
1375  fHProg1->Reset(); fHProg2->Reset(); fHProg3->Reset();
1376  fVProg2->SetBarColor("green");
1377  int cnt1 = 0, cnt2 = 0, cnt3 = 0, cnt4 = 0;
1378  int inc1 = 4, inc2 = 3, inc3 = 2, inc4 = 1;
1379  while (cnt1 < 100 || cnt2 < 100 || cnt3 < 100 || cnt4 <100) {
1380  if (cnt1 < 100) {
1381  cnt1 += inc1;
1382  fVProg1->Increment(inc1);
1383  }
1384  if (cnt2 < 100) {
1385  cnt2 += inc2;
1386  fVProg2->Increment(inc2);
1387  if (cnt2 > 75)
1388  fVProg2->SetBarColor("red");
1389  }
1390  if (cnt3 < 100) {
1391  cnt3 += inc3;
1392  fHProg1->Increment(inc3);
1393  }
1394  if (cnt4 < 100) {
1395  cnt4 += inc4;
1396  fHProg2->Increment(inc4);
1397  fHProg3->Increment(inc4);
1398  }
1399  gSystem->Sleep(100);
1401  // if user closed window return
1402  if (!fGO) return kTRUE;
1403  }
1404  }
1405  break;
1406  default:
1407  break;
1408  }
1409  break;
1410  default:
1411  break;
1412  }
1413  break;
1414  default:
1415  break;
1416  }
1417  return kTRUE;
1418 }
1419 
1421  TGTransientFrame(gClient->GetRoot(), main, w, h)
1422 {
1423  // Create an editor in a dialog.
1424 
1425  fEdit = new TGTextEdit(this, w, h, kSunkenFrame | kDoubleBorder);
1426  fL1 = new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 3, 3, 3, 3);
1427  AddFrame(fEdit, fL1);
1428 
1429  fOK = new TGTextButton(this, " &OK ");
1430  fL2 = new TGLayoutHints(kLHintsBottom | kLHintsCenterX, 0, 0, 5, 5);
1431  AddFrame(fOK, fL2);
1432 
1433  SetTitle();
1434 
1435  MapSubwindows();
1436 
1438 
1439  // position relative to the parent's window
1440  Window_t wdum;
1441  int ax, ay;
1442  gVirtualX->TranslateCoordinates(main->GetId(), GetParent()->GetId(),
1443  ((TGFrame *) main)->GetWidth() - (fWidth >> 1),
1444  (((TGFrame *) main)->GetHeight() - fHeight) >> 1,
1445  ax, ay, wdum);
1446  Move(ax, ay);
1447  SetWMPosition(ax, ay);
1448 }
1449 
1451 {
1452  // Delete editor dialog.
1453 
1454  delete fEdit;
1455  delete fOK;
1456  delete fL1;
1457  delete fL2;
1458 }
1459 
1461 {
1462  // Set title in editor window.
1463 
1464  TGText *txt = GetEditor()->GetText();
1465  Bool_t untitled = !strlen(txt->GetFileName()) ? kTRUE : kFALSE;
1466 
1467  char title[256];
1468  if (untitled)
1469  sprintf(title, "ROOT Editor - Untitled");
1470  else
1471  sprintf(title, "ROOT Editor - %s", txt->GetFileName());
1472 
1473  SetWindowName(title);
1474  SetIconName(title);
1475 }
1476 
1478 {
1479  // Show editor.
1480 
1481  MapWindow();
1482 }
1483 
1484 void Editor::LoadBuffer(const char *buffer)
1485 {
1486  // Load a text buffer in the editor.
1487 
1488  fEdit->LoadBuffer(buffer);
1489 }
1490 
1491 void Editor::LoadFile(const char *file)
1492 {
1493  // Load a file in the editor.
1494 
1495  fEdit->LoadFile(file);
1496 }
1497 
1499 {
1500  // Called when closed via window manager action.
1501 
1502  delete this;
1503 }
1504 
1506 {
1507  // Process OK button.
1508 
1509  switch (GET_MSG(msg)) {
1510  case kC_COMMAND:
1511  switch (GET_SUBMSG(msg)) {
1512  case kCM_BUTTON:
1513  // Only one button and one action...
1514  delete this;
1515  break;
1516  default:
1517  break;
1518  }
1519  break;
1520  case kC_TEXTVIEW:
1521  switch (GET_SUBMSG(msg)) {
1522  case kTXT_CLOSE:
1523  // close window
1524  delete this;
1525  break;
1526  case kTXT_OPEN:
1527  SetTitle();
1528  break;
1529  case kTXT_SAVE:
1530  SetTitle();
1531  break;
1532  default:
1533  break;
1534  }
1535  default:
1536  break;
1537  }
1538 
1539  return kTRUE;
1540 }
virtual Float_t GetMinPosition() const
TGLayoutHints * fHint1
Definition: guitest.h:222
TGPopupMenu * fMenuFile
Definition: guitest.h:106
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
Definition: TGFrame.cxx:587
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
Definition: TH1.cxx:3125
TGCompositeFrame * f2
Definition: guitest.h:157
TGCompositeFrame * f1
Definition: guitest.h:157
Bool_t HandleButton(Event_t *event)
Definition: guitest.cpp:129
Int_t GetState(TGFrame *f) const
Get state of sub frame.
Definition: TGFrame.cxx:1200
virtual void Resize(UInt_t w, UInt_t h)
Resize the listbox widget.
Definition: TGListBox.cxx:1419
virtual Bool_t ProcessEvents()
Process pending events (GUI, timers, sockets).
Definition: TSystem.cxx:421
virtual void Rannor(Float_t &a, Float_t &b)
Return 2 numbers distributed following a gaussian with mean=0 and sigma=1.
Definition: TRandom.cxx:460
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
Definition: TList.cxx:405
TGButton * fRad1
Definition: guitest.h:124
TestMsgBox(const TGWindow *p, const TGWindow *main, UInt_t w, UInt_t h, UInt_t options=kVerticalFrame)
Definition: guitest.cpp:785
virtual void AddEntry(TGString *s, Int_t id)
Add entry with specified string and id to listbox.
Definition: TGListBox.cxx:1211
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Definition: guitest.cpp:950
virtual UInt_t GetOptions() const
Definition: TGFrame.h:260
TGCheckButton * fCheckMulti
Definition: guitest.h:128
TestProgress(const TGWindow *p, const TGWindow *main, UInt_t w, UInt_t h)
Definition: guitest.cpp:1275
void Increment(Float_t inc)
Increment progress position.
TGTextEntry * fTitle
Definition: guitest.h:164
TGButton * fTestButton
Definition: guitest.h:103
Definition: TGTab.h:66
void LoadFile(const char *file)
Definition: guitest.cpp:1491
virtual Bool_t LoadBuffer(const char *txtbuf)
Load text from a text buffer. Return false in case of failure.
Definition: TGTextView.cxx:469
float Float_t
Definition: RtypesCore.h:53
TGButton * fChk1
Definition: guitest.h:124
Definition: guitest.h:62
virtual void SetRange(Int_t min, Int_t max)
Definition: TGSlider.h:105
shutterData_t tree_data0[]
Definition: guitest.cpp:34
TGCompositeFrame * f5
Definition: guitest.h:157
virtual void CloseWindow()
Close and delete main frame.
Definition: guitest.cpp:308
Definition: TGText.h:71
return c1
Definition: legend1.C:41
Definition: Rtypes.h:61
Definition: guitest.h:65
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
Definition: TGFrame.cxx:1746
virtual void SetVsbPosition(Int_t newPos)
Set position of vertical scrollbar.
Definition: TGCanvas.cxx:2405
TGCanvas * fCanvasWindow
Definition: guitest.h:100
TGButton * fCloseButton
Definition: guitest.h:158
const TGWindow * GetRoot() const
Returns current root (i.e.
Definition: TGClient.cxx:222
virtual void SetToolTipText(const char *text, Long_t delayms=500)
Set tool tip text associated with this text entry.
TGTextButton * fGO
Definition: guitest.h:225
void SetForeground(Pixel_t v)
Set foreground color.
Definition: TGGC.cxx:276
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Definition: guitest.cpp:675
TGPopupMenu * fCascade1Menu
Definition: guitest.h:107
TGTextBuffer * fTbtitle
Definition: guitest.h:165
UInt_t GetHeight() const
Definition: TGFrame.h:288
THist< 1, float, THistStatContent, THistStatUncertainty > TH1F
Definition: THist.hxx:302
TH1 * h
Definition: legend2.C:5
virtual void CloseWindow()
Close and delete main frame.
Definition: guitest.cpp:1262
virtual void DisableEntry(Int_t id)
Disable entry (disabled entries appear in a sunken relieve).
Definition: TGMenu.cxx:1714
virtual void SetBorderMode(Short_t bordermode)
Definition: TPad.h:308
Definition: guitest.h:63
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad.
Definition: TCanvas.cxx:659
Definition: guitest.h:60
virtual void SetContainer(TGFrame *f)
Definition: TGCanvas.h:234
TList * fCleanup
Definition: guitest.h:140
TGShutter * fShutter
Definition: guitest.h:202
TGLayoutHints * fBly
Definition: guitest.h:183
Basic string class.
Definition: TString.h:137
#define gClient
Definition: TGClient.h:174
virtual void SetLayoutManager(TGLayoutManager *l)
Set the layout manager for the composite frame.
Definition: TGFrame.cxx:982
virtual void SetMultipleSelections(Bool_t multi=kTRUE)
Definition: TGListBox.h:335
TGLabel * fLmsg
Definition: guitest.h:166
Int_t fLastEntry
Definition: guitest.h:136
int Int_t
Definition: RtypesCore.h:41
TGLayoutHints * fL4
Definition: guitest.h:163
bool Bool_t
Definition: RtypesCore.h:59
TGLayoutHints * fL2
Definition: guitest.h:133
virtual UInt_t GetDefaultHeight() const
Definition: TGFrame.h:389
const Bool_t kFALSE
Definition: Rtypes.h:92
virtual void AddEntry(TGHotString *s, Int_t id, void *ud=0, const TGPicture *p=0, TGMenuEntry *before=0)
Add a menu entry.
Definition: TGMenu.cxx:987
Definition: guitest.h:58
Bool_t GetColorByName(const char *name, Pixel_t &pixel) const
Get a color by name.
Definition: TGClient.cxx:392
Definition: guitest.h:57
TileFrame(const TGWindow *p)
Definition: guitest.cpp:116
virtual void Terminate(Int_t status=0)
Terminate the application by call TSystem::Exit() unless application has been told to return from Run...
TGLayoutHints * fL3
Definition: guitest.h:163
virtual void SetRange(Float_t min, Float_t max)
R__EXTERN TApplication * gApplication
Definition: TApplication.h:171
TGFrame * GetContainer() const
Definition: TGCanvas.h:228
TileFrame * fContainer
Definition: guitest.h:101
shutterData_t function_data0[]
Definition: guitest.cpp:28
void Popup()
Definition: guitest.cpp:1477
TGTextEntry * fTev2
Definition: guitest.h:187
void SetIconName(const char *name)
Set window icon name. This is typically done via the window manager.
Definition: TGFrame.cxx:1759
Bool_t fFillHistos
Definition: guitest.h:137
TGTextEdit * fEdit
Definition: guitest.h:239
TGLayoutHints * fL1
Definition: guitest.h:133
TGText * GetText() const
Definition: TGTextView.h:130
Handle_t GetId() const
Definition: TGObject.h:52
virtual void AddSeparator(TGMenuEntry *before=0)
Add a menu separator to the menu.
Definition: TGMenu.cxx:1057
virtual void Layout()
Layout the elements of the composite frame.
Definition: TGFrame.cxx:1239
TGButton * fStopB
Definition: guitest.h:123
TGLayoutHints * fL5
Definition: guitest.h:163
TGHSlider * fHslider1
Definition: guitest.h:184
TGGC fRedTextGC
Definition: guitest.h:167
virtual void SetState(EButtonState state, Bool_t emit=kFALSE)
Set radio button state.
Definition: TGButton.cxx:1563
Int_t mb_button_id0[9]
Definition: guitest.cpp:15
virtual void SetBarColor(Pixel_t color)
Set progress bar color.
TRootEmbeddedCanvas * fEc2
Definition: guitest.h:134
TGVProgressBar * fVProg2
Definition: guitest.h:224
const char * editortxt1
Definition: guitest.cpp:41
const Mask_t kPointerMotionMask
Definition: GuiTypes.h:164
TGVerticalFrame * fVframe2
Definition: guitest.h:182
virtual void ChangeBackground(Pixel_t back)
Change frame background color.
Definition: TGFrame.cxx:275
virtual void AddItem(TGShutterItem *item)
Add shutter item to shutter frame.
Definition: TGShutter.cxx:71
#define SafeDelete(p)
Definition: RConfig.h:507
TGVerticalFrame * fVframe1
Definition: guitest.h:182
TGVProgressBar * fVProg1
Definition: guitest.h:224
TGTextBuffer * fTbv1
Definition: guitest.h:188
TGCompositeFrame * fF4
Definition: guitest.h:122
TGCompositeFrame * fF1
Definition: guitest.h:122
TGFrame * GetContainer() const
Definition: TGShutter.h:65
virtual void CloseWindow()
Close and delete main frame.
Definition: guitest.cpp:1356
virtual void AddLabel(TGHotString *s, const TGPicture *p=0, TGMenuEntry *before=0)
Add a menu label to the menu.
Definition: TGMenu.cxx:1092
virtual void Sleep(UInt_t milliSec)
Sleep milliSec milli seconds.
Definition: TSystem.cxx:442
TGCompositeFrame * fF5
Definition: guitest.h:122
TGLayoutHints * fL1
Definition: guitest.h:163
virtual void CloseWindow()
Close and delete main frame.
Definition: guitest.cpp:1111
const char ** fFileTypes
Definition: TGFileDialog.h:65
TGHProgressBar * fHProg3
Definition: guitest.h:223
void SetWMSizeHints(UInt_t wmin, UInt_t hmin, UInt_t wmax, UInt_t hmax, UInt_t winc, UInt_t hinc)
Give the window manager minimum and maximum size hints.
Definition: TGFrame.cxx:1862
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Definition: guitest.cpp:1118
EMsgBoxIcon mb_icon1[4]
Definition: guitest.cpp:5
TGPictureButton * fPictButton
Definition: guitest.h:159
Definition: guitest.h:59
TGCompositeFrame(const TGCompositeFrame &)
const char * GetString() const
Definition: TGTextBuffer.h:49
TGCompositeFrame * fFrame1
Definition: guitest.h:122
EMsgBoxIcon
Definition: TGMsgBox.h:40
TGHProgressBar * fHProg1
Definition: guitest.h:223
TGGroupFrame * fG2
Definition: guitest.h:162
void AddText(Int_t pos, const char *text)
Definition: TGTextBuffer.h:51
TGTextEntry * fTev1
Definition: guitest.h:187
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Adding a frame to a canvas is actually adding the frame to the viewport container.
Definition: TGCanvas.cxx:2185
virtual Bool_t LoadFile(const char *fname, long startpos=0, long length=-1)
Load a file in the text view widget.
Definition: TGTextView.cxx:452
TGLayoutHints * fL4
Definition: guitest.h:133
TGLayoutHints * fMenuBarHelpLayout
Definition: guitest.h:108
TH2F * fHpxpy
Definition: guitest.h:139
Definition: guitest.h:64
TGComboBox * fCombo
Definition: guitest.h:130
TGTextEntry * fTeh1
Definition: guitest.h:187
virtual EButtonState GetState() const
Definition: TGButton.h:116
TGTextBuffer * fTbv2
Definition: guitest.h:188
TGLayoutHints * fL3
Definition: guitest.h:133
TGVerticalFrame * fVframe1
Definition: guitest.h:221
Definition: TGMsgBox.h:51
TGCompositeFrame * fF7
Definition: guitest.h:122
UInt_t fHeight
Definition: TGDimension.h:32
TRootEmbeddedCanvas * fEc1
Definition: guitest.h:134
TGViewPort * GetViewPort() const
Definition: TGCanvas.h:229
Editor(const TGWindow *main, UInt_t w, UInt_t h)
Definition: guitest.cpp:1420
const char * GetFileName() const
Definition: TGText.h:102
virtual void CloseWindow()
Close and delete main frame.
Definition: guitest.cpp:943
void WaitFor(TGWindow *w)
Wait for window to be destroyed.
Definition: TGClient.cxx:706
TestDialog(const TGWindow *p, const TGWindow *main, UInt_t w, UInt_t h, UInt_t options=kVerticalFrame)
Definition: guitest.cpp:396
A doubly linked list.
Definition: TList.h:47
TGTextEntry * fTeh2
Definition: guitest.h:187
const char * pixmap_name
Definition: guitest.h:70
TGLabel * fLtitle
Definition: guitest.h:166
void SetTitle()
Definition: guitest.cpp:1460
TGHorizontalFrame * fHframe1
Definition: guitest.h:220
const Mask_t kButtonPressMask
Definition: GuiTypes.h:162
TGPopupMenu * fMenuTest
Definition: guitest.h:106
const char * filetypes1[]
Definition: guitest.cpp:8
UInt_t fWidth
Definition: TGDimension.h:31
TGVSlider * fVslider1
Definition: guitest.h:185
TGButton * fChk2
Definition: guitest.h:124
TGLayoutHints * fL1
Definition: guitest.h:241
TGButton * fCancelButton
Definition: guitest.h:123
void SetCanvas(TGCanvas *canvas)
Definition: guitest.h:90
TGPopupMenu * fCascadeMenu
Definition: guitest.h:107
R__EXTERN TSystem * gSystem
Definition: TSystem.h:549
virtual void Draw(Option_t *option="")
Draw this histogram with options.
Definition: TH1.cxx:2851
TGRadioButton * fR[4]
Definition: guitest.h:160
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
Definition: TAttFill.h:42
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
Definition: TGFrame.h:391
Int_t GET_SUBMSG(Long_t val)
TestSliders(const TGWindow *p, const TGWindow *main, UInt_t w, UInt_t h)
Definition: guitest.cpp:1006
TGLayoutHints * fHint2
Definition: guitest.h:222
virtual ~TestDialog()
Definition: guitest.cpp:604
virtual void Associate(const TGWindow *w)
Definition: TGWidget.h:90
TGButton * fBtn1
Definition: guitest.h:124
virtual void Associate(const TGWindow *w)
Definition: TGMenu.h:227
virtual TGCompositeFrame * AddTab(TGString *text)
Add a tab to the tab widget.
Definition: TGTab.cxx:341
TGTextBuffer * fTbmsg
Definition: guitest.h:165
TGButton * fStartB
Definition: guitest.h:123
TList * fTrash
Definition: guitest.h:205
unsigned int UInt_t
Definition: RtypesCore.h:42
virtual ~TestMsgBox()
Definition: guitest.cpp:928
const Handle_t kNone
Definition: GuiTypes.h:89
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t)
Definition: guitest.cpp:317
TGListBox * fListBox
Definition: guitest.h:129
virtual void SetPosition(Int_t pos)
Definition: TGSlider.h:106
virtual void ChangeOptions(UInt_t options)
Change composite frame options. Options is an OR of the EFrameTypes.
Definition: TGFrame.cxx:1025
virtual UInt_t GetDefaultWidth() const
Definition: TGFrame.h:253
TGMenuBar * fMenuBar
Definition: guitest.h:105
TLine * l
Definition: textangle.C:4
TGButton * fOkButton
Definition: guitest.h:123
TGTextEdit * GetEditor() const
Definition: guitest.h:251
Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Definition: guitest.cpp:1505
TGLayoutHints * fHint5
Definition: guitest.h:222
virtual void RemoveTab(Int_t tabIndex=-1, Bool_t storeRemoved=kTRUE)
Remove container and tab of tab with index tabIndex.
Definition: TGTab.cxx:392
void ShowPosition(Bool_t set=kTRUE, Bool_t percent=kTRUE, const char *format="%.2f")
Show postion text, either in percent or formatted according format.
R__EXTERN TRandom * gRandom
Definition: TRandom.h:66
shutterData_t histo_data0[]
Definition: guitest.cpp:20
virtual ~Editor()
Definition: guitest.cpp:1450
TGTab * fTab
Definition: guitest.h:131
#define gVirtualX
Definition: TVirtualX.h:362
UInt_t fWidth
Definition: TGFrame.h:150
TGButton * button
Definition: guitest.h:73
virtual void Move(Int_t x, Int_t y)
Move frame.
Definition: TGFrame.cxx:575
char * StrDup(const char *str)
Duplicate the string str.
Definition: TString.cxx:2514
Int_t GET_MSG(Long_t val)
void AddShutterItem(const char *name, shutterData_t data[])
Definition: guitest.cpp:1219
TGCompositeFrame * fStatusFrame
Definition: guitest.h:99
long Long_t
Definition: RtypesCore.h:50
virtual UInt_t GetDefaultHeight() const
Definition: TGFrame.h:254
The Canvas class.
Definition: TCanvas.h:41
TGButton * fRad2
Definition: guitest.h:124
void LoadBuffer(const char *buffer)
Definition: guitest.cpp:1484
return c2
Definition: legend2.C:14
TGCompositeFrame * f4
Definition: guitest.h:157
TGHSlider * fHslider2
Definition: guitest.h:184
TGCompositeFrame * fF6
Definition: guitest.h:122
virtual void AddEntry(TGString *s, Int_t id)
Definition: TGComboBox.h:108
TGLayoutHints * fL2
Definition: guitest.h:163
const Mask_t kButtonReleaseMask
Definition: GuiTypes.h:163
TCanvas * GetCanvas() const
TGLayoutHints * fMenuBarLayout
Definition: guitest.h:108
UInt_t fCode
Definition: GuiTypes.h:181
const TGPicture * GetPicture(const char *name)
Get picture from the picture pool.
Definition: TGClient.cxx:287
unsigned long ULong_t
Definition: RtypesCore.h:51
char * fFilename
Definition: TGFileDialog.h:63
TGTextBuffer * fTbh1
Definition: guitest.h:188
UInt_t fHeight
Definition: TGFrame.h:151
void FillHistos()
Definition: guitest.cpp:629
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
Definition: TGFrame.cxx:1099
const TGWindow * GetParent() const
Definition: TGWindow.h:87
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
Definition: TGFrame.cxx:1146
void CloseWindow()
Close and delete main frame.
Definition: guitest.cpp:1498
Handle_t fId
Definition: TGObject.h:40
void Clear()
Definition: TGTextBuffer.h:54
TGCompositeFrame * f3
Definition: guitest.h:157
TH1F * fHpx
Definition: guitest.h:138
TGLayoutHints * fHint4
Definition: guitest.h:222
virtual void Reset()
Reset progress bar (i.e. set pos to 0).
virtual void Layout()
Layout the listbox components.
Definition: TGListBox.cxx:1460
const TGPicture * fDefaultPic
Definition: guitest.h:204
Handle_t Window_t
Definition: GuiTypes.h:30
TGGroupFrame * fG1
Definition: guitest.h:162
virtual void SetFont(TGFont *font, Bool_t local=kTRUE)
Changes text font specified by pointer to TGFont object.
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Definition: guitest.cpp:1363
TGLayoutHints * fHint3
Definition: guitest.h:222
void SetWMPosition(Int_t x, Int_t y)
Give the window manager a window position hint.
Definition: TGFrame.cxx:1837
TGTextEntry * fMsg
Definition: guitest.h:164
TGHProgressBar * fHProg2
Definition: guitest.h:223
virtual void Add(TObject *obj)
Definition: TList.h:81
Definition: file.py:1
virtual void MapWindow()
Definition: TGFrame.h:267
TGClient * fClient
Definition: TGObject.h:41
TGTabElement * GetTabTab(Int_t tabIndex) const
Return the tab element of tab with index tabIndex.
Definition: TGTab.cxx:612
TGTextEntry * fTestText
Definition: guitest.h:102
virtual void SetPosition(Float_t min, Float_t max)
void SetWMSize(UInt_t w, UInt_t h)
Give the window manager a window size hint.
Definition: TGFrame.cxx:1849
virtual ~TestProgress()
Definition: guitest.cpp:1344
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
Definition: TGClient.cxx:370
const char * GetString() const
Definition: TGTab.h:163
TGTextEntry * fTxt1
Definition: guitest.h:132
TGDoubleVSlider * fVslider2
Definition: guitest.h:186
TGCompositeFrame * fF2
Definition: guitest.h:122
virtual ~TestMainFrame()
Definition: guitest.cpp:284
virtual void AddPopup(TGHotString *s, TGPopupMenu *popup, TGMenuEntry *before=0, const TGPicture *p=0)
Add a (cascading) popup menu to a popup menu.
Definition: TGMenu.cxx:1149
virtual void SetState(EButtonState state, Bool_t emit=kFALSE)
Set check button state.
Definition: TGButton.cxx:1200
TGCompositeFrame * fF3
Definition: guitest.h:122
TGLayoutHints * fL2
Definition: guitest.h:242
TestShutter(const TGWindow *p, const TGWindow *main, UInt_t w, UInt_t h)
Definition: guitest.cpp:1183
TGButton * fBtn2
Definition: guitest.h:124
virtual void Update()
Update canvas pad buffers.
Definition: TCanvas.cxx:2183
Int_t fFirstEntry
Definition: guitest.h:135
TGPopupMenu * fMenuHelp
Definition: guitest.h:106
virtual void CloseWindow()
Close and delete main frame.
Definition: guitest.cpp:668
TGTextEntry * fTxt2
Definition: guitest.h:132
virtual ~TestSliders()
Definition: guitest.cpp:1099
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Definition: guitest.cpp:1267
const Bool_t kTRUE
Definition: Rtypes.h:91
Int_t Fill(Double_t)
Invalid Fill method.
Definition: TH2.cxx:292
Int_t GetNumberOfTabs() const
Return number of tabs.
Definition: TGTab.cxx:658
const Mask_t kAnyModifier
Definition: GuiTypes.h:211
THist< 2, float, THistStatContent, THistStatUncertainty > TH2F
Definition: THist.hxx:308
void SetMWMHints(UInt_t value, UInt_t funcs, UInt_t input)
Set decoration style for MWM-compatible wm (mwm, ncdwm, fvwm?).
Definition: TGFrame.cxx:1824
TGTextButton * fOK
Definition: guitest.h:240
virtual void SetToolTipText(const char *text, Long_t delayms=400)
Set tool tip text associated with this button.
Definition: TGButton.cxx:395
virtual Int_t GetVsbPosition() const
Get position of vertical scrollbar.
Definition: TGCanvas.cxx:2381
void SetFillType(EFillType type)
Set fill type.
virtual void AddPopup(TGHotString *s, TGPopupMenu *menu, TGLayoutHints *l, TGPopupMenu *before=0)
Add popup menu to menu bar.
Definition: TGMenu.cxx:415
void Modified(Bool_t flag=1)
Definition: TPad.h:399
int main(int argc, char **argv)
char name[80]
Definition: TGX11.cxx:109
TGCheckButton * fC[9]
Definition: guitest.h:161
TGLayoutHints * fMenuBarItemLayout
Definition: guitest.h:108
const char * cnt
Definition: TXMLSetup.cxx:75
TGPopupMenu * fCascade2Menu
Definition: guitest.h:107
TestMainFrame(const TGWindow *p, UInt_t w, UInt_t h)
Definition: guitest.cpp:159
virtual void RemoveEntry(Int_t id=-1)
remove entry with id.
Definition: TGListBox.cxx:1326
TGLayoutHints * fL6
Definition: guitest.h:163
TGCanvas * fCanvas
Definition: guitest.h:84
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Definition: TObject.cxx:911
char * fIniDir
Definition: TGFileDialog.h:64
TGButton * fTestButton
Definition: guitest.h:158
TGTextBuffer * fTbh2
Definition: guitest.h:188
TGLayoutHints * fBfly1
Definition: guitest.h:183
Definition: TGMsgBox.h:52
virtual void SetState(EButtonState state, Bool_t emit=kFALSE)
Set button state.
Definition: TGButton.cxx:185
TGLayoutHints * fLayout
Definition: guitest.h:203
TGLayoutHints * fL21
Definition: guitest.h:163