1 #ifndef Fireworks_TableWidget_FWTextTreeCellRenderer_h 2 #define Fireworks_TableWidget_FWTextTreeCellRenderer_h 11 #include "TGTextEntry.h" 12 #include "TGPicture.h" 37 static TString
path = Form(
"%s/src/Fireworks/Core/icons/",gSystem->Getenv(
"CMSSW_BASE"));
38 if ( gSystem->AccessPathName(path.Data()) ){
39 assert(gSystem->Getenv(
"CMSSW_RELEASE_BASE"));
40 path = Form(
"%s/src/Fireworks/Core/icons/",gSystem->Getenv(
"CMSSW_RELEASE_BASE"));
49 static const TGPicture* s_picture_white = gClient->GetPicture(
coreIcondir()+
"arrow-white-right-blackbg.png");
50 static const TGPicture* s_picture_black = gClient->GetPicture(
coreIcondir()+
"arrow-black-right.png");
52 return isBlack ? s_picture_black : s_picture_white;
58 static const TGPicture* s_picture_white = gClient->GetPicture(
coreIcondir()+
"arrow-white-down-blackbg.png");
59 static const TGPicture* s_picture_black = gClient->GetPicture(
coreIcondir()+
"arrow-black-down.png");
61 return isBlack ? s_picture_black : s_picture_white;
87 void draw(Drawable_t iID,
int iX,
int iY,
unsigned int iWidth,
unsigned int iHeight)
override 95 editGC.SetForeground(
m_editor->GetBackground());
133 FontMetrics_t metrics;
134 font()->GetFontMetrics(&metrics);
static const TGPicture * closedImage(bool isBlack=true)
void setBlackIcon(bool value)
void setIsOpen(bool value)
const TGGC * highlightContext() const
UInt_t width() const override
returns the minimum width of the cell to which the renderer is representing
void draw(Drawable_t iID, int iX, int iY, unsigned int iWidth, unsigned int iHeight) override
static const TString & coreIcondir()
static const int s_iconOffset
static const TGGC & getDefaultGC()
const TGFont * font() const
UInt_t width() const override
returns the minimum width of the cell to which the renderer is representing
virtual void setCellEditor(TGTextEntry *editor)
static const TGGC & getDefaultHighlightGC()
void setIsParent(bool value)
const TGGC * graphicsContext() const
virtual void setIndentation(int indentation=0)
const std::string & data()
constexpr int16_t xOffset
static const TGPicture * openedImage(bool isBlack=true)
FWTextTreeCellRenderer(const TGGC *iContext=&(getDefaultGC()), const TGGC *iHighlightContext=&(getDefaultHighlightGC()), Justify iJustify=kJustifyLeft)
virtual void showEditor(bool value)