Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TParallelCoordEditor.cxx
Go to the documentation of this file.
1// @(#)root/treeviewer:$Id$
2// Author: Bastien Dalla Piazza 02/08/2007
3
4/*************************************************************************
5 * Copyright (C) 1995-2007, 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
13#include "TParallelCoord.h"
14#include "TParallelCoordRange.h"
15#include "TParallelCoordVar.h"
16
17#include "TGButton.h"
18#include "TGButtonGroup.h"
19#include "TGNumberEntry.h"
20#include "TGLabel.h"
21#include "TGTextEntry.h"
22#include "TGComboBox.h"
23#include "TGColorSelect.h"
24#include "TColor.h"
25#include "TG3DLine.h"
26#include "TGSlider.h"
27#include "TGDoubleSlider.h"
28#include "TGedPatternSelect.h"
29#include "TCanvas.h"
30
31#include "TROOT.h"
32
33
34
35/** \class TParallelCoordEditor
36
37This is the TParallelCoord editor. It brings tools to explore datas
38Using parallel coordinates. The main tools are:
39
40 - Dots spacing : Set the dots spacing with which-one the lines
41 must be drawn. This tool is useful to reduce the image
42 cluttering.
43 - The Selections section : Set the current edited selection and
44 allows to apply it to the tree through a generated entry list.
45 - The Entries section : Set how many events must be drawn.
46 A weight cut can be defined here (see TParallelCoord for a
47 a description of the weight cut).
48 - The Variables tab : To define the global settings to display
49 the axes. It is also possible to add a variable from its
50 expression or delete a selected one (also possible using right
51 click on the pad.
52*/
53
90
91////////////////////////////////////////////////////////////////////////////////
92/// Normal constructor.
93
95 Int_t/*width*/, Int_t /*height*/,
96 UInt_t /*options*/, Pixel_t /*back*/)
97{
98 fPriority = 1;
99 fDelay = true;
100
101 // Line
102 MakeTitle("Line");
103
108 fGlobalLineWidth->Resize(91, 20);
109 f1->AddFrame(fGlobalLineWidth, new TGLayoutHints(kLHintsLeft, 3, 1, 1, 1));
111
112 if (!TCanvas::SupportAlpha()) {
113
114 AddFrame(new TGLabel(this,"Dots spacing"),
116
117 TGHorizontalFrame *f2 = new TGHorizontalFrame(this);
119 fDotsSpacing->SetRange(0,60);
127 }
128 else {
129 TGLabel *AlphaLabel = new TGLabel(this,"Opacity");
134 fAlpha->SetRange(0,1000);
139 fAlphaField->Resize(40,20);
142 }
143
144 fLineTypeBgroup = new TGButtonGroup(this,2,1,0,0, "Line type");
147 fLineTypePoly->SetToolTipText("Draw the entries with a polyline");
150 fLineTypeCurves->SetToolTipText("Draw the entries with a curve");
153
154 // Selections
155 MakeTitle("Selections");
156
157 fHideAllRanges = new TGCheckButton(this,"Hide all ranges",kHideAllRanges);
159
161 fSelectionSelect->Resize(140,20);
163
164 TGHorizontalFrame *f3 = new TGHorizontalFrame(this);
168 fSelectLineWidth->Resize(94, 20);
169 f3->AddFrame(fSelectLineWidth, new TGLayoutHints(kLHintsLeft, 3, 1, 1, 1));
170 AddFrame(f3, new TGLayoutHints(kLHintsLeft | kLHintsTop,0,0,3,0));
171
173 fActivateSelection->SetToolTipText("Activate the current selection");
175 fShowRanges = new TGCheckButton(this,"Show ranges",kShowRanges);
177
178 TGHorizontalFrame *f5 = new TGHorizontalFrame(this);
182 fAddSelection = new TGTextButton(f5,"Add");
183 fAddSelection->SetToolTipText("Add a new selection (Right click on the axes to add a range).");
186 fDeleteSelection->SetToolTipText("Delete the current selection");
189
190 TGHorizontalFrame *f7 = new TGHorizontalFrame(this);
191 fApplySelect = new TGTextButton(f7,"Apply to tree",kApplySelect);
192 fApplySelect->SetToolTipText("Generate an entry list for the current selection and apply it to the tree.");
194 fUnApply = new TGTextButton(f7,"Reset tree",kUnApply);
195 fUnApply->SetToolTipText("Reset the tree entry list");
198
199 // Entries
200 MakeTitle("Entries");
201
202 fPaintEntries = new TGCheckButton(this,"Draw entries",kPaintEntries);
204 fDelayDrawing = new TGCheckButton(this,"Delay Drawing", kDelayDrawing);
206
209
210 TGHorizontalFrame *f6 = new TGHorizontalFrame(this);
213 v1->AddFrame(new TGLabel(v1,"First entry:"));
217 fFirstEntry->Resize(68,20);
218 v1->AddFrame(fFirstEntry);
219 v2->AddFrame(new TGLabel(v2,"# of entries:"));
223 fNentries->Resize(68,20);
224 v2->AddFrame(fNentries);
225 f6->AddFrame(v1);
226 f6->AddFrame(v2, new TGLayoutHints(kLHintsLeft,4,0,0,0));
227 AddFrame(f6);
228
229 AddFrame(new TGLabel(this,"Weight cut:"));
230
231 TGHorizontalFrame *f8 = new TGHorizontalFrame(this);
236 fWeightCutField->Resize(40,20);
237 f8->AddFrame(fWeightCut);
239 AddFrame(f8);
240
242}
243
244////////////////////////////////////////////////////////////////////////////////
245/// Make the "variable" tab.
246
248{
249 fVarTab = CreateEditorTabSubFrame("Variables");
250 // Variable
251
253 fAddVariable = new TGTextEntry(f9);
254 fAddVariable->Resize(71,20);
256 fButtonAddVar = new TGTextButton(f9,"Add");
257 fButtonAddVar->SetToolTipText("Add a new variable from the tree (must be a valid expression).");
259 fVarTab->AddFrame(f9);
260
263 fVariables->Resize(105,20);
265 fVarTab->AddFrame(f10,new TGLayoutHints(kLHintsLeft,0,0,2,0));
266
268 fDeleteVar = new TGTextButton(f12,"Delete",kDeleteVar);
269 fDeleteVar->SetToolTipText("Delete the current selected variable");
271 fRenameVar = new TGTextButton(f12,"Rename",kRenameVar);
272 fRenameVar->SetToolTipText("Rename the current selected variable");
274 fVarTab->AddFrame(f12,new TGLayoutHints(kLHintsLeft,0,0,2,0));
275
276 fVarTab->AddFrame(new TGLabel(fVarTab,"Axis histograms:"));
277
281 v3->AddFrame(new TGLabel(v3,"Binning:"));
285 fHistBinning->Resize(68,20);
286 v3->AddFrame(fHistBinning);
287 v4->AddFrame(new TGLabel(v4,"Width:"));
291 fHistWidth->Resize(68,20);
292 v4->AddFrame(fHistWidth, new TGLayoutHints(kLHintsLeft,4,0,0,0));
293 f11->AddFrame(v3);
294 f11->AddFrame(v4);
295 fVarTab->AddFrame(f11);
296
297 fHistShowBoxes = new TGCheckButton(fVarTab,"Show box histograms");
299
300 fVarTab->AddFrame(new TGLabel(fVarTab,"Bar histograms style:"));
301
304 f13->AddFrame(fHistColorSelect, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
309 fVarTab->AddFrame(f13, new TGLayoutHints(kLHintsTop, 1, 1, 0, 0));
310}
311
312////////////////////////////////////////////////////////////////////////////////
313/// Destructor.
314
320
321////////////////////////////////////////////////////////////////////////////////
322/// Clean up the selection combo box.
323
325{
326 TList *list = fParallel->GetSelectList();
328 bool enable = list->GetSize() > 0;
335 if (list->GetSize() > 0) {
336 Int_t i = 0;
337 TIter next(list);
339 while ((sel = (TParallelCoordSelect*)next())) {
340 fSelectionSelect->AddEntry(sel->GetTitle(),i);
341 TGLBEntry *entry = fSelectionSelect->GetListBox()->GetEntry(i);
342 if (entry)
343 entry->SetBackgroundColor(TColor::Number2Pixel(sel->GetLineColor()));
344 ++i;
345 }
347 if (sel) {
348 fSelectionSelect->Select(list->IndexOf(sel),false);
349 Color_t c;
350 Pixel_t p;
351 c = sel->GetLineColor();
354 fSelectLineWidth->Select(sel->GetLineWidth());
357 }
358 }
359}
360
361////////////////////////////////////////////////////////////////////////////////
362/// Clean up the variables combo box.
363
365{
366 TList *list = fParallel->GetVarList();
368 bool enable = list->GetSize() > 0;
374 if (list->GetSize() > 0) {
375 Int_t i = 0;
376 TIter next(list);
378 while ((var = (TParallelCoordVar*)next())) {
379 fVariables->AddEntry(var->GetTitle(),i);
380 ++i;
381 }
382 var = (TParallelCoordVar*)list->First();
383 fVariables->Select(0,false);
387 }
388}
389
390////////////////////////////////////////////////////////////////////////////////
391/// Connect signals to slots.
392
394{
395 fGlobalLineColor->Connect("ColorSelected(Pixel_t)","TParallelCoordEditor",
396 this, "DoGlobalLineColor(Pixel_t)");
397 fGlobalLineWidth->Connect("Selected(Int_t)","TParallelCoordEditor",
398 this, "DoGlobalLineWidth(Int_t)");
399 if (!TCanvas::SupportAlpha()) {
400 fDotsSpacing->Connect("Released()","TParallelCoordEditor",
401 this, "DoDotsSpacing()");
402 fDotsSpacing->Connect("PositionChanged(Int_t)","TParallelCoordEditor",
403 this, "DoLiveDotsSpacing(Int_t)");
404 fDotsSpacingField->Connect("ReturnPressed()","TParallelCoordEditor",
405 this, "DoDotsSpacingField()");
406 }
407 else {
408 fAlpha->Connect("Released()","TParallelCoordEditor",
409 this, "DoAlpha()");
410 fAlpha->Connect("PositionChanged(Int_t)","TParallelCoordEditor",
411 this, "DoLiveAlpha(Int_t)");
412 fAlphaField->Connect("ReturnPressed()","TParallelCoordEditor",
413 this, "DoAlphaField()");
414 }
415 fLineTypeBgroup->Connect("Clicked(Int_t)", "TParallelCoordEditor",
416 this, "DoLineType()");
417 fSelectionSelect->Connect("Selected(const char*)","TParallelCoordEditor",
418 this, "DoSelectionSelect(const char*)");
419 fSelectLineColor->Connect("ColorSelected(Pixel_t)","TParallelCoordEditor",
420 this, "DoSelectLineColor(Pixel_t)");
421 fSelectLineWidth->Connect("Selected(Int_t)","TParallelCoordEditor",
422 this, "DoSelectLineWidth(Int_t)");
423 fActivateSelection->Connect("Toggled(bool)","TParallelCoordEditor",
424 this, "DoActivateSelection(bool)");
425 fShowRanges->Connect("Toggled(bool)","TParallelCoordEditor",
426 this, "DoShowRanges(bool)");
427 fDeleteSelection->Connect("Clicked()","TParallelCoordEditor",
428 this, "DoDeleteSelection()");
429 fAddSelection->Connect("Clicked()","TParallelCoordEditor",
430 this, "DoAddSelection()");
431 fPaintEntries->Connect("Toggled(bool)","TParallelCoordEditor",
432 this, "DoPaintEntries(bool)");
433 fEntriesToDraw->Connect("Released()","TParallelCoordEditor",
434 this, "DoEntriesToDraw()");
435 fEntriesToDraw->Connect("PositionChanged()","TParallelCoordEditor",
436 this, "DoLiveEntriesToDraw()");
437 fFirstEntry->Connect("ReturnPressed()","TParallelCoordEditor",
438 this, "DoFirstEntry()");
439 fNentries->Connect("ReturnPressed()","TParallelCoordEditor",
440 this, "DoNentries()");
441 fApplySelect->Connect("Clicked()","TParallelCoordEditor",
442 this, "DoApplySelect()");
443 fUnApply->Connect("Clicked()","TParallelCoordEditor",
444 this, "DoUnApply()");
445 fDelayDrawing->Connect("Toggled(bool)","TParallelCoordEditor",
446 this, "DoDelayDrawing(bool)");
447 fAddVariable->Connect("ReturnPressed()","TParallelCoordEditor",
448 this, "DoAddVariable()");
449 fButtonAddVar->Connect("Clicked()","TParallelCoordEditor",
450 this, "DoAddVariable()");
451 fHideAllRanges->Connect("Toggled(bool)","TParallelCoordEditor",
452 this, "DoHideAllRanges(bool)");
453 fVariables->Connect("Selected(const char*)","TParallelCoordEditor",
454 this, "DoVariableSelect(const char*)");
455 fDeleteVar->Connect("Clicked()","TParallelCoordEditor",
456 this, "DoDeleteVar()");
457 fHistWidth->Connect("ReturnPressed()","TParallelCoordEditor",
458 this, "DoHistWidth()");
459 fHistBinning->Connect("ReturnPressed()","TParallelCoordEditor",
460 this, "DoHistBinning()");
461 fWeightCut->Connect("Released()","TParallelCoordEditor",
462 this, "DoWeightCut()");
463 fWeightCut->Connect("PositionChanged(Int_t)","TParallelCoordEditor",
464 this, "DoLiveWeightCut(Int_t)");
465 fWeightCutField->Connect("ReturnPressed()","TParallelCoordEditor",
466 this, "DoWeightCut()");
467 fHistColorSelect->Connect("ColorSelected(Pixel_t)", "TParallelCoordEditor",
468 this, "DoHistColorSelect(Pixel_t)");
469 fHistPatternSelect->Connect("PatternSelected(Style_t)", "TParallelCoordEditor",
470 this, "DoHistPatternSelect(Style_t)");
471 fHistShowBoxes->Connect("Toggled(bool)","TParallelCoordEditor",
472 this, "DoHistShowBoxes(bool)");
473
474 fInit = false;
475}
476
477////////////////////////////////////////////////////////////////////////////////
478/// Slot to activate or not a selection.
479
481{
482 if (fAvoidSignal) return;
483
485 if (sel) {
486 sel->SetActivated(on);
487 Update();
488 }
489}
490
491////////////////////////////////////////////////////////////////////////////////
492/// Slot to add a selection.
493
495{
497 if (title == "") title = "Selection";
498 TString titlebis = title;
499 bool found = true;
500 Int_t i=1;
501 while (found){
503 titlebis = title;
504 titlebis.Append(Form("(%d)",i));
505 }
506 else found = false;
507 ++i;
508 }
509
511
513}
514
515////////////////////////////////////////////////////////////////////////////////
516/// Slot to add a variable.
517
526
527////////////////////////////////////////////////////////////////////////////////
528/// Slot to apply a selection to the tree.
529
531{
532 //FIXME I forgot to update the slider over the entries
533 // (nentries and firstentry might have changed after applying the selection)
534
535 if (fAvoidSignal) return;
536
538 Update();
540}
541
542////////////////////////////////////////////////////////////////////////////////
543/// Slot to delay the drawing.
544
546{
547 if (fAvoidSignal) return;
548
549 fDelay = on;
551}
552
553////////////////////////////////////////////////////////////////////////////////
554/// Slot to delete a selection.
555
565
566////////////////////////////////////////////////////////////////////////////////
567/// Slot to delete a variable().
568
577
578////////////////////////////////////////////////////////////////////////////////
579/// Slot to set the line dot spacing.
580
589
590////////////////////////////////////////////////////////////////////////////////
591/// Slot to set the line dot spacing from the entry field.
592
601
602////////////////////////////////////////////////////////////////////////////////
603/// Slot to set the alpha value from the entry field.
604
606{
607 if (fAvoidSignal) return;
608
609 if (TColor *color = gROOT->GetColor(fParallel->GetLineColor())) {
610 color->SetAlpha((Float_t)fAlphaField->GetNumber());
612 }
613 Update();
614}
615
616////////////////////////////////////////////////////////////////////////////////
617/// Slot to set the alpha value
618
620{
621 if (fAvoidSignal) return;
622
623 if (TColor *color = gROOT->GetColor(fParallel->GetLineColor())) {
624 color->SetAlpha((Float_t)fAlpha->GetPosition()/1000);
626 }
627 Update();
628}
629
630////////////////////////////////////////////////////////////////////////////////
631/// Slot to select the entries to be drawn.
632
645
646////////////////////////////////////////////////////////////////////////////////
647/// Slot to set the first entry.
648
657
658////////////////////////////////////////////////////////////////////////////////
659/// Slot to set the global line color.
660
662{
663 if (fAvoidSignal) return;
664
665 if (TColor *color = gROOT->GetColor(fParallel->GetLineColor())) {
666 color->SetAlpha(1);
667 color = gROOT->GetColor(TColor::GetColor(a));
668 if (color) {
669 color->SetAlpha((Float_t)fAlphaField->GetNumber());
670 fParallel->SetLineColor(color->GetNumber());
671 }
672 }
673 Update();
674}
675
676////////////////////////////////////////////////////////////////////////////////
677/// Slot to set the global line width.
678
686
687////////////////////////////////////////////////////////////////////////////////
688/// Slot to hide all the ranges.
689
691{
692 if (fAvoidSignal) return;
693
696 while((sel = (TParallelCoordSelect*)next())) sel->SetShowRanges(!on);
700 Update();
701}
702
703////////////////////////////////////////////////////////////////////////////////
704/// Slot to set the axes histogram binning.
705
713
714////////////////////////////////////////////////////////////////////////////////
715/// Slot to set the histograms color.
716
718{
719 if (fAvoidSignal) return;
720
722 TIter next(fParallel->GetVarList());
723 TParallelCoordVar *var = nullptr;
724 while ((var = (TParallelCoordVar*)next())) var->SetFillColor(col);
725 Update();
726}
727
728////////////////////////////////////////////////////////////////////////////////
729/// Slot to set histogram height.
730
732{
733 if (fAvoidSignal) return;
734
735 TIter next(fParallel->GetVarList());
737 while ((var = (TParallelCoordVar*)next())) var->SetBit(TParallelCoordVar::kShowBarHisto,s);
738 Update();
739}
740
741////////////////////////////////////////////////////////////////////////////////
742/// Slot to set the histograms fill style.
743
745{
746 if (fAvoidSignal) return;
747
748 TIter next(fParallel->GetVarList());
749 TParallelCoordVar *var = nullptr;
750 while ((var = (TParallelCoordVar*)next())) var->SetFillStyle(sty);
751 Update();
752}
753
754////////////////////////////////////////////////////////////////////////////////
755/// Slot to set histogram width.
756
764
765////////////////////////////////////////////////////////////////////////////////
766/// Slot to set the line type.
767
769{
770 if (fAvoidSignal) return;
771
773 else fParallel->SetCurveDisplay(true);
774 Update();
775}
776
777////////////////////////////////////////////////////////////////////////////////
778/// Slot to set the dots spacing online.
779
787
788////////////////////////////////////////////////////////////////////////////////
789/// Slot to set alpha value online.
790
792{
793 if (fAvoidSignal) return;
795
796 if (TColor *color = gROOT->GetColor(fParallel->GetLineColor())) color->SetAlpha((Float_t)a/1000);
797 if (!fDelay) Update();
798}
799
800////////////////////////////////////////////////////////////////////////////////
801/// Slot to update the entries fields from the slider position.
802
820
821////////////////////////////////////////////////////////////////////////////////
822/// Slot to update the weight cut entry field from the slider position.
823
825{
826 if (fAvoidSignal) return;
827
829 if (!fDelay) {
831 Update();
832 }
833}
834
835////////////////////////////////////////////////////////////////////////////////
836/// Slot to set the number of entries to display.
837
846
847////////////////////////////////////////////////////////////////////////////////
848/// Slot to postpone the entries drawing.
849
857
858////////////////////////////////////////////////////////////////////////////////
859/// Slot to set the line color of selection.
860
862{
863 if (fAvoidSignal) return;
864
866 if (sel) sel->SetLineColor(TColor::GetColor(a));
867 fSelectionSelect->GetSelectedEntry()->SetBackgroundColor(a);
868 Update();
869}
870
871////////////////////////////////////////////////////////////////////////////////
872/// Slot to set the line width of selection.
873
875{
876 if (fAvoidSignal) return;
877
879 if (sel) {
880 sel->SetLineWidth(wid);
881 Update();
882 }
883}
884
885////////////////////////////////////////////////////////////////////////////////
886/// Slot to set the selection being edited.
887
903
904////////////////////////////////////////////////////////////////////////////////
905/// Slot to show or not the ranges on the pad.
906
908{
909 if (fAvoidSignal) return;
910
912 if (select) {
913 select->SetShowRanges(s);
914 Update();
915 }
916}
917
918////////////////////////////////////////////////////////////////////////////////
919/// Slot to reset the tree entry list to the original one.
920
922{
923 if (fAvoidSignal) return;
924
926 Update();
928}
929
930////////////////////////////////////////////////////////////////////////////////
931/// Slot to select a variable.
932
934{
935}
936
937////////////////////////////////////////////////////////////////////////////////
938/// Slot to update the weight cut.
939
948
949////////////////////////////////////////////////////////////////////////////////
950/// Pick up the used parallel coordinates plot attributes.
951
953{
954 if (!obj) return;
955 fParallel = dynamic_cast<TParallelCoord*>(obj);
956 if (!fParallel) return;
957 fAvoidSignal = true;
958
962
964
966
967 if (!TCanvas::SupportAlpha()) {
970 }
971 else {
972 if (TColor *color = gROOT->GetColor(fParallel->GetLineColor())) {
973 fAlpha->SetPosition((Int_t)color->GetAlpha()*1000);
974 fAlphaField->SetNumber(color->GetAlpha());
975 }
976 }
977
978 bool cur = fParallel->GetCurveDisplay();
981
982 if (fInit) fHideAllRanges->SetOn(false);
983
986
989
992
994
995 fWeightCut->SetRange(0,(Int_t)(fParallel->GetNentries()/10)); // Maybe search here for better boundaries.
998
1000 fHistPatternSelect->SetPattern(((TParallelCoordVar*)fParallel->GetVarList()->Last())->GetFillStyle(),false);
1001
1003
1004 fAvoidSignal = false;
1005}
@ kChildFrame
Definition GuiTypes.h:379
@ kVerticalFrame
Definition GuiTypes.h:381
@ kHorizontalFrame
Definition GuiTypes.h:382
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:40
#define c(i)
Definition RSha256.hxx:101
#define a(i)
Definition RSha256.hxx:99
short Style_t
Style number (short)
Definition RtypesCore.h:96
int Int_t
Signed integer 4 bytes (int)
Definition RtypesCore.h:59
short Color_t
Color number (short)
Definition RtypesCore.h:99
float Float_t
Float 4 bytes (float)
Definition RtypesCore.h:71
long long Long64_t
Portable signed long integer 8 bytes.
Definition RtypesCore.h:83
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
@ kButtonDown
Definition TGButton.h:54
@ kDoubleScaleNo
@ kLHintsLeft
Definition TGLayout.h:24
@ kLHintsCenterY
Definition TGLayout.h:28
@ kLHintsTop
Definition TGLayout.h:27
@ kScaleNo
Definition TGSlider.h:34
@ kSlider2
Definition TGSlider.h:31
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t sel
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize wid
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
int nentries
@ kLineTypeCurves
@ kAddSelectionEntry
@ kSelectLineWidth
@ kDotsSpacingField
@ kHistColorSelect
@ kDeleteSelection
@ kHistPatternSelect
@ kSelectLineColor
@ kGlobalLineColor
@ kSelectionSelect
@ kActivateSelection
@ kLineTypeBgroup
@ kGlobalLineWidth
#define gROOT
Definition TROOT.h:411
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
Definition TString.cxx:2495
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
Definition TAttFill.h:38
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
Definition TAttFill.h:40
virtual Color_t GetLineColor() const
Return the line color.
Definition TAttLine.h:35
virtual Width_t GetLineWidth() const
Return the line width.
Definition TAttLine.h:37
static Bool_t SupportAlpha()
Static function returning "true" if transparency is supported.
Definition TCanvas.cxx:2473
The color creation and management class.
Definition TColor.h:22
static ULong_t Number2Pixel(Int_t ci)
Static method that given a color index number, returns the corresponding pixel value.
Definition TColor.cxx:2445
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb",...
Definition TColor.cxx:1926
Organizes TGButton widgets in a group.
virtual void SetRadioButtonExclusive(Bool_t flag=kTRUE)
If enable is kTRUE, this button group will treat radio buttons as mutually exclusive,...
virtual void SetButton(Int_t id, Bool_t down=kTRUE)
Sets the button with id to be on/down, and if this is an exclusive group, all other button in the gro...
virtual void SetToolTipText(const char *text, Long_t delayms=400)
Set tool tip text associated with this button.
Definition TGButton.cxx:439
virtual EButtonState GetState() const
Definition TGButton.h:112
virtual void SetOn(Bool_t on=kTRUE, Bool_t emit=kFALSE)
Definition TGButton.h:120
virtual void SetEnabled(Bool_t e=kTRUE)
Set enabled or disabled state of button.
Definition TGButton.cxx:453
Selects different options.
Definition TGButton.h:264
Like a checkbutton but instead of the check mark there is color area with a little down arrow.
void SetEnabled(Bool_t e=kTRUE) override
Set enabled or disabled state of button.
void SetColor(Pixel_t color, Bool_t emit=kTRUE)
Set color.
A combobox (also known as a drop down listbox) allows the selection of one item out of a list of item...
Definition TGComboBox.h:47
void RemoveAll() override
Remove all entries from combo box.
virtual TGLBEntry * GetSelectedEntry() const
Definition TGComboBox.h:115
virtual void AddEntry(TGString *s, Int_t id)
Definition TGComboBox.h:86
virtual TGListBox * GetListBox() const
Definition TGComboBox.h:110
virtual void Select(Int_t id, Bool_t emit=kTRUE)
Make the selected item visible in the combo box window and emit signals according to the second param...
virtual void SetEnabled(Bool_t on=kTRUE)
Set state of combo box. If kTRUE=enabled, kFALSE=disabled.
virtual TGLBEntry * FindEntry(const char *s) const
Find entry by name.
The base class for composite widgets (menu bars, list boxes, etc.).
Definition TGFrame.h:289
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
Definition TGFrame.cxx:1109
TGCompositeFrame(const TGCompositeFrame &)=delete
void ChangeOptions(UInt_t options) override
Change composite frame options. Options is an OR of the EFrameTypes.
Definition TGFrame.cxx:1035
Dragging the slider will generate the event:
virtual Double_t GetMaxPositionD() const
virtual Long64_t GetMinPositionL() const
virtual Double_t GetMinPositionD() const
virtual void SetRange(Float_t min, Float_t max)
virtual void SetPosition(Float_t min, Float_t max)
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
Definition TGFrame.cxx:597
Concrete class for horizontal slider.
Definition TGSlider.h:119
A composite frame that layout their children in horizontal way.
Definition TGFrame.h:387
Basic listbox entries.
Definition TGListBox.h:24
This class handles GUI labels.
Definition TGLabel.h:24
This class describes layout hints used by the layout classes.
Definition TGLayout.h:50
The TGLineWidthComboBox user callable and it creates a combobox for selecting the line width.
Definition TGComboBox.h:158
virtual void SetNumber(Double_t val, Bool_t emit=kTRUE)
Set the numeric value (floating point representation).
virtual Double_t GetNumber() const
Get the numeric value (floating point representation).
@ kNEANonNegative
Non-negative number.
@ kNESReal
Real number.
@ kNESInteger
Style of number entry field.
Selects different options.
Definition TGButton.h:321
virtual Int_t GetPosition() const
Definition TGSlider.h:77
virtual void SetPosition(Int_t pos)
Set slider position.
Definition TGSlider.cxx:107
virtual void SetRange(Int_t min, Int_t max)
Set slider range.
Definition TGSlider.cxx:96
Yield an action as soon as it is clicked.
Definition TGButton.h:142
A TGTextEntry is a one line text input widget.
Definition TGTextEntry.h:24
const char * GetText() const
void SetEnabled(Bool_t flag=kTRUE)
Text string listbox entries.
Definition TGListBox.h:48
A composite frame that layout their children in vertical way.
Definition TGFrame.h:376
virtual void Associate(const TGWindow *w)
Definition TGWidget.h:72
ROOT GUI Window base class.
Definition TGWindow.h:23
virtual TGVerticalFrame * CreateEditorTabSubFrame(const char *name)
Create a vertical frame to be used by 'owner' in extra tab 'name'.
Bool_t fInit
init flag for setting signals/slots
Definition TGedFrame.h:47
virtual void MakeTitle(const char *title)
Create attribute frame title.
Definition TGedFrame.cxx:94
virtual void Update()
Update the current pad when an attribute is changed via GUI.
Definition TGedFrame.cxx:71
Int_t fPriority
location in GedEditor
Definition TGedFrame.h:53
Bool_t fAvoidSignal
flag for executing slots
Definition TGedFrame.h:50
is a button with pattern area with a little down arrow.
void SetPattern(Style_t pattern, Bool_t emit=kTRUE)
Set pattern.
A doubly linked list.
Definition TList.h:38
TObject * Last() const override
Return the last object in the list. Returns 0 when list is empty.
Definition TList.cxx:690
const char * GetTitle() const override
Returns title of object.
Definition TNamed.h:50
Mother of all ROOT objects.
Definition TObject.h:41
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Definition TObject.h:202
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Definition TObject.cxx:864
virtual void DoSelectLineColor(Pixel_t)
Slot to set the line color of selection.
~TParallelCoordEditor() override
Destructor.
virtual void DoHistShowBoxes(bool)
Slot to set histogram height.
TGDoubleHSlider * fEntriesToDraw
virtual void DoLiveEntriesToDraw()
Slot to update the entries fields from the slider position.
TGCheckButton * fHideAllRanges
virtual void DoDotsSpacing()
Slot to set the line dot spacing.
virtual void DoAlpha()
Slot to set the alpha value.
virtual void DoApplySelect()
Slot to apply a selection to the tree.
virtual void ConnectSignals2Slots()
Connect signals to slots.
virtual void DoFirstEntry()
Slot to set the first entry.
virtual void DoLiveDotsSpacing(Int_t a)
Slot to set the dots spacing online.
TGTextButton * fDeleteSelection
TGLineWidthComboBox * fSelectLineWidth
virtual void DoLiveWeightCut(Int_t n)
Slot to update the weight cut entry field from the slider position.
TGCheckButton * fActivateSelection
TGedPatternSelect * fHistPatternSelect
virtual void DoDotsSpacingField()
Slot to set the line dot spacing from the entry field.
TGLineWidthComboBox * fGlobalLineWidth
virtual void DoPaintEntries(bool)
Slot to postpone the entries drawing.
void CleanUpSelections()
Clean up the selection combo box.
virtual void DoActivateSelection(bool)
Slot to activate or not a selection.
virtual void DoGlobalLineColor(Pixel_t)
Slot to set the global line color.
TGNumberEntryField * fFirstEntry
virtual void DoLiveAlpha(Int_t a)
Slot to set alpha value online.
virtual void DoDeleteVar()
Slot to delete a variable().
TGNumberEntryField * fDotsSpacingField
virtual void DoSelectionSelect(const char *title)
Slot to set the selection being edited.
TGCompositeFrame * fVarTab
virtual void DoHistColorSelect(Pixel_t)
Slot to set the histograms color.
virtual void DoGlobalLineWidth(Int_t)
Slot to set the global line width.
virtual void DoHistWidth()
Slot to set histogram width.
TGCheckButton * fHistShowBoxes
void SetModel(TObject *obj) override
Pick up the used parallel coordinates plot attributes.
virtual void DoUnApply()
Slot to reset the tree entry list to the original one.
virtual void DoAddVariable()
Slot to add a variable.
TGCheckButton * fPaintEntries
virtual void DoDelayDrawing(bool)
Slot to delay the drawing.
virtual void DoHistPatternSelect(Style_t)
Slot to set the histograms fill style.
TGColorSelect * fSelectLineColor
void MakeVariablesTab()
Make the "variable" tab.
virtual void DoAddSelection()
Slot to add a selection.
TGCheckButton * fDelayDrawing
virtual void DoAlphaField()
Slot to set the alpha value from the entry field.
TGNumberEntryField * fHistWidth
TParallelCoordEditor(const TGWindow *p=nullptr, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Normal constructor.
virtual void DoSelectLineWidth(Int_t)
Slot to set the line width of selection.
virtual void DoEntriesToDraw()
Slot to select the entries to be drawn.
TGColorSelect * fHistColorSelect
TGRadioButton * fLineTypePoly
virtual void DoHideAllRanges(bool)
Slot to hide all the ranges.
virtual void DoLineType()
Slot to set the line type.
TGColorSelect * fGlobalLineColor
TGNumberEntryField * fAlphaField
void CleanUpVariables()
Clean up the variables combo box.
TGNumberEntryField * fWeightCutField
TGRadioButton * fLineTypeCurves
virtual void DoWeightCut()
Slot to update the weight cut.
virtual void DoNentries()
Slot to set the number of entries to display.
TGNumberEntryField * fNentries
TGButtonGroup * fLineTypeBgroup
virtual void DoShowRanges(bool s)
Slot to show or not the ranges on the pad.
virtual void DoHistBinning()
Slot to set the axes histogram binning.
virtual void DoDeleteSelection()
Slot to delete a selection.
TGNumberEntryField * fHistBinning
virtual void DoVariableSelect(const char *var)
Slot to select a variable.
A TParallelCoordSelect is a specialised TList to hold TParallelCoordRanges used by TParallelCoord.
TParallelCoord axes.
Int_t GetHistBinning() const
Parallel Coordinates class.
void AddSelection(const char *title)
Add a selection.
Int_t GetWeightCut() const
TList * GetSelectList()
void SetAxisHistogramLineWidth(Int_t lw=2)
Set the same histogram axis line width for all axis.
void SetLineColor(Color_t col)
void SetLineWidth(Width_t wid)
TParallelCoordSelect * GetCurrentSelection()
Return the selection currently being edited.
void SetLiveRangesUpdate(bool)
If true, the pad is updated while the motion of a dragged range.
Int_t GetDotsSpacing() const
void DeleteSelection(TParallelCoordSelect *sel)
Delete a selection.
Long64_t GetNentries()
void ResetTree()
Reset the tree entry list to the initial one..
Long64_t GetCurrentFirst()
Long64_t GetCurrentN()
void AddVariable(Double_t *val, const char *title="")
Add a variable.
TList * GetVarList()
Color_t GetLineColor()
void SetCurrentN(Long64_t)
Set the number of entry to be displayed.
TParallelCoordSelect * SetCurrentSelection(const char *title)
Set the selection being edited.
void RemoveVariable(TParallelCoordVar *var)
Delete a variable from the graph.
void ApplySelectionToTree()
Apply the current selection to the tree.
void SetAxisHistogramBinning(Int_t n=100)
Set the same histogram axis binning for all axis.
void SetDotsSpacing(Int_t s=0)
Set dots spacing.
virtual void SetCurveDisplay(bool curve=true)
@ kPaintEntries
To paint all TParallelCoord entries.
void SetCurrentFirst(Long64_t)
Set the first entry to be displayed.
void SetWeightCut(Int_t w=0)
bool GetCurveDisplay() const
Width_t GetLineWidth()
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot.
Definition TQObject.cxx:865
Basic string class.
Definition TString.h:138
const Int_t n
Definition legend1.C:16
TF1 * f1
Definition legend1.C:11