GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
TGo4LabelPainter Class Reference

#include <TGo4LabelPainter.h>

+ Inheritance diagram for TGo4LabelPainter:

Public Member Functions

 TGo4LabelPainter ()
 
 TGo4LabelPainter (const char *name, const char *title=nullptr)
 
virtual ~TGo4LabelPainter ()
 
virtual void PaintLabel (Option_t *opt="")
 
virtual void UnPaintLabel (Option_t *opt="")
 
virtual void RePaintLabel (Option_t *opt="")
 
virtual void DisplayToFront (Option_t *opt="")
 
void SetCaption (const char *txt)
 
void SetX0 (Double_t x=0.)
 
void SetY0 (Double_t y=0.)
 
void SetWidth (Double_t w=0.)
 
void SetHeight (Double_t h=0.)
 
void AddToLabel (const char *txt)
 
void InitAttributes ()
 
Double_t GetLabelXlo ()
 
Double_t GetLabelYlo ()
 
Double_t GetLabelXup ()
 
Double_t GetLabelYup ()
 

Private Member Functions

TGo4LabelCreateCurrentLabel (Double_t x, Double_t y)
 
void LabelCoords (Double_t &xmin, Double_t &ymin, Double_t &xmax, Double_t &ymax)
 
Bool_t CheckLabel ()
 

Private Attributes

TGo4LabelfxLabel {nullptr}
 
Double_t fdX0 {0}
 
Double_t fdY0 {0}
 
Double_t fdWidth {0}
 
Double_t fdHeight {0}
 
TString fxCaption
 
Bool_t fbIsLabStreamed {kFALSE}
 

Detailed Description

Base class for painters providing a textlabel for additional information. To be inherited by condition painters and marker painters.

Since
6/2004
Author
J. Adamczewski

Definition at line 97 of file TGo4LabelPainter.h.

Constructor & Destructor Documentation

◆ TGo4LabelPainter() [1/2]

TGo4LabelPainter::TGo4LabelPainter ( )

Definition at line 19 of file TGo4LabelPainter.cxx.

References InitAttributes().

◆ TGo4LabelPainter() [2/2]

TGo4LabelPainter::TGo4LabelPainter ( const char *  name,
const char *  title = nullptr 
)

Definition at line 28 of file TGo4LabelPainter.cxx.

References InitAttributes().

◆ ~TGo4LabelPainter()

TGo4LabelPainter::~TGo4LabelPainter ( )
virtual

Definition at line 50 of file TGo4LabelPainter.cxx.

References fxLabel.

Member Function Documentation

◆ AddToLabel()

void TGo4LabelPainter::AddToLabel ( const char *  txt)
inline

◆ CheckLabel()

Bool_t TGo4LabelPainter::CheckLabel ( )
private

Check if label is still existing. Uses root list of cleanups.

Definition at line 141 of file TGo4LabelPainter.cxx.

References fbIsLabStreamed, fxLabel, TGo4Label::fxLastDeleted, and TGo4Label::SetOwner().

Referenced by PaintLabel(), and UnPaintLabel().

◆ CreateCurrentLabel()

TGo4Label * TGo4LabelPainter::CreateCurrentLabel ( Double_t  x,
Double_t  y 
)
private

Create Label at the window coords.

Definition at line 127 of file TGo4LabelPainter.cxx.

References LabelCoords(), and TGo4Label::SetOwner().

Referenced by PaintLabel().

◆ DisplayToFront()

void TGo4LabelPainter::DisplayToFront ( Option_t *  opt = "")
virtual

◆ GetLabelXlo()

Double_t TGo4LabelPainter::GetLabelXlo ( )

Reference coordinate x of label box (lower left corner)

Definition at line 176 of file TGo4LabelPainter.cxx.

References fxLabel.

Referenced by TGo4MarkerPainter::PaintConnector().

◆ GetLabelXup()

Double_t TGo4LabelPainter::GetLabelXup ( )

Reference coordinate x of label box (upper right corner)

Definition at line 186 of file TGo4LabelPainter.cxx.

References fxLabel.

Referenced by TGo4MarkerPainter::PaintConnector().

