19 #ifdef PERFTOOL_GEO_TABLE 20 #include <google/profiler.h> 29 #include "TGeoVolume.h" 30 #include "TGeoMatrix.h" 31 #include "TGeoShape.h" 33 #include "TGeoMatrix.h" 34 #include "TVirtualX.h" 43 gval.fMask = kGCForeground | kGCBackground | kGCStipple | kGCFillStyle | kGCGraphicsExposures;
44 gval.fStipple = gClient->GetResourcePool()->GetCheckeredBitmap();
45 gval.fGraphicsExposures = kFALSE;
46 gval.fBackground = gVirtualX->GetPixel(kGray);
47 m_colorContext = gClient->GetResourcePool()->GetGCPool()->GetGC(&gval, kTRUE);
51 gClient->GetResourcePool()->GetGCPool()->FreeGC(m_colorContext->GetGC());
55 m_color = gVirtualX->GetPixel(
c);
60 Drawable_t iID,
int iX,
int iY,
unsigned int iWidth,
unsigned int iHeight) {
66 m_colorContext->SetFillStyle(kFillSolid);
67 Pixel_t baq = m_colorContext->GetForeground();
68 m_colorContext->SetForeground(m_color);
69 gVirtualX->FillRectangle(iID, m_colorContext->GetGC(), iX, iY, iWidth, iHeight);
72 m_colorContext->SetFillStyle(kFillOpaqueStippled);
73 gVirtualX->FillRectangle(iID, m_colorContext->GetGC(), iX, iY, iWidth, iHeight);
75 m_colorContext->SetForeground(baq);
92 gval.fMask = kGCForeground | kGCBackground | kGCStipple | kGCFillStyle | kGCGraphicsExposures;
93 gval.fForeground = gVirtualX->GetPixel(kGray);
94 gval.fBackground = gVirtualX->GetPixel(kWhite);
95 gval.fFillStyle = kFillOpaqueStippled;
96 gval.fStipple = gClient->GetResourcePool()->GetCheckeredBitmap();
97 gval.fGraphicsExposures = kFALSE;
110 std::vector<std::string> returnValue;
113 returnValue.push_back(
"Name");
114 returnValue.push_back(
"Color");
115 returnValue.push_back(
"Opcty");
116 returnValue.push_back(
"RnrSelf");
117 returnValue.push_back(
"RnrChildren");
118 returnValue.push_back(
"Material");
146 if (xPos > off && xPos < (off + 20)) {
163 int pIdx =
data.m_parent;
167 mtx.MultiplyLeft(
m_entries.at(pIdx).m_node->GetMatrix());
172 mtx.Multiply(
data.m_node->GetMatrix());
192 std::vector<std::string> relPath;
199 size_t ns = relPath.size();
200 for (
size_t i = 1;
i < ns; ++
i) {
202 path += relPath[ns -
i - 1];
228 if (
t > 100 ||
t < 0) {
236 fwLog(
fwlog::kError) <<
"Bad Lexical cast. Transparency must be set in procentage [0-100].";
262 TGeoNode* parentNode =
m_entries[selectedIdx].m_node;
263 int nD = parentNode->GetNdaughters();
265 for (
int n = 0;
n != nD; ++
n) {
266 int idx = selectedIdx + 1 +
n + dOff;
288 TGeoNode* parentNode = nInfo.
m_node;
289 int nD = parentNode->GetNdaughters();
291 for (
int n = 0;
n != nD; ++
n) {
292 int idx = selectedIdx + 1 +
n + dOff;
295 data.copyColorTransparency(nInfo);
309 bool foundParent =
false;
312 int pidx =
data.m_parent;
319 if (pidx == topNodeIdx) {
~FWGeometryTableManagerBase() override
virtual int numberOfColumns() const =0
Number of columns in the table.
bool firstColumnClicked(int row, int xPos)
void setBlackIcon(bool value)
std::vector< int > m_row_to_index
int unsortedRowNumber(int unsorted) const override
when passed the index to the sorted order of the rows it returns the original row number from the und...
virtual void recalculateVisibility()=0
UInt_t height() const override
returns the minimum height of the cell to which the renderer is representing
void dataChanged()
Classes which inherit from FWTableManagerBase must call this when their underlying data changes...
virtual void applyColorTranspToDaughters(int selectedIdx, bool recurse)
virtual void setVisibilityChld(NodeInfo &, bool)
virtual const std::string title() const
std::vector< int > rowToIndex()
TGGC * m_highlightContext
void setData(Color_t c, bool)
void getNodePath(int, std::string &) const
void setHighlightContext(const TGGC *context)
virtual void setCellEditor(TGTextEntry *editor)
FWGeometryTableManagerBase()
void setBackgroundToWhite(bool)
void applyTransparencyFromEditor()
void setGraphicsContext(const TGGC *iContext)
bool isNodeRendered(int idx, int top_node_idx) const
void setDaughtersSelfVisibility(bool)
int m_editTransparencyIdx
virtual void setVisibility(NodeInfo &, bool)
static void getNNodesTotal(TGeoNode *geoNode, int &off)
void draw(Drawable_t iID, int iX, int iY, unsigned int iWidth, unsigned int iHeight) override
int numberOfRows() const override
Number of rows in the table.
void setCellValueEditor(TGTextEntry *editor)
virtual bool getVisibilityChld(const NodeInfo &nodeInfo) const
~ColorBoxRenderer() override
char data[epos_bytes_allocation]
virtual bool getVisibility(const NodeInfo &nodeInfo) const
void getNodeMatrix(const NodeInfo &nodeInfo, TGeoHMatrix &mat) const
void visualPropertiesChanged()
Classes which inherit from FWTableManagerBase must call this when how the data is shown (e...
const char * name() const
FWTextTreeCellRenderer m_renderer
void redrawTable(bool setExpand=false)
std::vector< std::string > getTitles() const override
returns the title names for each column
ColorBoxRenderer m_colorBoxRenderer