Logo ROOT  
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 #include "TControlBarButton.h"
16 
17 #ifdef R__LESS_INCLUDES
18 class TObjArray;
19 class TControlBarImp;
20 #else
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);
67  void SetOrientation(const char *o);
68  void SetOrientation(Int_t o);
70  void Show();
71 
72  ClassDef(TControlBar,0) //Control bar
73 };
74 
75 #endif
TControlBarImp
ABC describing GUI independent control bar.
Definition: TControlBarImp.h:30
TControlBar::fNoroc
Int_t fNoroc
number of rows or columns
Definition: TControlBar.h:39
TControlBar::AddSeparator
void AddSeparator()
Add separator.
Definition: TControlBar.cxx:182
n
const Int_t n
Definition: legend1.C:16
TControlBar::Show
void Show()
Show control bar.
Definition: TControlBar.cxx:321
TObjArray
An array of TObjects.
Definition: TObjArray.h:37
TControlBar::AddButton
void AddButton(TControlBarButton *button)
Add button.
Definition: TControlBar.cxx:147
TControlBar::~TControlBar
virtual ~TControlBar()
Destructor.
Definition: TControlBar.cxx:125
TControlBar::SetTextColor
void SetTextColor(const char *colorName)
Sets text color for control bar buttons, e.g.
Definition: TControlBar.cxx:246
TControlBar::GetControlBarImp
TControlBarImp * GetControlBarImp() const
Definition: TControlBar.h:56
TControlBar::TControlBar
TControlBar()
Default constructor.
Definition: TControlBar.cxx:92
TControlBar::kHorizontal
@ kHorizontal
Definition: TControlBar.h:42
width
include TDocParser_001 C image html pict1_TDocParser_001 png width
Definition: TDocParser.cxx:121
Int_t
int Int_t
Definition: RtypesCore.h:45
x
Double_t x[n]
Definition: legend1.C:17
TControlBarImp.h
TControlBar::fControlBarImp
TControlBarImp * fControlBarImp
system specific implementation
Definition: TControlBar.h:36
TControlBarButton.h
TControlBar::fOrientation
Int_t fOrientation
orientation
Definition: TControlBar.h:37
TControlBar
A Control Bar is a fully user configurable tool which provides fast access to frequently used operati...
Definition: TControlBar.h:26
TControlBar::Initialize
void Initialize(Int_t x, Int_t y)
Initialize control bar.
Definition: TControlBar.cxx:209
TControlBar::SetNumberOfColumns
void SetNumberOfColumns(Int_t n)
Definition: TControlBar.h:65
TControlBar::Create
virtual void Create()
Create control bar.
Definition: TControlBar.cxx:189
TControlBar::GetNumberOfColumns
Int_t GetNumberOfColumns() const
Definition: TControlBar.h:58
UInt_t
unsigned int UInt_t
Definition: RtypesCore.h:46
TControlBar::SetButtonWidth
void SetButtonWidth(UInt_t width)
Sets the width in pixels for control bar button.
Definition: TControlBar.cxx:281
y
Double_t y[n]
Definition: legend1.C:17
TControlBar::Hide
void Hide()
Hide control bar.
Definition: TControlBar.cxx:199
TControlBar::GetClicked
TControlBarButton * GetClicked() const
Returns a pointer to the last clicked control bar button; null if no button was clicked yet.
Definition: TControlBar.cxx:331
TControlBar::GetNumberOfRows
Int_t GetNumberOfRows() const
Definition: TControlBar.h:59
TControlBar::GetOrientation
Int_t GetOrientation() const
Definition: TControlBar.h:60
TControlBar::kVertical
@ kVertical
Definition: TControlBar.h:42
TControlBar::SetNumberOfRows
void SetNumberOfRows(Int_t n)
Definition: TControlBar.h:66
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TControlBar::SetButtonState
void SetButtonState(const char *label, Int_t state=0)
Sets a state for control bar button 'label'; possible states are 0-kButtonUp, 1-kButtonDown,...
Definition: TControlBar.cxx:268
TControlBar::fButtons
TList * fButtons
list of buttons
Definition: TControlBar.h:38
type
int type
Definition: TGX11.cxx:121
TControlBar::SetOrientation
void SetOrientation(const char *o)
Set control bar orientation.
Definition: TControlBar.cxx:289
TControlBar::AddControlBar
void AddControlBar(TControlBar *controlBar)
Add control bar.
Definition: TControlBar.cxx:173
TControlBar::GetListOfButtons
TList * GetListOfButtons() const
Definition: TControlBar.h:57
TControlBarButton
This class defines the control bar buttons.
Definition: TControlBarButton.h:17
TControlBar::SetFont
void SetFont(const char *fontName)
Sets new font for control bar buttons, e.g.
Definition: TControlBar.cxx:234
TList
A doubly linked list.
Definition: TList.h:44
int