76 if (fStatusInfo)
delete fStatusInfo;
84void TGStatusBarPart::DoRedraw()
111 int max_ascent, max_descent;
113 int ht = max_ascent + max_descent;
130 for (
int i = 0; i <
fNpart; i++) {
146 if (partidx < 0 || partidx >=
fNpart) {
147 Error(
"SetText",
"partidx out of range (0,%d)",
fNpart-1);
159 if ((partidx >= 0) && (partidx <
fNpart))
168 if (partidx < 0 || partidx >=
fNpart) {
169 Error(
"GetText",
"partidx out of range (0,%d)",
fNpart-1);
184 for (i = 0; i <
fNpart; i++) {
192 for (i = 0; i <
fNpart; i++) {
243 for (
int i = 0; i <
fNpart; i++)
254 Warning(
"SetParts",
"must be at least one part");
258 Error(
"SetParts",
"to many parts (limit is 15)");
263 for (i = 0; i <
fNpart; i++)
276 for (i = 0; i < npart; i++) {
282 Error(
"SetParts",
"sum of part > 100");
285 fParts[npart-1] += 100 - tot;
295 Warning(
"SetParts",
"must be at least one part");
299 Error(
"SetParts",
"to many parts (limit is 40)");
304 for (i = 0; i <
fNpart; i++)
318 for (i = 0; i < npart; i++) {
325 fParts[npart-1] += 100 - tot;
367 for (
int i = 0; i <
fNpart; i++) {
381 out <<
" // status bar" << std::endl;
383 out <<
" TGStatusBar *";
389 out <<
");" << std::endl;
396 if (option && strstr(option,
"keep_names"))
397 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
399 int i;
char quote =
'"';
402 out <<
" Int_t parts" <<
GetName()+5 <<
"[] = {" <<
fParts[0];
404 for (i=1; i<
fNpart; i++) {
407 out <<
"};" << std::endl;
410 <<
"," <<
fNpart <<
");" <<std::endl;
412 for (i=0; i<
fNpart; i++) {
414 out <<
" " <<
GetName() <<
"->SetText(" << quote
416 << quote <<
"," << i <<
");" << std::endl;
419 out <<
" TGCompositeFrame *" <<
fStatusPart[i]->GetName()
420 <<
" = " <<
GetName() <<
"->GetBarPart(" << i <<
");" << std::endl;
427 out <<
" " <<
fStatusPart[i]->GetName() <<
"->AddFrame("
430 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.
virtual void MapWindow()
map window
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()
destroy window
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)