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
16#include "TControlBarButton.h"
17
18#include "TControlBarImp.h"
19
20class TList;
21
23
24friend class TControlBarImp;
25
26private:
27 virtual void Create();
28 void Initialize(Int_t x, Int_t y);
29
30protected:
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
37public:
38 enum { kVertical = 1, kHorizontal = 2 };
39
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);
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
int Int_t
Definition: RtypesCore.h:41
unsigned int UInt_t
Definition: RtypesCore.h:42
#define ClassDef(name, id)
Definition: Rtypes.h:326
include TDocParser_001 C image html pict1_TDocParser_001 png width
Definition: TDocParser.cxx:121
int type
Definition: TGX11.cxx:120
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:22
void SetFont(const char *fontName)
Sets new font for control bar buttons, e.g.
TList * fButtons
list of buttons
Definition: TControlBar.h:34
void Show()
Show control bar.
Int_t fOrientation
orientation
Definition: TControlBar.h:33
Int_t GetNumberOfColumns() const
Definition: TControlBar.h:54
void AddSeparator()
Add separator.
Int_t fNoroc
number of rows or columns
Definition: TControlBar.h:35
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:52
TControlBarImp * fControlBarImp
system specific implementation
Definition: TControlBar.h:32
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:62
Int_t GetOrientation() const
Definition: TControlBar.h:56
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:61
TControlBar()
Default constructor.
Definition: TControlBar.cxx:91
void Hide()
Hide control bar.
TList * GetListOfButtons() const
Definition: TControlBar.h:53
Int_t GetNumberOfRows() const
Definition: TControlBar.h:55
A doubly linked list.
Definition: TList.h:44
Double_t y[n]
Definition: legend1.C:17
Double_t x[n]
Definition: legend1.C:17
const Int_t n
Definition: legend1.C:16