ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 /////////////////////////////////////////////////////////////////////////
17 // //
18 // TControlBar //
19 // //
20 // ControlBar is a fully user configurable tool which provides fast //
21 // access to frequently used operations. The user can choose between //
22 // buttons and drawnbuttons (let's say icons) and assign to them their //
23 // own actions (let's say ROOT or C++ commands). //
24 // //
25 /////////////////////////////////////////////////////////////////////////
26 
27 #ifndef ROOT_TControlBarButton
28 #include "TControlBarButton.h"
29 #endif
30 
31 #ifndef ROOT_TControlBarImp
32 #include "TControlBarImp.h"
33 #endif
34 
35 class TList;
36 
38 
39 friend class TControlBarImp;
40 
41 private:
42  virtual void Create();
43  void Initialize(Int_t x, Int_t y);
44 
45 protected:
46 
47  TControlBarImp *fControlBarImp; //system specific implementation
48  Int_t fOrientation; //orientation
49  TList *fButtons; //list of buttons
50  Int_t fNoroc; //number of rows or columns
51 
52 public:
53  enum { kVertical = 1, kHorizontal = 2 };
54 
55  TControlBar();
56  TControlBar(const char *orientation, const char *title="");
57  TControlBar(const char *orientation, const char *title, Int_t x, Int_t y);
58  virtual ~TControlBar();
59 
60  void AddButton(TControlBarButton *button);
61  void AddButton(TControlBarButton &button);
62  void AddButton(const char *label, const char *action, const char *hint="", const char *type="button");
63  void AddControlBar(TControlBar *controlBar);
64  void AddControlBar(TControlBar &controlBar);
65  void AddSeparator();
68  TList *GetListOfButtons() const { return fButtons; }
69  Int_t GetNumberOfColumns() const { return fNoroc; }
70  Int_t GetNumberOfRows() const { return fNoroc; }
71  Int_t GetOrientation() const { return fOrientation; }
72  void Hide();
73  void SetButtonState(const char *label, Int_t state = 0);
74  void SetFont(const char *fontName);
75  void SetTextColor(const char *colorName);
78  void SetOrientation(const char *o);
79  void SetOrientation(Int_t o);
80  void SetButtonWidth(UInt_t width);
81  void Show();
82 
83  ClassDef(TControlBar,0) //Control bar
84 };
85 
86 #endif
void Show()
Show control bar.
TList * GetListOfButtons() const
Definition: TControlBar.h:68
void AddButton(TControlBarButton *button)
Add button.
A Control Bar is a fully user configurable tool which provides fast access to frequently used operati...
Definition: TControlBar.h:37
void SetTextColor(const char *colorName)
Sets text color for control bar buttons, e.g.
TControlBarImp * GetControlBarImp() const
Definition: TControlBar.h:67
void SetFont(const char *fontName)
Sets new font for control bar buttons, e.g.
ABC describing GUI independent control bar.
Int_t fOrientation
Definition: TControlBar.h:48
Int_t GetNumberOfRows() const
Definition: TControlBar.h:70
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.
TControlBarImp * fControlBarImp
Definition: TControlBar.h:47
A doubly linked list.
Definition: TList.h:47
TPaveLabel title(3, 27.1, 15, 28.7,"ROOT Environment and Tools")
TControlBarButton * GetClicked() const
Returns a pointer to the last clicked control bar button; null if no button was clicked yet...
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:76
virtual void Create()
Create control bar.
Int_t GetOrientation() const
Definition: TControlBar.h:71
void SetNumberOfRows(Int_t n)
Definition: TControlBar.h:77
int type
Definition: TGX11.cxx:120
void AddControlBar(TControlBar *controlBar)
Add control bar.
Double_t y[n]
Definition: legend1.C:17
Int_t GetNumberOfColumns() const
Definition: TControlBar.h:69
void Hide()
Hide control bar.
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 'label'; possible states are 0-kButtonUp, 1-kButtonDown, 2-kButtonEngaged, 3-kButtonDisabled,.
Created by the TControlBar.
const Int_t n
Definition: legend1.C:16
Int_t fNoroc
Definition: TControlBar.h:50
TList * fButtons
Definition: TControlBar.h:49