◆ GetLabelYlo()

Double_t TGo4LabelPainter::GetLabelYlo ( )

Reference coordinate y of label box (lower left corner)

Definition at line 181 of file TGo4LabelPainter.cxx.

References fxLabel.

Referenced by TGo4MarkerPainter::PaintConnector().

◆ GetLabelYup()

Double_t TGo4LabelPainter::GetLabelYup ( )

Reference coordinate y of label box (upper right corner)

Definition at line 191 of file TGo4LabelPainter.cxx.

References fxLabel, and TGo4Label::fxLastDeleted.

Referenced by TGo4MarkerPainter::PaintConnector().

◆ InitAttributes()

void TGo4LabelPainter::InitAttributes ( )

Initialize the label attributes

Definition at line 37 of file TGo4LabelPainter.cxx.

References fdHeight, fdWidth, and SetCaption().

Referenced by TGo4LabelPainter().

◆ LabelCoords()

void TGo4LabelPainter::LabelCoords ( Double_t &  xmin,
Double_t &  ymin,
Double_t &  xmax,
Double_t &  ymax 
)
private

Evaluate coordinates for new label for given xmin, ymin with respect to pad size

Definition at line 160 of file TGo4LabelPainter.cxx.

References fdHeight, and fdWidth.

Referenced by CreateCurrentLabel(), and PaintLabel().

◆ PaintLabel()

void TGo4LabelPainter::PaintLabel ( Option_t *  opt = "")
virtual

◆ RePaintLabel()

void TGo4LabelPainter::RePaintLabel ( Option_t *  opt = "")
virtual

refresh painting of label with current attributes

Definition at line 115 of file TGo4LabelPainter.cxx.

References fxLabel, and TGo4Label::Paint().

Referenced by TGo4MarkerPainter::PaintLabel(), and TGo4ConditionPainter::PaintLabel().

◆ SetCaption()

void TGo4LabelPainter::SetCaption ( const char *  txt)
inline

◆ SetHeight()

void TGo4LabelPainter::SetHeight ( Double_t  h = 0.)
inline

Definition at line 119 of file TGo4LabelPainter.h.

◆ SetWidth()

void TGo4LabelPainter::SetWidth ( Double_t  w = 0.)
inline

Definition at line 118 of file TGo4LabelPainter.h.

◆ SetX0()

void TGo4LabelPainter::SetX0 ( Double_t  x = 0.)
inline

◆ SetY0()

void TGo4LabelPainter::SetY0 ( Double_t  y = 0.)
inline

◆ UnPaintLabel()

void TGo4LabelPainter::UnPaintLabel ( Option_t *  opt = "")
virtual

Member Data Documentation

◆ fbIsLabStreamed

Bool_t TGo4LabelPainter::fbIsLabStreamed {kFALSE}
private

Flag to handle streamed label from file correctly

Definition at line 158 of file TGo4LabelPainter.h.

Referenced by CheckLabel().

◆ fdHeight

Double_t TGo4LabelPainter::fdHeight {0}
private

initial height relative to whole pad

Definition at line 152 of file TGo4LabelPainter.h.

Referenced by InitAttributes(), and LabelCoords().

◆ fdWidth

Double_t TGo4LabelPainter::fdWidth {0}
private

initial width relative to whole pad

Definition at line 149 of file TGo4LabelPainter.h.

Referenced by InitAttributes(), and LabelCoords().

◆ fdX0

Double_t TGo4LabelPainter::fdX0 {0}
private

initial reference coordinates x

Definition at line 143 of file TGo4LabelPainter.h.

Referenced by PaintLabel().

◆ fdY0

Double_t TGo4LabelPainter::fdY0 {0}
private

initial reference coordinates y

Definition at line 146 of file TGo4LabelPainter.h.

Referenced by PaintLabel().

◆ fxCaption

TString TGo4LabelPainter::fxCaption
private

Headline for the label

Definition at line 155 of file TGo4LabelPainter.h.

Referenced by PaintLabel().

◆ fxLabel

TGo4Label* TGo4LabelPainter::fxLabel {nullptr}
private

The documentation for this class was generated from the following files: