75 if (fStatusInfo)
delete fStatusInfo;
83 void TGStatusBarPart::DoRedraw()
110 int max_ascent, max_descent;
112 int ht = max_ascent + max_descent;
129 for (
int i = 0; i <
fNpart; i++) {
145 if (partidx < 0 || partidx >=
fNpart) {
146 Error(
"SetText",
"partidx out of range (0,%d)",
fNpart-1);
158 if ((partidx >= 0) && (partidx <
fNpart))
167 if (partidx < 0 || partidx >=
fNpart) {
168 Error(
"GetText",
"partidx out of range (0,%d)",
fNpart-1);
183 for (i = 0; i <
fNpart; i++) {
191 for (i = 0; i <
fNpart; i++) {
242 for (
int i = 0; i <
fNpart; i++)
253 Warning(
"SetParts",
"must be at least one part");
257 Error(
"SetParts",
"to many parts (limit is 15)");
262 for (i = 0; i <
fNpart; i++)
275 for (i = 0; i < npart; i++) {
281 Error(
"SetParts",
"sum of part > 100");
284 fParts[npart-1] += 100 - tot;
294 Warning(
"SetParts",
"must be at least one part");
298 Error(
"SetParts",
"to many parts (limit is 40)");
303 for (i = 0; i <
fNpart; i++)
317 for (i = 0; i < npart; i++) {
324 fParts[npart-1] += 100 - tot;
366 for (
int i = 0; i <
fNpart; i++) {
380 out <<
" // status bar" << std::endl;
382 out <<
" TGStatusBar *";
388 out <<
");" << std::endl;
395 if (option && strstr(option,
"keep_names"))
396 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
398 int i;
char quote =
'"';
401 out <<
" Int_t parts" <<
GetName()+5 <<
"[] = {" <<
fParts[0];
403 for (i=1; i<
fNpart; i++) {
404 out <<
"," << fParts[i];
406 out <<
"};" << std::endl;
409 <<
"," << fNpart <<
");" <<std::endl;
411 for (i=0; i<
fNpart; i++) {
413 out <<
" " <<
GetName() <<
"->SetText(" << quote
415 << quote <<
"," << i <<
");" << std::endl;
418 out <<
" TGCompositeFrame *" <<
fStatusPart[i]->GetName()
419 <<
" = " <<
GetName() <<
"->GetBarPart(" << i <<
");" << std::endl;
426 out <<
" " <<
fStatusPart[i]->GetName() <<
"->AddFrame(" 429 out <<
");" << std::endl;
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
virtual UInt_t GetOptions() const
static const TGGC & GetHilightGC()
Get highlight color graphics context.
static const TGGC & GetDefaultGC()
Return default graphics context in use.
virtual UInt_t GetDefaultHeight() const
friend class TGStatusBarPart
virtual void DoRedraw()
Redraw the frame.
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
virtual TList * GetList() const
virtual void SetText(TGString *text, Int_t partidx=0)
Set text in partition partidx in status bar.
TGStatusBarPart ** fStatusPart
void SetFont(FontH_t v)
Set font.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a frame widget as a C++ statement(s) on output stream out.
TGDimension GetDefaultSize() const
Return default size.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
const char * GetText(Int_t partidx=0) const
return text in the part partidx
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
TGStatusBar(const TGStatusBar &)
static TGGC * fgDefaultGC
FontStruct_t GetFontStruct() const
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
TGCompositeFrame * GetBarPart(Int_t npart) const
Returns bar part.
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
Short_t Max(Short_t a, Short_t b)
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
virtual void SetParts(Int_t npart)
Divide the status bar in npart equal sized parts.
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
virtual void DoRedraw()
Redraw status bar.
static FontStruct_t GetDefaultFontStruct()
Return default font structure in use.
static const TGGC & GetShadowGC()
Get shadow color graphics context.
static const TGGC & GetBckgndGC()
Get background color graphics context.
virtual void DestroyWindow()
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual void Draw(Drawable_t id, GContext_t gc, Int_t x, Int_t y)
Draw string.
virtual Int_t MustCleanup() const
const char * Data() const
FontH_t GetFontHandle() const