1 #ifndef Fireworks_TableWidget_FWTextTreeCellRenderer_h 2 #define Fireworks_TableWidget_FWTextTreeCellRenderer_h 11 #include "TGTextEntry.h" 12 #include "TGPicture.h" 34 static TString
path = Form(
"%s/src/Fireworks/Core/icons/", gSystem->Getenv(
"CMSSW_BASE"));
35 if (gSystem->AccessPathName(path.Data())) {
36 assert(gSystem->Getenv(
"CMSSW_RELEASE_BASE"));
37 path = Form(
"%s/src/Fireworks/Core/icons/", gSystem->Getenv(
"CMSSW_RELEASE_BASE"));
44 static const TGPicture* s_picture_white = gClient->GetPicture(
coreIcondir() +
"arrow-white-right-blackbg.png");
45 static const TGPicture* s_picture_black = gClient->GetPicture(
coreIcondir() +
"arrow-black-right.png");
47 return isBlack ? s_picture_black : s_picture_white;
51 static const TGPicture* s_picture_white = gClient->GetPicture(
coreIcondir() +
"arrow-white-down-blackbg.png");
52 static const TGPicture* s_picture_black = gClient->GetPicture(
coreIcondir() +
"arrow-black-down.png");
54 return isBlack ? s_picture_black : s_picture_white;
74 void draw(Drawable_t iID,
int iX,
int iY,
unsigned int iWidth,
unsigned int iHeight)
override {
80 editGC.SetForeground(
m_editor->GetBackground());
81 gVirtualX->FillRectangle(iID,
108 gVirtualX->FillRectangle(iID,
122 FontMetrics_t metrics;
123 font()->GetFontMetrics(&metrics);
125 gVirtualX->DrawString(iID,
128 iY + metrics.fAscent,
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)