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