Logo ROOT  
Reference Guide
Go to the documentation of this file.
1// @(#)root/gui:$Id$
2// Author: Fons Rademakers 23/01/98
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 *************************************************************************/
12#ifndef ROOT_TGStatusBar
13#define ROOT_TGStatusBar
16#include "TGFrame.h"
18class TGStatusBarPart;
23friend class TGStatusBarPart;
26 TGStatusBar(const TGStatusBar&) = delete;
30 TGStatusBarPart **fStatusPart; ///< frames containing statusbar text
31 Int_t *fParts; ///< size of parts (in percent of total width)
32 Int_t fNpart; ///< number of parts
33 Int_t fYt; ///< y drawing position (depending on font)
34 Int_t *fXt; ///< x position for each part
35 Bool_t f3DCorner; ///< draw 3D corner (drawn by default)
37 static const TGFont *fgDefaultFont;
40 virtual void DoRedraw();
43 static const TGGC &GetDefaultGC();
46 TGStatusBar(const TGWindow *p = nullptr, UInt_t w = 4, UInt_t h = 2,
49 virtual ~TGStatusBar();
51 virtual void DrawBorder();
52 virtual void SetText(TGString *text, Int_t partidx = 0);
53 virtual void SetText(const char *text, Int_t partidx = 0);
54 void AddText(const char *text, Int_t partidx = 0)
55 { SetText(text, partidx); } //*MENU*
56 const char *GetText(Int_t partidx = 0) const;
57 virtual void SetParts(Int_t npart); //*MENU*
58 virtual void SetParts(Int_t *parts, Int_t npart);
59 void Draw3DCorner(Bool_t corner) { f3DCorner = corner; }
60 TGCompositeFrame *GetBarPart(Int_t npart) const;
63 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
65 ClassDef(TGStatusBar,0) // Status bar widget
@ kSunkenFrame
Definition: GuiTypes.h:383
@ kHorizontalFrame
Definition: GuiTypes.h:382
Handle_t FontStruct_t
Pointer to font structure.
Definition: GuiTypes.h:39
ULong_t Pixel_t
Pixel value.
Definition: GuiTypes.h:40
#define h(i)
Definition: RSha256.hxx:106
int Int_t
Definition: RtypesCore.h:45
unsigned int UInt_t
Definition: RtypesCore.h:46
bool Bool_t
Definition: RtypesCore.h:63
const char Option_t
Definition: RtypesCore.h:66
#define ClassDef(name, id)
Definition: Rtypes.h:325
The base class for composite widgets (menu bars, list boxes, etc.).
Definition: TGFrame.h:287
Encapsulate fonts used in the GUI system.
Definition: TGFont.h:140
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:683
Encapsulate a graphics context used in the low level graphics.
Definition: TGGC.h:22
A composite frame that layout their children in horizontal way.
Definition: TGFrame.h:386
Provides a StatusBar widget.
Definition: TGStatusBar.h:21
virtual ~TGStatusBar()
Delete status bar widget.
static FontStruct_t GetDefaultFontStruct()
Return default font structure in use.
TGDimension GetDefaultSize() const
Return default size.
void AddText(const char *text, Int_t partidx=0)
Definition: TGStatusBar.h:54
Int_t * fParts
size of parts (in percent of total width)
Definition: TGStatusBar.h:31
static const TGGC & GetDefaultGC()
Return default graphics context in use.
const char * GetText(Int_t partidx=0) const
return text in the part partidx
Int_t * fXt
x position for each part
Definition: TGStatusBar.h:34
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a status bar widget as a C++ statement(s) on output stream out.
static const TGFont * fgDefaultFont
Definition: TGStatusBar.h:37
void Draw3DCorner(Bool_t corner)
Definition: TGStatusBar.h:59
Int_t fYt
y drawing position (depending on font)
Definition: TGStatusBar.h:33
virtual void DoRedraw()
Redraw status bar.
TGCompositeFrame * GetBarPart(Int_t npart) const
Returns bar part.
virtual void SetText(TGString *text, Int_t partidx=0)
Set text in partition partidx in status bar.
TGStatusBar & operator=(const TGStatusBar &)=delete
Int_t fNpart
number of parts
Definition: TGStatusBar.h:32
static TGGC * fgDefaultGC
Definition: TGStatusBar.h:38
virtual void SetParts(Int_t npart)
Divide the status bar in npart equal sized parts.
Bool_t f3DCorner
draw 3D corner (drawn by default)
Definition: TGStatusBar.h:35
TGStatusBar(const TGStatusBar &)=delete
TGStatusBarPart ** fStatusPart
frames containing statusbar text
Definition: TGStatusBar.h:30
virtual void DrawBorder()
Draw the status bar border (including cute 3d corner).
TGString wraps a TString and adds some graphics routines like drawing, size of string on screen depen...
Definition: TGString.h:20
ROOT GUI Window base class.
Definition: TGWindow.h:23
TText * text