Logo ROOT  
Reference Guide
Go to the documentation of this file.
1// @(#)root/gpad:$Id$
2// Author: Nenad Buncic 20/02/96
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 *************************************************************************/
12#ifndef ROOT_TControlBar
13#define ROOT_TControlBar
15#include "TControlBarButton.h"
18class TObjArray;
19class TControlBarImp;
21#include "TControlBarImp.h"
24class TList;
28friend class TControlBarImp;
31 void Create() override;
32 void Initialize(Int_t x, Int_t y);
36 TControlBarImp *fControlBarImp{nullptr}; ///< system specific implementation
37 Int_t fOrientation{0}; ///< orientation
38 TList *fButtons{nullptr}; ///< list of buttons
39 Int_t fNoroc{1}; ///< number of rows or columns
42 enum { kVertical = 1, kHorizontal = 2 };
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();
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();
int Int_t
Definition: RtypesCore.h:45
unsigned int UInt_t
Definition: RtypesCore.h:46
#define ClassDefOverride(name, id)
Definition: Rtypes.h:339
Option_t Option_t width
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t button
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
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()
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 Create() override
Create control bar.
void SetNumberOfRows(Int_t n)
Definition: TControlBar.h:66
Int_t GetOrientation() const
Definition: TControlBar.h:60
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
Default constructor.
Definition: TControlBar.cxx:90
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:38
An array of TObjects.
Definition: TObjArray.h:31
Double_t y[n]
Definition: legend1.C:17
Double_t x[n]
Definition: legend1.C:17
const Int_t n
Definition: legend1.C:16