#include <CanvasPage.h>
Inheritance diagram for CanvasPage:

Public Member Functions | |
| CanvasPage () | |
| ~CanvasPage () | |
| virtual TObject * | Init (Mint *mint, PageDisplay *pd, GuiBox &box) |
| virtual void | Print () |
| Implement to print your display. | |
Protected Member Functions | |
| TCanvas & | GetCanvas () |
Private Attributes | |
| TCanvas * | fCanvas |
| TGWindow * | fMainWindow |
Midad
Sub classes should implement the Update() command in which they fill the canvas returned by GetCanvas() with whatever.
Contact: bv@bnl.gov
Created on: Tue Aug 20 11:03:07 2002
Definition at line 27 of file CanvasPage.h.
|
|
Definition at line 21 of file CanvasPage.cxx. 00022 : fCanvas(0), fMainWindow(0) 00023 { 00024 }
|
|
|
Definition at line 26 of file CanvasPage.cxx. 00027 {
00028 }
|
|
|
Definition at line 64 of file CanvasPage.cxx. References fCanvas. Referenced by MCDisp::Clear(), MultiPage::ColorSemanticHandler(), EVD::ColorSemanticHandler(), MultiPage::Init(), EVD::Init(), CheezyPage::Init(), EVD::PrintCanvas(), HistPage::Setup(), MCDisp::Update(), CheezyPage::Update(), MultiPage::UpdateCanvas(), and EVD::UpdateCanvas(). 00065 {
00066 fCanvas->cd();
00067 return *fCanvas;
00068 }
|
|
||||||||||||||||
|
Implement to fill box with whatever your page displays. If the page wishes to return a class to the initializer, then return an object which inherits from TObject, o.w. just return 0. Implements PageABC. Reimplemented in EVD, UserCanvas, CheezyPage, HistPage, MCDisp, and MultiPage. Definition at line 30 of file CanvasPage.cxx. References fCanvas, and fMainWindow. Referenced by UserCanvas::Init(), MultiPage::Init(), MCDisp::Init(), HistPage::Init(), EVD::Init(), and CheezyPage::Init(). 00031 {
00032 fMainWindow = dynamic_cast<TGWindow*>(&box);
00033 assert(fMainWindow);
00034
00035 GuiCanvas* gc = SigC::manage(new GuiCanvas(box,100,100));
00036 box.Add(*gc);
00037 fCanvas = gc->GetCanvas();
00038 fCanvas->cd();
00039 return fCanvas;
00040 }
|
|
|
Implement to print your display.
Implements PageABC. Definition at line 42 of file CanvasPage.cxx. References fCanvas. 00043 {
00044 if (!fMainWindow) {
00045 std::cerr << "CanvasPage::Print no main window\n";
00046 return;
00047 }
00048
00049 const char* filetypes[] = { "All files", "*",
00050 "EPS", "*.eps",
00051 "PS", "*.ps",
00052 "GIF", "*.gif",
00053 0, 0 };
00054 static TString dir(".");
00055 TGFileInfo fi;
00056 fi.fFileTypes = filetypes;
00057 fi.fIniDir = StrDup(dir);
00058 new TGFileDialog(gClient->GetRoot(), fMainWindow, kFDOpen, &fi);
00059 dir = fi.fIniDir;
00060 fCanvas->Print(fi.fFilename);
00061 }
|
|
|
Definition at line 49 of file CanvasPage.h. Referenced by GetCanvas(), Init(), and Print(). |
|
|
Definition at line 50 of file CanvasPage.h. Referenced by Init(). |
1.3.9.1