17 #include <boost/bind.hpp> 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" 37 #include "boost/lexical_cast.hpp" 54 gval.fMask = kGCForeground | kGCBackground | kGCStipple | kGCFillStyle | kGCGraphicsExposures;
55 gval.fStipple = gClient->GetResourcePool()->GetCheckeredBitmap();
56 gval.fGraphicsExposures = kFALSE;
57 gval.fBackground = gVirtualX->GetPixel(kGray);
58 m_colorContext = gClient->GetResourcePool()->GetGCPool()->GetGC(&gval,kTRUE);
64 gClient->GetResourcePool()->GetGCPool()->FreeGC(
m_colorContext->GetGC());
69 m_color = gVirtualX->GetPixel(c);
84 gVirtualX->FillRectangle(iID,
m_colorContext->GetGC(), iX, iY, iWidth, iHeight);
89 gVirtualX->FillRectangle(iID,
m_colorContext->GetGC(), iX, iY, iWidth, iHeight);
113 gval.fMask = kGCForeground | kGCBackground | kGCStipple | kGCFillStyle | kGCGraphicsExposures;
114 gval.fForeground = gVirtualX->GetPixel(kGray);
115 gval.fBackground = gVirtualX->GetPixel(kWhite);
116 gval.fFillStyle = kFillOpaqueStippled;
117 gval.fStipple = gClient->GetResourcePool()->GetCheckeredBitmap();
118 gval.fGraphicsExposures = kFALSE;
142 std::vector<std::string> returnValue;
145 returnValue.push_back(
"Name");
146 returnValue.push_back(
"Color");
147 returnValue.push_back(
"Opcty");
148 returnValue.push_back(
"RnrSelf");
149 returnValue.push_back(
"RnrChildren");
150 returnValue.push_back(
"Material");
184 if (xPos > off && xPos < (off + 20))
211 mtx.MultiplyLeft(
m_entries.at(pIdx).m_node->GetMatrix());
216 mtx.Multiply(data.
m_node->GetMatrix());
239 std::vector<std::string> relPath;
247 size_t ns = relPath.size();
248 for (
size_t i = 1;
i < ns; ++
i )
251 path += relPath[ns-
i -1];
282 using boost::lexical_cast;
283 using boost::bad_lexical_cast;
285 int t = lexical_cast<
int>(
m_editor->GetText());
286 if (t > 100 || t < 0 )
295 catch (bad_lexical_cast &) {
296 fwLog(
fwlog::kError) <<
"Bad Lexical cast. Transparency must be set in procentage [0-100].";
331 TGeoNode *parentNode =
m_entries[selectedIdx].m_node;
332 int nD = parentNode->GetNdaughters();
334 for (
int n = 0;
n != nD; ++
n)
336 int idx = selectedIdx + 1 +
n + dOff;
365 TGeoNode *parentNode = nInfo.
m_node;
366 int nD = parentNode->GetNdaughters();
368 for (
int n = 0;
n != nD; ++
n)
370 int idx = selectedIdx + 1 +
n + dOff;
389 bool foundParent =
false;
401 if (pidx == topNodeIdx) { foundParent =
true;
~FWGeometryTableManagerBase() override
std::vector< std::string > getTitles() const override
returns the title names for each column
bool isNodeRendered(int idx, int top_node_idx) const
bool firstColumnClicked(int row, int xPos)
void setBlackIcon(bool value)
const char * name() const
std::vector< int > m_row_to_index
virtual bool getVisibility(const NodeInfo &nodeInfo) const
virtual void recalculateVisibility()=0
virtual bool getVisibilityChld(const NodeInfo &nodeInfo) const
void getNodePath(int, std::string &) const
void getNodeMatrix(const NodeInfo &nodeInfo, TGeoHMatrix &mat) const
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)
std::vector< int > rowToIndex()
TGGC * m_highlightContext
void setData(Color_t c, bool)
int numberOfRows() const override
Number of rows in the table.
virtual int numberOfColumns() const =0
Number of columns in the table.
void setHighlightContext(const TGGC *context)
virtual void setCellEditor(TGTextEntry *editor)
FWGeometryTableManagerBase()
virtual const std::string title() const
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...
void setBackgroundToWhite(bool)
void applyTransparencyFromEditor()
void setGraphicsContext(const TGGC *iContext)
void setDaughtersSelfVisibility(bool)
int m_editTransparencyIdx
virtual void setVisibility(NodeInfo &, bool)
void copyColorTransparency(const NodeInfo &x)
static void getNNodesTotal(TGeoNode *geoNode, int &off)
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
void setCellValueEditor(TGTextEntry *editor)
~ColorBoxRenderer() override
char data[epos_bytes_allocation]
void setBitVal(UChar_t f, bool x)
void visualPropertiesChanged()
Classes which inherit from FWTableManagerBase must call this when how the data is shown (e...
FWTextTreeCellRenderer m_renderer
void redrawTable(bool setExpand=false)
ColorBoxRenderer m_colorBoxRenderer
bool testBit(UChar_t f) const