17 #include "TVirtualX.h"
35 : m_context(iContext),
36 m_highlightContext(iHighlightContext),
41 m_font = gClient->GetFontPool()->FindFontByHandle(
m_context->GetFont());
69 gVirtualX->FillRectangle(iID,
83 FontMetrics_t metrics;
84 m_font->GetFontMetrics(&metrics);
92 dX = (iWidth -
w) / 2;
95 gVirtualX->DrawString(iID,
m_context->GetGC(), iX + dX, iY + metrics.fAscent + 1,
m_data.c_str(),
m_data.size());
120 return m_font->TextHeight();
129 static const TGGC* s_default = gClient->GetResourcePool()->GetFrameGC();
135 static const TGGC* s_default =
nullptr;
138 gval.fMask = kGCForeground | kGCBackground | kGCStipple | kGCFillStyle | kGCGraphicsExposures;
139 gval.fForeground = gVirtualX->GetPixel(kGray);
140 gval.fBackground = gVirtualX->GetPixel(kWhite);
141 gval.fFillStyle = kFillOpaqueStippled;
142 gval.fStipple = gClient->GetResourcePool()->GetCheckeredBitmap();
143 gval.fGraphicsExposures = kFALSE;
144 s_default = gClient->GetGC(&gval, kTRUE);
const edm::EventSetup & c
void draw(Drawable_t iID, int iX, int iY, unsigned int iWidth, unsigned int iHeight) override
FWTextTableCellRenderer(const TGGC *iContext=&(getDefaultGC()), const TGGC *iHighlightContext=&(getDefaultHighlightGC()), Justify iJustify=kJustifyLeft)
UInt_t height() const override
returns the minimum height of the cell to which the renderer is representing
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
const TGGC * m_highlightContext
static const TGGC & getDefaultHighlightGC()
void setData(const std::string &, bool isSelected)
~FWTextTableCellRenderer() override