Logo ROOT   6.14/05
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 #include "TControlBarButton.h"
17 
18 #include "TControlBarImp.h"
19 
20 class TList;
21 
23 
24 friend class TControlBarImp;
25 
26 private:
27  virtual void Create();
28  void Initialize(Int_t x, Int_t y);
29 
30 protected:
31 
32  TControlBarImp *fControlBarImp; ///< system specific implementation
33  Int_t fOrientation; ///< orientation
34  TList *fButtons; ///< list of buttons
35  Int_t fNoroc; ///< number of rows or columns
36 
37 public:
38  enum { kVertical = 1, kHorizontal = 2 };
39 
40  TControlBar();
41  TControlBar(const char *orientation, const char *title="");
42  TControlBar(const char *orientation, const char *title, Int_t x, Int_t y);
43  virtual ~TControlBar();
44 
45  void AddButton(TControlBarButton *button);
46  void AddButton(TControlBarButton &button);
47  void AddButton(const char *label, const char *action, const char *hint="", const char *type="button");
48  void AddControlBar(TControlBar *controlBar);
49  void AddControlBar(TControlBar &controlBar);
50  void AddSeparator();
53  TList *GetListOfButtons() const { return fButtons; }
54  Int_t GetNumberOfColumns() const { return fNoroc; }
55  Int_t GetNumberOfRows() const { return fNoroc; }
56  Int_t GetOrientation() const { return fOrientation; }
57  void Hide();
58  void SetButtonState(const char *label, Int_t state = 0);
59  void SetFont(const char *fontName);
60  void SetTextColor(const char *colorName);
61  void SetNumberOfColumns(Int_t n) { fNoroc = n; }
62  void SetNumberOfRows(Int_t n) { fNoroc = n; }
63  void SetOrientation(const char *o);
64  void SetOrientation(Int_t o);
66  void Show();
67 
68  ClassDef(TControlBar,0) //Control bar
69 };
70 
71 #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:22
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.
image html pict1_TGaxis_012 png width
Define new text attributes for the label number "labNum".
Definition: TGaxis.cxx:2551
ABC describing GUI independent control bar.
Int_t fOrientation
orientation
Definition: TControlBar.h:33
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:320
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:32
A doubly linked list.
Definition: TList.h:44
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:61
Int_t GetOrientation() const
Definition: TControlBar.h:56
Int_t GetNumberOfColumns() const
Definition: TControlBar.h:54
virtual void Create()
Create control bar.
Int_t GetNumberOfRows() const
Definition: TControlBar.h:55
void SetNumberOfRows(Int_t n)
Definition: TControlBar.h:62
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:53
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:35
TControlBarImp * GetControlBarImp() const
Definition: TControlBar.h:52
TList * fButtons
list of buttons
Definition: TControlBar.h:34