Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

evdb::GoToDialog Class Reference

#include <GoToDialog.h>

List of all members.

Public Member Functions

 GoToDialog ()
 ~GoToDialog ()
void CloseWindow ()
void DoGo ()
void DoClose ()

Private Member Functions

 RQ_OBJECT ("evdb::GoToDialog")
 ClassDef (evdb::GoToDialog, 0)

Private Attributes

TGCompositeFrame * fF1
TGLayoutHints * fL1
TGButton * fGoButton
TGButton * fCancelButton
TGButton * fCloseButton
TGLabel * fRunLabel
TGLabel * fEventLabel
TGTextEntry * fRunTextEntry
TGTextEntry * fEventTextEntry


Constructor & Destructor Documentation

GoToDialog::GoToDialog  ) 
 

Definition at line 36 of file GoToDialog.cxx.

References fCloseButton, fEventTextEntry, fF1, fGoButton, fL1, fRunLabel, fRunTextEntry, GetEventNumbers(), and evdb::TopWindow().

00036                        :
00037   TGTransientFrame(evdb::TopWindow(), evdb::TopWindow(), 500, 30, 0)
00038 {
00039 //======================================================================
00040 // Build the GoTo dialog
00041 //======================================================================
00042   int  run;
00043   int  event;
00044   char runtext[128];
00045   char eventtext[128];
00046   GetEventNumbers(run,event);
00047   sprintf(runtext,  "%d",run);
00048   sprintf(eventtext,"%d",event);
00049 
00050   this->Connect("CloseWindow", "evdb::GoToDialog", this, "CloseWindow()");
00051 
00052   fF1 = new TGHorizontalFrame(this,60,20);
00053   fL1 = new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2);
00054   
00055   fRunLabel = new TGLabel(fF1, new TGHotString("[Run Event]="));
00056   fF1->AddFrame(fRunLabel, fL1);
00057   
00058   fRunTextEntry = new TGTextEntry(fF1, new TGTextBuffer(128));
00059   fRunTextEntry->SetText(runtext);
00060   fF1->AddFrame(fRunTextEntry, fL1);
00061   fRunTextEntry->Resize(100,20);
00062   fRunTextEntry->Connect("ReturnPressed","evdb::GoToDialog",this,"DoGo()");
00063 
00064   fEventTextEntry = new TGTextEntry(fF1, new TGTextBuffer(128));
00065   fEventTextEntry->SetText(eventtext);
00066   fF1->AddFrame(fEventTextEntry, fL1);
00067   fEventTextEntry->Resize(100,20);
00068   fEventTextEntry->Connect("ReturnPressed","evdb::GoToDialog",this,"DoGo()");
00069   
00070   fGoButton = new TGTextButton(fF1,"&Go",1);
00071   fGoButton->Connect("Clicked()", "evdb::GoToDialog", this, "DoGo()");
00072   fF1->AddFrame(fGoButton, fL1);
00073 
00074   fCloseButton = new TGTextButton(fF1,"&Close",1);
00075   fCloseButton->Connect("Clicked()", "evdb::GoToDialog", this, "DoClose()");
00076   fF1->AddFrame(fCloseButton, fL1);
00077 
00078   this->AddFrame(fF1, fL1);
00079 
00080   this->SetWindowName("Go To Event");
00081   this->MapSubwindows();
00082   this->Resize(382,30);
00083   this->MapWindow();
00084 }

GoToDialog::~GoToDialog  ) 
 

Definition at line 101 of file GoToDialog.cxx.

References fCloseButton, fEventTextEntry, fF1, fGoButton, fL1, fRunLabel, and fRunTextEntry.

00102 {
00103   delete fCloseButton;
00104   delete fGoButton;
00105   delete fEventTextEntry;
00106   delete fRunTextEntry;
00107   delete fRunLabel;
00108   delete fL1;
00109   delete fF1;
00110 }


Member Function Documentation

evdb::GoToDialog::ClassDef evdb::GoToDialog  ,
[private]
 

void GoToDialog::CloseWindow  ) 
 

Definition at line 114 of file GoToDialog.cxx.

00114 { delete this; }

void GoToDialog::DoClose  ) 
 

Definition at line 118 of file GoToDialog.cxx.

00118 { this->SendCloseMessage(); }

void GoToDialog::DoGo  ) 
 

Definition at line 88 of file GoToDialog.cxx.

References fEventTextEntry, and fRunTextEntry.

00089 {
00090 //======================================================================-
00091 // Actually go to the event number typed
00092 //======================================================================-
00093   int run   = atoi(fRunTextEntry->GetText());
00094   int event = atoi(fEventTextEntry->GetText());
00095 
00096   IoModule::Instance()->GoTo(run,event);
00097 }

evdb::GoToDialog::RQ_OBJECT "evdb::GoToDialog"   )  [private]
 


Member Data Documentation

TGButton* evdb::GoToDialog::fCancelButton [private]
 

Definition at line 35 of file GoToDialog.h.

TGButton* evdb::GoToDialog::fCloseButton [private]
 

Definition at line 36 of file GoToDialog.h.

Referenced by GoToDialog(), and ~GoToDialog().

TGLabel* evdb::GoToDialog::fEventLabel [private]
 

Definition at line 38 of file GoToDialog.h.

TGTextEntry* evdb::GoToDialog::fEventTextEntry [private]
 

Definition at line 40 of file GoToDialog.h.

Referenced by DoGo(), GoToDialog(), and ~GoToDialog().

TGCompositeFrame* evdb::GoToDialog::fF1 [private]
 

Definition at line 32 of file GoToDialog.h.

Referenced by GoToDialog(), and ~GoToDialog().

TGButton* evdb::GoToDialog::fGoButton [private]
 

Definition at line 34 of file GoToDialog.h.

Referenced by GoToDialog(), and ~GoToDialog().

TGLayoutHints* evdb::GoToDialog::fL1 [private]
 

Definition at line 33 of file GoToDialog.h.

Referenced by GoToDialog(), and ~GoToDialog().

TGLabel* evdb::GoToDialog::fRunLabel [private]
 

Definition at line 37 of file GoToDialog.h.

Referenced by GoToDialog(), and ~GoToDialog().

TGTextEntry* evdb::GoToDialog::fRunTextEntry [private]
 

Definition at line 39 of file GoToDialog.h.

Referenced by DoGo(), GoToDialog(), and ~GoToDialog().


The documentation for this class was generated from the following files:
Generated on Thu Jul 24 12:01:16 2008 for NOvA Offline by doxygen 1.3.5