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,
123 FontMetrics_t metrics;
124 font()->GetFontMetrics(&metrics);
126 gVirtualX->DrawString(iID,
129 iY + metrics.fAscent,
static const TGPicture * closedImage(bool isBlack=true)
const edm::EventSetup & c
void setBlackIcon(bool value)
void setIsOpen(bool value)
const TGGC * highlightContext() const
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
UInt_t width() const override
returns the minimum width of the cell to which the renderer is representing
static const TGGC & getDefaultGC()
const TGFont * font() const
virtual void setCellEditor(TGTextEntry *editor)
static const TGGC & getDefaultHighlightGC()
void setIsParent(bool value)
const TGGC * graphicsContext() const
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()
constexpr int16_t xOffset
static const TGPicture * openedImage(bool isBlack=true)
FWTextTreeCellRenderer(const TGGC *iContext=&(getDefaultGC()), const TGGC *iHighlightContext=&(getDefaultHighlightGC()), Justify iJustify=kJustifyLeft)
tuple size
Write out results.
virtual void showEditor(bool value)