75 if (fStatusInfo)
delete fStatusInfo;
83void 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++) {
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;
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
virtual TList * GetList() const
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
virtual Int_t MustCleanup() const
virtual UInt_t GetDefaultHeight() const
FontStruct_t GetFontStruct() const
FontH_t GetFontHandle() const
virtual void DoRedraw()
Redraw the frame.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a frame widget as a C++ statement(s) on output stream out.
static const TGGC & GetHilightGC()
Get highlight color graphics context.
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
virtual UInt_t GetOptions() const
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
static const TGGC & GetShadowGC()
Get shadow color graphics context.
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
static const TGGC & GetBckgndGC()
Get background color graphics context.
void SetFont(FontH_t v)
Set font.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
TGStatusBar(const TGStatusBar &)
virtual ~TGStatusBar()
Delete status bar widget.
static FontStruct_t GetDefaultFontStruct()
Return default font structure in use.
TGDimension GetDefaultSize() const
Return default size.
static const TGGC & GetDefaultGC()
Return default graphics context in use.
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.
static const TGFont * fgDefaultFont
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.
static TGGC * fgDefaultGC
virtual void SetParts(Int_t npart)
Divide the status bar in npart equal sized parts.
friend class TGStatusBarPart
TGStatusBarPart ** fStatusPart
virtual void DrawBorder()
Draw the status bar border (including cute 3d corner).
virtual void Draw(Drawable_t id, GContext_t gc, Int_t x, Int_t y)
Draw string.
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
virtual void DestroyWindow()
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
const char * Data() const
Short_t Max(Short_t a, Short_t b)