ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TGStatusBar.h
Go to the documentation of this file.
1 // @(#)root/gui:$Id$
2 // Author: Fons Rademakers 23/01/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_TGStatusBar
13 #define ROOT_TGStatusBar
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TGStatusBar //
19 // //
20 // Provides a StatusBar widget. //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 #ifndef ROOT_TGFrame
25 #include "TGFrame.h"
26 #endif
27 
28 class TGStatusBarPart;
29 
30 
32 
33 friend class TGStatusBarPart;
34 
35 private:
36  TGStatusBar(const TGStatusBar&); // not implemented
37  TGStatusBar& operator=(const TGStatusBar&); // not implemented
38 
39 protected:
40  TGStatusBarPart **fStatusPart; // frames containing statusbar text
41  Int_t *fParts; // size of parts (in percent of total width)
42  Int_t fNpart; // number of parts
43  Int_t fYt; // y drawing position (depending on font)
44  Int_t *fXt; // x position for each part
45  Bool_t f3DCorner; // draw 3D corner (drawn by default)
46 
47  static const TGFont *fgDefaultFont;
48  static TGGC *fgDefaultGC;
49 
50  virtual void DoRedraw();
51 
53  static const TGGC &GetDefaultGC();
54 
55 public:
56  TGStatusBar(const TGWindow *p = 0, UInt_t w = 4, UInt_t h = 2,
59  virtual ~TGStatusBar();
60 
61  virtual void DrawBorder();
62  virtual void SetText(TGString *text, Int_t partidx = 0);
63  virtual void SetText(const char *text, Int_t partidx = 0);
64  void AddText(const char *text, Int_t partidx = 0)
65  { SetText(text, partidx); } //*MENU*
66  const char *GetText(Int_t partidx = 0) const;
67  virtual void SetParts(Int_t npart); //*MENU*
68  virtual void SetParts(Int_t *parts, Int_t npart);
69  void Draw3DCorner(Bool_t corner) { f3DCorner = corner; }
70  TGCompositeFrame *GetBarPart(Int_t npart) const;
72 
73  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
74 
75  ClassDef(TGStatusBar,0) // Status bar widget
76 };
77 
78 #endif
Handle_t FontStruct_t
Definition: GuiTypes.h:40
const char Option_t
Definition: RtypesCore.h:62
TH1 * h
Definition: legend2.C:5
void Draw3DCorner(Bool_t corner)
Definition: TGStatusBar.h:69
static const TGGC & GetDefaultGC()
Return default graphics context in use.
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
friend class TGStatusBarPart
Definition: TGStatusBar.h:33
TGDimension GetDefaultSize() const
Return default size.
#define ClassDef(name, id)
Definition: Rtypes.h:254
ULong_t Pixel_t
Definition: GuiTypes.h:41
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:665
Bool_t f3DCorner
Definition: TGStatusBar.h:45
virtual void SetText(TGString *text, Int_t partidx=0)
Set text in partition partidx in status bar.
TGStatusBarPart ** fStatusPart
Definition: TGStatusBar.h:40
char * out
Definition: TBase64.cxx:29
Int_t * fParts
Definition: TGStatusBar.h:41
TGStatusBar & operator=(const TGStatusBar &)
unsigned int UInt_t
Definition: RtypesCore.h:42
tuple w
Definition: qtexample.py:51
TGStatusBar(const TGStatusBar &)
static TGGC * fgDefaultGC
Definition: TGStatusBar.h:48
TText * text
Definition: TGFont.h:155
void AddText(const char *text, Int_t partidx=0)
Definition: TGStatusBar.h:64
const char * GetText(Int_t partidx=0) const
return text in the part partidx
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a status bar widget as a C++ statement(s) on output stream out.
virtual void DrawBorder()
Draw the status bar border (including cute 3d corner).
virtual ~TGStatusBar()
Delete status bar widget.
static const TGFont * fgDefaultFont
Definition: TGStatusBar.h:47
Int_t * fXt
Definition: TGStatusBar.h:44
virtual void SetParts(Int_t npart)
Divide the status bar in npart equal sized parts.
Int_t fNpart
Definition: TGStatusBar.h:42
virtual void DoRedraw()
Redraw status bar.
static FontStruct_t GetDefaultFontStruct()
Return default font structure in use.
Definition: TGGC.h:35
TGCompositeFrame * GetBarPart(Int_t npart) const
Returns bar part.