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