Logo ROOT  
Reference Guide
TRootControlBar.h
Go to the documentation of this file.
1 // @(#)root/gui:$Id$
2 // Author: Fons Rademakers 22/02/98
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_TRootControlBar
13 #define ROOT_TRootControlBar
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TRootControlBar //
19 // //
20 // This class provides an interface to the GUI dependent functions of //
21 // the TControlBar class. A control bar is a horizontal or vertical bar //
22 // with a number of buttons (text or picture buttons). //
23 // //
24 //////////////////////////////////////////////////////////////////////////
25 
26 #include "TControlBarImp.h"
27 #include "TGFrame.h"
28 
29 class TControlBar;
30 class TList;
31 
32 
33 class TRootControlBar : public TGMainFrame, public TControlBarImp {
34 
35 private:
36  TList *fWidgets; // list of TGTextButton or TGPictureButtons
37  TGLayoutHints *fL1; // button layout hints
38  UInt_t fBwidth; // button width in pixels
39 
40 public:
41  TRootControlBar(TControlBar *c = 0, const char *title = "ROOT Control Bar",
42  Int_t x = -999, Int_t y = -999);
43  virtual ~TRootControlBar();
44 
45  void Create();
46  void Hide();
47  void Show();
48 
49  TList *GetWidgets() const { return fWidgets; }
50 
51  // overridden from TGMainFrame
52  void CloseWindow();
53  Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
54  void ReallyDelete();
55  void SetButtonState(const char *label, Int_t state = 0);
57  void SetFont(const char *fontName);
58  void SetTextColor(const char *colorName);
59 
60  ClassDef(TRootControlBar,0) //ROOT native GUI implementation of TControlBar
61 };
62 
63 #endif
TControlBarImp
Definition: TControlBarImp.h:30
c
#define c(i)
Definition: RSha256.hxx:119
TRootControlBar::SetFont
void SetFont(const char *fontName)
sets new font for control bar buttons
Definition: TRootControlBar.cxx:169
TRootControlBar::Show
void Show()
Show controlbar. If not yet created create it first.
Definition: TRootControlBar.cxx:121
TGMainFrame
Definition: TGFrame.h:444
TRootControlBar::CloseWindow
void CloseWindow()
Called when closed via window manager action.
Definition: TRootControlBar.cxx:161
TRootControlBar::fWidgets
TList * fWidgets
Definition: TRootControlBar.h:36
width
include TDocParser_001 C image html pict1_TDocParser_001 png width
Definition: TDocParser.cxx:121
Int_t
int Int_t
Definition: RtypesCore.h:45
x
Double_t x[n]
Definition: legend1.C:17
TControlBarImp.h
TRootControlBar::SetTextColor
void SetTextColor(const char *colorName)
sets text color for control bar buttons, e.g.
Definition: TRootControlBar.cxx:228
Bool_t
bool Bool_t
Definition: RtypesCore.h:63
TRootControlBar::ReallyDelete
void ReallyDelete()
Really delete the control bar and the this GUI.
Definition: TRootControlBar.cxx:153
TControlBar
Definition: TControlBar.h:26
TRootControlBar::Create
void Create()
Create the control bar.
Definition: TRootControlBar.cxx:67
TRootControlBar::~TRootControlBar
virtual ~TRootControlBar()
Delete the control bar implementation.
Definition: TRootControlBar.cxx:57
TRootControlBar::Hide
void Hide()
Hide controlbar.
Definition: TRootControlBar.cxx:131
TRootControlBar::ProcessMessage
Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Handle controlbar button messages.
Definition: TRootControlBar.cxx:139
TRootControlBar::fL1
TGLayoutHints * fL1
Definition: TRootControlBar.h:37
TGFrame.h
Long_t
long Long_t
Definition: RtypesCore.h:54
TRootControlBar::SetButtonState
void SetButtonState(const char *label, Int_t state=0)
sets new font for control bar buttons
Definition: TRootControlBar.cxx:186
TGLayoutHints
Definition: TGLayout.h:57
UInt_t
unsigned int UInt_t
Definition: RtypesCore.h:46
y
Double_t y[n]
Definition: legend1.C:17
TRootControlBar
Definition: TRootControlBar.h:33
unsigned int
TRootControlBar::fBwidth
UInt_t fBwidth
Definition: TRootControlBar.h:38
TRootControlBar::SetButtonWidth
void SetButtonWidth(UInt_t width)
Set button width in pixels.
Definition: TRootControlBar.cxx:250
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TRootControlBar::TRootControlBar
TRootControlBar(TControlBar *c=0, const char *title="ROOT Control Bar", Int_t x=-999, Int_t y=-999)
Create a ROOT native GUI controlbar.
Definition: TRootControlBar.cxx:33
TList
Definition: TList.h:44
TRootControlBar::GetWidgets
TList * GetWidgets() const
Definition: TRootControlBar.h:49
int