1 #ifndef Fireworks_TableWidget_FWTextTreeCellRenderer_h 2 #define Fireworks_TableWidget_FWTextTreeCellRenderer_h 11 #include "TGTextEntry.h" 12 #include "TGPicture.h" 15 #include "TVirtualX.h" 35 static TString
path = Form(
"%s/src/Fireworks/Core/icons/", gSystem->Getenv(
"CMSSW_BASE"));
36 if (gSystem->AccessPathName(
path.Data())) {
37 assert(gSystem->Getenv(
"CMSSW_RELEASE_BASE"));
38 path = Form(
"%s/src/Fireworks/Core/icons/", gSystem->Getenv(
"CMSSW_RELEASE_BASE"));
45 static const TGPicture* s_picture_white = gClient->GetPicture(
coreIcondir() +
"arrow-white-right-blackbg.png");
46 static const TGPicture* s_picture_black = gClient->GetPicture(
coreIcondir() +
"arrow-black-right.png");
48 return isBlack ? s_picture_black : s_picture_white;
52 static const TGPicture* s_picture_white = gClient->GetPicture(
coreIcondir() +
"arrow-white-down-blackbg.png");
53 static const TGPicture* s_picture_black = gClient->GetPicture(
coreIcondir() +
"arrow-black-down.png");
55 return isBlack ? s_picture_black : s_picture_white;
75 void draw(Drawable_t iID,
int iX,
int iY,
unsigned int iWidth,
unsigned int iHeight)
override {
81 editGC.SetForeground(
m_editor->GetBackground());
82 gVirtualX->FillRectangle(iID,
109 gVirtualX->FillRectangle(iID,
126 gVirtualX->DrawString(iID,
static const TGPicture * closedImage(bool isBlack=true)
void setBlackIcon(bool value)
void setIsOpen(bool value)
void draw(Drawable_t iID, int iX, int iY, unsigned int iWidth, unsigned int iHeight) override
const TGGC * graphicsContext() const
static const TString & coreIcondir()
static const int s_iconOffset
const TGGC * highlightContext() const
UInt_t width() const override
returns the minimum width of the cell to which the renderer is representing
static const TGGC & getDefaultGC()
virtual void setCellEditor(TGTextEntry *editor)
static const TGGC & getDefaultHighlightGC()
void setIsParent(bool value)
UInt_t width() const override
returns the minimum width of the cell to which the renderer is representing
virtual void setIndentation(int indentation=0)
const std::string & data()
const TGFont * font() const
static const TGPicture * openedImage(bool isBlack=true)
FWTextTreeCellRenderer(const TGGC *iContext=&(getDefaultGC()), const TGGC *iHighlightContext=&(getDefaultHighlightGC()), Justify iJustify=kJustifyLeft)
virtual void showEditor(bool value)