Logo ROOT  
Reference Guide
No Matches
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 void DoRedraw() override;
43 static const TGGC &GetDefaultGC();
46 TGStatusBar(const TGWindow *p = nullptr, UInt_t w = 4, UInt_t h = 2,
49 ~TGStatusBar() override;
51 void DrawBorder() override;
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;
61 TGDimension GetDefaultSize() const override;
63 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
65 ClassDefOverride(TGStatusBar,0) // Status bar widget
@ kSunkenFrame
Definition GuiTypes.h:383
@ kHorizontalFrame
Definition GuiTypes.h:382
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:40
Handle_t FontStruct_t
Pointer to font structure.
Definition GuiTypes.h:39
#define h(i)
Definition RSha256.hxx:106
int Int_t
Definition RtypesCore.h:45
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t option
Option_t Option_t TPoint TPoint const char text
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:385
Provides a StatusBar widget.
Definition TGStatusBar.h:21
static FontStruct_t GetDefaultFontStruct()
Return default font structure in use.
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
~TGStatusBar() override
Delete status bar widget.
void DrawBorder() override
Draw the status bar border (including cute 3d corner).
void DoRedraw() override
Redraw status bar.
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
TGDimension GetDefaultSize() const override
Return default size.
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
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a status bar widget as a C++ statement(s) on output stream out.
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