ROOT  6.06/09
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 #ifndef ROOT_TControlBarImp
27 #include "TControlBarImp.h"
28 #endif
29 #ifndef ROOT_TGFrame
30 #include "TGFrame.h"
31 #endif
32 
33 class TControlBar;
34 class TList;
35 
36 
37 class TRootControlBar : public TGMainFrame, public TControlBarImp {
38 
39 private:
40  TList *fWidgets; // list of TGTextButton or TGPictureButtons
41  TGLayoutHints *fL1; // button layout hints
42  UInt_t fBwidth; // button width in pixels
43 
44 public:
45  TRootControlBar(TControlBar *c = 0, const char *title = "ROOT Control Bar",
46  Int_t x = -999, Int_t y = -999);
47  virtual ~TRootControlBar();
48 
49  void Create();
50  void Hide();
51  void Show();
52 
53  TList *GetWidgets() const { return fWidgets; }
54 
55  // overridden from TGMainFrame
56  void CloseWindow();
57  Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
58  void ReallyDelete();
59  void SetButtonState(const char *label, Int_t state = 0);
60  void SetButtonWidth(UInt_t width);
61  void SetFont(const char *fontName);
62  void SetTextColor(const char *colorName);
63 
64  ClassDef(TRootControlBar,0) //ROOT native GUI implementation of TControlBar
65 };
66 
67 #endif
TRootControlBar(TControlBar *c=0, const char *title="ROOT Control Bar", Int_t x=-999, Int_t y=-999)
A Control Bar is a fully user configurable tool which provides fast access to frequently used operati...
Definition: TControlBar.h:37
void Create()
Create the control bar.
ABC describing GUI independent control bar.
void SetTextColor(const char *colorName)
sets text color for control bar buttons, e.g.
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
void ReallyDelete()
Really delete the control bar and the this GUI.
Double_t x[n]
Definition: legend1.C:17
#define ClassDef(name, id)
Definition: Rtypes.h:254
virtual ~TRootControlBar()
Delete the control bar implementation.
A doubly linked list.
Definition: TList.h:47
unsigned int UInt_t
Definition: RtypesCore.h:42
void SetButtonWidth(UInt_t width)
Set button width in pixels.
TGLayoutHints * fL1
long Long_t
Definition: RtypesCore.h:50
void Hide()
Hide controlbar.
TList * GetWidgets() const
Double_t y[n]
Definition: legend1.C:17
void SetFont(const char *fontName)
sets new font for control bar buttons
void CloseWindow()
Called when closed via window manager action.
void Show()
Show controlbar. If not yet created create it first.
void SetButtonState(const char *label, Int_t state=0)
sets new font for control bar buttons
Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Handle controlbar button messages.