17 #include "TVirtualX.h" 34 const TGGC* iFillContext,
36 : m_context(iTextContext), m_frameContext(iFillContext), m_font(
nullptr), m_justify(iJustify) {
38 m_font = gClient->GetFontPool()->FindFontByHandle(
m_context->GetFont());
66 gVirtualX->DrawLine(iID,
m_frameContext->GetGC(), iX - 1, iY - 1, iX - 1, iY + iHeight);
67 gVirtualX->DrawLine(iID,
m_frameContext->GetGC(), iX + iWidth, iY - 1, iX + iWidth, iY + iHeight);
68 gVirtualX->DrawLine(iID,
m_frameContext->GetGC(), iX - 1, iY - 1, iX + iWidth, iY - 1);
69 gVirtualX->DrawLine(iID,
m_frameContext->GetGC(), iX - 1, iY + iHeight, iX + iWidth, iY + iHeight);
71 FontMetrics_t metrics;
72 m_font->GetFontMetrics(&metrics);
80 dX = (iWidth -
w) / 2;
83 gVirtualX->DrawString(iID,
m_context->GetGC(), iX + dX, iY + metrics.fAscent,
m_data.c_str(),
m_data.size());
107 static const TGGC* s_default = gClient->GetResourcePool()->GetFrameGC();
113 static const TGGC* s_default =
nullptr;
116 gval.fMask = kGCForeground | kGCBackground | kGCTile | kGCFillStyle | kGCGraphicsExposures;
117 gval.fForeground = gClient->GetResourcePool()->GetFrameHiliteColor();
118 gval.fBackground = gClient->GetResourcePool()->GetFrameBgndColor();
119 gval.fFillStyle = kFillTiled;
120 gval.fTile = gClient->GetResourcePool()->GetCheckeredPixmap();
121 gval.fGraphicsExposures = kFALSE;
122 s_default = gClient->GetGC(&gval, kTRUE);
static const TGGC & getFillGC()
void setData(const std::string &)
const TGGC * m_frameContext
~FWFramedTextTableCellRenderer() override
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
UInt_t height() const override
returns the minimum height of the cell to which the renderer is representing
static const TGGC & getDefaultGC()
const TGFont * font() const
FWFramedTextTableCellRenderer(const TGGC *iTextContext=&(getDefaultGC()), const TGGC *iFillContext=&(getFillGC()), Justify iJustify=kJustifyLeft)