11 #include "TGNumberEntry.h"
13 #include "TRootEmbeddedCanvas.h"
17 #include "cetlib_except/exception.h"
27 mf->RemoveFrame(fEmbCanvas);
28 mf->RemoveFrame(fFrame);
53 for(
int ipad = 0; ipad < npad; ++ipad) {
54 evdb::Canvas::fCanvas->cd();
67 throw cet::exception(
"Ortho3DView")
68 << __func__ <<
": unknown projection pad " << ipad <<
"\n";
71 std::string padname = std::string(
"Ortho3DPad") + projname;
72 std::string padtitle = projname + std::string(
" View");
73 double ylo = double(npad - ipad - 1) / double(npad);
74 double yhi = double(npad - ipad) / double(npad);
76 proj, 0.0, ylo, 1.0, yhi);
81 TGCompositeFrame* wframe =
new TGVerticalFrame(
fWidgetFrame);
83 fWidgetFrame->AddFrame(wframe,
new TGLayoutHints(kLHintsTop |
91 TGLabel* label =
new TGLabel(wframe, padtitle.c_str());
92 wframe->AddFrame(label,
new TGLayoutHints(kLHintsTop | kLHintsLeft,
97 TGTextButton* unzoom =
new TGTextButton(wframe,
"&Unzoom");
98 wframe->AddFrame(unzoom,
new TGLayoutHints(kLHintsTop | kLHintsLeft,
100 unzoom->Connect(
"Clicked()",
"evd::Ortho3DPad", pad,
105 TGCompositeFrame* msize_frame =
new TGHorizontalFrame(wframe);
106 wframe->AddFrame(msize_frame,
new TGLayoutHints(kLHintsTop | kLHintsLeft,
109 TGNumberEntry* msize_entry =
new TGNumberEntry(msize_frame, val, 3, -1,
110 TGNumberFormat::kNESInteger,
111 TGNumberFormat::kNEANonNegative,
112 TGNumberFormat::kNELLimitMin, 1.);
113 msize_frame->AddFrame(msize_entry);
116 TGLabel* msize_label =
new TGLabel(msize_frame,
"Marker Size");
117 msize_frame->AddFrame(msize_label,
118 new TGLayoutHints(kLHintsTop | kLHintsLeft,
120 msize_entry->Connect(
"ValueSet(Long_t)",
"evd::Ortho3DPad", pad,
127 evdb::Canvas::fCanvas->Update();
140 for(std::vector<Ortho3DPad*>::const_iterator i = fOrtho3DPads.begin();
141 i != fOrtho3DPads.end(); ++i) {
void SetMSizeEntry(TGNumberEntry *p)
A drawing pad showing an orthographic rendering of 3D objects.
void Draw(const char *opt="")
TGCompositeFrame * fMetaFrame
Frame holding root canvas and widget frame.
Drawing pad showing an orthographic projection of 3D objects in the detector.
std::vector< TGCompositeFrame * > fWidgetSubFrames
A view showing an orthographic projection of 3D objects.
TGCompositeFrame * fWidgetFrame
Frame holding widgets.
double GetMarkerSize() const
std::vector< Ortho3DPad * > fOrtho3DPads
Graphics pads.
void Draw(const char *opt=0)
Ortho3DView(TGMainFrame *mf)