15 #include "TGTextEntry.h" 30 TGTransientFrame(0,0,800,300,0),
33 fL1 =
new TGLayoutHints(kLHintsLeft|kLHintsTop|kLHintsExpandX, 2, 2, 2, 2);
34 fL2 =
new TGLayoutHints(kLHintsLeft|kLHintsTop, 2, 2, 2, 2);
49 std::map<std::string,Printable*>&
53 for (; itr!=itrEnd; ++itr) {
62 base += itr->second->PrintTag();
65 sprintf(runevt,
".%d.%d",
80 fFilename[i]->SetToolTipText(
"Base file name for print");
87 fDoPNG[i]->Resize(wCheckBox,h);
90 if (gsFormatSelection[ptag])
fDoPNG[i]->SetState(kButtonDown);
94 fDoGIF[i]->Resize(wCheckBox,h);
97 if (gsFormatSelection[ptag])
fDoGIF[i]->SetState(kButtonDown);
101 fDoPDF[i]->Resize(wCheckBox,h);
104 if (gsFormatSelection[ptag])
fDoPDF[i]->SetState(kButtonDown);
108 fDoEPS[i]->Resize(wCheckBox,h);
111 if (gsFormatSelection[ptag])
fDoEPS[i]->SetState(kButtonDown);
127 new TGLayoutHints(kLHintsLeft,4,4,4,4));
130 fCancelButton->Connect(
"Clicked()",
"evdb::PrintDialog",
this,
"Cancel()");
132 new TGLayoutHints(kLHintsRight,4,4,4,4));
137 this->MapSubwindows();
138 this->Resize(500, fNprintable*(h+8)+38);
140 this->SetWindowName(
"Print Dialog");
143 this->Connect(
"CloseWindow()",
"evdb::PrintDialog",
this,
"CloseWindow()");
179 std::string format[4] = {
".png",
".gif",
".pdf",
".eps" };
183 bool printMe = (
fPrintableCB[i]->GetState() == kButtonDown);
186 gsPrintableSelection[
fPrintTag[i]] = printMe;
190 std::string base =
fFilename[i]->GetText();
192 doPrint[0] = (
fDoPNG[i]->GetState() == kButtonDown);
193 doPrint[1] = (
fDoGIF[i]->GetState() == kButtonDown);
194 doPrint[2] = (
fDoPDF[i]->GetState() == kButtonDown);
195 doPrint[3] = (
fDoEPS[i]->GetState() == kButtonDown);
196 for (
int j=0; j<nFormats; ++j) {
198 std::string ftag(fPrintTag[i]); ftag += format[j];
199 std::string
f(base); f += format[j];
202 gsFormatSelection[ftag] = doPrint[j];
static std::map< std::string, bool > gsPrintableSelection
TGCheckButton * fDoGIF[10]
TGCheckButton * fDoEPS[10]
TGTextEntry * fFilename[10]
Manage all things related to colors for the event display.
std::string fPrintTag[10]
TGCheckButton * fDoPDF[10]
Singleton to hold the current art::Event for the event display.
Base class for printable objects.
TGCheckButton * fPrintableCB[10]
static std::map< std::string, evdb::Printable * > & GetPrintables()
TGCheckButton * fDoPNG[10]
static EventHolder * Instance()
Pop up dialog for printing.
TGTextButton * fCancelButton
TGCompositeFrame * fButtonFrame
TGCompositeFrame * fPrintFrame[10]
static std::map< std::string, bool > gsFormatSelection
TGTextButton * fPrintButton
Printable * fPrintable[10]
Event finding and building.
virtual void Print(const char *filename)=0