Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TStyleManager.cxx
Go to the documentation of this file.
1// @(#)root/ged:$Id$
2// Author: Denis Favre-Miville 08/09/05
3
4/*************************************************************************
5 * Copyright (C) 1995-2004, 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
13/** \class TStyleManager
14 \ingroup ged
15
16 This class provides a Graphical User Interface to manage styles
17 in ROOT. It allows the user to edit styles, import / export
18 them to macros, apply a style on the selected object or on
19 all canvases, change gStyle.
20
21 Activate the style manager by selecting Edit menu / Style...
22 in the canvas window.
23
24 The Style Manager interface is composed of two parts:
25 - the top level interface that manages a list of styles;
26 - the style editor, which deals with the current style settings.
27
28
29The combo box 'Available Styles' contains the list of available
30styles for the current ROOT session and shows the currently
31selected one. The field on the right shows the setting of the gStyle.
32You can set the global variable gStyle to the selected style by
33clicking on the button in the middle.
34The group frame 'Apply on' displays information for the currently
35selected canvas and object in the ROOT session. This selection might
36be changed by clicking on another object with the middle mouse
37button. You have a choice to apply a style on the selected object or
38on all available canvases.
39WARNING: You cannot undo the changes after applying the style! If
40you are not sure of that action, it may be better to see a preview
41of what you are going to apply.
42If the check button 'Preview' is selected, a preview of the selected
43canvas according to the selected style will be shown. The selection
44of the next check button 'Run Time Preview' will apply updates of
45the preview any time a value of the selected style is changed. For
46drawings that take a time it is better to disable this option.
47
48Create a new style:
49A new style can be created via the Style menu/New... or the toolbar.
50A clone of the selected style will be used as a base of the new
51style. All its values can be modified via the style editor later.
52The dialog that appears will ask for the name and description of the
53new style.
54
55Import a style (from a macro):
56A style macro can be imported at any time. The new imported style in
57the ROOT session will become the selected one.
58
59Import a style (from a canvas):
60You can do that selecting the Style menu/Import from.../Canvas or
61the corresponding Tool bar button. A new style will be created in the
62ROOT session and will become the selected one. This style is a clone
63of the gStyle with modified values as they are set in the currently
64selected canvas. You can import a style from any canvas and apply it
65later on some objects.
66
67Export a style (in a C++ macro file):
68To store a style longer than for the current ROOT session you can
69save it in a C++ macro file. This can be done via the menu or the
70tool bar button. There is a naming convention for the style macros:
71the name must be 'Style_*.C', where * can be replaced by anything
72you want.
73
74Delete a style:
75The selected style can be deleted from the list when you use the
76Style menu/Delete or the corresponding tool bar button. The selected
77style is removed from the list of all available styles for the
78current ROOT session. WARRNING: it will be lost if you didn't saved
79it in a C++ macro file before its deletion. Also, you cannot delete
80the selected style if it is set to gStyle. A message 'Can not delete
81gStyle' will be displayed on the CINT prompt.
82
83Editor's buttons:
84Open / close the style editor:
85The button 'Edit >>' opens the style editor and its label changes to
86'Close <<'. For all details of what can be changed and how please see
87the provided Help.
88
89Reset a style (to a previously saved state):
90When the editor is opened, the 'Reset' button allows you to reset
91the values of the selected style for editing. Doing that you cancel
92all changes made since the last time you saved that style in a macro.
93If the selected style is one of the five ROOT styles (Plain, Bold,
94Video, Pub or Default), it will be recreated.
95
96Update the preview:
97The button 'Update Preview' is available when a preview is shown and
98the run time option is not selected. This button allows you to
99refresh the preview any time you want to see how the style you edit
100looks like.
101
102Help button:
103Provides a help of the currently selected tab.
104
105*/
106
107
108#include "TStyleManager.h"
109#include "TStyleDialog.h"
110#include "TStylePreview.h"
111#include "HelpSMText.h"
112
113#include <TCanvas.h>
114#include <TColor.h>
115#include <TG3DLine.h>
116#include <TGButton.h>
117#include <TGButtonGroup.h>
118#include <TGColorSelect.h>
119#include <TGComboBox.h>
120#include <TGedMarkerSelect.h>
121#include <TGedPatternSelect.h>
122#include <TGFileDialog.h>
123#include <TGLabel.h>
124#include <TGLayout.h>
125#include <TGMenu.h>
126#include <TGNumberEntry.h>
127#include <TGResourcePool.h>
128#include <TGStatusBar.h>
129#include <TGTab.h>
130#include <TGToolBar.h>
131#include <TROOT.h>
132#include <snprintf.h>
133#include <TRootHelpDialog.h>
134#include <TStyle.h>
135#include <TSystem.h>
136#include <TVirtualPad.h>
137#include <TVirtualX.h>
138
140
142
161
168
180
184
203
223
240
252
263
270
275
293
311
329
344
372
383
384const char *kFiletypes[] = { "ROOT macros", "Style_*.C",
385 0, 0 };
386
387////////////////////////////////////////////////////////////////////////////////
388/// Constructor. Create the main window of the style manager.
389
391{
392 SetWindowName("Style Manager");
394
395 // Initialization: no selected style, no preview, no signal/slots,
396 // no selected object, no current macro file.
397 fCurSelStyle = 0;
398 fCurMacro = 0;
399 fCurPad = 0;
400 fCurObj = 0;
401 fPreviewWindow = 0;
403 fCurTabNum = 0;
404 fCurTabAxisNum = 0;
408
409 // Create the trash lists to have an effective deletion of every object.
410 fTrashListLayout = new TList();
411 fTrashListFrame = new TList();
412
413 // To avoid to create a lot a copies of the often used layouts.
424
425 // Build the graphical interface.
426 AddMenus(this);
427 AddToolbar(this);
429 AddEdition(this);
430
431 // Add status bar.
432 fStatusBar = new TGStatusBar(this, 50, 10, kVerticalFrame);
433 Int_t parts[] = { 20, 30, 50 };
437
438 // Initialize the layout algorithm and map the main frame.
441 MapWindow();
442
443 // Ensure the editor will be visible (not out of the screen's range) when
444 // the user will press the 'More' button, if they didn't move the window.
445 Int_t x, y;
446 UInt_t w, h;
447 gVirtualX->GetWindowSize(GetId(), x, y, w, h);
448 fSMWidth = w;
449 fSMHeight = h;
450 if (fSMWidth < 467) fSMWidth = 467;
451 if (fSMHeight < 708) fSMHeight = 708;
453 gVirtualX->TranslateCoordinates(GetId(), GetParent()->GetId(), 0, 0, x, y, win);
454 x -= 6;
455 y -= 21;
456 MoveResize(x, TMath::Max(TMath::Min(y, (Int_t) (gClient->GetDisplayHeight() - h)), 0), w, h);
457
458 // Only the top level interface is shown, at the begining.
459 DoMoreLess();
460
461 // Connect all widgets (excluding editor).
462 ConnectAll();
463
464 Init();
465}
466
467////////////////////////////////////////////////////////////////////////////////
468/// Destructor.
469
471{
472 // Disconnect all widgets
475
476 if (fPreviewWindow) {
478 delete fPreviewWindow;
479 }
480
481 // Delete every graphical data member,
482 // excluding fPreviewWindow and fLayout[..].
483 gClient->FreePicture(fToolBarNewPic);
484 gClient->FreePicture(fToolBarDeletePic);
485 gClient->FreePicture(fToolBarImportCanvasPic);
486 gClient->FreePicture(fToolBarImportMacroPic);
487 gClient->FreePicture(fToolBarExportPic);
488 gClient->FreePicture(fToolBarHelpPic);
489 gClient->FreePicture(fMakeDefaultPic);
490
491 delete fImportCascade;
492 delete fMenuStyle;
493 delete fMenuHelp;
494 delete fMenuBar;
495
496 delete fToolBar;
497 delete fToolBarNew;
498 delete fToolBarDelete;
500 delete fToolBarImportMacro;
501 delete fToolBarExport;
502 delete fToolBarHelp;
503 delete fHorizontal3DLine;
504
505 delete fListLabel;
506 delete fListComboBox;
507 delete fCurMacro;
508 delete fCurStylabel;
509 delete fCurStyle;
510 delete fCurPadLabel;
511 delete fCurPadTextEntry;
512 delete fCurObjLabel;
513 delete fCurObjTextEntry;
514 delete fPreviewButton;
515 delete fPreviewRealTime;
516 delete fMakeDefault;
517
518 delete fApplyOnGroup;
519 delete fApplyOnAll;
520 delete fApplyOnSel;
521 delete fApplyOnButton;
522 delete fMoreLess;
523
524 delete fFillColor;
525 delete fFillStyle;
526 delete fHatchesLineWidth;
527 delete fHatchesSpacing;
528 delete fTextColor;
529 delete fTextSize;
530 delete fTextSizeInPixels;
531 delete fTextFont;
532 delete fTextAlign;
533 delete fTextAngle;
534 delete fLineColor;
535 delete fLineWidth;
536 delete fLineStyle;
537 delete fLineStyleEdit;
538 delete fMarkerColor;
539 delete fMarkerStyle;
540 delete fMarkerSize;
541 delete fScreenFactor;
542 delete fCanvasColor;
543 delete fCanvasDefX;
544 delete fCanvasDefY;
545 delete fCanvasDefW;
546 delete fCanvasDefH;
547 delete fCanvasBorderMode;
548 delete fCanvasBorderSize;
549 delete fOptDateBool;
550 delete fAttDateTextColor;
551 delete fAttDateTextSize;
553 delete fOptDateFormat;
554 delete fAttDateTextFont;
555 delete fAttDateTextAngle;
556 delete fAttDateTextAlign;
557 delete fDateX;
558 delete fDateY;
559 delete fPadLeftMargin;
560 delete fPadRightMargin;
561 delete fPadTopMargin;
562 delete fPadBottomMargin;
563 delete fPadBorderMode;
564 delete fPadBorderSize;
565 delete fPadColor;
566 delete fPadTickX;
567 delete fPadTickY;
568 delete fPadGridX;
569 delete fPadGridY;
570 delete fGridColor;
571 delete fGridWidth;
572 delete fGridStyle;
573 delete fHistFillColor;
574 delete fHistFillStyle;
575 delete fHistLineColor;
576 delete fHistLineWidth;
577 delete fHistLineStyle;
578 delete fBarWidth;
579 delete fBarOffset;
580 delete fHistMinimumZero;
581 delete fPaintTextFormat;
582 delete fNumberContours;
583 delete fLegoInnerR;
584 delete fFrameFillColor;
585 delete fFrameFillStyle;
586 delete fFrameLineColor;
587 delete fFrameLineWidth;
588 delete fFrameLineStyle;
589 delete fPaletteEdit;
590 delete fFrameBorderMode;
591 delete fFrameBorderSize;
592 delete fFuncColor;
593 delete fFuncWidth;
594 delete fFuncStyle;
595 delete fDrawBorder;
596 delete fEndErrorSize;
597 delete fErrorX;
598 delete fTimeOffsetDate;
599 delete fTimeOffsetTime;
600 delete fStripDecimals;
601 delete fApplyOnXYZ;
602 delete fXTitleSize;
603 delete fXTitleSizeInPixels;
604 delete fXTitleColor;
605 delete fXTitleOffset;
606 delete fXTitleFont;
607 delete fXLabelSize;
608 delete fXLabelSizeInPixels;
609 delete fXLabelColor;
610 delete fXLabelOffset;
611 delete fXLabelFont;
612 delete fXAxisColor;
613 delete fXTickLength;
614 delete fOptLogx;
615 delete fXNdivMain;
616 delete fXNdivSub;
617 delete fXNdivSubSub;
619 delete fYTitleSize;
620 delete fYTitleSizeInPixels;
621 delete fYTitleColor;
622 delete fYTitleOffset;
623 delete fYTitleFont;
624 delete fYLabelSize;
625 delete fYLabelSizeInPixels;
626 delete fYLabelColor;
627 delete fYLabelOffset;
628 delete fYLabelFont;
629 delete fYAxisColor;
630 delete fYTickLength;
631 delete fOptLogy;
632 delete fYNdivMain;
633 delete fYNdivSub;
634 delete fYNdivSubSub;
636 delete fZTitleSize;
637 delete fZTitleSizeInPixels;
638 delete fZTitleColor;
639 delete fZTitleOffset;
640 delete fZTitleFont;
641 delete fZLabelSize;
642 delete fZLabelSizeInPixels;
643 delete fZLabelColor;
644 delete fZLabelOffset;
645 delete fZLabelFont;
646 delete fZAxisColor;
647 delete fZTickLength;
648 delete fOptLogz;
649 delete fZNdivMain;
650 delete fZNdivSub;
651 delete fZNdivSubSub;
653 delete fOptTitle;
654 delete fTitleColor;
655 delete fTitleStyle;
656 delete fTitleTextColor;
657 delete fTitleFontSize;
659 delete fTitleFont;
660 delete fTitleAlign;
662 delete fTitleBorderSize;
663 delete fTitleX;
664 delete fTitleY;
665 delete fTitleW;
666 delete fTitleH;
668 delete fLegendBorderSize;
669 delete fStatColor;
670 delete fStatStyle;
671 delete fStatTextColor;
672 delete fStatFontSize;
674 delete fStatFont;
675 delete fStatX;
676 delete fStatY;
677 delete fStatW;
678 delete fStatH;
680 delete fStatBorderSize;
681 delete fOptStatName;
682 delete fOptStatEntries;
683 delete fOptStatOverflow;
684 delete fOptStatMean;
685 delete fOptStatUnderflow;
686 delete fOptStatRMS;
687 delete fOptStatSkewness;
688 delete fOptStatIntegral;
689 delete fOptStatKurtosis;
690 delete fOptStatErrors;
691 delete fStatFormatLabel;
692 delete fStatFormat;
693 delete fOptFitValues;
694 delete fOptFitErrors;
695 delete fOptFitProbability;
696 delete fOptFitChi;
697 delete fFitFormatLabel;
698 delete fFitFormat;
699 delete fHeaderPS;
700 delete fTitlePS;
701 delete fColorModelPS;
702 delete fColorModelPSRGB;
703 delete fColorModelPSCMYK;
704 delete fLineScalePS;
705 delete fPaperSizePredef;
706 delete fPaperSizeX;
707 delete fPaperSizeY;
708 delete fEditionHelp;
710 delete fEditionReset;
711 delete fEditionButtonFrame;
712 delete fHistosTab;
713 delete fAxisTab;
714 delete fEditionTab;
715 delete fEditionFrame;
716
717 delete fStatusBar;
718
719 // Delete the temporary frames and layout.
720 TObject *obj1;
721 TObject *obj2;
722
724 while (obj1) {
727 delete obj1;
728 obj1 = obj2;
729 }
730 delete fTrashListFrame;
731
733 while (obj1) {
736 delete obj1;
737 obj1 = obj2;
738 }
739 delete fTrashListLayout;
740
741 fgStyleManager = 0;
742}
743
744////////////////////////////////////////////////////////////////////////////////
745///static: return style manager
746
751
752////////////////////////////////////////////////////////////////////////////////
753/// Set up the interface. Called by the ctor or by the 'Show' method.
754
756{
757 // Build the list of available styles and select gStyle.
759
760 // Show the current object.
761 if ((gROOT->GetSelectedPad()) && (gROOT->GetSelectedPad()->GetCanvas())) {
762 DoSelectCanvas(gROOT->GetSelectedPad()->GetCanvas(),
763 gROOT->GetSelectedPad()->GetCanvas(), kButton2Down);
764 } else {
766 }
767}
768
769////////////////////////////////////////////////////////////////////////////////
770/// Called to hide the style manager.
771
773{
774 if (fgStyleManager) {
775 fgStyleManager->UnmapWindow();
776 }
777}
778
779////////////////////////////////////////////////////////////////////////////////
780/// Called to show the style manager. Static method.
781
783{
784 if (fgStyleManager) {
785 fgStyleManager->Init();
786 if (!fgStyleManager->IsMapped()) {
787 fgStyleManager->MapWindow();
788 }
789 } else {
790 TStyleManager::GetSM() = new TStyleManager(gClient->GetRoot());
791 }
792}
793
794////////////////////////////////////////////////////////////////////////////////
795/// Called to delete the style manager. Called when the ROOT session is
796/// closed via a canvas' menu.
797
799{
800 delete fgStyleManager;
801 fgStyleManager = 0;
802}
803
804////////////////////////////////////////////////////////////////////////////////
805/// Add the menu bar to the frame 'p'.
806
808{
809 fMenuBar = new TGMenuBar(p);
810
811 fMenuStyle = new TGPopupMenu(gClient->GetRoot());
812 fMenuStyle->Associate(this);
813 fMenuStyle->AddEntry("&New...", kMenuNew);
814 fMenuStyle->AddEntry("&Delete", kMenuDelete);
816 fMenuStyle->AddEntry("&Rename...", kMenuRename);
818 fImportCascade = new TGPopupMenu(gClient->GetRoot());
822 fMenuStyle->AddPopup("&Import From...", fImportCascade);
823
824 fMenuStyle->AddEntry("&Export...", kMenuExport);
826 fMenuStyle->AddEntry("&Close", kMenuExit);
829 fMenuBar->AddPopup("&Style", fMenuStyle, layout1);
830
831 fMenuHelp = new TGPopupMenu(gClient->GetRoot());
832 fMenuHelp->Associate(this);
833 fMenuHelp->AddEntry("Top &level", kMenuHelp);
835 fMenuHelp->AddEntry("&General", kMenuHelpGeneral);
838 fMenuHelp->AddEntry("&Histograms", kMenuHelpHistos);
842 fMenuHelp->AddEntry("&PS / PDF", kMenuHelpPSPDF);
846
847 p->AddFrame(fMenuBar, fLayoutExpandX);
848}
849
850////////////////////////////////////////////////////////////////////////////////
851/// Create a new style. Called via the menu bar or the tool bar.
852
854{
855 // Open a message box to allow the user to create a new style.
856 new TStyleDialog(this, fCurSelStyle, 1, 0);
857
858 // Create the list of available styles, and select:
859 // - the new style, if it has been created (Ok).
860 // - the previous selected style, if no style has been created (Cancel).
861 if (fLastChoice) BuildList();
863}
864
865////////////////////////////////////////////////////////////////////////////////
866/// Delete the current selected style from the ROOT session.
867/// Called via the menu or the tool bar.
868
870{
871 // Protection: the user is NOT allowed to delete gStyle.
872 // As a consequence, there is always at least one style in the ROOT session.
873 if (fCurSelStyle == gStyle) {
874 printf("Can not delete gStyle.\n");
875 return;
876 }
877
878 delete fCurSelStyle;
879 fCurSelStyle = 0;
880
882}
883
884////////////////////////////////////////////////////////////////////////////////
885/// Rename the current selected style. Called via the menu bar.
886
888{
889 new TStyleDialog(this, fCurSelStyle, 2, 0);
890
891 // Create the list of styles and select the previous selected style.
893}
894
895////////////////////////////////////////////////////////////////////////////////
896/// Save the current selected style in a C++ macro file. Called via the menu
897/// or the tool bar.
898
900{
901 // Create an associated macro and propose a pertinent name to the user.
902 CreateMacro();
904 newName.Form("Style_%s.C", fCurSelStyle->GetName());
905
906 // Protection: The user isn't allowed to export a style if the output
907 // file name isn't based on the "Style_*.C" mask, without spaces.
908 char* tmpFileName;
909 const char* tmpBaseName;
910 do {
912
913 // Open a dialog to ask the user to choose an output file.
914 new TGFileDialog(gClient->GetRoot(), this, kFDSave, fCurMacro);
917 else tmpBaseName = 0;
918 } while (tmpBaseName && (strstr(tmpBaseName, "Style_") != tmpBaseName)
919 && (strstr(tmpBaseName, " ") != 0));
920
921 if (tmpBaseName != 0) {
922 // Export the style.
926 }
927
929}
930
931////////////////////////////////////////////////////////////////////////////////
932/// Close the style manager. Called via the menu bar.
933
935{
936// SendCloseMessage(); // Doesn't delete the StyleManager. Hides it.
937 delete this;
938}
939
940////////////////////////////////////////////////////////////////////////////////
941/// Open an help window. Called via the menu bar or the tool bar.
942
944{
946 switch (i) {
947 case 0:
948 hd = new TRootHelpDialog(this, "Help on General Tab", 600, 400);
949 hd->SetText(gHelpSMGeneral);
950 break;
951 case 1:
952 hd = new TRootHelpDialog(this, "Help on Canvas Tab", 600, 400);
953 hd->SetText(gHelpSMCanvas);
954 break;
955 case 2:
956 hd = new TRootHelpDialog(this, "Help on Pad Tab", 600, 400);
957 hd->SetText(gHelpSMPad);
958 break;
959 case 3:
960 hd = new TRootHelpDialog(this, "Help on Histograms Tab", 600, 400);
961 hd->SetText(gHelpSMHistos);
962 break;
963 case 4:
964 hd = new TRootHelpDialog(this, "Help on Axis Tab", 600, 400);
965 hd->SetText(gHelpSMAxis);
966 break;
967 case 5:
968 hd = new TRootHelpDialog(this, "Help on Title Tab", 600, 400);
969 hd->SetText(gHelpSMTitle);
970 break;
971 case 6:
972 hd = new TRootHelpDialog(this, "Help on Stats Tab", 600, 400);
973 hd->SetText(gHelpSMStats);
974 break;
975 case 7:
976 hd = new TRootHelpDialog(this, "Help on PS / PDF Tab", 600, 400);
977 hd->SetText(gHelpSMPSPDF);
978 break;
979 default:
980 hd = new TRootHelpDialog(this, "Help on Top Level", 600, 400);
981 hd->SetText(gHelpSMTopLevel);
982 }
983 hd->Popup();
984}
985
986////////////////////////////////////////////////////////////////////////////////
987/// Create a new style (a copy of gStyle) and import the properties of the
988/// current canvas inside.
989
991{
992 if ((!fCurPad) || (!fCurObj)) return;
993
994 new TStyleDialog(this, gStyle, 3, fCurPad);
995
996 // Create the list of available style, and select:
997 // - the new style, if it has been created
998 // - the previous selected style, if no style has been created (Cancel)
999 if (fLastChoice) {
1000 BuildList();
1001
1002 // Auto export of the canvas' style.
1003 CreateMacro();
1005 newName.Form("Style_%s.C", fCurSelStyle->GetName());
1006 fCurMacro->SetFilename(newName.Data());
1008 } else {
1010 }
1011}
1012
1013////////////////////////////////////////////////////////////////////////////////
1014/// Create a TGFileInfo concerning a macro, if it doesn't exist already.
1015
1017{
1018 if (fCurMacro) delete fCurMacro;
1019 fCurMacro = new TGFileInfo();
1021 fCurMacro->SetIniDir(".");
1022 fCurMacro->SetFilename(nullptr);
1023}
1024
1025////////////////////////////////////////////////////////////////////////////////
1026/// Add the tool bar to the frame 'p'.
1027
1029{
1034
1035 fToolBar = new TGToolBar(p);
1036 fToolBarNewPic = gClient->GetPicture("sm_new.xpm");
1038 fToolBarNew->SetStyle(gClient->GetStyle());
1039 fToolBarNew->Associate(this);
1041
1042 fToolBarImportCanvasPic = gClient->GetPicture("sm_import_canvas.xpm");
1047
1048 fToolBarImportMacroPic = gClient->GetPicture("sm_import_macro.xpm");
1050 fToolBarImportMacro->SetStyle(gClient->GetStyle());
1053
1054 fToolBarExportPic = gClient->GetPicture("sm_export.xpm");
1056 fToolBarExport->SetStyle(gClient->GetStyle());
1059
1060 fToolBarDeletePic = gClient->GetPicture("sm_delete.xpm");
1062 fToolBarDelete->SetStyle(gClient->GetStyle());
1065
1066 fToolBarHelpPic = gClient->GetPicture("sm_help.xpm");
1068 fToolBarHelp->SetStyle(gClient->GetStyle());
1069 fToolBarHelp->Associate(this);
1071
1072 p->AddFrame(fToolBar, fLayoutExpandX);
1075
1076 fToolBarNew->SetToolTipText("Create a new style");
1077 fToolBarDelete->SetToolTipText("Delete the selected style");
1078 fToolBarImportCanvas->SetToolTipText("Import a style from selected canvas");
1079 fToolBarImportMacro->SetToolTipText("Import a style from a macro");
1080 fToolBarExport->SetToolTipText("Export the selected style into a macro");
1081 fToolBarHelp->SetToolTipText("Help about the top level interface");
1082}
1083
1084////////////////////////////////////////////////////////////////////////////////
1085/// Add the top level interface to the frame 'cf'. This part of the
1086/// interface will provide all enable functionalities, excluding the
1087/// edition of styles.
1088
1090{
1107 TGLayoutHints *layout9 = new TGLayoutHints(kLHintsNormal, -15, 0, -5, -10);
1109 TGLayoutHints *layout10 = new TGLayoutHints(kLHintsNormal, 15, 0, -5, -10);
1117
1124 fListLabel = new TGLabel(v11, "Available Styles:");
1125 v11->AddFrame(fListLabel);
1127 fListComboBox->Associate(this);
1128 fListComboBox->Resize(200, 22);
1129 v11->AddFrame(fListComboBox, layout1);
1130 h1->AddFrame(v11, fLayoutExpandX);
1133 fMakeDefaultPic = gClient->GetPicture("arrow_right2.xpm");
1135 fMakeDefault->SetStyle(gClient->GetStyle());
1136 fMakeDefault->Associate(this);
1137 fMakeDefault->Resize(40, 22);
1138 v12->AddFrame(fMakeDefault, layout3);
1139 h1->AddFrame(v12, layout4);
1142 fCurStylabel = new TGLabel(v13, "gStyle is set to:");
1143 v13->AddFrame(fCurStylabel);
1145 fCurStyle->Associate(this);
1147 v13->AddFrame(fCurStyle, layout1);
1148 h1->AddFrame(v13, fLayoutExpandX);
1149 topLevel->AddFrame(h1, fLayoutExpandX);
1150
1153 TGGroupFrame *gf = new TGGroupFrame(h2, "Apply on");
1157 Pixel_t red;
1158 gClient->GetColorByName("#FF0000", red);
1161 fCurPadLabel = new TGLabel(selCanvas, "Canvas:");
1162 selCanvas->AddFrame(fCurPadLabel, layout6);
1167 vf->AddFrame(selCanvas, fLayoutExpandX);
1170 fCurObjLabel = new TGLabel(selObject, "Object:");
1171 selObject->AddFrame(fCurObjLabel, layout7);
1177 vf->AddFrame(selObject, layout8);
1181 fApplyOnAll = new TGRadioButton(fApplyOnGroup, "All canvases", kTopApplyOnAll);
1182 fApplyOnAll->Associate(this);
1183 fApplyOnSel = new TGRadioButton(fApplyOnGroup, "Selected object", kTopApplyOnSel);
1184 fApplyOnSel->Associate(this);
1190 h4->AddFrame(fApplyOnGroup);
1191 fApplyOnButton = new TGTextButton(h4, "&Apply", kTopApplyOnBut);
1193 fApplyOnButton->Resize(100, 22);
1194 h4->AddFrame(fApplyOnButton, layout13);
1195 vf->AddFrame(h4, fLayoutExpandX);
1196 gf->AddFrame(vf, layout11);
1197 h2->AddFrame(gf, layout12);
1198 topLevel->AddFrame(h2, fLayoutExpandX);
1199
1202 fPreviewButton = new TGCheckButton(h3, "&Preview", kTopPreview);
1204 h3->AddFrame(fPreviewButton, layout6);
1205 fPreviewRealTime = new TGCheckButton(h3, "Run &Time Preview", kTopPreviewRealTime);
1208 h3->AddFrame(fPreviewRealTime, layout6);
1209 fMoreLess = new TGTextButton(h3, "&Close <<", kTopMoreLess);
1210 fMoreLess->Associate(this);
1211 h3->AddFrame(fMoreLess, layout5);
1212 topLevel->AddFrame(h3, fLayoutExpandX);
1213
1214 cf->AddFrame(topLevel, layout2);
1215
1216 fApplyOnButton->SetToolTipText("Apply the selected style on the selected object");
1217 fPreviewButton->SetToolTipText("Show / Hide the preview window");
1218 fPreviewRealTime->SetToolTipText("Continuous / Asynchronous update of the preview");
1219}
1220
1221////////////////////////////////////////////////////////////////////////////////
1222/// Build the list of styles which will appear in the available styles
1223/// combo box. The new style to select is mentioned. If no style has
1224/// been specified, the last entry of the list is selected.
1225
1227{
1228 // Empty the list.
1230
1231 // Build the list of all styles already created in the ROOT session.
1232 Int_t i = 1;
1233 Int_t styleID = 0;
1234 TStyle *tmpStyle = (TStyle *) (gROOT->GetListOfStyles()->First());
1235 while (tmpStyle) {
1236 if (tmpStyle == style) styleID = i;
1237 fListComboBox->AddEntry(tmpStyle->GetName(), i++);
1238 tmpStyle = (TStyle *) (gROOT->GetListOfStyles()->After(tmpStyle));
1239 }
1240
1241 // Select 'style' in the list of available styles.
1242 if (styleID == 0) styleID = i - 1;
1244 DoListSelect();
1246}
1247
1248////////////////////////////////////////////////////////////////////////////////
1249/// Update the content of the status bar: show the name of the current
1250/// selected style, its title and the macro from which it has been imported.
1251
1253{
1256
1257 if ((!strcmp(fCurSelStyle->GetName(), "Default"))
1258 || (!strcmp(fCurSelStyle->GetName(), "Plain" ))
1259 || (!strcmp(fCurSelStyle->GetName(), "Bold" ))
1260 || (!strcmp(fCurSelStyle->GetName(), "Video" ))
1261 || (!strcmp(fCurSelStyle->GetName(), "Pub" ))) {
1262 fStatusBar->SetText("ROOT style", 1);
1263 } else if (fStyleChanged) {
1264 fStatusBar->SetText("User Style _ Not Saved", 1);
1265 } else {
1266 fStatusBar->SetText("User Style", 1);
1267 }
1268}
1269
1270////////////////////////////////////////////////////////////////////////////////
1271/// Update the values of every widget entry in the editor. The new values
1272/// are loaded from the current selected style.
1273
1275{
1276 Double_t delta;
1277 Int_t year;
1278 Int_t month;
1279 Int_t day;
1282 Int_t tmp;
1283 Int_t tmp2;
1284 switch (tabNum) {
1285 case 0: // GENERAL
1297 // Nothing to do with fLineStyleEdit.
1299 if (fCurSelStyle->GetTextFont()%10 > 2) {
1302 } else {
1305 }
1309 break;
1310 case 1: // CANVAS
1319 if (fCurSelStyle->GetAttDate()->GetTextFont()%10 > 2) {
1322 } else {
1325 }
1330 fDateX->SetIntNumber((Int_t) (fCurSelStyle->GetDateX()*100 + 0.5));
1331 fDateY->SetIntNumber((Int_t) (fCurSelStyle->GetDateY()*100 + 0.5));
1332
1333 if (fCurSelStyle->GetOptDate()) {
1339// TODO Just delete when ComboBox can be grayed
1340 //fOptDateFormat->SetState(kTRUE);
1341 //ModAttDateTextFont->SetState(kTRUE);
1342 //ModAttDateTextAlign->SetState(kTRUE);
1346 } else {
1351// TODO Just delete when ComboBox can be grayed
1352 //fOptDateFormat->SetState(kFALSE);
1353 //ModAttDateTextFont->SetState(kFALSE);
1354 //ModAttDateTextAlign->SetState(kFALSE);
1358 }
1359 break;
1360 case 2: // PAD
1370 else
1374 else
1378 else
1382 else
1387 break;
1388 case 3: // HISTOS
1398 else
1408 // Nothing to do with fPaletteEdit;
1416 else
1419 fErrorX->SetIntNumber((Int_t) (fCurSelStyle->GetErrorX() * 100 + 0.5));
1420 break;
1421 case 4: // AXIS
1422 delta = fCurSelStyle->GetTimeOffset() - 788918400;
1423 year = 1995;
1424 month = 1;
1425 while (delta < 0) {
1426 year--;
1427 if (year % 4) oneYearInSecs = 3600 * 24 * 365;
1428 else oneYearInSecs = 3600 * 24 * 366;
1429 delta += oneYearInSecs;
1430 }
1431 oneYearInSecs = 3600 * 24 * 365; // because 365 days in 1995.
1432 while (delta >= oneYearInSecs) {
1433 if (year % 4) oneYearInSecs = 3600 * 24 * 365;
1434 else oneYearInSecs = 3600 * 24 * 366;
1435 delta -= oneYearInSecs;
1436 year++;
1437 }
1438 oneMonthInSecs = 3600 * 24 * 31; // because 31 days in January.
1439 while (delta >= oneMonthInSecs) {
1440 month++;
1441 delta -= oneMonthInSecs;
1442 switch (month) {
1443 case 2:
1444 if (year % 4) oneMonthInSecs = 3600 * 24 * 28;
1445 else oneMonthInSecs = 3600 * 24 * 29;
1446 break;
1447 case 3: case 5: case 7: case 8: case 10: case 12:
1448 oneMonthInSecs = 3600 * 24 * 31;
1449 break;
1450 default:
1451 oneMonthInSecs = 3600 * 24 * 30;
1452 }
1453 }
1454 day = (Int_t) delta / (3600 * 24) + 1;
1455 delta = ((Int_t) delta) % (3600 * 24);
1456 fTimeOffsetDate->SetNumber(year*10000 + month*100 + day);
1457 fTimeOffsetTime->SetNumber(delta);
1458
1461 else
1464 if (fCurSelStyle->GetTitleFont("X")%10 > 2) {
1467 } else {
1470 }
1475 if (fCurSelStyle->GetLabelFont("X")%10 > 2) {
1478 } else {
1481 }
1487 if (fCurSelStyle->GetOptLogx())
1489 else
1494 if (fCurSelStyle->GetNdivisions("X") > 0)
1496 else
1499 if (fCurSelStyle->GetTitleFont("Y")%10 > 2) {
1502 } else {
1505 }
1510 if (fCurSelStyle->GetLabelFont("Y")%10 > 2) {
1513 } else {
1516 }
1522 if (fCurSelStyle->GetOptLogy())
1524 else
1529 if (fCurSelStyle->GetNdivisions("Y") > 0)
1531 else
1534 if (fCurSelStyle->GetTitleFont("Z")%10 > 2) {
1537 } else {
1540 }
1545 if (fCurSelStyle->GetLabelFont("Z")%10 > 2) {
1548 } else {
1551 }
1557
1558 if (fCurSelStyle->GetOptLogz())
1560 else
1562
1566 if (fCurSelStyle->GetNdivisions("Z") > 0)
1568 else
1570 break;
1571 case 5: // TITLES
1576 if (fCurSelStyle->GetTitleFont()%10 > 2) {
1579 } else {
1582 }
1587 fTitleX->SetIntNumber((Int_t) (fCurSelStyle->GetTitleX() * 100 + 0.5));
1588 fTitleY->SetIntNumber((Int_t) (fCurSelStyle->GetTitleY() * 100 + 0.5));
1589 fTitleW->SetIntNumber((Int_t) (fCurSelStyle->GetTitleW() * 100 + 0.5));
1590 fTitleH->SetIntNumber((Int_t) (fCurSelStyle->GetTitleH() * 100 + 0.5));
1591
1592 if (fCurSelStyle->GetOptTitle()) {
1600// TODO Just delete when ComboBox can be grayed
1601 //fTitleFont->SetState(kTRUE);
1602 //fTitleAlign->SetState(kTRUE);
1603 //fTitleBorderSize->SetState(kTRUE);
1604 //fLegendBorderSize->SetState(kTRUE);
1609 } else {
1616// TODO Just delete when ComboBox can be grayed
1617 //fTitleFont->SetState(kFALSE);
1618 //fTitleAlign->SetState(kFALSE);
1619 //fTitleBorderSize->SetState(kFALSE);
1620 //fLegendBorderSize->SetState(kFALSE);
1625 }
1626 break;
1627 case 6: // STATS
1632 if (fCurSelStyle->GetStatFont()%10 > 2) {
1635 } else {
1638 }
1640
1646 tmp = fCurSelStyle->GetOptStat();
1647
1648 if (tmp % 10) fOptStatName->SetState(kButtonDown, kFALSE);
1650
1651 if ((tmp/10) % 10) fOptStatEntries->SetState(kButtonDown, kFALSE);
1653
1654 if ((tmp/100) % 10) fOptStatMean->SetState(kButtonDown, kFALSE);
1656
1657 if ((tmp/1000) % 10) fOptStatRMS->SetState(kButtonDown, kFALSE);
1659
1660 if ((tmp/10000) % 10) fOptStatUnderflow->SetState(kButtonDown, kFALSE);
1662
1663 if ((tmp/100000) % 10) fOptStatOverflow->SetState(kButtonDown, kFALSE);
1665
1666 if ((tmp/1000000) % 10) fOptStatIntegral->SetState(kButtonDown, kFALSE);
1668
1669 if ((tmp/10000000) % 10) fOptStatSkewness->SetState(kButtonDown, kFALSE);
1671
1672 if ((tmp/100000000) % 10) fOptStatKurtosis->SetState(kButtonDown, kFALSE);
1674
1675 if ((((tmp/100) % 10) == 2) || (((tmp/1000) % 10) == 2) ||
1676 (((tmp/10000000) % 10) == 2) || (((tmp/100000000) % 10) == 2))
1679
1682
1685
1686 if ((tmp2/10) % 10) {
1689 } else
1691
1692 if ((tmp2/100) % 10) fOptFitChi->SetState(kButtonDown, kFALSE);
1694
1697
1699 break;
1700
1701 case 7: // PS / PDF
1709 if ((papSizeX == 20) && (papSizeY == 26)) {
1714 } else if ((papSizeX == 20) && (papSizeY == 24)) {
1717 fPaperSizeX->SetNumber(papSizeX * 0.394);
1718 fPaperSizeY->SetNumber(papSizeY * 0.394);
1719 } else {
1724 }
1725 break;
1726 }
1727}
1728
1729////////////////////////////////////////////////////////////////////////////////
1730/// Connect every entry in the top level interface to the slot.
1731
1733{
1734 Connect("CloseWindow()", "TStyleManager", this, "CloseWindow()");
1735 fMenuStyle->Connect("Activated(Int_t)", "TStyleManager", this, "DoMenu(Int_t)");
1736 fMenuHelp->Connect("Activated(Int_t)", "TStyleManager", this, "DoMenu(Int_t)");
1737 fToolBarNew->Connect("Clicked()", "TStyleManager", this, TString::Format("DoMenu(Int_t=%d)", kMenuNew));
1738 fToolBarDelete->Connect("Clicked()", "TStyleManager", this, TString::Format("DoMenu(Int_t=%d)", kMenuDelete));
1739 fToolBarImportCanvas->Connect("Clicked()", "TStyleManager", this, TString::Format("DoMenu(Int_t=%d)", kMenuImportCanvas));
1740 fToolBarImportMacro->Connect("Clicked()", "TStyleManager", this, TString::Format("DoMenu(Int_t=%d)", kMenuImportMacro));
1741 fToolBarExport->Connect("Clicked()", "TStyleManager", this, TString::Format("DoMenu(Int_t=%d)", kMenuExport));
1742 fToolBarHelp->Connect("Clicked()", "TStyleManager", this, TString::Format("DoMenu(Int_t=%d)", kMenuHelp));
1743 fListComboBox->Connect("Selected(Int_t)", "TStyleManager", this, "DoListSelect()");
1744 fPreviewButton->Connect("Toggled(Bool_t)", "TStyleManager", this, "DoPreview(Bool_t)");
1745 fPreviewRealTime->Connect("Toggled(Bool_t)", "TStyleManager", this, "DoRealTime(Bool_t)");
1746 fMakeDefault->Connect("Clicked()", "TStyleManager", this, "DoMakeDefault()");
1747 fApplyOnGroup->Connect("Clicked(Int_t)", "TStyleManager", this, "DoApplyOnSelect(Int_t)");
1748 fApplyOnButton->Connect("Clicked()", "TStyleManager", this, "DoApplyOn()");
1749 fMoreLess->Connect("Clicked()", "TStyleManager", this, "DoMoreLess()");
1750
1751 fEditionHelp->Connect("Clicked()", "TStyleManager", this, TString::Format("DoMenu(Int_t=%d)", kMenuHelpEditor));
1752 fEditionUpdatePreview->Connect("Clicked()", "TStyleManager", this, "DoEditionUpdatePreview()");
1753 fEditionReset->Connect("Clicked()", "TStyleManager", this, "DoImportMacro(Int_t=kFALSE)");
1754 fEditionTab->Connect("Selected(Int_t)", "TStyleManager", this, "DoChangeTab(Int_t)");
1755 fAxisTab->Connect("Selected(Int_t)", "TStyleManager", this, "DoChangeAxisTab(Int_t)");
1756
1757 // Connect signals emited when the current pad changed.
1758 TQObject::Connect("TCanvas", "Selected(TVirtualPad *, TObject *, Int_t)", "TStyleManager",
1759 this, "DoSelectCanvas(TVirtualPad *, TObject *, Int_t)");
1760 TQObject::Connect("TCanvas", "Closed()", "TStyleManager", this, "DoSelectNoCanvas()");
1761}
1762
1763////////////////////////////////////////////////////////////////////////////////
1764/// Disconnect every entry in the top level interface of the slot.
1765
1767{
1768 Disconnect("CloseWindow()");
1769 fMenuStyle->Disconnect("Activated(Int_t)");
1770 fMenuHelp->Disconnect("Activated(Int_t)");
1771 fToolBarNew->Disconnect("Clicked()");
1772 fToolBarDelete->Disconnect("Clicked()");
1773 fToolBarImportCanvas->Disconnect("Clicked()");
1774 fToolBarImportMacro->Disconnect("Clicked()");
1775 fToolBarExport->Disconnect("Clicked()");
1776 fToolBarHelp->Disconnect("Clicked()");
1777 fListComboBox->Disconnect("Selected(Int_t)");
1778 fPreviewButton->Disconnect("Toggled(Bool_t)");
1779 fMakeDefault->Disconnect("Clicked()");
1780 fApplyOnGroup->Disconnect("Clicked(Int_t)");
1781 fApplyOnButton->Disconnect("Clicked()");
1782 fMoreLess->Disconnect("Clicked()");
1783
1784 fEditionHelp->Disconnect("Clicked()");
1785 fEditionUpdatePreview->Disconnect("Clicked()");
1786 fEditionReset->Disconnect("Clicked()");
1787 fEditionTab->Disconnect("Selected(Int_t)");
1788
1789 TQObject::Disconnect("TCanvas", "Selected(TVirtualPad *, TObject *, Int_t)");
1790 TQObject::Disconnect("TCanvas", "Closed()");
1791}
1792
1793////////////////////////////////////////////////////////////////////////////////
1794/// Connect every widget entry of the editor to its specific slot.
1795
1797{
1798 if (fSigSlotConnected) return;
1800
1801 switch (tabNum) {
1802 case 0: // GENERAL
1803 fFillColor->Connect("ColorSelected(Pixel_t)", "TStyleManager", this, "ModFillColor()");
1804 fFillStyle->Connect("PatternSelected(Style_t)", "TStyleManager", this, "ModFillStyle()");
1805 fHatchesLineWidth->Connect("Selected(Int_t)", "TStyleManager", this, "ModHatchesLineWidth()");
1806 fHatchesSpacing->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModHatchesSpacing()");
1807 fMarkerColor->Connect("ColorSelected(Pixel_t)", "TStyleManager", this, "ModMarkerColor()");
1808 fMarkerStyle->Connect("MarkerSelected(Style_t)", "TStyleManager", this, "ModMarkerStyle()");
1809 fMarkerSize->Connect("Selected(Int_t)", "TStyleManager", this, "ModMarkerSize()");
1810 fScreenFactor->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModScreenFactor()");
1811 fLineColor->Connect("ColorSelected(Pixel_t)", "TStyleManager", this, "ModLineColor()");
1812 fLineWidth->Connect("Selected(Int_t)", "TStyleManager", this, "ModLineWidth()");
1813 fLineStyle->Connect("Selected(Int_t)", "TStyleManager", this, "ModLineStyle()");
1814 fLineStyleEdit->Connect("Clicked()", "TStyleManager", this, "ModLineStyleEdit()");
1815 fTextColor->Connect("ColorSelected(Pixel_t)", "TStyleManager", this, "ModTextColor()");
1816 fTextSize->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModTextSize()");
1817 fTextSizeInPixels->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModTextSizeInPixels(Bool_t)");
1818 fTextFont->Connect("Selected(Int_t)", "TStyleManager", this, "ModTextFont()");
1819 fTextAlign->Connect("Selected(Int_t)", "TStyleManager", this, "ModTextAlign()");
1820 fTextAngle->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModTextAngle()");
1821 break;
1822 case 1: // CANVAS
1823 fCanvasColor->Connect("ColorSelected(Pixel_t)", "TStyleManager", this, "ModCanvasColor()");
1824 fCanvasDefX->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModCanvasDefX()");
1825 fCanvasDefY->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModCanvasDefY()");
1826 fCanvasDefW->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModCanvasDefW()");
1827 fCanvasDefH->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModCanvasDefH()");
1828 fCanvasBorderMode->Connect("Clicked(Int_t)", "TStyleManager", this, "ModCanvasBorderMode()");
1829 fCanvasBorderSize->Connect("Selected(Int_t)", "TStyleManager", this, "ModCanvasBorderSize()");
1830 fOptDateBool->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModOptDateBool()");
1831 fAttDateTextColor->Connect("ColorSelected(Pixel_t)", "TStyleManager", this, "ModAttDateTextColor()");
1832 fAttDateTextSize->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModAttDateTextSize()");
1833 fAttDateTextSizeInPixels->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModAttDateTextSizeInPixels(Bool_t)");
1834 fOptDateFormat->Connect("Selected(Int_t)", "TStyleManager", this, "ModOptDateFormat()");
1835 fAttDateTextFont->Connect("Selected(Int_t)", "TStyleManager", this, "ModAttDateTextFont()");
1836 fAttDateTextAngle->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModAttDateTextAngle()");
1837 fAttDateTextAlign->Connect("Selected(Int_t)", "TStyleManager", this, "ModAttDateTextAlign()");
1838 fDateX->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModDateX()");
1839 fDateY->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModDateY()");
1840 break;
1841 case 2: // PAD
1842 fPadTopMargin->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModPadTopMargin()");
1843 fPadBottomMargin->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModPadBottomMargin()");
1844 fPadLeftMargin->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModPadLeftMargin()");
1845 fPadRightMargin->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModPadRightMargin()");
1846 fPadBorderMode->Connect("Clicked(Int_t)", "TStyleManager", this, "ModPadBorderMode()");
1847 fPadBorderSize->Connect("Selected(Int_t)", "TStyleManager", this, "ModPadBorderSize()");
1848 fPadColor->Connect("ColorSelected(Pixel_t)", "TStyleManager", this, "ModPadColor()");
1849 fPadTickX->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModPadTickX()");
1850 fPadTickY->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModPadTickY()");
1851 fPadGridX->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModPadGridX()");
1852 fPadGridY->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModPadGridY()");
1853 fGridColor->Connect("ColorSelected(Pixel_t)", "TStyleManager", this, "ModGridColor()");
1854 fGridWidth->Connect("Selected(Int_t)", "TStyleManager", this, "ModGridWidth()");
1855 fGridStyle->Connect("Selected(Int_t)", "TStyleManager", this, "ModGridStyle()");
1856 break;
1857 case 3: // HISTOS
1858 fHistFillColor->Connect("ColorSelected(Pixel_t)", "TStyleManager", this, "ModHistFillColor()");
1859 fHistFillStyle->Connect("PatternSelected(Style_t)", "TStyleManager", this, "ModHistFillStyle()");
1860 fHistLineColor->Connect("ColorSelected(Pixel_t)", "TStyleManager", this, "ModHistLineColor()");
1861 fHistLineWidth->Connect("Selected(Int_t)", "TStyleManager", this, "ModHistLineWidth()");
1862 fHistLineStyle->Connect("Selected(Int_t)", "TStyleManager", this, "ModHistLineStyle()");
1863 fBarWidth->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModBarWidth()");
1864 fBarOffset->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModBarOffset()");
1865 fHistMinimumZero->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModHistMinimumZero()");
1866 fPaintTextFormat->Connect("TextChanged(const char *)", "TStyleManager", this, "ModPaintTextFormat()");
1867 fNumberContours->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModNumberContours()");
1868 fLegoInnerR->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModLegoInnerR()");
1869 fFrameFillColor->Connect("ColorSelected(Pixel_t)", "TStyleManager", this, "ModFrameFillColor()");
1870 fFrameFillStyle->Connect("PatternSelected(Style_t)", "TStyleManager", this, "ModFrameFillStyle()");
1871 fFrameLineColor->Connect("ColorSelected(Pixel_t)", "TStyleManager", this, "ModFrameLineColor()");
1872 fFrameLineWidth->Connect("Selected(Int_t)", "TStyleManager", this, "ModFrameLineWidth()");
1873 fFrameLineStyle->Connect("Selected(Int_t)", "TStyleManager", this, "ModFrameLineStyle()");
1874 fPaletteEdit->Connect("Clicked()", "TStyleManager", this, "ModPaletteEdit()");
1875 fFrameBorderMode->Connect("Clicked(Int_t)", "TStyleManager", this, "ModFrameBorderMode()");
1876 fFrameBorderSize->Connect("Selected(Int_t)", "TStyleManager", this, "ModFrameBorderSize()");
1877 fFuncColor->Connect("ColorSelected(Pixel_t)", "TStyleManager", this, "ModFuncColor()");
1878 fFuncWidth->Connect("Selected(Int_t)", "TStyleManager", this, "ModFuncWidth()");
1879 fFuncStyle->Connect("Selected(Int_t)", "TStyleManager", this, "ModFuncStyle()");
1880 fDrawBorder->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModDrawBorder()");
1881 fEndErrorSize->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModEndErrorSize()");
1882 fErrorX->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModErrorX()");
1883 break;
1884 case 4: // AXIS
1885 fTimeOffsetDate->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModTimeOffset()");
1886 fTimeOffsetTime->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModTimeOffset()");
1887 fStripDecimals->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModStripDecimals()");
1888 fApplyOnXYZ->Connect("Clicked()", "TStyleManager", this, "ModApplyOnXYZ()");
1889 fXTitleSize->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModXTitleSize()");
1890 fXTitleSizeInPixels->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModXTitleSizeInPixels(Bool_t)");
1891 fXTitleColor->Connect("ColorSelected(Pixel_t)", "TStyleManager", this, "ModXTitleColor()");
1892 fXTitleOffset->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModXTitleOffset()");
1893 fXTitleFont->Connect("Selected(Int_t)", "TStyleManager", this, "ModXTitleFont()");
1894 fXLabelSize->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModXLabelSize()");
1895 fXLabelSizeInPixels->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModXLabelSizeInPixels(Bool_t)");
1896 fXLabelColor->Connect("ColorSelected(Pixel_t)", "TStyleManager", this, "ModXLabelColor()");
1897 fXLabelOffset->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModXLabelOffset()");
1898 fXLabelFont->Connect("Selected(Int_t)", "TStyleManager", this, "ModXLabelFont()");
1899 fXAxisColor->Connect("ColorSelected(Pixel_t)", "TStyleManager", this, "ModXAxisColor()");
1900 fXTickLength->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModXTickLength()");
1901 fOptLogx->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModOptLogx()");
1902 fXNdivMain->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModXNdivisions()");
1903 fXNdivSub->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModXNdivisions()");
1904 fXNdivSubSub->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModXNdivisions()");
1905 fXNdivisionsOptimize->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModXNdivisions()");
1906 fYTitleSize->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModYTitleSize()");
1907 fYTitleSizeInPixels->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModYTitleSizeInPixels(Bool_t)");
1908 fYTitleColor->Connect("ColorSelected(Pixel_t)", "TStyleManager", this, "ModYTitleColor()");
1909 fYTitleOffset->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModYTitleOffset()");
1910 fYTitleFont->Connect("Selected(Int_t)", "TStyleManager", this, "ModYTitleFont()");
1911 fYLabelSize->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModYLabelSize()");
1912 fYLabelSizeInPixels->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModYLabelSizeInPixels(Bool_t)");
1913 fYLabelColor->Connect("ColorSelected(Pixel_t)", "TStyleManager", this, "ModYLabelColor()");
1914 fYLabelOffset->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModYLabelOffset()");
1915 fYLabelFont->Connect("Selected(Int_t)", "TStyleManager", this, "ModYLabelFont()");
1916 fYAxisColor->Connect("ColorSelected(Pixel_t)", "TStyleManager", this, "ModYAxisColor()");
1917 fYTickLength->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModYTickLength()");
1918 fOptLogy->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModOptLogy()");
1919 fYNdivMain->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModYNdivisions()");
1920 fYNdivSub->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModYNdivisions()");
1921 fYNdivSubSub->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModYNdivisions()");
1922 fYNdivisionsOptimize->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModYNdivisions()");
1923 fZTitleSize->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModZTitleSize()");
1924 fZTitleSizeInPixels->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModZTitleSizeInPixels(Bool_t)");
1925 fZTitleColor->Connect("ColorSelected(Pixel_t)", "TStyleManager", this, "ModZTitleColor()");
1926 fZTitleOffset->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModZTitleOffset()");
1927 fZTitleFont->Connect("Selected(Int_t)", "TStyleManager", this, "ModZTitleFont()");
1928 fZLabelSize->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModZLabelSize()");
1929 fZLabelSizeInPixels->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModZLabelSizeInPixels(Bool_t)");
1930 fZLabelColor->Connect("ColorSelected(Pixel_t)", "TStyleManager", this, "ModZLabelColor()");
1931 fZLabelOffset->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModZLabelOffset()");
1932 fZLabelFont->Connect("Selected(Int_t)", "TStyleManager", this, "ModZLabelFont()");
1933 fZAxisColor->Connect("ColorSelected(Pixel_t)", "TStyleManager", this, "ModZAxisColor()");
1934 fZTickLength->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModZTickLength()");
1935 fOptLogz->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModOptLogz()");
1936 fZNdivMain->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModZNdivisions()");
1937 fZNdivSub->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModZNdivisions()");
1938 fZNdivSubSub->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModZNdivisions()");
1939 fZNdivisionsOptimize->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModZNdivisions()");
1940 break;
1941 case 5: // TITLES
1942 fOptTitle->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModOptTitle()");
1943 fTitleColor->Connect("ColorSelected(Pixel_t)", "TStyleManager", this, "ModTitleFillColor()");
1944 fTitleStyle->Connect("PatternSelected(Style_t)", "TStyleManager", this, "ModTitleStyle()");
1945 fTitleTextColor->Connect("ColorSelected(Pixel_t)", "TStyleManager", this, "ModTitleTextColor()");
1946 fTitleFontSize->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModTitleFontSize()");
1947 fTitleFontSizeInPixels->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModTitleFontSizeInPixels(Bool_t)");
1948 fTitleFont->Connect("Selected(Int_t)", "TStyleManager", this, "ModTitleFont()");
1949 fTitleAlign->Connect("Selected(Int_t)", "TStyleManager", this, "ModTitleAlign()");
1950 fTitleBorderSize->Connect("Selected(Int_t)", "TStyleManager", this, "ModTitleBorderSize()");
1951 fTitleX->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModTitleX()");
1952 fTitleY->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModTitleY()");
1953 fTitleW->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModTitleW()");
1954 fTitleH->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModTitleH()");
1955 fLegendBorderSize->Connect("Selected(Int_t)", "TStyleManager", this, "ModLegendBorderSize()");
1956 break;
1957 case 6: // STATS
1958 fStatColor->Connect("ColorSelected(Pixel_t)", "TStyleManager", this, "ModStatColor(Pixel_t)");
1959 fStatStyle->Connect("PatternSelected(Style_t)", "TStyleManager", this, "ModStatStyle(Style_t)");
1960 fStatTextColor->Connect("ColorSelected(Pixel_t)", "TStyleManager", this, "ModStatTextColor(Pixel_t)");
1961 fStatFontSize->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModStatFontSize()");
1962 fStatFontSizeInPixels->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModStatFontSizeInPixels(Bool_t)");
1963 fStatFont->Connect("Selected(Int_t)", "TStyleManager", this, "ModStatFont()");
1964 fStatX->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModStatX()");
1965 fStatY->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModStatY()");
1966 fStatW->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModStatW()");
1967 fStatH->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModStatH()");
1968 fStatBorderSize->Connect("Selected(Int_t)", "TStyleManager", this, "ModStatBorderSize()");
1969 fOptStatName->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModOptStat()");
1970 fOptStatEntries->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModOptStat()");
1971 fOptStatOverflow->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModOptStat()");
1972 fOptStatMean->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModOptStat()");
1973 fOptStatUnderflow->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModOptStat()");
1974 fOptStatRMS->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModOptStat()");
1975 fOptStatSkewness->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModOptStat()");
1976 fOptStatIntegral->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModOptStat()");
1977 fOptStatKurtosis->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModOptStat()");
1978 fOptStatErrors->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModOptStat()");
1979 fStatFormat->Connect("TextChanged(const char *)", "TStyleManager", this, "ModStatFormat(const char *)");
1980 fOptFitValues->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModOptFit()");
1981 fOptFitErrors->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModOptFit()");
1982 fOptFitProbability->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModOptFit()");
1983 fOptFitChi->Connect("Toggled(Bool_t)", "TStyleManager", this, "ModOptFit()");
1984 fFitFormat->Connect("TextChanged(const char *)", "TStyleManager", this, "ModFitFormat(const char *)");
1985 break;
1986 case 7: // PS / PDF
1987 fHeaderPS->Connect("TextChanged(const char *)", "TStyleManager", this, "ModHeaderPS()");
1988 fTitlePS->Connect("TextChanged(const char *)", "TStyleManager", this, "ModTitlePS()");
1989 fColorModelPS->Connect("Clicked(Int_t)", "TStyleManager", this, "ModColorModelPS()");
1990 fLineScalePS->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModLineScalePS()");
1991 fPaperSizePredef->Connect("Selected(Int_t)", "TStyleManager", this, "ModPaperSizePredef()");
1992 fPaperSizeX->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModPaperSizeXY()");
1993 fPaperSizeY->Connect("ValueSet(Long_t)", "TStyleManager", this, "ModPaperSizeXY()");
1994 break;
1995 }
1996}
1997
1998////////////////////////////////////////////////////////////////////////////////
1999/// Disconnect every widget entry of the editor from its slot. Must be
2000/// called before UpdateEditor() to avoid recursive calls.
2001
2003{
2004 if (!fSigSlotConnected) return;
2006
2007 switch (tabNum) {
2008 case 0: // GENERAL
2009 fFillColor->Disconnect("ColorSelected(Pixel_t)");
2010 fFillStyle->Disconnect("PatternSelected(Style_t)");
2011 fHatchesLineWidth->Disconnect("Selected(Int_t)");
2012 fHatchesSpacing->Disconnect("ValueSet(Long_t)");
2013 fMarkerColor->Disconnect("ColorSelected(Pixel_t)");
2014 fMarkerStyle->Disconnect("MarkerSelected(Style_t)");
2015 fMarkerSize->Disconnect("Selected(Int_t)");
2016 fScreenFactor->Disconnect("ValueSet(Long_t)");
2017 fLineColor->Disconnect("ColorSelected(Pixel_t)");
2018 fLineWidth->Disconnect("Selected(Int_t)");
2019 fLineStyle->Disconnect("Selected(Int_t)");
2020 fLineStyleEdit->Disconnect("Clicked()");
2021 fTextColor->Disconnect("ColorSelected(Pixel_t)");
2022 fTextSize->Disconnect("ValueSet(Long_t)");
2023 fTextFont->Disconnect("Selected(Int_t)");
2024 fTextAlign->Disconnect("Selected(Int_t)");
2025 fTextAngle->Disconnect("ValueSet(Long_t)");
2026 break;
2027 case 1: // CANVAS
2028 fCanvasColor->Disconnect("ColorSelected(Pixel_t)");
2029 fCanvasDefX->Disconnect("ValueSet(Long_t)");
2030 fCanvasDefY->Disconnect("ValueSet(Long_t)");
2031 fCanvasDefW->Disconnect("ValueSet(Long_t)");
2032 fCanvasDefH->Disconnect("ValueSet(Long_t)");
2033 fCanvasBorderMode->Disconnect("Clicked(Int_t)");
2034 fCanvasBorderSize->Disconnect("Selected(Int_t)");
2035 fOptDateBool->Disconnect("Toggled(Bool_t)");
2036 fAttDateTextColor->Disconnect("ColorSelected(Pixel_t)");
2037 fAttDateTextSize->Disconnect("ValueSet(Long_t)");
2038 fOptDateFormat->Disconnect("Selected(Int_t)");
2039 fAttDateTextFont->Disconnect("Selected(Int_t)");
2040 fAttDateTextAngle->Disconnect("ValueSet(Long_t)");
2041 fAttDateTextAlign->Disconnect("Selected(Int_t)");
2042 fDateX->Disconnect("ValueSet(Long_t)");
2043 fDateY->Disconnect("ValueSet(Long_t)");
2044 break;
2045 case 2: // PAD
2046 fPadTopMargin->Disconnect("ValueSet(Long_t)");
2047 fPadBottomMargin->Disconnect("ValueSet(Long_t)");
2048 fPadLeftMargin->Disconnect("ValueSet(Long_t)");
2049 fPadRightMargin->Disconnect("ValueSet(Long_t)");
2050 fPadBorderMode->Disconnect("Clicked(Int_t)");
2051 fPadBorderSize->Disconnect("Selected(Int_t)");
2052 fPadColor->Disconnect("ColorSelected(Pixel_t)");
2053 fPadTickX->Disconnect("Toggled(Bool_t)");
2054 fPadTickY->Disconnect("Toggled(Bool_t)");
2055 fPadGridX->Disconnect("Toggled(Bool_t)");
2056 fPadGridY->Disconnect("Toggled(Bool_t)");
2057 fGridColor->Disconnect("ColorSelected(Pixel_t)");
2058 fGridWidth->Disconnect("Selected(Int_t)");
2059 fGridStyle->Disconnect("Selected(Int_t)");
2060 break;
2061 case 3: // HISTOS
2062 fHistFillColor->Disconnect("ColorSelected(Pixel_t)");
2063 fHistFillStyle->Disconnect("PatternSelected(Style_t)");
2064 fHistLineColor->Disconnect("ColorSelected(Pixel_t)");
2065 fHistLineWidth->Disconnect("Selected(Int_t)");
2066 fHistLineStyle->Disconnect("Selected(Int_t)");
2067 fBarWidth->Disconnect("ValueSet(Long_t)");
2068 fBarOffset->Disconnect("ValueSet(Long_t)");
2069 fHistMinimumZero->Disconnect("Toggled(Bool_t)");
2070 fPaintTextFormat->Disconnect("TextChanged(const char *)");
2071 fNumberContours->Disconnect("ValueSet(Long_t)");
2072 fLegoInnerR->Disconnect("ValueSet(Long_t)");
2073 fFrameFillColor->Disconnect("ColorSelected(Pixel_t)");
2074 fFrameFillStyle->Disconnect("PatternSelected(Style_t)");
2075 fFrameLineColor->Disconnect("ColorSelected(Pixel_t)");
2076 fFrameLineWidth->Disconnect("Selected(Int_t)");
2077 fFrameLineStyle->Disconnect("Selected(Int_t)");
2078 fPaletteEdit->Disconnect("Clicked()");
2079 fFrameBorderMode->Disconnect("Clicked(Int_t)");
2080 fFrameBorderSize->Disconnect("Selected(Int_t)");
2081 fFuncColor->Disconnect("ColorSelected(Pixel_t)");
2082 fFuncWidth->Disconnect("Selected(Int_t)");
2083 fFuncStyle->Disconnect("Selected(Int_t)");
2084 fDrawBorder->Disconnect("Toggled(Bool_t)");
2085 fEndErrorSize->Disconnect("ValueSet(Long_t)");
2086 fErrorX->Disconnect("ValueSet(Long_t)");
2087 break;
2088 case 4: // AXIS
2089 fTimeOffsetDate->Disconnect("ValueSet(Long_t)");
2090 fTimeOffsetTime->Disconnect("ValueSet(Long_t)");
2091 fStripDecimals->Disconnect("Toggled(Bool_t)");
2092 fApplyOnXYZ->Disconnect("Clicked()");
2093 fXTitleSize->Disconnect("ValueSet(Long_t)");
2094 fXTitleColor->Disconnect("ColorSelected(Pixel_t)");
2095 fXTitleOffset->Disconnect("ValueSet(Long_t)");
2096 fXTitleFont->Disconnect("Selected(Int_t)");
2097 fXLabelSize->Disconnect("ValueSet(Long_t)");
2098 fXLabelColor->Disconnect("ColorSelected(Pixel_t)");
2099 fXLabelOffset->Disconnect("ValueSet(Long_t)");
2100 fXLabelFont->Disconnect("Selected(Int_t)");
2101 fXAxisColor->Disconnect("ColorSelected(Pixel_t)");
2102 fXTickLength->Disconnect("ValueSet(Long_t)");
2103 fOptLogx->Disconnect("Toggled(Bool_t)");
2104 fXNdivMain->Disconnect("ValueSet(Long_t)");
2105 fXNdivSub->Disconnect("ValueSet(Long_t)");
2106 fXNdivSubSub->Disconnect("ValueSet(Long_t)");
2107 fXNdivisionsOptimize->Disconnect("Toggled(Bool_t)");
2108 fYTitleSize->Disconnect("ValueSet(Long_t)");
2109 fYTitleColor->Disconnect("ColorSelected(Pixel_t)");
2110 fYTitleOffset->Disconnect("ValueSet(Long_t)");
2111 fYTitleFont->Disconnect("Selected(Int_t)");
2112 fYLabelSize->Disconnect("ValueSet(Long_t)");
2113 fYLabelColor->Disconnect("ColorSelected(Pixel_t)");
2114 fYLabelOffset->Disconnect("ValueSet(Long_t)");
2115 fYLabelFont->Disconnect("Selected(Int_t)");
2116 fYAxisColor->Disconnect("ColorSelected(Pixel_t)");
2117 fYTickLength->Disconnect("ValueSet(Long_t)");
2118 fOptLogy->Disconnect("Toggled(Bool_t)");
2119 fYNdivMain->Disconnect("ValueSet(Long_t)");
2120 fYNdivSub->Disconnect("ValueSet(Long_t)");
2121 fYNdivSubSub->Disconnect("ValueSet(Long_t)");
2122 fYNdivisionsOptimize->Disconnect("Toggled(Bool_t)");
2123 fZTitleSize->Disconnect("ValueSet(Long_t)");
2124 fZTitleColor->Disconnect("ColorSelected(Pixel_t)");
2125 fZTitleOffset->Disconnect("ValueSet(Long_t)");
2126 fZTitleFont->Disconnect("Selected(Int_t)");
2127 fZLabelSize->Disconnect("ValueSet(Long_t)");
2128 fZLabelColor->Disconnect("ColorSelected(Pixel_t)");
2129 fZLabelOffset->Disconnect("ValueSet(Long_t)");
2130 fZLabelFont->Disconnect("Selected(Int_t)");
2131 fZAxisColor->Disconnect("ColorSelected(Pixel_t)");
2132 fZTickLength->Disconnect("ValueSet(Long_t)");
2133 fOptLogz->Disconnect("Toggled(Bool_t)");
2134 fZNdivMain->Disconnect("ValueSet(Long_t)");
2135 fZNdivSub->Disconnect("ValueSet(Long_t)");
2136 fZNdivSubSub->Disconnect("ValueSet(Long_t)");
2137 fZNdivisionsOptimize->Disconnect("Toggled(Bool_t)");
2138 break;
2139 case 5: // TITLES
2140 fOptTitle->Disconnect("Toggled(Bool_t)");
2141 fTitleColor->Disconnect("ColorSelected(Pixel_t)");
2142 fTitleStyle->Disconnect("PatternSelected(Style_t)");
2143 fTitleTextColor->Disconnect("ColorSelected(Pixel_t)");
2144 fTitleFontSize->Disconnect("ValueSet(Long_t)");
2145 fTitleFont->Disconnect("Selected(Int_t)");
2146 fTitleAlign->Disconnect("Selected(Int_t)");
2147 fTitleBorderSize->Disconnect("Selected(Int_t)");
2148 fTitleX->Disconnect("ValueSet(Long_t)");
2149 fTitleY->Disconnect("ValueSet(Long_t)");
2150 fTitleW->Disconnect("ValueSet(Long_t)");
2151 fTitleH->Disconnect("ValueSet(Long_t)");
2152 fLegendBorderSize->Disconnect("Selected(Int_t)");
2153 break;
2154 case 6: // STATS
2155 fStatColor->Disconnect("ColorSelected(Pixel_t)");
2156 fStatStyle->Disconnect("PatternSelected(Style_t)");
2157 fStatTextColor->Disconnect("ColorSelected(Pixel_t)");
2158 fStatFontSize->Disconnect("ValueSet(Long_t)");
2159 fStatFont->Disconnect("Selected(Int_t)");
2160 fStatX->Disconnect("ValueSet(Long_t)");
2161 fStatY->Disconnect("ValueSet(Long_t)");
2162 fStatW->Disconnect("ValueSet(Long_t)");
2163 fStatH->Disconnect("ValueSet(Long_t)");
2164 fStatBorderSize->Disconnect("Selected(Int_t)");
2165 fOptStatName->Disconnect("Toggled(Bool_t)");
2166 fOptStatEntries->Disconnect("Toggled(Bool_t)");
2167 fOptStatOverflow->Disconnect("Toggled(Bool_t)");
2168 fOptStatMean->Disconnect("Toggled(Bool_t)");
2169 fOptStatUnderflow->Disconnect("Toggled(Bool_t)");
2170 fOptStatRMS->Disconnect("Toggled(Bool_t)");
2171 fOptStatSkewness->Disconnect("Toggled(Bool_t)");
2172 fOptStatIntegral->Disconnect("Toggled(Bool_t)");
2173 fOptStatKurtosis->Disconnect("Toggled(Bool_t)");
2174 fOptStatErrors->Disconnect("Toggled(Bool_t)");
2175 fStatFormat->Disconnect("TextChanged(const char *)");
2176 fOptFitValues->Disconnect("Toggled(Bool_t)");
2177 fOptFitErrors->Disconnect("Toggled(Bool_t)");
2178 fOptFitProbability->Disconnect("Toggled(Bool_t)");
2179 fOptFitChi->Disconnect("Toggled(Bool_t)");
2180 fFitFormat->Disconnect("TextChanged(const char *)");
2181 break;
2182 case 7: // PS / PDF
2183 fHeaderPS->Disconnect("TextChanged(const char *)");
2184 fTitlePS->Disconnect("TextChanged(const char *)");
2185 fColorModelPS->Disconnect("Clicked(Int_t)");
2186 fLineScalePS->Disconnect("ValueSet(Long_t)");
2187 fPaperSizePredef->Disconnect("Selected(Int_t)");
2188 fPaperSizeX->Disconnect("ValueSet(Long_t)");
2189 fPaperSizeY->Disconnect("ValueSet(Long_t)");
2190 break;
2191 }
2192}
2193
2194////////////////////////////////////////////////////////////////////////////////
2195/// Called each time something is changed in the style editor. Thanks to
2196/// this method, we can know if the style differs from the original style.
2197
2199{
2201
2202 // Update the status bar.
2204
2205 // Update the preview if the real time mode is selected.
2206 if (fRealTimePreview)
2208}
2209
2210////////////////////////////////////////////////////////////////////////////////
2211/// Add the editor to the frame 'p'. It contains the tabs allowing the user
2212/// to modify every data member of the current TStyle object.
2213
2215{
2220
2223
2224 fEditionTab = new TGTab(fEditionFrame, 200, 150);
2225 fEditionTab->Associate(this);
2226 CreateTabGeneral(fEditionTab->AddTab("General"));
2229 CreateTabHistos(fEditionTab->AddTab("Histograms"));
2233 CreateTabPsPdf(fEditionTab->AddTab("PS / PDF"));
2235
2238 fEditionHelp->Associate(this);
2245 fEditionReset->Associate(this);
2248
2249 p->AddFrame(fEditionFrame, layout1);
2250
2251 fEditionHelp->SetToolTipText("Help about the current tab");
2252 fEditionUpdatePreview->SetToolTipText("Force the refresh of the preview window");
2253 fEditionReset->SetToolTipText("Reset the selected style");
2254}
2255
2256////////////////////////////////////////////////////////////////////////////////
2257/// Add the tab 'General' to the editor.
2258
2260{
2261 TGLayoutHints *layout = new TGLayoutHints(kLHintsExpandX, 10, 21, 5, 5);
2263
2268 tab->AddFrame(h1, fLayoutExpandX);
2269
2272 AddGeneralText(h2);
2279 "Screen factor:", 0, 6, TGNumberFormat::kNESRealOne,
2282 v->AddFrame(h3, layout);
2283 h2->AddFrame(v, fLayoutExpandXY);
2284 tab->AddFrame(h2, fLayoutExpandX);
2285
2286 fScreenFactor->GetNumberEntry()->SetToolTipText("Coefficient for different screen's resolutions");
2287}
2288
2289////////////////////////////////////////////////////////////////////////////////
2290/// Add the 'Fill' group frame to the 'General' tab.
2291
2293{
2296
2297 TGGroupFrame *gf = new TGGroupFrame(f, "Fill");
2303 gf->AddFrame(h1, fLayoutExpandX);
2304 AddTitle(gf, "Hatchings");
2312 gf->AddFrame(h2, layout2);
2313 f->AddFrame(gf, fLayoutExpandXYMargin);
2314
2315// TODO Delete the // when the selectColor and selectPattern tooltips are OK.
2316// fFillColor->SetToolTipText("General fill color");
2317// fFillStyle->SetToolTipText("General fill pattern");
2318 fHatchesSpacing->GetNumberEntry()->SetToolTipText("Spacing between the hatching's lines");
2319}
2320
2321////////////////////////////////////////////////////////////////////////////////
2322/// Add the 'Line' group frame to the 'General' tab.
2323
2325{
2326 TGGroupFrame *gf = new TGGroupFrame(f, "Line");
2332 gf->AddFrame(h, fLayoutExpandX);
2334 fLineStyleEdit = AddTextButton(gf, "Lines' Style Editor...", kGeneralLineStyleEdit);
2336 f->AddFrame(gf, fLayoutExpandXYMargin);
2337
2338// TODO Delete the // when the selectColor and selectPattern tooltips are OK.
2339// fLineColor->SetToolTipText("General line color");
2340}
2341
2342////////////////////////////////////////////////////////////////////////////////
2343/// Add the 'Text' group frame to the 'General' tab.
2344
2346{
2347 TGGroupFrame *gf = new TGGroupFrame(f, "Text");
2353 gf->AddFrame(h1, fLayoutExpandX);
2358 fTextSize = AddNumberEntry(h2, 21, 10, 0, kGeneralTextSize, "Size:", 0, 5,
2362 gf->AddFrame(h2, fLayoutExpandX);
2363 fTextAngle = AddNumberEntry(gf, 0, 0, 0, kGeneralTextAngle, "Angle:",
2367 f->AddFrame(gf, fLayoutExpandXYMargin);
2368
2369// TODO Delete the // when the selectColor and selectPattern tooltips are OK.
2370// fTextColor->SetToolTipText("General text color");
2371 fTextSizeInPixels->SetToolTipText("Set the text size in pixels if selected, otherwise - in % of pad.");
2372 fTextSize->GetNumberEntry()->SetToolTipText("General text size (in pixels or in % of pad)");
2373 fTextAngle->GetNumberEntry()->SetToolTipText("General text angle");
2374}
2375
2376////////////////////////////////////////////////////////////////////////////////
2377/// Add the 'Marker' group frame to the 'General' tab.
2378
2380{
2381 TGGroupFrame *gf = new TGGroupFrame(f, "Marker");
2388 gf->AddFrame(h, fLayoutExpandX);
2389 f->AddFrame(gf, fLayoutExpandXMargin);
2390
2391// TODO Delete the // when the selectColor and selectPattern tooltips are OK.
2392// fMarkerColor->SetToolTipText("Marker color");
2393// fMarkerStyle->SetToolTipText("Marker shape");
2394}
2395
2396////////////////////////////////////////////////////////////////////////////////
2397/// Add the tab 'Canvas' to the editor.
2398
2415
2416////////////////////////////////////////////////////////////////////////////////
2417/// Add the 'Fill' group frame to the 'Canvas' tab.
2418
2420{
2421 TGGroupFrame *gf = new TGGroupFrame(f, "Fill");
2426 gf->AddFrame(h, fLayoutExpandX);
2427 f->AddFrame(gf, fLayoutExpandXMargin);
2428
2429// TODO Delete the // when the selectColor and selectPattern tooltips are OK.
2430// fCanvasColor->SetToolTipText("Color used to fill canvases");
2431}
2432
2433////////////////////////////////////////////////////////////////////////////////
2434/// Add the 'Geometry' group frame to the 'Canvas' tab.
2435
2437{
2438 TGGroupFrame *gf = new TGGroupFrame(f, "Geometry");
2442 fCanvasDefX = AddNumberEntry(h1, 0, 9, 0, kCanvasDefX, "X:",
2446 fCanvasDefY = AddNumberEntry(h1, 7, 8, 0, kCanvasDefY, "Y:",
2450 gf->AddFrame(h1, fLayoutExpandX);
2451
2454 fCanvasDefW = AddNumberEntry(h2, 0, 7, 0, kCanvasDefW, "W:",
2458 fCanvasDefH = AddNumberEntry(h2, 7, 8, 0, kCanvasDefH, "H:",
2462 gf->AddFrame(h2, fLayoutExpandX);
2463 f->AddFrame(gf, fLayoutExpandXMargin);
2464
2465 fCanvasDefX->GetNumberEntry()->SetToolTipText("Canvases' default abscissa");
2466 fCanvasDefY->GetNumberEntry()->SetToolTipText("Canvases' default ordinate");
2467 fCanvasDefW->GetNumberEntry()->SetToolTipText("Canvases' default width");
2468 fCanvasDefH->GetNumberEntry()->SetToolTipText("Canvases' default height");
2469}
2470
2471////////////////////////////////////////////////////////////////////////////////
2472/// Add the 'Border' group frame to the 'Canvas' tab.
2473
2479
2480////////////////////////////////////////////////////////////////////////////////
2481/// Add the 'Date' group frame to the 'Canvas' tab.
2482
2484{
2487
2488 TGGroupFrame *gf = new TGGroupFrame(f, "Date");
2494 gf->AddFrame(h1, fLayoutExpandX);
2498 fAttDateTextSize = AddNumberEntry(h2, 22, 10, 0, kCanvasAttDateTextSize, "Size:", 0, 5,
2502 gf->AddFrame(h2, fLayoutExpandX);
2507 "Angle:", 0, 6, TGNumberFormat::kNESInteger,
2510 AddTitle(gf, "Position");
2513 fDateX = AddNumberEntry(h3, 0, 0, 0, kCanvasDateX, "X (% of Pad):",
2517 fDateY = AddNumberEntry(h3, 0, 0, 0, kCanvasDateY, "Y (% of Pad):",
2521 gf->AddFrame(h3, layout2);
2522 f->AddFrame(gf, fLayoutExpandXYMargin);
2523
2524 fOptDateBool->SetToolTipText("Show / Hide the date in canvases");
2525// TODO Delete the // when the selectColor and selectPattern tooltips are OK.
2526// fAttDateTextColor->SetToolTipText("Color of the date text");
2527 fAttDateTextSizeInPixels->SetToolTipText("Set the date text size in pixels if selected, otherwise - in % of pad");
2528 fAttDateTextSize->GetNumberEntry()->SetToolTipText("Date text size (in pixels or in % of pad)");
2529 fAttDateTextAngle->GetNumberEntry()->SetToolTipText("Date text angle");
2530 fDateX->GetNumberEntry()->SetToolTipText("Date abscissa in percent of pad");
2531 fDateY->GetNumberEntry()->SetToolTipText("Date ordinate in percent of pad");
2532}
2533
2534////////////////////////////////////////////////////////////////////////////////
2535/// Add the tab 'Pad' to the editor.
2536
2554
2555////////////////////////////////////////////////////////////////////////////////
2556/// Add the 'Margin' group frame to the 'Pad' tab.
2557
2559{
2560 TGGroupFrame *gf = new TGGroupFrame(f, "Margin (% of Pad)");
2564 fPadLeftMargin = AddNumberEntry(h1, 0, 5, 0, kPadLeftMargin, "Left:",
2568 fPadRightMargin = AddNumberEntry(h1, 0, 0, 0, kPadRightMargin, "Right:",
2572 gf->AddFrame(h1, fLayoutExpandXY);
2575 fPadTopMargin = AddNumberEntry(h2, 0, 5, 0, kPadTopMargin, "Top:",
2579 fPadBottomMargin = AddNumberEntry(h2, 0, 0, 0, kPadBottomMargin, "Bottom:",
2583 gf->AddFrame(h2, fLayoutExpandXY);
2584 f->AddFrame(gf, fLayoutExpandXYMargin);
2585
2586 fPadLeftMargin->GetNumberEntry()->SetToolTipText("Pads' left margin");
2587 fPadRightMargin->GetNumberEntry()->SetToolTipText("Pads' right margin");
2588 fPadTopMargin->GetNumberEntry()->SetToolTipText("Pads' top margin");
2589 fPadBottomMargin->GetNumberEntry()->SetToolTipText("Pads' bottom margin");
2590}
2591
2592////////////////////////////////////////////////////////////////////////////////
2593/// Add the 'Border' group frame to the 'Pad' tab.
2594
2600
2601////////////////////////////////////////////////////////////////////////////////
2602/// Add the 'Fill' group frame to the 'Pad' tab.
2603
2605{
2606 TGGroupFrame *gf = new TGGroupFrame(f, "Fill");
2611 gf->AddFrame(h, fLayoutExpandX);
2612 f->AddFrame(gf, fLayoutExpandXYMargin);
2613
2614// TODO Delete the // when the selectColor and selectPattern tooltips are OK.
2615// fPadColor->SetToolTipText("Color used to fill pads");
2616}
2617
2618////////////////////////////////////////////////////////////////////////////////
2619/// Add the 'Ticks' group frame to the 'Pad' tab.
2620
2622{
2623 TGGroupFrame *gf = new TGGroupFrame(f, "Ticks");
2629 fPadTickX = AddCheckButton(h1, "Along X", kPadTickX);
2630 h->AddFrame(h1, fLayoutExpandX);
2633 fPadTickY = AddCheckButton(h2, "Along Y", kPadTickY);
2634 h->AddFrame(h2, fLayoutExpandX);
2635 gf->AddFrame(h, fLayoutExpandX);
2636 f->AddFrame(gf, fLayoutExpandXYMargin);
2637
2638 fPadTickX->SetToolTipText("Show / Hide the ticks along X");
2639 fPadTickY->SetToolTipText("Show / Hide the ticks along Y");
2640}
2641
2642////////////////////////////////////////////////////////////////////////////////
2643/// Add the 'Grid' group frame to the 'Pad' tab.
2644
2646{
2647 TGGroupFrame *gf = new TGGroupFrame(f, "Grid");
2653 fPadGridX = AddCheckButton(h10, "Along X", kPadGridX);
2654 h1->AddFrame(h10, fLayoutExpandX);
2657 fPadGridY = AddCheckButton(h20, "Along Y", kPadGridY);
2658 h1->AddFrame(h20, fLayoutExpandX);
2659 gf->AddFrame(h1, fLayoutExpandX);
2664 gf->AddFrame(h2, fLayoutExpandX);
2666 f->AddFrame(gf, fLayoutExpandXYMargin);
2667
2668// TODO Delete the // when the selectColor and selectPattern tooltips are OK.
2669// fGridColor->SetToolTipText("Line color for the grid");
2670 fPadGridX->SetToolTipText("Show / Hide the grid along X");
2671 fPadGridY->SetToolTipText("Show / Hide the grid along Y");
2672}
2673
2674////////////////////////////////////////////////////////////////////////////////
2675/// Add the tab 'Histos' to the editor.
2676
2686
2687////////////////////////////////////////////////////////////////////////////////
2688/// Add the sub-tab 'Histos' to the tab 'Histos'.
2689
2710
2711////////////////////////////////////////////////////////////////////////////////
2712/// Add the 'Fill' group frame to the 'Histos - Histos' tab.
2713
2715{
2716 TGGroupFrame *gf = new TGGroupFrame(f, "Fill");
2722 gf->AddFrame(h1, fLayoutExpandX);
2723 f->AddFrame(gf, fLayoutExpandXYMargin);
2724
2725// TODO Delete the // when the selectColor and selectPattern tooltips are OK.
2726// fHistFillColor->SetToolTipText("Color used to fill histograms");
2727// fHistFillStyle->SetToolTipText("Pattern used to fill histograms");
2728}
2729
2730////////////////////////////////////////////////////////////////////////////////
2731/// Add the 'Line' group frame to the 'Histos - Histos' tab.
2732
2734{
2735 TGGroupFrame *gf = new TGGroupFrame(f, "Line");
2741 gf->AddFrame(h, fLayoutExpandX);
2743 f->AddFrame(gf, fLayoutExpandXYMargin);
2744
2745// TODO Delete the // when the selectColor and selectPattern tooltips are OK.
2746// fHistLineColor->SetToolTipText("Color used for histograms' lines");
2747}
2748
2749////////////////////////////////////////////////////////////////////////////////
2750/// Add the 'Bar' group frame to the 'Histos - Histos' tab.
2751
2772
2773////////////////////////////////////////////////////////////////////////////////
2774/// Add the 'Contours' group frame to the 'Histos - Histos' tab.
2775
2788
2789////////////////////////////////////////////////////////////////////////////////
2790/// Add the 'Axis' group frame to the 'Histos - Histos' tab.
2791
2793{
2794 TGGroupFrame *gf = new TGGroupFrame(f, "Axis");
2798 f->AddFrame(gf, fLayoutExpandXYMargin);
2799
2800 fHistMinimumZero->SetToolTipText("Set to zero / Compute the minimum of axis range");
2801 fPaintTextFormat->SetToolTipText("Paint format of the axis labels in histograms");
2802}
2803
2804////////////////////////////////////////////////////////////////////////////////
2805/// Add the '3D Cylindrical' group frame to the 'Histos - Histos' tab.
2806
2808{
2809 TGGroupFrame *gf = new TGGroupFrame(f, "3D Cylindrical (%)");
2811 fLegoInnerR = AddNumberEntry(gf, 0, 0, 0, kHistLegoInnerR, "Inner radius:",
2815 f->AddFrame(gf, fLayoutExpandXYMargin);
2816
2817 fLegoInnerR->GetNumberEntry()->SetToolTipText("Percent of radius allocated to the tube");
2818}
2819
2820////////////////////////////////////////////////////////////////////////////////
2821/// Add the sub-tab 'Frames' to the tab 'Histos'.
2822
2849
2850////////////////////////////////////////////////////////////////////////////////
2851/// Add the 'Fill' group frame to the 'Histos - Frames' tab.
2852
2854{
2855 TGGroupFrame *gf = new TGGroupFrame(f, "Fill");
2861 gf->AddFrame(h1, fLayoutExpandX);
2862 f->AddFrame(gf, fLayoutExpandXMargin);
2863
2864// TODO Delete the // when the selectColor and selectPattern tooltips are OK.
2865// fFrameFillColor->SetToolTipText("Color used to fill frames");
2866// fFrameFillStyle->SetToolTipText("Pattern used to fill frames");
2867}
2868
2869////////////////////////////////////////////////////////////////////////////////
2870/// Add the 'Line' group frame to the 'Histos - Frames' tab.
2871
2873{
2874 TGGroupFrame *gf = new TGGroupFrame(f, "Line");
2880 gf->AddFrame(h, fLayoutExpandX);
2882 f->AddFrame(gf, fLayoutExpandXYMargin);
2883
2884// TODO Delete the // when the selectColor and selectPattern tooltips are OK.
2885// fFrameLineColor->SetToolTipText("Color of lines in frames");
2886}
2887
2888////////////////////////////////////////////////////////////////////////////////
2889/// Add the 'Border' group frame to the 'Histos - Frames' tab.
2890
2896
2897////////////////////////////////////////////////////////////////////////////////
2898/// Add the sub-tab 'Graphs' to the tab 'Histos'.
2899
2909
2910////////////////////////////////////////////////////////////////////////////////
2911/// Add the 'Line' group frame to the 'Histos - Graphs' tab.
2912
2914{
2915 TGGroupFrame *gf = new TGGroupFrame(f, "Line");
2921 gf->AddFrame(h, fLayoutExpandX);
2923 f->AddFrame(gf, fLayoutExpandXMargin);
2924
2925// TODO Delete the // when the selectColor and selectPattern tooltips are OK.
2926// fFuncColor->SetToolTipText("Color of curves in graphs");
2927}
2928
2929////////////////////////////////////////////////////////////////////////////////
2930/// Add the 'Draw Border' check button to the 'Histos - Graphs' tab.
2931
2933{
2934 TGLayoutHints *layout = new TGLayoutHints(kLHintsExpandX, 10, 21, 5, 5);
2936
2939 fDrawBorder = AddCheckButton(h, "Draw Border (for Filled Function)", kGraphsDrawBorder);
2940 f->AddFrame(h, layout);
2941
2942 fDrawBorder->SetToolTipText("Show / Hide the border of filled functions");
2943}
2944
2945////////////////////////////////////////////////////////////////////////////////
2946/// Add the 'Errors' group frame to the 'Histos - Graphs' tab.
2947
2949{
2950 TGGroupFrame *gf = new TGGroupFrame(f, "Errors");
2953 "End error size:", 0, 4, TGNumberFormat::kNESRealOne,
2956 fErrorX = AddNumberEntry(gf, 0, 0, 0, kGraphsErrorX, "Error X (% of bin):",
2960 f->AddFrame(gf, fLayoutExpandXMargin);
2961
2962 fEndErrorSize->GetNumberEntry()->SetToolTipText("Size of lines drawn at the end of error bars");
2963 fErrorX->GetNumberEntry()->SetToolTipText("Percent of the bin width to use for errors along X");
2964}
2965
2966////////////////////////////////////////////////////////////////////////////////
2967/// Add the tab 'Axis' to the editor.
2968
2970{
2972 new TGLayoutHints(kLHintsNormal, 10, 13, 3);
2974
2977
2980 fStripDecimals = AddCheckButton(h3, "Decimal labels' part", kAxisStripDecimals, 0, 8);
2981 TGVerticalFrame *space = new TGVerticalFrame(h3);
2982 fTrashListFrame->AddFirst(space);
2983 h3->AddFrame(space, fLayoutExpandXY);
2984 fApplyOnXYZ = AddTextButton(h3, "Apply on XYZ", kAxisApplyOnXYZ);
2985 h->AddFrame(h3, layout);
2986
2987 TGGroupFrame *gf = new TGGroupFrame(h, "Date/Time Offset");
2999 gf->AddFrame(h2, fLayoutExpandX);
3000 h->AddFrame(gf, fLayoutExpandXMargin);
3001 tab->AddFrame(h, fLayoutExpandX);
3002
3003 fAxisTab = new TGTab(tab);
3004 fAxisTab->Associate(this);
3005 CreateTabAxisX(fAxisTab->AddTab("X axis"));
3006 CreateTabAxisY(fAxisTab->AddTab("Y axis"));
3007 CreateTabAxisZ(fAxisTab->AddTab("Z axis"));
3008 tab->AddFrame(fAxisTab, fLayoutExpandXY);
3009
3010 fStripDecimals->SetToolTipText("Draw / Hide the decimal part of labels");
3011 fApplyOnXYZ->SetToolTipText("Apply settings of the currently selected axis on XYZ");
3012 fTimeOffsetDate->GetNumberEntry()->SetToolTipText("Date offset for axis (dd/mm/yyyy)");
3013 fTimeOffsetTime->GetNumberEntry()->SetToolTipText("Time offset for axis (hh/mm/ss)");
3014}
3015
3016////////////////////////////////////////////////////////////////////////////////
3017/// Add the sub-tab 'X Axis' to the tab 'Axis'.
3018
3033
3034////////////////////////////////////////////////////////////////////////////////
3035/// Add the 'Line' group frame to the 'Axis - X Axis' tab.
3036
3038{
3041
3042 TGGroupFrame *gf = new TGGroupFrame(f, "Line");
3049 fXTickLength = AddNumberEntry(h2, 3, 8, 0, kAxisXTickLength, "Ticks:",
3053 h->AddFrame(h2, layout);
3054 gf->AddFrame(h, fLayoutExpandX);
3055 fOptLogx = AddCheckButton(gf, "Logarithmic scale", kAxisOptLogx);
3056 f->AddFrame(gf, fLayoutExpandXYMargin);
3057
3058// TODO Delete the // when the selectColor and selectPattern tooltips are OK.
3059// fXAxisColor->SetToolTipText("Color of axis' line");
3060 fXTickLength->GetNumberEntry()->SetToolTipText("Set the ticks' length");
3061 fOptLogx->SetToolTipText("Draw logarithmic scale");
3062}
3063
3064////////////////////////////////////////////////////////////////////////////////
3065/// Add the 'Title' group frame to the 'Axis - X Axis' tab.
3066
3068{
3069 TGGroupFrame *gf = new TGGroupFrame(f, "Title");
3075 gf->AddFrame(h1, fLayoutExpandX);
3079 fXTitleSize = AddNumberEntry(h2, 21, 8, 0, kAxisXTitleSize, "Size:", 0, 5,
3083 gf->AddFrame(h2, fLayoutExpandX);
3084 fXTitleOffset = AddNumberEntry(gf, 68, 8, 0, kAxisXTitleOffset, "Offset:",
3088 f->AddFrame(gf, fLayoutExpandXMargin);
3089
3090// TODO Delete the // when the selectColor and selectPattern tooltips are OK.
3091// fXTitleColor->SetToolTipText("Color of axis' title");
3092 fXTitleSizeInPixels->SetToolTipText("Set the title size in pixels if selected, otherwise - in % of pad");
3093 fXTitleSize->GetNumberEntry()->SetToolTipText("Title size (in pixels or in % of pad)");
3094 fXTitleOffset->GetNumberEntry()->SetToolTipText("Offset between axis and title");
3095}
3096
3097////////////////////////////////////////////////////////////////////////////////
3098/// Add the 'Divisions' group frame to the 'Axis - X Axis' tab.
3099
3101{
3102 TGGroupFrame *gf = new TGGroupFrame(f, "Divisions");
3104
3111 fXNdivSub = AddNumberEntry(h1, 0, 18, 0, kAxisXNdivSub, "",
3115 fXNdivMain = AddNumberEntry(h1, 0, 18, 0, kAxisXNdivMain, "",
3119 gf->AddFrame(h1, fLayoutExpandX);
3120
3124 gf->AddFrame(h2, fLayoutExpandX);
3125 f->AddFrame(gf, fLayoutExpandXMargin);
3126
3127 fXNdivMain->GetNumberEntry()->SetToolTipText("Primary axis divisions");
3128 fXNdivSub->GetNumberEntry()->SetToolTipText("Secondary axis divisions");
3129 fXNdivSubSub->GetNumberEntry()->SetToolTipText("Tertiary axis divisions");
3130 fXNdivisionsOptimize->SetToolTipText("Optimize the number of axis divisions if selected");
3131}
3132
3133////////////////////////////////////////////////////////////////////////////////
3134/// Add the 'Labels' group frame to the 'Axis - X Axis' tab.
3135