Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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-2021, 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#include "TControlBarImp.h"
17#include "TGFrame.h"
18
19class TControlBar;
20class TList;
21
22
24
25private:
26 TList *fWidgets; ///< list of TGTextButton or TGPictureButtons
27 TGLayoutHints *fL1; ///< button layout hints
28 UInt_t fBwidth; ///< button width in pixels
29
30public:
31 TRootControlBar(TControlBar *c = nullptr, const char *title = "ROOT Control Bar",
32 Int_t x = -999, Int_t y = -999);
33 ~TRootControlBar() override;
34
35 void Create() override;
36 void Hide() override;
37 void Show() override;
38
39 TList *GetWidgets() const { return fWidgets; }
40
41 // overridden from TGMainFrame
42 void CloseWindow() override;
43 Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2) override;
44 void ReallyDelete() override;
45 void SetButtonState(const char *label, Int_t state = 0) override;
46 void SetButtonWidth(UInt_t width) override;
47 void SetFont(const char *fontName) override;
48 void SetTextColor(const char *colorName) override;
49
50 ClassDefOverride(TRootControlBar,0) //ROOT native GUI implementation of TControlBar
51};
52
53#endif
#define c(i)
Definition RSha256.hxx:101
bool Bool_t
Definition RtypesCore.h:63
int Int_t
Definition RtypesCore.h:45
long Longptr_t
Definition RtypesCore.h:82
unsigned int UInt_t
Definition RtypesCore.h:46
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t width
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
This class describes layout hints used by the layout classes.
Definition TGLayout.h:50
Defines top level windows that interact with the system Window Manager.
Definition TGFrame.h:397
A doubly linked list.
Definition TList.h:38
This class provides an interface to the GUI dependent functions of the TControlBar class.
TList * GetWidgets() const
void Show() override
Show controlbar. If not yet created create it first.
void SetFont(const char *fontName) override
sets new font for control bar buttons
Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2) override
Handle controlbar button messages.
void SetTextColor(const char *colorName) override
sets text color for control bar buttons, e.g.: root > .x tutorials/demos.C root > bar->SetTextColor("...
void ReallyDelete() override
Really delete the control bar and the this GUI.
UInt_t fBwidth
button width in pixels
void CloseWindow() override
Called when closed via window manager action.
void SetButtonWidth(UInt_t width) override
Set button width in pixels.
void SetButtonState(const char *label, Int_t state=0) override
sets new font for control bar buttons
void Hide() override
Hide controlbar.
TList * fWidgets
list of TGTextButton or TGPictureButtons
void Create() override
Create the control bar.
~TRootControlBar() override
Delete the control bar implementation.
TGLayoutHints * fL1
button layout hints
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17