Logo ROOT  
Reference Guide
TTVLVContainer.cxx
Go to the documentation of this file.
1 // @(#)root/treeviewer:$Id$
2 //Author : Andrei Gheata 16/08/00
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #include "TTVLVContainer.h"
13 #include "TTreeViewer.h"
14 #include "TGPicture.h"
15 #include "TGLabel.h"
16 #include "TGButton.h"
17 #include "TGTextEntry.h"
18 #include "TGToolTip.h"
19 #include "TList.h"
20 #include "TVirtualX.h"
21 #include "snprintf.h"
22 
23 
25 
26 /** \class TGItemContext
27 empty object used as context menu support for TGLVTreeEntries.
28 */
29 
30 ////////////////////////////////////////////////////////////////////////////////
31 /// Constructor
32 
34 {
35  fItem = 0;
36 }
37 
38 ////////////////////////////////////////////////////////////////////////////////
39 /// Draw item
40 
42 {
44 }
45 
46 ////////////////////////////////////////////////////////////////////////////////
47 /// Edit expression
48 
50 {
52 }
53 
54 ////////////////////////////////////////////////////////////////////////////////
55 /// Empty item
56 
58 {
59  fItem->Empty();
60 }
61 
62 ////////////////////////////////////////////////////////////////////////////////
63 /// Remove item
64 
66 {
68 }
69 
70 ////////////////////////////////////////////////////////////////////////////////
71 /// Scan item
72 
74 {
77 }
78 
79 ////////////////////////////////////////////////////////////////////////////////
80 /// Set item expression
81 
82 void TGItemContext::SetExpression(const char *name, const char *alias, Bool_t cut)
83 {
84  fItem->SetExpression(name, alias, cut);
85 }
86 
88 
89 /** \class TTVLVEntry
90 This class represent entries that goes into the TreeViewer
91 listview container. It subclasses TGLVEntry and adds 2
92 data members: the item true name and the alias.
93 */
94 
95 ////////////////////////////////////////////////////////////////////////////////
96 /// TTVLVEntry constructor.
97 
99  const TGPicture *bigpic, const TGPicture *smallpic,
100  TGString *name, TGString **subnames,
101  EListViewMode ViewMode)
102  :TGLVEntry(p, bigpic, smallpic, name, subnames, ViewMode)
103 {
104  // both alias and true name are initialized to name
105  fContainer = (TTVLVContainer *) p;
106 
107  fTip = 0;
108  fIsCut = kFALSE;
109  fTrueName = name->GetString();
110  fContext = new TGItemContext();
111  fContext->Associate(this);
112 
114 }
115 
116 ////////////////////////////////////////////////////////////////////////////////
117 /// TTVLVEntry destructor
118 
120 {
121  if (fTip) delete fTip;
122  delete fContext;
123 }
124 
125 ////////////////////////////////////////////////////////////////////////////////
126 /// Convert all aliases into true names
127 
129 {
130  TList *list = GetContainer()->GetViewer()->ExpressionList();
132  TString start(fConvName);
133  TIter next(list);
134  TTVLVEntry* item;
135  while (!FullConverted()) {
136  next.Reset();
137  start = fConvName;
138  while ((item=(TTVLVEntry*)next())) {
139  if (item != this)
140  fConvName.ReplaceAll(item->GetAlias(), item->GetTrueName());
141  }
142  if (fConvName == start) {
143  //the following line is deadcode reported by coverity because item=0
144  //if (item) Warning(item->GetAlias(), "Cannot convert aliases for this expression.");
145  return(fConvName.Data());
146  }
147  }
148  return(fConvName.Data());
149 }
150 
151 ////////////////////////////////////////////////////////////////////////////////
152 /// Return true if converted name is alias free
153 
155 {
156  TList *list = GetContainer()->GetViewer()->ExpressionList();
157  TIter next(list);
158  TTVLVEntry* item;
159  while ((item=(TTVLVEntry*)next())) {
160  if (item != this) {
161  if (fConvName.Contains(item->GetAlias())) return kFALSE;
162  }
163  }
164  return kTRUE;
165 }
166 
167 ////////////////////////////////////////////////////////////////////////////////
168 /// Copy this item's name and alias to an other.
169 
171 {
172  if (!dest) return;
173  dest->SetExpression(fTrueName.Data(), fAlias.Data(), fIsCut);
174  TString alias = dest->GetAlias();
175  if (!alias.BeginsWith("~") && !alias.Contains("empty")) dest->PrependTilde();
176 }
177 
178 ////////////////////////////////////////////////////////////////////////////////
179 /// Handle mouse crossing event.
180 
182 {
183  if (fTip) {
184  if (event->fType == kEnterNotify)
185  fTip->Reset();
186  else
187  fTip->Hide();
188  }
189  return kTRUE;
190 }
191 
192 ////////////////////////////////////////////////////////////////////////////////
193 /// Check if alias name is not empty.
194 
196 {
197  if (fAlias.Length()) return kTRUE;
198  return kFALSE;
199 }
200 
201 ////////////////////////////////////////////////////////////////////////////////
202 /// Prepend a ~ to item alias
203 
205 {
206  fAlias = "~" + fAlias;
208 }
209 
210 ////////////////////////////////////////////////////////////////////////////////
211 /// Redraw this entry with new name
212 
213 void TTVLVEntry::SetItemName(const char* name)
214 {
215  if (fItemName) delete fItemName;
216  fItemName = new TGString(name);
217  Int_t max_ascent, max_descent;
219  gVirtualX->GetFontProperties(fFontStruct, max_ascent, max_descent);
220  fTHeight = max_ascent + max_descent;
221  gVirtualX->ClearWindow(fId);
223  fClient->NeedRedraw(this);
224 }
225 
226 ////////////////////////////////////////////////////////////////////////////////
227 /// Set cut type
228 
230 {
231  if (fIsCut && type) return;
232  if (!fIsCut && !type) return;
233  if (type) {
234  SetSmallPic(fClient->GetPicture("selection_t.xpm"));
235  SetToolTipText("Selection expression. Drag to scissors to activate");
236  } else
237  SetSmallPic(fClient->GetPicture("expression_t.xpm"));
238  fIsCut = type;
239 }
240 
241 ////////////////////////////////////////////////////////////////////////////////
242 /// Set the true name, alias and type of the expression, then refresh it
243 
244 void TTVLVEntry::SetExpression(const char* name, const char* alias, Bool_t cutType)
245 {
246  SetItemName(alias);
247  SetAlias(alias);
248  SetTrueName(name);
249  ULong_t *itemType = (ULong_t *) GetUserData();
250  if (*itemType & TTreeViewer::kLTPackType) {
251  if (strlen(name))
252  SetSmallPic(fClient->GetPicture("pack_t.xpm"));
253  else
254  SetSmallPic(fClient->GetPicture("pack-empty_t.xpm"));
255  }
256  if ((*itemType & TTreeViewer::kLTDragType) && strlen(name) && !fIsCut)
257  SetToolTipText("Double-click to draw. Drag and drop. Use Edit/Expression or context menu to edit.");
258  if (*itemType & TTreeViewer::kLTDragType) SetCutType(cutType);
259 }
260 
261 ////////////////////////////////////////////////////////////////////////////////
262 /// Clear all names and alias
263 
265 {
266  SetExpression("","-empty-");
267  ULong_t *itemType = (ULong_t *) GetUserData();
268  if (itemType && (*itemType & TTreeViewer::kLTDragType))
269  SetToolTipText("User-defined expression/cut. Double-click to edit");
270 }
271 
272 ////////////////////////////////////////////////////////////////////////////////
273 /// Set tool tip text associated with this item. The delay is in
274 /// milliseconds (minimum 250). To remove tool tip call method with text = 0
275 
276 void TTVLVEntry::SetToolTipText(const char *text, Long_t delayms)
277 {
278  if (fTip) {
279  delete fTip;
280  fTip = 0;
281  }
282 
283  if (text && strlen(text))
284  fTip = new TGToolTip(fClient->GetRoot(), this, text, delayms);
285 }
286 ////////////////////////////////////////////////////////////////////////////////
287 /// Set small picture
288 
290 {
291  const TGPicture *cspic = fSmallPic;
292  fSmallPic = spic;
294  if (fSelPic) delete fSelPic;
295  fSelPic = 0;
296  if (fActive) {
298  }
299  DoRedraw();
300  fClient->FreePicture(cspic);
301 }
302 
304 
305 /** \class TTVLVContainer
306 This class represent the list view container for the.
307 TreeView class. It is a TGLVContainer with item dragging
308 capabilities for the TTVLVEntry objects inside.
309 */
310 
311 ////////////////////////////////////////////////////////////////////////////////
312 /// TGLVContainer constructor
313 
315  :TGLVContainer(p, w, h,options | kSunkenFrame)
316 {
317  fListView = 0;
318  fViewer = 0;
319  fExpressionList = new TList;
320  fCursor = gVirtualX->CreateCursor(kMove);
321  fDefaultCursor = gVirtualX->CreateCursor(kPointer);
323 }
324 
325 ////////////////////////////////////////////////////////////////////////////////
326 /// TGLVContainer destructor
327 
329 {
330  delete fExpressionList;
331 }
332 
333 ////////////////////////////////////////////////////////////////////////////////
334 /// Return the cut entry
335 
336 const char* TTVLVContainer::Cut()
337 {
338  TGFrameElement *el = (TGFrameElement *) fList->At(3);
339  if (el) {
340  TTVLVEntry *f = (TTVLVEntry *) el->fFrame;
341  if (f) return f->ConvertAliases();
342  return 0;
343  }
344  return 0;
345 }
346 
347 ////////////////////////////////////////////////////////////////////////////////
348 /// Return the expression item at specific position
349 
351 {
352  TGFrameElement *el = (TGFrameElement *) fList->At(index);
353  if (el) {
354  TTVLVEntry *item = (TTVLVEntry *) el->fFrame;
355  return item;
356  }
357  return 0;
358 }
359 
360 ////////////////////////////////////////////////////////////////////////////////
361 /// Return the list of user-defined expressions
362 
364 {
366  TIter next(fList);
367  TGFrameElement *el;
368  while ((el = (TGFrameElement*)next())) {
369  TTVLVEntry *item = (TTVLVEntry *)el->fFrame;
370  if (item) {
371  ULong_t *itemType = (ULong_t *) item->GetUserData();
372  if ((*itemType & TTreeViewer::kLTExpressionType) &&
373  (*itemType & TTreeViewer::kLTDragType)) fExpressionList->Add(item);
374  }
375  }
376  return fExpressionList;
377 }
378 
379 ////////////////////////////////////////////////////////////////////////////////
380 /// Return the expression on X
381 
382 const char* TTVLVContainer::Ex()
383 {
384  TGFrameElement *el = (TGFrameElement *) fList->At(0);
385  if (el) {
386  TTVLVEntry *f = (TTVLVEntry *) el->fFrame;
387  if (f) return f->ConvertAliases();
388  return 0;
389  }
390  return 0;
391 }
392 
393 ////////////////////////////////////////////////////////////////////////////////
394 /// Return the expression on Y
395 
396 const char* TTVLVContainer::Ey()
397 {
398  TGFrameElement *el = (TGFrameElement *) fList->At(1);
399  if (el) {
400  TTVLVEntry *f = (TTVLVEntry *) el->fFrame;
401  if (f) return f->ConvertAliases();
402  return 0;
403  }
404  return 0;
405 }
406 
407 ////////////////////////////////////////////////////////////////////////////////
408 /// Return the expression on Z
409 
410 const char* TTVLVContainer::Ez()
411 {
412  TGFrameElement *el = (TGFrameElement *) fList->At(2);
413  if (el) {
414  TTVLVEntry *f = (TTVLVEntry *) el->fFrame;
415  if (f) return f->ConvertAliases();
416  return 0;
417  }
418  return 0;
419 }
420 
421 ////////////////////////////////////////////////////////////////////////////////
422 /// Return the cut entry
423 
425 {
426  TGFrameElement *el = (TGFrameElement *) fList->At(4);
427  if (el) {
428  TTVLVEntry *f = (TTVLVEntry *) el->fFrame;
429  if (f) return f->GetTrueName();
430  return 0;
431  }
432  return 0;
433 }
434 
435 ////////////////////////////////////////////////////////////////////////////////
436 /// Handle mouse button event in container.
437 
439 {
440  int total, selected;
441 
442  if (event->fType == kButtonPress) {
443  fXp = event->fX;
444  fYp = event->fY;
445  if (fLastActive) {
447  fLastActive = 0;
448  }
449  total = selected = 0;
450 
451  TGFrameElement *el;
452  TIter next(fList);
453  while ((el = (TGFrameElement *) next())) {
454  TTVLVEntry *f = (TTVLVEntry *) el->fFrame;
455  ++total;
456  if (f->GetId() == (Window_t)event->fUser[0]) { // fUser[0] = subwindow
457  f->Activate(kTRUE);
458  if (f->GetTip()) (f->GetTip())->Hide();
459  fX0 = f->GetX();
460  fY0 = f->GetY();
461  ++selected;
462  fLastActive = f;
463  } else {
464  f->Activate(kFALSE);
465  }
466  }
467 
468  if (fTotal != total || fSelected != selected) {
469  fTotal = total;
470  fSelected = selected;
472  fTotal, fSelected);
473  }
474 
475  if (selected == 1 && event->fCode == 1) {
476  ULong_t *itemType = (ULong_t *) fLastActive->GetUserData();
477  if (*itemType & TTreeViewer::kLTDragType) {
478  fDragging = kTRUE;
479  gVirtualX->SetCursor(fId,fCursor);
480  fXp = event->fX;
481  fYp = event->fY;
482  }
483  }
484  }
485 
486  if (event->fType == kButtonRelease) {
487  if (fDragging) {
488  fDragging = kFALSE;
489  gVirtualX->SetCursor(fId,fDefaultCursor);
491  TGFrameElement *el;
492  TIter next(fList);
493  while ((el = (TGFrameElement *) next())) {
494  TTVLVEntry *f = (TTVLVEntry *) el->fFrame;
495  if ((f == fLastActive) || !f->IsActive()) continue;
496  ULong_t *itemType = (ULong_t *) f->GetUserData();
498  if (!(*itemType & TTreeViewer::kLTPackType)) {
499  // dragging items to expressions
500  ((TTVLVEntry *) fLastActive)->CopyItem(f);
501  if (*itemType & TTreeViewer::kLTDragType)
502  f->SetToolTipText("Double-click to draw. Drag and drop. Use Edit/Expression or context menu to edit.");
503  } else {
504  if (strlen(((TTVLVEntry *) fLastActive)->GetTrueName())) {
505  // dragging to scan box
506  if (!strlen(f->GetTrueName())) {
507  f->SetTrueName(((TTVLVEntry *)fLastActive)->GetTrueName());
508  f->SetSmallPic(fClient->GetPicture("pack_t.xpm"));
509  } else {
510  TString name(2000);
511  TString dragged = ((TTVLVEntry *)fLastActive)->ConvertAliases();
512  name = f->GetTrueName();
513  if ((name.Length()+dragged.Length()) < 228) {
514  name += ":";
515  name += dragged;
516  f->SetTrueName(name.Data());
517  } else {
518  Warning("HandleButton",
519  "Name too long. Can not add any more items to scan box.");
520  }
521  }
522  }
523  }
524  fLastActive = f;
525  if (fViewer) {
526  char msg[2000];
527  msg[0] = 0;
528  snprintf(msg,2000, "Content : %s", f->GetTrueName());
529  fViewer->Message(msg);
530  }
531  }
532  if ((TMath::Abs(event->fX - fXp) < 2) && (TMath::Abs(event->fY - fYp) < 2)) {
534  event->fCode, (event->fYRoot << 16) | event->fXRoot);
535  }
536  } else {
538  event->fCode, (event->fYRoot << 16) | event->fXRoot);
539  }
540  }
541  return kTRUE;
542 }
543 
544 ////////////////////////////////////////////////////////////////////////////////
545 /// Handle mouse motion events.
546 
548 {
549  Int_t xf0, xff, yf0, yff;
550  Int_t xpos = event->fX - (fXp-fX0);
551  Int_t ypos = event->fY - (fYp-fY0);
552 
553  if (fDragging) {
554  TGFrameElement *el;
555  ULong_t *itemType;
556  TIter next(fList);
557  while ((el = (TGFrameElement *) next())) {
558  TTVLVEntry *f = (TTVLVEntry *) el->fFrame;
559  if (f == fLastActive) {
560  if (f->GetTip()) (f->GetTip())->Hide();
561  continue;
562  }
563  xf0 = f->GetX();
564  yf0 = f->GetY();
565  xff = f->GetX() + f->GetWidth();
566  yff = f->GetY() + f->GetHeight();
567  itemType = (ULong_t *) f->GetUserData();
568  if (*itemType & TTreeViewer::kLTExpressionType) {
569  if (xpos>xf0 && xpos<xff && ypos>yf0 && ypos<yff) {
570  f->Activate(kTRUE);
571  } else {
572  f->Activate(kFALSE);
573  }
574  }
575  }
576  if ((fXp - event->fX) > 10) {
579  }
580  fLastActive->Move(xpos, ypos);
581  gVirtualX->RaiseWindow(fLastActive->GetId());
583  }
584  return kTRUE;
585 }
586 
587 ////////////////////////////////////////////////////////////////////////////////
588 /// Clear all names and aliases for expression type items
589 
591 {
592  TGFrameElement *el;
593  TIter next(fList);
594  while ((el = (TGFrameElement *) next())) {
595  TTVLVEntry *f = (TTVLVEntry *) el->fFrame;
596  UInt_t *userData = (UInt_t *) f->GetUserData();
597  if (*userData & TTreeViewer::kLTExpressionType) {
598  if (*userData & TTreeViewer::kLTPackType) {
599  f->SetSmallPic(fClient->GetPicture("pack-empty_t.xpm"));
600  f->SetTrueName("");
601  } else {
602  f->Empty();
603  }
604  }
605  }
606 }
607 
608 ////////////////////////////////////////////////////////////////////////////////
609 /// Remove all non-static items from the list view, except expressions
610 
612 {
613  TGFrameElement *el;
614  TIter next(fList);
615  while ((el = (TGFrameElement *) next())) {
616  TTVLVEntry *f = (TTVLVEntry *) el->fFrame;
617  UInt_t *userData = (UInt_t *) f->GetUserData();
618  if (!((*userData) & TTreeViewer::kLTExpressionType)) {
619  RemoveItem(f);
620  }
621  }
622  fLastActive = 0;
623 }
624 
625 ////////////////////////////////////////////////////////////////////////////////
626 /// Select an item
627 
629 {
630  if (fLastActive) {
632  fLastActive = 0;
633  }
634  TGFrameElement *el;
635  fSelected = 0;
636  TIter next(fList);
637  while ((el = (TGFrameElement *) next())) {
638  TTVLVEntry *f = (TTVLVEntry *) el->fFrame;
639  if (!strcmp(f->GetItemName()->GetString(),name)) {
640  f->Activate(kTRUE);
641  fLastActive = (TGLVEntry *) f;
642  fSelected++;
643  } else {
644  f->Activate(kFALSE);
645  }
646  }
647 }
648 
650 
651 /** \class TGSelectBox
652 This class represent a specialized expression editor for
653 TTVLVEntry 'true name' and 'alias' data members.
654 It is a singleton in order to be able to use it for several
655 expressions.
656 */
657 
660  kTFCancel
661 };
662 
664 
665 ////////////////////////////////////////////////////////////////////////////////
666 /// TGSelectBox constructor
667 
669  UInt_t w, UInt_t h)
670  :TGTransientFrame(p, main, w, h)
671 {
672  if (!fgInstance) {
673  fgInstance = this;
675  if (!fViewer) Error("TGSelectBox", "Must be started from viewer");
676  fEntry = 0;
678  fBLayout = new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 2, 2, 2);
679  fBLayout1= new TGLayoutHints(kLHintsTop | kLHintsRight, 2, 0, 2, 2);
680 
681  fLabel = new TGLabel(this, "");
683 
684  fTe = new TGTextEntry(this, new TGTextBuffer(2000));
685  fTe->SetToolTipText("Type an expression using C++ syntax. Click other expression/leaves to paste them here.");
686  AddFrame(fTe, fLayout);
687 
688  fLabelAlias = new TGLabel(this, "Alias");
690 
691  fTeAlias = new TGTextEntry(this, new TGTextBuffer(100));
692  fTeAlias->SetToolTipText("Define an alias for this expression. Do NOT use leading strings of other aliases.");
694 
695  fBf = new TGHorizontalFrame(this, 10, 10);
696 
697  fCANCEL = new TGTextButton(fBf, "&Cancel", kTFCancel);
698  fCANCEL->Associate(this);
700 
701  fDONE = new TGTextButton(fBf, "&Done", kTFDone);
702  fDONE->Associate(this);
704 
705  AddFrame(fBf, fLayout);
706 
707  MapSubwindows();
709 
710 // SetBackgroundColor(color);
711  Window_t wdum;
712  Int_t ax, ay;
713  gVirtualX->TranslateCoordinates(main->GetId(), GetParent()->GetId(), 25,
714  (Int_t)(((TGFrame *) main)->GetHeight() - fHeight) >> 1,
715  ax, ay, wdum);
716  MoveResize(ax, ay, w, GetDefaultHeight());
717  MapWindow();
718  }
719 }
720 
721 ////////////////////////////////////////////////////////////////////////////////
722 /// TGSelectBox destructor
723 
725 {
726  fgInstance = 0;
727  delete fLabel;
728  delete fTe;
729  delete fLabelAlias;
730  delete fTeAlias;
731  delete fDONE;
732  delete fCANCEL;
733  delete fBf;
734  delete fLayout;
735  delete fBLayout;
736  delete fBLayout1;
737 }
738 
739 ////////////////////////////////////////////////////////////////////////////////
740 /// Close the select box
741 
743 {
744  gVirtualX->UnmapWindow(GetId());
745  delete this;
746 }
747 
748 ////////////////////////////////////////////////////////////////////////////////
749 /// Return the pointer to the instantiated singleton
750 
752 {
753  return fgInstance;
754 }
755 
756 ////////////////////////////////////////////////////////////////////////////////
757 /// Just focus the cursor inside
758 
760 {
761  Event_t event;
762  event.fType = kButtonPress;
763  event.fCode = kButton1;
764  event.fX = event.fY = 1;
765  Int_t position = fTe->GetCursorPosition();
766  fTe->HandleButton(&event);
767  fTe->SetCursorPosition(position);
768 }
769 
770 ////////////////////////////////////////////////////////////////////////////////
771 /// Set label of selection box
772 
773 void TGSelectBox::SetLabel(const char* title)
774 {
775  fLabel->SetText(new TGString(title));
776 }
777 
778 ////////////////////////////////////////////////////////////////////////////////
779 /// Save the edited entry true name and alias
780 
782 {
783  if (fEntry) {
784 
785  Bool_t cutType;
786  TString name(fTe->GetText());
787  if (name.Length())
788  fEntry->SetToolTipText("Double-click to draw. Drag and drop. Use Edit/Expression or context menu to edit.");
789  else
790  fEntry->SetToolTipText("User-defined expression/cut. Double-click to edit");
791  // Set type of item to "cut" if containing boolean operators
792  cutType = name.Contains("<") || name.Contains(">") || name.Contains("=") ||
793  name.Contains("!") || name.Contains("&") || name.Contains("|");
794  TString alias(fTeAlias->GetText());
795  if (!alias.BeginsWith("~") && !alias.Contains("empty")) fTeAlias->InsertText("~", 0);
796  fEntry->SetExpression(fTe->GetText(), fTeAlias->GetText(), cutType);
797 
798  if (fOldAlias.Contains("empty")) {
800  return;
801  }
802  TList *list = fViewer->ExpressionList();
803  TIter next(list);
804  TTVLVEntry* item;
805  while ((item=(TTVLVEntry*)next())) {
806  if (item != fEntry) {
807  name = item->GetTrueName();
808  name.ReplaceAll(fOldAlias.Data(), fTeAlias->GetText());
809  item->SetTrueName(name.Data());
810  }
811  }
812  }
813 }
814 
815 ////////////////////////////////////////////////////////////////////////////////
816 /// Connect one entry
817 
819 {
820  fEntry = entry;
821  fTe->SetText(entry->GetTrueName());
822  fTeAlias->SetText(entry->GetAlias());
823  fOldAlias = entry->GetAlias();
824 }
825 
826 ////////////////////////////////////////////////////////////////////////////////
827 /// Insert text in text entry
828 
829 void TGSelectBox::InsertText(const char* text)
830 {
831  Int_t start = fTe->GetCursorPosition();
833  fTe->SetCursorPosition(start+strlen(text));
834 }
835 
836 ////////////////////////////////////////////////////////////////////////////////
837 /// Message interpreter
838 
840 {
841  switch (GET_MSG(msg)) {
842  case kC_TEXTENTRY:
843  switch (GET_SUBMSG(msg)) {
844  case kTE_ENTER:
845  if (ValidateAlias()) SaveText();
846  break;
847  default:
848  break;
849  }
850  break;
851  case kC_COMMAND:
852  switch (GET_SUBMSG(msg)) {
853  case kCM_BUTTON:
854  switch (parm1) {
855  case kTFDone:
856  if (!ValidateAlias()) break;
857  SaveText();
858  CloseWindow();
859  break;
860  case kTFCancel:
861  CloseWindow();
862  break;
863  default:
864  break;
865  }
866  break;
867  default:
868  break;
869  }
870  break;
871  default:
872  if (parm2) break; // just to avoid warning on CC compiler
873  break;
874  }
875  return kTRUE;
876 }
877 
878 ////////////////////////////////////////////////////////////////////////////////
879 /// Return true if edited alias is not a leading string of other expression aliases
880 
882 {
883  if (!strcmp(fTeAlias->GetText(), "-empty-") || !strlen(fTeAlias->GetText())) {
884  fViewer->Warning("ValidateAlias", "You should define the alias first.");
885  return kFALSE;
886  }
887  TList *list = fViewer->ExpressionList();
888  TIter next(list);
889  TTVLVEntry* item;
890  while ((item=(TTVLVEntry*)next())) {
891  if (item != fEntry) {
892  TString itemalias(item->GetAlias());
893  if (itemalias.Contains(fTeAlias->GetText())) {
894  fViewer->Warning("ValidAlias", "Alias can not be the leading string of other alias.");
895  return kFALSE;
896  }
897  }
898  }
899  return kTRUE;
900 }
TGCompositeFrame::GetDefaultSize
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
Definition: TGFrame.h:353
TTVLVContainer::RemoveNonStatic
void RemoveNonStatic()
Remove all non-static items from the list view, except expressions.
Definition: TTVLVContainer.cxx:611
EListViewMode
EListViewMode
Definition: TGListView.h:39
Event_t::fType
EGEventType fType
Definition: GuiTypes.h:174
TGSelectBox::SaveText
void SaveText()
Save the edited entry true name and alias.
Definition: TTVLVContainer.cxx:781
TGContainer::fSelected
Int_t fSelected
Definition: TGCanvas.h:59
TGSelectBox::fBLayout1
TGLayoutHints * fBLayout1
Definition: TTVLVContainer.h:168
TGTransientFrame
Definition: TGFrame.h:553
GET_MSG
Int_t GET_MSG(Long_t val)
Definition: WidgetMessageTypes.h:112
TGSelectBox::fEntry
TTVLVEntry * fEntry
Definition: TTVLVContainer.h:161
TTVLVContainer::TTVLVContainer
TTVLVContainer(const TGWindow *p, UInt_t w, UInt_t h, UInt_t options=kSunkenFrame)
TGLVContainer constructor.
Definition: TTVLVContainer.cxx:314
EWidgetMessageTypes
EWidgetMessageTypes
Definition: WidgetMessageTypes.h:32
TGFrame::GetHeight
UInt_t GetHeight() const
Definition: TGFrame.h:250
TGSelectBox
This class represent a specialized expression editor for TTVLVEntry 'true name' and 'alias' data memb...
Definition: TTVLVContainer.h:156
kTFCancel
@ kTFCancel
Definition: TTVLVContainer.cxx:660
TTVLVContainer::fDefaultCursor
Cursor_t fDefaultCursor
Definition: TTVLVContainer.h:116
TGLVEntry::fTWidth
UInt_t fTWidth
Definition: TGListView.h:66
Event_t::fY
Int_t fY
Definition: GuiTypes.h:177
Event_t::fX
Int_t fX
Definition: GuiTypes.h:177
TGSelectBox::InsertText
void InsertText(const char *text)
Insert text in text entry.
Definition: TTVLVContainer.cxx:829
TGWindow
Definition: TGWindow.h:31
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
TGTextEntry::SetText
virtual void SetText(const char *text, Bool_t emit=kTRUE)
Sets text entry to text, clears the selection and moves the cursor to the end of the line.
Definition: TGTextEntry.cxx:623
TTreeViewer::kLTPackType
@ kLTPackType
Definition: TTreeViewer.h:63
TTreeViewer::SetScanMode
void SetScanMode(Bool_t mode=kTRUE)
Definition: TTreeViewer.h:219
TGLVEntry::fActive
Bool_t fActive
Definition: TGListView.h:68
TGLVEntry::fFontStruct
FontStruct_t fFontStruct
Definition: TGListView.h:77
snprintf
#define snprintf
Definition: civetweb.c:1540
TGPicture
Definition: TGPicture.h:36
f
#define f(i)
Definition: RSha256.hxx:104
TTreeViewer::ProcessMessage
Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Handle menu and other commands generated.
Definition: TTreeViewer.cxx:1792
TTVLVEntry::SetToolTipText
void SetToolTipText(const char *text, Long_t delayms=1000)
Set tool tip text associated with this item.
Definition: TTVLVContainer.cxx:276
Option_t
const char Option_t
Definition: RtypesCore.h:66
dest
#define dest(otri, vertexptr)
Definition: triangle.c:1040
TTreeViewer::EditExpression
void EditExpression()
Start the expression editor.
Definition: TTreeViewer.cxx:1669
TGSelectBox::~TGSelectBox
virtual ~TGSelectBox()
TGSelectBox destructor.
Definition: TTVLVContainer.cxx:724
TGSelectBox::SetEntry
void SetEntry(TTVLVEntry *entry)
Connect one entry.
Definition: TTVLVContainer.cxx:818
TTVLVEntry::SetAlias
void SetAlias(const char *alias)
Definition: TTVLVContainer.h:89
gVirtualX
#define gVirtualX
Definition: TVirtualX.h:338
TString::Data
const char * Data() const
Definition: TString.h:369
kLHintsTop
@ kLHintsTop
Definition: TGLayout.h:34
ClassImp
#define ClassImp(name)
Definition: Rtypes.h:364
TTVLVContainer::Ey
const char * Ey()
Return the expression on Y.
Definition: TTVLVContainer.cxx:396
TGPicture.h
TTVLVContainer
This class represent the list view container for the.
Definition: TTVLVContainer.h:110
kLHintsLeft
@ kLHintsLeft
Definition: TGLayout.h:31
TObject::Error
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition: TObject.cxx:890
TGTextEntry::SetToolTipText
virtual void SetToolTipText(const char *text, Long_t delayms=500)
Set tool tip text associated with this text entry.
Definition: TGTextEntry.cxx:1663
TGLabel
Definition: TGLabel.h:32
TTreeViewer::Message
void Message(const char *msg)
Send a message on the status bar.
Definition: TTreeViewer.cxx:2656
TGTextButton
Definition: TGButton.h:142
TGLVEntry
Definition: TGListView.h:54
TTVLVEntry::fContainer
TTVLVContainer * fContainer
Definition: TTVLVContainer.h:59
TGTransientFrame::fMain
const TGWindow * fMain
Definition: TGFrame.h:556
TGSelectBox::fLabel
TGLabel * fLabel
Definition: TTVLVContainer.h:160
TString::Contains
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Definition: TString.h:624
TGSelectBox::fOldAlias
TString fOldAlias
Definition: TTVLVContainer.h:165
kCT_SELCHANGED
@ kCT_SELCHANGED
Definition: WidgetMessageTypes.h:58
kEnterNotify
@ kEnterNotify
Definition: GuiTypes.h:60
TString::Length
Ssiz_t Length() const
Definition: TString.h:410
TTVLVEntry::PrependTilde
void PrependTilde()
Prepend a ~ to item alias.
Definition: TTVLVContainer.cxx:204
TGItemContext
empty object used as context menu support for TGLVTreeEntries.
Definition: TTVLVContainer.h:36
TGToolTip
Definition: TGToolTip.h:35
TList.h
kButton1
@ kButton1
Definition: GuiTypes.h:213
TGSelectedPicture
Definition: TGPicture.h:78
TTreeViewer
A graphic user interface designed to handle ROOT trees and to take advantage of TTree class features.
Definition: TTreeViewer.h:54
TGItemContext::TGItemContext
TGItemContext()
Constructor.
Definition: TTVLVContainer.cxx:33
TIter::Reset
void Reset()
Definition: TCollection.h:252
TVirtualX.h
TTVLVContainer::ExpressionList
TList * ExpressionList()
Return the list of user-defined expressions.
Definition: TTVLVContainer.cxx:363
TGClient::FreePicture
void FreePicture(const TGPicture *pic)
Free picture resource.
Definition: TGClient.cxx:309
TMath::Abs
Short_t Abs(Short_t d)
Definition: TMathBase.h:120
TGHorizontalFrame
Definition: TGFrame.h:423
kMove
@ kMove
Definition: GuiTypes.h:373
TGLVEntry::GetUserData
void * GetUserData() const
Definition: TGListView.h:113
TGItemContext::Associate
void Associate(TTVLVEntry *item)
Definition: TTVLVContainer.h:43
TGSelectBox::GetInstance
static TGSelectBox * GetInstance()
Return the pointer to the instantiated singleton.
Definition: TTVLVContainer.cxx:751
TGSelectBox::TGSelectBox
TGSelectBox(const TGWindow *p, const TGWindow *main, UInt_t w=10, UInt_t h=10)
TGSelectBox constructor.
Definition: TTVLVContainer.cxx:668
TGSelectBox::GrabPointer
void GrabPointer()
Just focus the cursor inside.
Definition: TTVLVContainer.cxx:759
TGSelectBox::fLabelAlias
TGLabel * fLabelAlias
Definition: TTVLVContainer.h:163
TString
Basic string class.
Definition: TString.h:136
TGFrame
Definition: TGFrame.h:105
TTVLVEntry::fAlias
TString fAlias
Definition: TTVLVContainer.h:61
TGObject::GetId
Handle_t GetId() const
Definition: TGObject.h:47
kCT_ITEMDBLCLICK
@ kCT_ITEMDBLCLICK
Definition: WidgetMessageTypes.h:57
text
TText * text
Definition: entrylist_figure1.C:10
TGLVContainer::fLastActive
TGLVEntry * fLastActive
Definition: TGListView.h:209
TGLVEntry::GetDefaultSize
virtual TGDimension GetDefaultSize() const
Get default size of list item.
Definition: TGListView.cxx:465
TGLabel::SetText
virtual void SetText(TGString *newText)
Set new text in label.
Definition: TGLabel.cxx:179
TGCanvas::SetVsbPosition
virtual void SetVsbPosition(Int_t newPos)
Set position of vertical scrollbar.
Definition: TGCanvas.cxx:2404
TGFrame::MapWindow
virtual void MapWindow()
map window
Definition: TGFrame.h:229
bool
TGSelectBox::fBf
TGHorizontalFrame * fBf
Definition: TTVLVContainer.h:169
kLeaveWindowMask
const Mask_t kLeaveWindowMask
Definition: GuiTypes.h:167
TString::ReplaceAll
TString & ReplaceAll(const TString &s1, const TString &s2)
Definition: TString.h:692
TGTextBuffer
Definition: TGTextBuffer.h:30
TGContainer::fYp
Int_t fYp
Definition: TGCanvas.h:54
TGCompositeFrame::fList
TList * fList
Definition: TGFrame.h:329
TTVLVEntry::SetSmallPic
void SetSmallPic(const TGPicture *spic)
Set small picture.
Definition: TTVLVContainer.cxx:289
TTreeViewer::ExpressionList
TList * ExpressionList()
Get the list of expression items.
Definition: TTreeViewer.cxx:1362
TGSelectBox::fTe
TGTextEntry * fTe
Definition: TTVLVContainer.h:162
TGFrameElement::fFrame
TGFrame * fFrame
Definition: TGLayout.h:119
TGSelectBox::fgInstance
static TGSelectBox * fgInstance
Definition: TTVLVContainer.h:174
TGLVEntry::fTHeight
UInt_t fTHeight
Definition: TGListView.h:67
TGContainer::RemoveItem
virtual void RemoveItem(TGFrame *item)
Remove item from container.
Definition: TGCanvas.cxx:656
TTVLVContainer::fExpressionList
TList * fExpressionList
Definition: TTVLVContainer.h:119
TTVLVEntry::GetAlias
const char * GetAlias()
Definition: TTVLVContainer.h:77
TGLVEntry::Activate
virtual void Activate(Bool_t a)
Make list view item active.
Definition: TGListView.cxx:256
TGContainer::fMsgWindow
const TGWindow * fMsgWindow
Definition: TGCanvas.h:52
TTVLVEntry::FullConverted
Bool_t FullConverted()
Return true if converted name is alias free.
Definition: TTVLVContainer.cxx:154
TTVLVEntry::SetCutType
void SetCutType(Bool_t type=kFALSE)
Set cut type.
Definition: TTVLVContainer.cxx:229
total
static unsigned int total
Definition: TGWin32ProxyDefs.h:40
TGString::GetLength
Int_t GetLength() const
Definition: TGString.h:39
TGFrame::AddInput
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
Definition: TGFrame.cxx:324
TList::At
virtual TObject * At(Int_t idx) const
Returns the object at position idx. Returns 0 if idx is out of range.
Definition: TList.cxx:357
TGToolTip::Reset
void Reset()
Reset tool tip popup delay timer.
Definition: TGToolTip.cxx:260
TGContainer::fY0
Int_t fY0
Definition: TGCanvas.h:55
TTVLVContainer::Ez
const char * Ez()
Return the expression on Z.
Definition: TTVLVContainer.cxx:410
kSunkenFrame
@ kSunkenFrame
Definition: GuiTypes.h:383
TGTextEntry::HandleButton
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event in text entry widget.
Definition: TGTextEntry.cxx:1356
TTreeViewer.h
TTVLVEntry::Empty
void Empty()
Clear all names and alias.
Definition: TTVLVContainer.cxx:264
TTreeViewer::kLTExpressionType
@ kLTExpressionType
Definition: TTreeViewer.h:69
kLHintsCenterY
@ kLHintsCenterY
Definition: TGLayout.h:35
TTVLVEntry::TTVLVEntry
TTVLVEntry(const TGWindow *p, const TGPicture *bigpic, const TGPicture *smallpic, TGString *name, TGString **subnames, EListViewMode ViewMode)
TTVLVEntry constructor.
Definition: TTVLVContainer.cxx:98
TGLVEntry::fSelPic
TGSelectedPicture * fSelPic
Definition: TGListView.h:75
h
#define h(i)
Definition: RSha256.hxx:106
TGCompositeFrame::MapSubwindows
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
Definition: TGFrame.cxx:1149
TGWidget::Associate
virtual void Associate(const TGWindow *w)
Definition: TGWidget.h:84
TGFrame::Resize
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
Definition: TGFrame.cxx:590
TGContainer::fXp
Int_t fXp
Definition: TGCanvas.h:54
TGObject::fId
Handle_t fId
Definition: TGObject.h:36
TTVLVEntry::HasAlias
Bool_t HasAlias()
Check if alias name is not empty.
Definition: TTVLVContainer.cxx:195
TGTextEntry
Definition: TGTextEntry.h:39
TGSelectBox::SetLabel
void SetLabel(const char *title)
Set label of selection box.
Definition: TTVLVContainer.cxx:773
TTVLVContainer::SelectItem
void SelectItem(const char *name)
Select an item.
Definition: TTVLVContainer.cxx:628
TTVLVContainer::fViewer
TTreeViewer * fViewer
Definition: TTVLVContainer.h:118
Event_t::fCode
UInt_t fCode
Definition: GuiTypes.h:179
TGFrame::SendMessage
virtual void SendMessage(const TGWindow *w, Long_t msg, Long_t parm1, Long_t parm2)
Send message (i.e.
Definition: TGFrame.cxx:630
TGItemContext::RemoveItem
void RemoveItem()
Remove item.
Definition: TTVLVContainer.cxx:65
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
kButtonPress
@ kButtonPress
Definition: GuiTypes.h:59
kCM_BUTTON
@ kCM_BUTTON
Definition: WidgetMessageTypes.h:36
Long_t
long Long_t
Definition: RtypesCore.h:54
main
int main(int argc, char **argv)
Definition: histspeedtest.cxx:751
kLHintsRight
@ kLHintsRight
Definition: TGLayout.h:33
kButtonRelease
@ kButtonRelease
Definition: GuiTypes.h:59
TGLayoutHints
Definition: TGLayout.h:57
TGSelectBox::fBLayout
TGLayoutHints * fBLayout
Definition: TTVLVContainer.h:167
TTVLVEntry::fTrueName
TString fTrueName
Definition: TTVLVContainer.h:60
TGItemContext::Scan
void Scan()
Scan item.
Definition: TTVLVContainer.cxx:73
kC_CONTAINER
@ kC_CONTAINER
Definition: WidgetMessageTypes.h:55
TGClient::GetPicture
const TGPicture * GetPicture(const char *name)
Get picture from the picture pool.
Definition: TGClient.cxx:290
TGSelectBox::fTeAlias
TGTextEntry * fTeAlias
Definition: TTVLVContainer.h:164
kTE_ENTER
@ kTE_ENTER
Definition: WidgetMessageTypes.h:52
Window_t
Handle_t Window_t
Definition: GuiTypes.h:28
TString::BeginsWith
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
Definition: TString.h:615
TTVLVContainer.h
TTVLVContainer::EmptyAll
void EmptyAll()
Clear all names and aliases for expression type items.
Definition: TTVLVContainer.cxx:590
TGSelectBox::ValidateAlias
Bool_t ValidateAlias()
Return true if edited alias is not a leading string of other expression aliases.
Definition: TTVLVContainer.cxx:881
ULong_t
unsigned long ULong_t
Definition: RtypesCore.h:55
TTVLVEntry::SetItemName
void SetItemName(const char *name)
Redraw this entry with new name.
Definition: TTVLVContainer.cxx:213
kTFDone
@ kTFDone
Definition: TTVLVContainer.cxx:659
Event_t::fXRoot
Int_t fXRoot
Definition: GuiTypes.h:178
TGContainer::fX0
Int_t fX0
Definition: TGCanvas.h:55
TTVLVEntry::fContext
TGItemContext * fContext
Definition: TTVLVContainer.h:65
TObject::Warning
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Definition: TObject.cxx:876
kPointer
@ kPointer
Definition: GuiTypes.h:374
Event_t::fYRoot
Int_t fYRoot
Definition: GuiTypes.h:178
TGSelectBox::fCANCEL
TGTextButton * fCANCEL
Definition: TTVLVContainer.h:171
TTVLVEntry::GetTrueName
const char * GetTrueName()
Definition: TTVLVContainer.h:81
TTVLVContainer::GetViewer
TTreeViewer * GetViewer()
Definition: TTVLVContainer.h:132
TGTextEntry::InsertText
virtual void InsertText(const char *text, Int_t pos)
Inserts text at position pos, clears the selection and moves the cursor to the end of the line.
Definition: TGTextEntry.cxx:1691
TTVLVEntry::ConvertAliases
const char * ConvertAliases()
Convert all aliases into true names.
Definition: TTVLVContainer.cxx:128
unsigned int
TGCompositeFrame::GetDefaultHeight
virtual UInt_t GetDefaultHeight() const
Definition: TGFrame.h:351
TGSelectBox::CloseWindow
virtual void CloseWindow()
Close the select box.
Definition: TTVLVContainer.cxx:742
TGItemContext::Empty
void Empty()
Empty item.
Definition: TTVLVContainer.cxx:57
TGSelectBox::ProcessMessage
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Message interpreter.
Definition: TTVLVContainer.cxx:839
TGLabel.h
TTreeViewer::RemoveItem
void RemoveItem()
Remove the selected item from the list.
Definition: TTreeViewer.cxx:1745
TTVLVEntry::HandleCrossing
virtual Bool_t HandleCrossing(Event_t *event)
Handle mouse crossing event.
Definition: TTVLVContainer.cxx:181
TGCompositeFrame::fMapSubwindows
Bool_t fMapSubwindows
Definition: TGFrame.h:332
TGWindow::GetParent
const TGWindow * GetParent() const
Definition: TGWindow.h:84
kC_TEXTENTRY
@ kC_TEXTENTRY
Definition: WidgetMessageTypes.h:50
TGClient::NeedRedraw
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
Definition: TGClient.cxx:373
TTVLVContainer::Cut
const char * Cut()
Return the cut entry.
Definition: TTVLVContainer.cxx:336
TTVLVEntry::fConvName
TString fConvName
Definition: TTVLVContainer.h:62
TTVLVEntry::SetTrueName
void SetTrueName(const char *name)
Definition: TTVLVContainer.h:91
TGLVContainer
Definition: TGListView.h:196
TGSelectBox::fViewer
TTreeViewer * fViewer
Definition: TTVLVContainer.h:159
TGObject::fClient
TGClient * fClient
Definition: TGObject.h:37
TGItemContext::fItem
TTVLVEntry * fItem
Definition: TTVLVContainer.h:39
TGFrame::MoveResize
virtual void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0)
Move and/or resize the frame.
Definition: TGFrame.cxx:614
TTVLVEntry
This class represent entries that goes into the TreeViewer listview container.
Definition: TTVLVContainer.h:56
TTVLVEntry::GetContainer
TTVLVContainer * GetContainer()
Definition: TTVLVContainer.h:78
kC_COMMAND
@ kC_COMMAND
Definition: WidgetMessageTypes.h:33
TGFrame::Move
virtual void Move(Int_t x, Int_t y)
Move frame.
Definition: TGFrame.cxx:578
TGCanvas::SetHsbPosition
virtual void SetHsbPosition(Int_t newPos)
Set position of horizontal scrollbar.
Definition: TGCanvas.cxx:2390
TList::Add
virtual void Add(TObject *obj)
Definition: TList.h:87
TGTextEntry.h
TGToolTip.h
TTVLVEntry::~TTVLVEntry
virtual ~TTVLVEntry()
TTVLVEntry destructor.
Definition: TTVLVContainer.cxx:119
TGButton.h
TTreeViewer::kLTDragType
@ kLTDragType
Definition: TTreeViewer.h:68
Event_t
Definition: GuiTypes.h:173
GET_SUBMSG
Int_t GET_SUBMSG(Long_t val)
Definition: WidgetMessageTypes.h:113
TList::Clear
virtual void Clear(Option_t *option="")
Remove all objects from the list.
Definition: TList.cxx:402
name
char name[80]
Definition: TGX11.cxx:110
TGItemContext::SetExpression
void SetExpression(const char *name="", const char *alias="-empty-", Bool_t cut=kFALSE)
Set item expression.
Definition: TTVLVContainer.cxx:82
TGContainer::fDragging
Bool_t fDragging
Definition: TGCanvas.h:57
TGFrameElement
Definition: TGLayout.h:112
TTVLVContainer::ScanList
const char * ScanList()
Return the cut entry.
Definition: TTVLVContainer.cxx:424
TGTextEntry::GetText
const char * GetText() const
Definition: TGTextEntry.h:134
TGSelectBox::fLayout
TGLayoutHints * fLayout
Definition: TTVLVContainer.h:166
TGString::GetString
const char * GetString() const
Definition: TGString.h:40
TIter
Definition: TCollection.h:233
kCT_ITEMCLICK
@ kCT_ITEMCLICK
Definition: WidgetMessageTypes.h:56
kLHintsExpandX
@ kLHintsExpandX
Definition: TGLayout.h:37
ETransientFrameCommands
ETransientFrameCommands
Definition: TTVLVContainer.cxx:658
TTVLVContainer::fCursor
Cursor_t fCursor
Definition: TTVLVContainer.h:115
TGTextEntry::GetCursorPosition
Int_t GetCursorPosition() const
Definition: TGTextEntry.h:128
TGTextEntry::SetCursorPosition
virtual void SetCursorPosition(Int_t pos)
Set the cursor position to newPos.
Definition: TGTextEntry.cxx:730
TGFrame::fHeight
UInt_t fHeight
Definition: TGFrame.h:113
TGLVEntry::fCurrent
const TGPicture * fCurrent
Definition: TGListView.h:73
TTVLVContainer::HandleButton
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event in container.
Definition: TTVLVContainer.cxx:438
kEnterWindowMask
const Mask_t kEnterWindowMask
Definition: GuiTypes.h:166
type
int type
Definition: TGX11.cxx:121
TTVLVContainer::HandleMotion
virtual Bool_t HandleMotion(Event_t *event)
Handle mouse motion events.
Definition: TTVLVContainer.cxx:547
TGItemContext::Draw
void Draw(Option_t *option="")
Draw item.
Definition: TTVLVContainer.cxx:41
TGClient::GetRoot
const TGWindow * GetRoot() const
Returns current root (i.e.
Definition: TGClient.cxx:225
TGContainer::fTotal
Int_t fTotal
Definition: TGCanvas.h:58
TGToolTip::Hide
void Hide()
Hide tool tip window.
Definition: TGToolTip.cxx:247
TGLVEntry::fItemName
TGString * fItemName
Definition: TGListView.h:61
TTVLVContainer::~TTVLVContainer
virtual ~TTVLVContainer()
TGLVContainer destructor.
Definition: TTVLVContainer.cxx:328
TTVLVEntry::fTip
TGToolTip * fTip
Definition: TTVLVContainer.h:63
TGCompositeFrame::AddFrame
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
Definition: TGFrame.cxx:1102
Event_t::fUser
Long_t fUser[5]
Definition: GuiTypes.h:186
TGString
Definition: TGString.h:30
TTVLVEntry::fIsCut
Bool_t fIsCut
Definition: TTVLVContainer.h:64
TTVLVContainer::ExpressionItem
TTVLVEntry * ExpressionItem(Int_t index)
Return the expression item at specific position.
Definition: TTVLVContainer.cxx:350
MK_MSG
Int_t MK_MSG(EWidgetMessageTypes msg, EWidgetMessageTypes submsg)
Definition: WidgetMessageTypes.h:110
TTVLVEntry::CopyItem
void CopyItem(TTVLVEntry *dest)
Copy this item's name and alias to an other.
Definition: TTVLVContainer.cxx:170
TGLVEntry::DoRedraw
virtual void DoRedraw()
Redraw list view item.
Definition: TGListView.cxx:316
TList
A doubly linked list.
Definition: TList.h:44
TTVLVEntry::SetExpression
void SetExpression(const char *name, const char *alias, Bool_t cutType=kFALSE)
Set the true name, alias and type of the expression, then refresh it.
Definition: TTVLVContainer.cxx:244
TGSelectBox::fDONE
TGTextButton * fDONE
Definition: TTVLVContainer.h:170
TGItemContext::EditExpression
void EditExpression()
Edit expression.
Definition: TTVLVContainer.cxx:49
int
TGLVEntry::fSmallPic
const TGPicture * fSmallPic
Definition: TGListView.h:72
TTVLVContainer::Ex
const char * Ex()
Return the expression on X.
Definition: TTVLVContainer.cxx:382
TTVLVContainer::fListView
TGListView * fListView
Definition: TTVLVContainer.h:117