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" 44 gval.fMask = kGCForeground | kGCBackground | kGCStipple | kGCFillStyle | kGCGraphicsExposures;
45 gval.fStipple = gClient->GetResourcePool()->GetCheckeredBitmap();
46 gval.fGraphicsExposures = kFALSE;
47 gval.fBackground = gVirtualX->GetPixel(kGray);
48 m_colorContext = gClient->GetResourcePool()->GetGCPool()->GetGC(&gval, kTRUE);
52 gClient->GetResourcePool()->GetGCPool()->FreeGC(
m_colorContext->GetGC());
56 m_color = gVirtualX->GetPixel(c);
61 Drawable_t iID,
int iX,
int iY,
unsigned int iWidth,
unsigned int iHeight) {
70 gVirtualX->FillRectangle(iID,
m_colorContext->GetGC(), iX, iY, iWidth, iHeight);
74 gVirtualX->FillRectangle(iID,
m_colorContext->GetGC(), iX, iY, iWidth, iHeight);
93 gval.fMask = kGCForeground | kGCBackground | kGCStipple | kGCFillStyle | kGCGraphicsExposures;
94 gval.fForeground = gVirtualX->GetPixel(kGray);
95 gval.fBackground = gVirtualX->GetPixel(kWhite);
96 gval.fFillStyle = kFillOpaqueStippled;
97 gval.fStipple = gClient->GetResourcePool()->GetCheckeredBitmap();
98 gval.fGraphicsExposures = kFALSE;
111 std::vector<std::string> returnValue;
114 returnValue.push_back(
"Name");
115 returnValue.push_back(
"Color");
116 returnValue.push_back(
"Opcty");
117 returnValue.push_back(
"RnrSelf");
118 returnValue.push_back(
"RnrChildren");
119 returnValue.push_back(
"Material");
147 if (xPos > off && xPos < (off + 20)) {
168 mtx.MultiplyLeft(
m_entries.at(pIdx).m_node->GetMatrix());
173 mtx.Multiply(data.
m_node->GetMatrix());
193 std::vector<std::string> relPath;
200 size_t ns = relPath.size();
201 for (
size_t i = 1;
i < ns; ++
i) {
203 path += relPath[ns -
i - 1];
227 using boost::bad_lexical_cast;
228 using boost::lexical_cast;
230 int t = lexical_cast<
int>(
m_editor->GetText());
231 if (t > 100 || t < 0) {
238 }
catch (bad_lexical_cast&) {
239 fwLog(
fwlog::kError) <<
"Bad Lexical cast. Transparency must be set in procentage [0-100].";
265 TGeoNode* parentNode =
m_entries[selectedIdx].m_node;
266 int nD = parentNode->GetNdaughters();
268 for (
int n = 0;
n != nD; ++
n) {
269 int idx = selectedIdx + 1 +
n + dOff;
291 TGeoNode* parentNode = nInfo.
m_node;
292 int nD = parentNode->GetNdaughters();
294 for (
int n = 0;
n != nD; ++
n) {
295 int idx = selectedIdx + 1 +
n + dOff;
312 bool foundParent =
false;
322 if (pidx == topNodeIdx) {
~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