#ifndef ROOT_TStyleManager
#define ROOT_TStyleManager
#ifndef ROOT_TGFrame
#include "TGFrame.h"
#endif
#ifndef ROOT_TGNumberEntry
#include "TGNumberEntry.h"
#endif
class TGButtonGroup;
class TGCheckButton;
class TGColorSelect;
class TGComboBox;
class TGCompositeFrame;
class TGedMarkerSelect;
class TGedPatternSelect;
class TGFileInfo;
class TGFontTypeComboBox;
class TGHButtonGroup;
class TGHorizontal3DLine;
class TGHorizontalFrame;
class TGLabel;
class TGLayoutHints;
class TGLineStyleComboBox;
class TGLineWidthComboBox;
class TGMainFrame;
class TGMatrixLayout;
class TGMenuBar;
class TGPicture;
class TGPictureButton;
class TGPopupMenu;
class TGRadioButton;
class TGStatusBar;
class TGTab;
class TGTextButton;
class TGTextEntry;
class TGToolBar;
class TGVerticalFrame;
class TList;
class TObject;
class TStyle;
class TStylePreview;
class TVirtualPad;
class TStyleManager : public TGMainFrame {
private:
static TStyleManager *fgStyleManager;
TStyle *fCurSelStyle;
Bool_t fLastChoice;
Bool_t fRealTimePreview;
Int_t fCurTabNum;
Int_t fCurTabAxisNum;
UInt_t fSMWidth;
UInt_t fSMHeight;
Bool_t fStyleChanged;
Bool_t fMoreAndNotLess;
Bool_t fSigSlotConnected;
Bool_t fAllAndNotCurrent;
TList *fTrashListFrame;
TList *fTrashListLayout;
TGMenuBar *fMenuBar;
TGPopupMenu *fMenuStyle;
TGPopupMenu *fImportCascade;
TGPopupMenu *fMenuHelp;
TGToolBar *fToolBar;
TGPictureButton *fToolBarNew;
TGPictureButton *fToolBarDelete;
TGPictureButton *fToolBarImportCanvas;
TGPictureButton *fToolBarImportMacro;
TGPictureButton *fToolBarExport;
TGPictureButton *fToolBarHelp;
const TGPicture *fToolBarNewPic;
const TGPicture *fToolBarDeletePic;
const TGPicture *fToolBarImportCanvasPic;
const TGPicture *fToolBarImportMacroPic;
const TGPicture *fToolBarExportPic;
const TGPicture *fToolBarHelpPic;
TGHorizontal3DLine *fHorizontal3DLine;
TGLabel *fListLabel;
TGComboBox *fListComboBox;
TGFileInfo *fCurMacro;
TGLabel *fCurStylabel;
TGTextEntry *fCurStyle;
TGLabel *fCurPadLabel;
TGTextEntry *fCurPadTextEntry;
TVirtualPad *fCurPad;
TGLabel *fCurObjLabel;
TGTextEntry *fCurObjTextEntry;
TObject *fCurObj;
TGCheckButton *fPreviewButton;
TGCheckButton *fPreviewRealTime;
TStylePreview *fPreviewWindow;
TGPictureButton *fMakeDefault;
const TGPicture *fMakeDefaultPic;
TGHButtonGroup *fApplyOnGroup;
TGRadioButton *fApplyOnAll;
TGRadioButton *fApplyOnSel;
TGTextButton *fApplyOnButton;
TGTextButton *fMoreLess;
TGStatusBar *fStatusBar;
TGVerticalFrame *fEditionFrame;
TGTab *fEditionTab;
TGTab *fHistosTab;
TGTab *fAxisTab;
TGHorizontalFrame *fEditionButtonFrame;
TGTextButton *fEditionHelp;
TGTextButton *fEditionUpdatePreview;
TGTextButton *fEditionReset;
TGColorSelect *fFillColor;
TGedPatternSelect *fFillStyle;
TGLineWidthComboBox *fHatchesLineWidth;
TGNumberEntry *fHatchesSpacing;
TGColorSelect *fTextColor;
TGNumberEntry *fTextSize;
TGCheckButton *fTextSizeInPixels;
TGFontTypeComboBox *fTextFont;
TGComboBox *fTextAlign;
TGNumberEntry *fTextAngle;
TGColorSelect *fLineColor;
TGLineWidthComboBox *fLineWidth;
TGLineStyleComboBox *fLineStyle;
TGTextButton *fLineStyleEdit;
TGColorSelect *fMarkerColor;
TGedMarkerSelect *fMarkerStyle;
TGComboBox *fMarkerSize;
TGNumberEntry *fScreenFactor;
TGColorSelect *fCanvasColor;
TGNumberEntry *fCanvasDefX;
TGNumberEntry *fCanvasDefY;
TGNumberEntry *fCanvasDefW;
TGNumberEntry *fCanvasDefH;
TGButtonGroup *fCanvasBorderMode;
TGLineWidthComboBox *fCanvasBorderSize;
TGCheckButton *fOptDateBool;
TGColorSelect *fAttDateTextColor;
TGNumberEntry *fAttDateTextSize;
TGCheckButton *fAttDateTextSizeInPixels;
TGComboBox *fOptDateFormat;
TGFontTypeComboBox *fAttDateTextFont;
TGNumberEntry *fAttDateTextAngle;
TGComboBox *fAttDateTextAlign;
TGNumberEntry *fDateX;
TGNumberEntry *fDateY;
TGNumberEntry *fPadLeftMargin;
TGNumberEntry *fPadRightMargin;
TGNumberEntry *fPadTopMargin;
TGNumberEntry *fPadBottomMargin;
TGButtonGroup *fPadBorderMode;
TGLineWidthComboBox *fPadBorderSize;
TGColorSelect *fPadColor;
TGCheckButton *fPadTickX;
TGCheckButton *fPadTickY;
TGCheckButton *fPadGridX;
TGCheckButton *fPadGridY;
TGColorSelect *fGridColor;
TGLineWidthComboBox *fGridWidth;
TGLineStyleComboBox *fGridStyle;
TGColorSelect *fHistFillColor;
TGedPatternSelect *fHistFillStyle;
TGColorSelect *fHistLineColor;
TGLineWidthComboBox *fHistLineWidth;
TGLineStyleComboBox *fHistLineStyle;
TGNumberEntry *fBarWidth;
TGNumberEntry *fBarOffset;
TGCheckButton *fHistMinimumZero;
TGTextEntry *fPaintTextFormat;
TGNumberEntry *fNumberContours;
TGNumberEntry *fLegoInnerR;
TGColorSelect *fFrameFillColor;
TGedPatternSelect *fFrameFillStyle;
TGColorSelect *fFrameLineColor;
TGLineWidthComboBox *fFrameLineWidth;
TGLineStyleComboBox *fFrameLineStyle;
TGTextButton *fPaletteEdit;
TGButtonGroup *fFrameBorderMode;
TGLineWidthComboBox *fFrameBorderSize;
TGColorSelect *fFuncColor;
TGLineWidthComboBox *fFuncWidth;
TGLineStyleComboBox *fFuncStyle;
TGCheckButton *fDrawBorder;
TGNumberEntry *fEndErrorSize;
TGNumberEntry *fErrorX;
TGNumberEntry *fTimeOffsetDate;
TGNumberEntry *fTimeOffsetTime;
TGCheckButton *fStripDecimals;
TGTextButton *fApplyOnXYZ;
TGNumberEntry *fXTitleSize;
TGCheckButton *fXTitleSizeInPixels;
TGColorSelect *fXTitleColor;
TGNumberEntry *fXTitleOffset;
TGFontTypeComboBox *fXTitleFont;
TGNumberEntry *fXLabelSize;
TGCheckButton *fXLabelSizeInPixels;
TGColorSelect *fXLabelColor;
TGNumberEntry *fXLabelOffset;
TGFontTypeComboBox *fXLabelFont;
TGColorSelect *fXAxisColor;
TGNumberEntry *fXTickLength;
TGCheckButton *fOptLogx;
TGNumberEntry *fXNdivMain;
TGNumberEntry *fXNdivSub;
TGNumberEntry *fXNdivSubSub;
TGCheckButton *fXNdivisionsOptimize;
TGNumberEntry *fYTitleSize;
TGCheckButton *fYTitleSizeInPixels;
TGColorSelect *fYTitleColor;
TGNumberEntry *fYTitleOffset;
TGFontTypeComboBox *fYTitleFont;
TGNumberEntry *fYLabelSize;
TGCheckButton *fYLabelSizeInPixels;
TGColorSelect *fYLabelColor;
TGNumberEntry *fYLabelOffset;
TGFontTypeComboBox *fYLabelFont;
TGColorSelect *fYAxisColor;
TGNumberEntry *fYTickLength;
TGCheckButton *fOptLogy;
TGNumberEntry *fYNdivMain;
TGNumberEntry *fYNdivSub;
TGNumberEntry *fYNdivSubSub;
TGCheckButton *fYNdivisionsOptimize;
TGNumberEntry *fZTitleSize;
TGCheckButton *fZTitleSizeInPixels;
TGColorSelect *fZTitleColor;
TGNumberEntry *fZTitleOffset;
TGFontTypeComboBox *fZTitleFont;
TGNumberEntry *fZLabelSize;
TGCheckButton *fZLabelSizeInPixels;
TGColorSelect *fZLabelColor;
TGNumberEntry *fZLabelOffset;
TGFontTypeComboBox *fZLabelFont;
TGColorSelect *fZAxisColor;
TGNumberEntry *fZTickLength;
TGCheckButton *fOptLogz;
TGNumberEntry *fZNdivMain;
TGNumberEntry *fZNdivSub;
TGNumberEntry *fZNdivSubSub;
TGCheckButton *fZNdivisionsOptimize;
TGCheckButton *fOptTitle;
TGColorSelect *fTitleColor;
TGedPatternSelect *fTitleStyle;
TGColorSelect *fTitleTextColor;
TGNumberEntry *fTitleFontSize;
TGCheckButton *fTitleFontSizeInPixels;
TGFontTypeComboBox *fTitleFont;
TGComboBox *fTitleAlign;
TGLabel *fTitleBorderSizeLabel;
TGLineWidthComboBox *fTitleBorderSize;
TGNumberEntry *fTitleX;
TGNumberEntry *fTitleY;
TGNumberEntry *fTitleW;
TGNumberEntry *fTitleH;
TGLabel *fLegendBorderSizeLabel;
TGLineWidthComboBox *fLegendBorderSize;
TGColorSelect *fStatColor;
TGedPatternSelect *fStatStyle;
TGColorSelect *fStatTextColor;
TGNumberEntry *fStatFontSize;
TGCheckButton *fStatFontSizeInPixels;
TGFontTypeComboBox *fStatFont;
TGNumberEntry *fStatX;
TGNumberEntry *fStatY;
TGNumberEntry *fStatW;
TGNumberEntry *fStatH;
TGLabel *fStatBorderSizeLabel;
TGLineWidthComboBox *fStatBorderSize;
TGCheckButton *fOptStatName;
TGCheckButton *fOptStatEntries;
TGCheckButton *fOptStatOverflow;
TGCheckButton *fOptStatMean;
TGCheckButton *fOptStatUnderflow;
TGCheckButton *fOptStatRMS;
TGCheckButton *fOptStatSkewness;
TGCheckButton *fOptStatIntegral;
TGCheckButton *fOptStatKurtosis;
TGCheckButton *fOptStatErrors;
TGLabel *fStatFormatLabel;
TGTextEntry *fStatFormat;
TGCheckButton *fOptFitValues;
TGCheckButton *fOptFitErrors;
TGCheckButton *fOptFitProbability;
TGCheckButton *fOptFitChi;
TGLabel *fFitFormatLabel;
TGTextEntry *fFitFormat;
TGTextEntry *fHeaderPS;
TGTextEntry *fTitlePS;
TGButtonGroup *fColorModelPS;
TGRadioButton *fColorModelPSRGB;
TGRadioButton *fColorModelPSCMYK;
TGNumberEntry *fLineScalePS;
TGComboBox *fPaperSizePredef;
Bool_t fPaperSizeEnCm;
TGNumberEntry *fPaperSizeX;
TGNumberEntry *fPaperSizeY;
TGLayoutHints *fLayoutExpandX;
TGLayoutHints *fLayoutExpandXMargin;
TGLayoutHints *fLayoutExpandXY;
TGLayoutHints *fLayoutExpandXYMargin;
TGLayoutHints *fLayoutExpandXCenterYMargin;
void AddMenus(TGCompositeFrame *p);
void DoNew();
void DoDelete();
void DoRename();
void DoExport();
void DoExit();
void DoHelp(Int_t i);
void DoImportCanvas();
void CreateMacro();
void AddToolbar(TGCompositeFrame *p);
void AddTopLevelInterface(TGCompositeFrame *cf);
void UpdateStatusBar();
void UpdateEditor(Int_t tabNum);
void ConnectAll();
void DisconnectAll();
void ConnectEditor(Int_t tabNum);
void DisconnectEditor(Int_t tabNum);
void DoEditor();
void AddEdition(TGCompositeFrame *p);
void CreateTabGeneral(TGCompositeFrame *tab);
void AddGeneralLine(TGCompositeFrame *f);
void AddGeneralFill(TGCompositeFrame *f);
void AddGeneralText(TGCompositeFrame *f);
void AddGeneralMarker(TGCompositeFrame *f);
void CreateTabCanvas(TGCompositeFrame *tab);
void AddCanvasFill(TGCompositeFrame *f);
void AddCanvasGeometry(TGCompositeFrame *f);
void AddCanvasBorder(TGCompositeFrame *f);
void AddCanvasDate(TGCompositeFrame *f);
void CreateTabPad(TGCompositeFrame *tab);
void AddPadMargin(TGCompositeFrame *f);
void AddPadBorder(TGCompositeFrame *f);
void AddPadFill(TGCompositeFrame *f);
void AddPadTicks(TGCompositeFrame *f);
void AddPadGrid(TGCompositeFrame *f);
void CreateTabHistos(TGCompositeFrame *tab);
void CreateTabHistosHistos(TGCompositeFrame *tab);
void AddHistosHistosFill(TGCompositeFrame *f);
void AddHistosHistosLine(TGCompositeFrame *f);
void AddHistosHistosBar(TGCompositeFrame *f);
void AddHistosHistosContours(TGCompositeFrame *f);
void AddHistosHistosAxis(TGCompositeFrame *f);
void AddHistosHistosLegoInnerR(TGCompositeFrame *f);
void CreateTabHistosFrames(TGCompositeFrame *tab);
void AddHistosFramesFill(TGCompositeFrame *f);
void AddHistosFramesLine(TGCompositeFrame *f);
void AddHistosFramesBorder(TGCompositeFrame *f);
void CreateTabHistosGraphs(TGCompositeFrame *tab);
void AddHistosGraphsLine(TGCompositeFrame *f);
void AddHistosGraphsBorder(TGCompositeFrame *f);
void AddHistosGraphsErrors(TGCompositeFrame *f);
void CreateTabAxis(TGCompositeFrame *tab);
void CreateTabAxisX(TGCompositeFrame *tab);
void AddAxisXTitle(TGCompositeFrame *f);
void AddAxisXLine(TGCompositeFrame *f);
void AddAxisXLabels(TGCompositeFrame *f);
void AddAxisXDivisions(TGCompositeFrame *f);
void CreateTabAxisY(TGCompositeFrame *tab);
void AddAxisYTitle(TGCompositeFrame *f);
void AddAxisYLine(TGCompositeFrame *f);
void AddAxisYLabels(TGCompositeFrame *f);
void AddAxisYDivisions(TGCompositeFrame *f);
void CreateTabAxisZ(TGCompositeFrame *tab);
void AddAxisZTitle(TGCompositeFrame *f);
void AddAxisZLine(TGCompositeFrame *f);
void AddAxisZLabels(TGCompositeFrame *f);
void AddAxisZDivisions(TGCompositeFrame *f);
void CreateTabTitle(TGCompositeFrame *tab);
void AddTitleFill(TGCompositeFrame *f);
void AddTitleBorderSize(TGCompositeFrame *f);
void AddTitleText(TGCompositeFrame *f);
void AddTitleGeometry(TGCompositeFrame *f);
void CreateTabStats(TGCompositeFrame *tab);
void AddStatsFill(TGCompositeFrame *f);
void AddStatsText(TGCompositeFrame *f);
void AddStatsGeometry(TGCompositeFrame *f);
void AddStatsStats(TGCompositeFrame *f);
void AddStatsFit(TGCompositeFrame *f);
void CreateTabPsPdf(TGCompositeFrame *tab);
void AddPsPdfHeader(TGCompositeFrame *f);
void AddPsPdfTitle(TGCompositeFrame *f);
void AddPsPdfColorModel(TGCompositeFrame *f);
void AddPsPdfPaperSize(TGCompositeFrame *f);
void AddPsPdfLineScale(TGCompositeFrame *f);
void AddTitle(TGCompositeFrame *f, const char *s);
TGColorSelect *AddColorEntry(TGCompositeFrame *f, Int_t id);
TGedPatternSelect *AddFillStyleEntry(TGCompositeFrame *f, Int_t id);
TGedMarkerSelect *AddMarkerStyleEntry(TGCompositeFrame *f, Int_t id);
TGComboBox *AddMarkerSizeEntry(TGCompositeFrame *f, Int_t id);
TGNumberEntry *AddNumberEntry(TGCompositeFrame *f, Int_t e1, Int_t e2,
Int_t e3, Int_t id, const char *s, Double_t init, Int_t digits,
TGNumberFormat::EStyle nfS, TGNumberFormat::EAttribute nfA,
TGNumberFormat::ELimit nfL, Double_t min, Double_t max);
TGLineWidthComboBox *AddLineWidthEntry(TGCompositeFrame *f, Int_t id);
TGLineStyleComboBox *AddLineStyleEntry(TGCompositeFrame *f, Int_t id);
TGTextButton *AddTextButton(TGCompositeFrame *f, const char *s, Int_t id);
TGFontTypeComboBox *AddFontTypeEntry(TGCompositeFrame *f, Int_t id);
TGComboBox *AddTextAlignEntry(TGCompositeFrame *f, Int_t id);
TGButtonGroup *AddBorderModeEntry(TGCompositeFrame *f, Int_t id1, Int_t id2, Int_t id3);
TGComboBox *AddDateFormatEntry(TGCompositeFrame *f, Int_t id);
TGCheckButton *AddCheckButton(TGCompositeFrame *f, const char *s, Int_t id, Int_t e1 = 0, Int_t e2 = 2);
TGTextEntry *AddTextEntry(TGCompositeFrame *f, const char *s, Int_t id);
TGComboBox *AddPaperSizeEntry(TGCompositeFrame *f, Int_t id);
public:
TStyleManager(const TGWindow *);
virtual ~TStyleManager();
static void Show();
static void Terminate();
static TStyleManager *&GetSM();
void Init();
void Hide();
void SetCurSelStyle(TStyle *style) { fCurSelStyle = style; }
void SetLastChoice(Bool_t choice) { fLastChoice = choice; }
void DoMenu(Int_t menuID);
void DoImportMacro(Bool_t create);
void DoListSelect();
void DoRealTime(Bool_t b);
void DoPreview(Bool_t b);
void DoPreviewClosed();
void DoMakeDefault();
void DoApplyOnSelect(Int_t i);
void DoApplyOn();
void DoMoreLess();
void DoEditionUpdatePreview();
void DoChangeTab(Int_t i);
void DoChangeAxisTab(Int_t i);
void BuildList(TStyle *style = 0);
void DoSelectNoCanvas();
void DoSelectCanvas(TVirtualPad *pad,
TObject *obj, Int_t mouseButton);
void CloseWindow();
void ModFillColor();
void ModFillStyle();
void ModHatchesLineWidth();
void ModHatchesSpacing();
void ModMarkerColor();
void ModMarkerStyle();
void ModMarkerSize();
void ModScreenFactor();
void ModLineColor();
void ModLineWidth();
void ModLineStyle();
void ModLineStyleEdit();
void ModTextColor();
void ModTextSize();
void ModTextSizeInPixels(Bool_t b);
void ModTextFont();
void ModTextAlign();
void ModTextAngle();
void ModCanvasColor();
void ModCanvasDefX();
void ModCanvasDefY();
void ModCanvasDefW();
void ModCanvasDefH();
void ModCanvasBorderMode();
void ModCanvasBorderSize();
void ModOptDateBool();
void ModAttDateTextColor();
void ModAttDateTextSize();
void ModAttDateTextSizeInPixels(Bool_t b);
void ModOptDateFormat();
void ModAttDateTextFont();
void ModAttDateTextAngle();
void ModAttDateTextAlign();
void ModDateX();
void ModDateY();
void ModPadTopMargin();
void ModPadBottomMargin();
void ModPadLeftMargin();
void ModPadRightMargin();
void ModPadBorderMode();
void ModPadBorderSize();
void ModPadColor();
void ModPadTickX();
void ModPadTickY();
void ModPadGridX();
void ModPadGridY();
void ModGridColor();
void ModGridWidth();
void ModGridStyle();
void ModHistFillColor();
void ModHistFillStyle();
void ModHistLineColor();
void ModHistLineWidth();
void ModHistLineStyle();
void ModBarWidth();
void ModBarOffset();
void ModHistMinimumZero();
void ModPaintTextFormat();
void ModNumberContours();
void ModLegoInnerR();
void ModFrameFillColor();
void ModFrameFillStyle();
void ModFrameLineColor();
void ModFrameLineWidth();
void ModFrameLineStyle();
void ModPaletteEdit();
void ModFrameBorderMode();
void ModFrameBorderSize();
void ModFuncColor();
void ModFuncWidth();
void ModFuncStyle();
void ModDrawBorder();
void ModEndErrorSize();
void ModErrorX();
void ModTimeOffset();
void ModStripDecimals();
void ModApplyOnXYZ();
void ModXTitleSize();
void ModXTitleSizeInPixels(Bool_t b);
void ModXTitleColor();
void ModXTitleOffset();
void ModXTitleFont();
void ModXLabelSize();
void ModXLabelSizeInPixels(Bool_t b);
void ModXLabelColor();
void ModXLabelOffset();
void ModXLabelFont();
void ModXAxisColor();
void ModXTickLength();
void ModOptLogx();
void ModXNdivisions();
void ModYTitleSize();
void ModYTitleSizeInPixels(Bool_t b);
void ModYTitleColor();
void ModYTitleOffset();
void ModYTitleFont();
void ModYLabelSize();
void ModYLabelSizeInPixels(Bool_t b);
void ModYLabelColor();
void ModYLabelOffset();
void ModYLabelFont();
void ModYAxisColor();
void ModYTickLength();
void ModOptLogy();
void ModYNdivisions();
void ModZTitleSize();
void ModZTitleSizeInPixels(Bool_t b);
void ModZTitleColor();
void ModZTitleOffset();
void ModZTitleFont();
void ModZLabelSize();
void ModZLabelSizeInPixels(Bool_t b);
void ModZLabelColor();
void ModZLabelOffset();
void ModZLabelFont();
void ModZAxisColor();
void ModZTickLength();
void ModOptLogz();
void ModZNdivisions();
void ModOptTitle();
void ModTitleFillColor();
void ModTitleStyle();
void ModTitleTextColor();
void ModTitleFontSize();
void ModTitleFontSizeInPixels(Bool_t b);
void ModTitleFont();
void ModTitleAlign();
void ModTitleBorderSize();
void ModTitleX();
void ModTitleY();
void ModTitleW();
void ModTitleH();
void ModLegendBorderSize();
void ModStatColor(Pixel_t color);
void ModStatStyle(Style_t pattern);
void ModStatTextColor(Pixel_t color);
void ModStatFontSize();
void ModStatFontSizeInPixels(Bool_t b);
void ModStatFont();
void ModStatX();
void ModStatY();
void ModStatW();
void ModStatH();
void ModStatBorderSize();
void ModOptStat();
void ModStatFormat(const char *sformat);
void ModOptFit();
void ModFitFormat(const char *fitformat);
void ModHeaderPS();
void ModTitlePS();
void ModColorModelPS();
void ModLineScalePS();
void ModPaperSizePredef();
void ModPaperSizeXY();
ClassDef(TStyleManager, 0)
};
#endif