00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef ROOT_TControlBar
00013 #define ROOT_TControlBar
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef ROOT_TControlBarButton
00028 #include "TControlBarButton.h"
00029 #endif
00030
00031 #ifndef ROOT_TControlBarImp
00032 #include "TControlBarImp.h"
00033 #endif
00034
00035 class TList;
00036
00037 class TControlBar : public TControlBarButton {
00038
00039 friend class TControlBarImp;
00040
00041 private:
00042 virtual void Create();
00043 void Initialize(Int_t x, Int_t y);
00044
00045 protected:
00046
00047 TControlBarImp *fControlBarImp;
00048 Int_t fOrientation;
00049 TList *fButtons;
00050 Int_t fNoroc;
00051
00052 public:
00053 enum { kVertical = 1, kHorizontal = 2 };
00054
00055 TControlBar();
00056 TControlBar(const char *orientation, const char *title="");
00057 TControlBar(const char *orientation, const char *title, Int_t x, Int_t y);
00058 virtual ~TControlBar();
00059
00060 void AddButton(TControlBarButton *button);
00061 void AddButton(TControlBarButton &button);
00062 void AddButton(const char *label, const char *action, const char *hint="", const char *type="button");
00063 void AddControlBar(TControlBar *controlBar);
00064 void AddControlBar(TControlBar &controlBar);
00065 void AddSeparator();
00066 TControlBarButton *GetClicked() const;
00067 TControlBarImp *GetControlBarImp() const { return fControlBarImp; }
00068 TList *GetListOfButtons() const { return fButtons; }
00069 Int_t GetNumberOfColumns() const { return fNoroc; }
00070 Int_t GetNumberOfRows() const { return fNoroc; }
00071 Int_t GetOrientation() const { return fOrientation; }
00072 void Hide();
00073 void SetButtonState(const char *label, Int_t state = 0);
00074 void SetFont(const char *fontName);
00075 void SetTextColor(const char *colorName);
00076 void SetNumberOfColumns(Int_t n) { fNoroc = n; }
00077 void SetNumberOfRows(Int_t n) { fNoroc = n; }
00078 void SetOrientation(const char *o);
00079 void SetOrientation(Int_t o);
00080 void SetButtonWidth(UInt_t width);
00081 void Show();
00082
00083 ClassDef(TControlBar,0)
00084 };
00085
00086 #endif