Logo ROOT   6.08/07
Reference Guide
TControlBar.h
Go to the documentation of this file.
1 // @(#)root/gpad:$Id$
2 // Author: Nenad Buncic 20/02/96
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TControlBar
13 #define ROOT_TControlBar
14 
15 
16 #ifndef ROOT_TControlBarButton
17 #include "TControlBarButton.h"
18 #endif
19 
20 #ifndef ROOT_TControlBarImp
21 #include "TControlBarImp.h"
22 #endif
23 
24 class TList;
25 
27 
28 friend class TControlBarImp;
29 
30 private:
31  virtual void Create();
32  void Initialize(Int_t x, Int_t y);
33 
34 protected:
35 
36  TControlBarImp *fControlBarImp; ///< system specific implementation
37  Int_t fOrientation; ///< orientation
38  TList *fButtons; ///< list of buttons
39  Int_t fNoroc; ///< number of rows or columns
40 
41 public:
42  enum { kVertical = 1, kHorizontal = 2 };
43 
44  TControlBar();
45  TControlBar(const char *orientation, const char *title="");
46  TControlBar(const char *orientation, const char *title, Int_t x, Int_t y);
47  virtual ~TControlBar();
48 
49  void AddButton(TControlBarButton *button);
50  void AddButton(TControlBarButton &button);
51  void AddButton(const char *label, const char *action, const char *hint="", const char *type="button");
52  void AddControlBar(TControlBar *controlBar);
53  void AddControlBar(TControlBar &controlBar);
54  void AddSeparator();
57  TList *GetListOfButtons() const { return fButtons; }
58  Int_t GetNumberOfColumns() const { return fNoroc; }
59  Int_t GetNumberOfRows() const { return fNoroc; }
60  Int_t GetOrientation() const { return fOrientation; }
61  void Hide();
62  void SetButtonState(const char *label, Int_t state = 0);
63  void SetFont(const char *fontName);
64  void SetTextColor(const char *colorName);
65  void SetNumberOfColumns(Int_t n) { fNoroc = n; }
66  void SetNumberOfRows(Int_t n) { fNoroc = n; }
67  void SetOrientation(const char *o);
68  void SetOrientation(Int_t o);
69  void SetButtonWidth(UInt_t width);
70  void Show();
71 
72  ClassDef(TControlBar,0) //Control bar
73 };
74 
75 #endif
void Show()
Show control bar.
void AddButton(TControlBarButton *button)
Add button.
TControlBar()
Default constructor.
Definition: TControlBar.cxx:91
A Control Bar is a fully user configurable tool which provides fast access to frequently used operati...
Definition: TControlBar.h:26
void SetTextColor(const char *colorName)
Sets text color for control bar buttons, e.g.
void SetFont(const char *fontName)
Sets new font for control bar buttons, e.g.
ABC describing GUI independent control bar.
Int_t fOrientation
orientation
Definition: TControlBar.h:37
int Int_t
Definition: RtypesCore.h:41
virtual ~TControlBar()
Destructor.
Double_t x[n]
Definition: legend1.C:17
#define ClassDef(name, id)
Definition: Rtypes.h:254
void SetButtonWidth(UInt_t width)
Sets the width in pixels for control bar button.
TControlBarButton * GetClicked() const
Returns a pointer to the last clicked control bar button; null if no button was clicked yet...
TControlBarImp * fControlBarImp
system specific implementation
Definition: TControlBar.h:36
A doubly linked list.
Definition: TList.h:47
void Initialize(Int_t x, Int_t y)
Initialize control bar.
unsigned int UInt_t
Definition: RtypesCore.h:42
void SetNumberOfColumns(Int_t n)
Definition: TControlBar.h:65
Int_t GetOrientation() const
Definition: TControlBar.h:60
Int_t GetNumberOfColumns() const
Definition: TControlBar.h:58
virtual void Create()
Create control bar.
Int_t GetNumberOfRows() const
Definition: TControlBar.h:59
void SetNumberOfRows(Int_t n)
Definition: TControlBar.h:66
int type
Definition: TGX11.cxx:120
void AddControlBar(TControlBar *controlBar)
Add control bar.
Double_t y[n]
Definition: legend1.C:17
void Hide()
Hide control bar.
TList * GetListOfButtons() const
Definition: TControlBar.h:57
void SetOrientation(const char *o)
Set control bar orientation.
void AddSeparator()
Add separator.
void SetButtonState(const char *label, Int_t state=0)
Sets a state for control bar button &#39;label&#39;; possible states are 0-kButtonUp, 1-kButtonDown, 2-kButtonEngaged, 3-kButtonDisabled,.
This class defines the control bar buttons.
const Int_t n
Definition: legend1.C:16
Int_t fNoroc
number of rows or columns
Definition: TControlBar.h:39
TControlBarImp * GetControlBarImp() const
Definition: TControlBar.h:56
TList * fButtons
list of buttons
Definition: TControlBar.h:38