114 gClient->GetColorByName(
"#ff0000", color);
119 fVolumeName->SetToolTipText(
"Enter the volume name");
126 gClient->GetColorByName(
"#ff0000", color);
132 gClient->GetColorByName(
"#0000ff", color);
137 fBSelShape->SetToolTipText(
"Replace with one of the existing shapes");
142 fEditShape->SetToolTipText(
"Edit selected shape");
150 gClient->GetColorByName(
"#0000ff", color);
155 fBSelMedium->SetToolTipText(
"Replace with one of the existing media");
160 fEditMedium->SetToolTipText(
"Edit selected medium");
174 gClient->GetColorByName(
"#ff0000", color);
188 fEditMatrix->SetToolTipText(
"Edit the position of selected node");
192 fRemoveNode->SetToolTipText(
"Remove the selected node. Cannot undo !)");
200 gClient->GetColorByName(
"#ff0000", color);
208 gClient->GetColorByName(
"#0000ff", color);
213 fBSelVolume->SetToolTipText(
"Select one of the existing volumes");
222 gClient->GetColorByName(
"#0000ff", color);
227 fBSelMatrix->SetToolTipText(
"Select one of the existing matrices");
308 gClient->GetColorByName(
"#ff0000", color);
313 fDivName->SetToolTipText(
"Enter the volume name");
328 fApplyDiv->SetToolTipText(
"Apply new division settings");
401 fCategories->GetItem(
"Visualization")->SetCleanup(0);
420 fVolumeName->Connect(
"TextChanged(const char *)",
"TGeoVolumeEditor",
this,
"DoVolumeName()");
421 fDivName->Connect(
"TextChanged(const char *)",
"TGeoVolumeEditor",
this,
"DoDivName()");
422 fEditMedium->Connect(
"Clicked()",
"TGeoVolumeEditor",
this,
"DoEditMedium()");
423 fEditShape->Connect(
"Clicked()",
"TGeoVolumeEditor",
this,
"DoEditShape()");
424 fEditMatrix->Connect(
"Clicked()",
"TGeoVolumeEditor",
this,
"DoEditMatrix()");
425 fAddNode->Connect(
"Clicked()",
"TGeoVolumeEditor",
this,
"DoAddNode()");
426 fRemoveNode->Connect(
"Clicked()",
"TGeoVolumeEditor",
this,
"DoRemoveNode()");
427 fBSelShape->Connect(
"Clicked()",
"TGeoVolumeEditor",
this,
"DoSelectShape()");
428 fBSelMedium->Connect(
"Clicked()",
"TGeoVolumeEditor",
this,
"DoSelectMedium()");
429 fBSelVolume->Connect(
"Clicked()",
"TGeoVolumeEditor",
this,
"DoSelectVolume()");
430 fBSelMatrix->Connect(
"Clicked()",
"TGeoVolumeEditor",
this,
"DoSelectMatrix()");
431 fBVis[0]->Connect(
"Clicked()",
"TGeoVolumeEditor",
this,
"DoVisVolume()");
432 fBVis[1]->Connect(
"Clicked()",
"TGeoVolumeEditor",
this,
"DoVisDaughters()");
433 fBAuto->Connect(
"Clicked()",
"TGeoVolumeEditor",
this,
"DoVisAuto()");
434 fEVisLevel->Connect(
"ValueSet(Long_t)",
"TGeoVolumeEditor",
this,
"DoVisLevel()");
435 fBView[0]->Connect(
"Clicked()",
"TGeoVolumeEditor",
this,
"DoViewAll()");
436 fBView[1]->Connect(
"Clicked()",
"TGeoVolumeEditor",
this,
"DoViewLeaves()");
437 fBView[2]->Connect(
"Clicked()",
"TGeoVolumeEditor",
this,
"DoViewOnly()");
438 fBDiv[0]->Connect(
"Clicked()",
"TGeoVolumeEditor",
this,
"DoDivSelAxis()");
439 fBDiv[1]->Connect(
"Clicked()",
"TGeoVolumeEditor",
this,
"DoDivSelAxis()");
440 fBDiv[2]->Connect(
"Clicked()",
"TGeoVolumeEditor",
this,
"DoDivSelAxis()");
441 fEDivFrom->Connect(
"ValueSet(Long_t)",
"TGeoVolumeEditor",
this,
"DoDivFromTo()");
442 fEDivStep->Connect(
"ValueSet(Long_t)",
"TGeoVolumeEditor",
this,
"DoDivStep()");
443 fEDivN->Connect(
"ValueSet(Long_t)",
"TGeoVolumeEditor",
this,
"DoDivN()");
444 fBRaytrace->Connect(
"Clicked()",
"TGeoVolumeEditor",
this,
"DoRaytrace()");
445 fApplyDiv->Connect(
"Clicked()",
"TGeoVolumeEditor",
this,
"DoApplyDiv()");
459 const char *vname =
fVolume->GetName();
472 while ((node = (
TGeoNode *)next2()))
503 Int_t ndiv = 2, iaxis = 1;
505 for (
Int_t i = 0; i < 3; i++) {
506 axis_name =
fVolume->GetShape()->GetAxisName(i + 1);
507 fBDiv[i]->SetText(axis_name);
512 iaxis =
fVolume->GetFinder()->GetDivAxis();
514 step =
fVolume->GetFinder()->GetStep();
515 ndiv =
fVolume->GetFinder()->GetNdiv();
682 if (!
fVolume->GetNdaughters()) {
687 Int_t ndiv = 2, iaxis = 1;
704 if (
fVolume->IsVisible() == on)
716 if (
fVolume->IsVisibleDaughters() == on)
728 if ((
fGeometry->GetVisLevel() == 0) == on)
755 if (
fVolume->IsVisContainers() == on)
773 if (
fVolume->IsVisLeaves() == on)
791 if (
fVolume->IsVisOnly() == on)
807 if (
fVolume->IsRaytracing() == on)
827 for (
Int_t i = 0; i < 3; i++) {
857 for (
Int_t i = 0; i < 3; i++) {
869 if (xhi - xlo <= 0) {
875 ndiv =
fEDivN->GetIntNumber();
880 max = min + ndiv * step;
883 step = (max - min) / ndiv;
900 for (
Int_t i = 0; i < 3; i++) {
912 if (xhi - xlo <= 0) {
919 max = min + ndiv * step;
928 step = (max - min) / ndiv;
944 for (
Int_t i = 0; i < 3; i++) {
956 if (xhi - xlo <= 0) {
968 max = min + ndiv * step;
975 ndiv = (
Int_t)((max - min) / step);
988 for (
Int_t i = 0; i < 3; i++) {
1000 if (xhi - xlo <= 0) {
1006 ndiv =
fEDivN->GetIntNumber();
ULong_t Pixel_t
Pixel value.
int Int_t
Signed integer 4 bytes (int).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
double Double_t
Double 8 bytes.
TClass instances represent classes, structs and namespaces in the ROOT type system.
A combobox (also known as a drop down listbox) allows the selection of one item out of a list of item...
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
UInt_t GetDefaultWidth() const override
Int_t GetState(TGFrame *f) const
Get state of sub frame.
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
UInt_t GetDefaultHeight() const override
TGCompositeFrame(const TGCompositeFrame &)=delete
void SetBackgroundColor(Pixel_t back) override
Set background color (override from TGWindow base class).
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
A horizontal 3D line is a line that typically separates a toolbar from the menubar.
TGHotString is a string with a "hot" character underlined.
This class handles GUI labels.
virtual void SetTextColor(Pixel_t color, Bool_t global=kFALSE)
Changes text color.
This class describes layout hints used by the layout classes.
TGNumberEntry is a number entry input widget with up/down buttons.
TGClient * fClient
Connection to display server.
TGFrame * GetContainer() const
A shutter widget contains a set of shutter items that can be open and closed like a shutter.
A text buffer is used in several widgets, like TGTextEntry, TGFileDialog, etc.
Yield an action as soon as it is clicked.
A TGTextEntry is a one line text input widget.
virtual void SetToolTipText(const char *text, Long_t delayms=500)
Set tool tip text associated with this text entry.
ROOT GUI Window base class.
const TGWindow * GetParent() const
virtual void ActivateBaseClassEditors(TClass *cl)
Provide list of editors for base-classes.
TGedEditor * fGedEditor
manager of this frame
Bool_t fInit
init flag for setting signals/slots
void Update() override
Override Update from TGedFrame as fGedEditor can be null.
TGeoGedFrame(const TGWindow *p=nullptr, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor.
virtual void SetActive(Bool_t active=kTRUE)
Set active GUI attribute frames related to the selected object.
Geometrical transformation package.
Media are used to store properties related to tracking and which are useful only when using geometry ...
A node represent a volume positioned inside another.They store links to both volumes and to the TGeoM...
base finder class for patterns. A pattern is specifying a division type
Base abstract class for all shapes.
virtual Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const =0
static void Cleanup(TGCompositeFrame *frame)
Static method to cleanup hierarchically all daughters of a composite frame.
static TObject * GetSelected()
static; return selected object
TGPictureButton * fBSelMatrix
virtual void ConnectSignals2Slots()
Connect signals to slots.
void DoApplyDiv()
Apply current division settings.
TGPictureButton * fBSelShape
void DoRemoveNode()
Remove a daughter.
TGTextEntry * fVolumeName
TGNumberEntry * fEDivFrom
void DoSelectMatrix()
Select a matrix for positioning.
void DoEditMatrix()
Edit the position of the selected node.
void DoSelectMedium()
Select a new medium.
void DoVisDaughters()
Slot for setting daughters visible/invisible.
TGNumberEntry * fEVisLevel
TGTextButton * fEditMatrix
TGTextButton * fEditShape
TGeoMedium * fSelectedMedium
TGeoVolume * fSelectedVolume
TGRadioButton * fBView[3]
void DoVisVolume()
Slot for setting volume visible/invisible.
TGeoShape * fSelectedShape
~TGeoVolumeEditor() override
Destructor.
void DoDivFromTo()
Handle division range modification.
void DoVisAuto()
Slot for setting visibility depth auto.
void DoViewLeaves()
Slot for viewing last leaves only.
void DoViewOnly()
Slot for viewing volume only.
TGNumberEntry * fEDivStep
TGTextButton * fRemoveNode
void DoDivStep()
Handle division step modification.
void DoVisLevel()
Slot for visibility level.
TGeoMatrix * fSelectedMatrix
void DoRaytrace()
Slot for raytracing.
void DoSelectVolume()
Select a daughter volume.
void DoEditShape()
Edit the shape of the volume.
TGCheckButton * fBRaytrace
TGNumberEntry * fCopyNumber
TGPictureButton * fBSelVolume
void DoEditMedium()
Edit the medium of the volume.
void SetModel(TObject *obj) override
Connect to the picked volume.
TGTextButton * fEditMedium
TGPictureButton * fBSelMedium
void DoDivN()
Handle division N modification.
void ActivateBaseClassEditors(TClass *cl) override
Add editors to fGedFrame and exclude TLineEditor.
void DoSelectShape()
Select a new shape.
void DoViewAll()
Slot for viewing volume and containers.
void DoAddNode()
Add a daughter.
void DoDivSelAxis()
Change division axis and preserve number of slices.
void DoDivName()
Modify division name.
TGeoVolumeEditor(const TGWindow *p=nullptr, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for volume editor.
void DoVolumeName()
Modify volume name.
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
const char * GetName() const override
Returns name of object.
void Clear(Option_t *option="") override
Remove all objects from the array.
void Delete(Option_t *option="") override
Remove all objects from the array AND delete all heap based objects.
Mother of all ROOT objects.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".