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

SelectionInfoPage Class Reference

#include <SelectionInfoPage.h>

Inheritance diagram for SelectionInfoPage:

PageABC List of all members.

Public Member Functions

 SelectionInfoPage ()
 ~SelectionInfoPage ()
virtual TObject * Init (Mint *mint, PageDisplay *pd, GuiBox &box)
virtual void Update ()
 Implement to respond to a change in the data.
virtual void Draw ()
virtual void Print ()
 Implement to print your display.
virtual void SetText (const std::string &s)
virtual void Unzoom ()
virtual void Rezoom ()
virtual void FullZoom ()
virtual void AutoZoom ()

Protected Member Functions

GuiTextViewGetTextView ()

Private Attributes

MintfMint
PageDisplayfPageDisplay
GuiTextViewfTextView
TGWindow * fMainWindow
std::string fText

Constructor & Destructor Documentation

SelectionInfoPage::SelectionInfoPage  ) 
 

Definition at line 27 of file SelectionInfoPage.cxx.

00028     : fMint(0),
00029       fPageDisplay(0),
00030       fTextView(0), 
00031       fMainWindow(0)
00032 {
00033 }

SelectionInfoPage::~SelectionInfoPage  ) 
 

Definition at line 35 of file SelectionInfoPage.cxx.

References fPageDisplay, TridControl::Instance(), and TridControl::SetSelectionInfoPage().

00036 {
00037   TridControl::Instance(fPageDisplay)->SetSelectionInfoPage(0);
00038 }


Member Function Documentation

virtual void SelectionInfoPage::AutoZoom  )  [inline, virtual]
 

Reimplemented from PageABC.

Definition at line 51 of file SelectionInfoPage.h.

00051 {};

void SelectionInfoPage::Draw  )  [virtual]
 

Definition at line 75 of file SelectionInfoPage.cxx.

References fText, and fTextView.

Referenced by SetText(), and Update().

00076 {
00077   fTextView->Clear();
00078   // Copy it out line-for-line into the text view.
00079   int lines = 0;
00080   const int maxlines = 25;
00081   std::string::size_type linestart =0;
00082   std::string::size_type linestop ;
00083   while(linestart < fText.length()) {
00084     linestop = fText.find('\n',linestart);
00085     std::string line(fText,linestart,linestop-linestart);
00086     fTextView->AddLine(line.c_str());
00087     lines++;
00088     linestart=linestop+1;
00089     if(lines>maxlines) {
00090       fTextView->AddLine("[[TRUNCATED]]");
00091       break;
00092     }
00093   }
00094 }

virtual void SelectionInfoPage::FullZoom void   )  [inline, virtual]
 

Reimplemented from PageABC.

Definition at line 50 of file SelectionInfoPage.h.

00050 {};

GuiTextView & SelectionInfoPage::GetTextView  )  [protected]
 

Definition at line 97 of file SelectionInfoPage.cxx.

00098 {
00099   return *fTextView;
00100 }

TObject * SelectionInfoPage::Init Mint mint,
PageDisplay pd,
GuiBox box
[virtual]
 

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.

Definition at line 40 of file SelectionInfoPage.cxx.

References GuiCompositeFrameBase::Add(), fMainWindow, fMint, fPageDisplay, fTextView, TridControl::Instance(), and TridControl::SetSelectionInfoPage().

00041 {
00042   fMint = mint;
00043   fPageDisplay = pd;
00044 
00045   TridControl::Instance(fPageDisplay)->SetSelectionInfoPage(this);
00046 
00047   fMainWindow = dynamic_cast<TGWindow*>(&box);
00048   assert(fMainWindow);
00049   
00050   fTextView = SigC::manage(new GuiTextView(*fMainWindow,500,300));
00051   box.Add(*fTextView);
00052   
00053   fTextView->AddLine("SelectionInfoPage");
00054   return fTextView;
00055 }

void SelectionInfoPage::Print  )  [virtual]
 

Implement to print your display.

Implements PageABC.

Definition at line 57 of file SelectionInfoPage.cxx.

00058 {
00059   cout << fText;
00060 }

virtual void SelectionInfoPage::Rezoom void   )  [inline, virtual]
 

Reimplemented from PageABC.

Definition at line 49 of file SelectionInfoPage.h.

00049 {};

void SelectionInfoPage::SetText const std::string &  s  )  [virtual]
 

Definition at line 62 of file SelectionInfoPage.cxx.

References Draw(), and fText.

Referenced by TridPage::MouseOver().

00063 {
00064   fText = s; 
00065 
00066   Draw();
00067 }

virtual void SelectionInfoPage::Unzoom void   )  [inline, virtual]
 

Reimplemented from PageABC.

Definition at line 48 of file SelectionInfoPage.h.

00048 {};

void SelectionInfoPage::Update void   )  [virtual]
 

Implement to respond to a change in the data.

Reimplemented from PageABC.

Definition at line 69 of file SelectionInfoPage.cxx.

References Draw(), and fText.

00070 {
00071   fText ="";
00072   Draw();
00073 }


Member Data Documentation

TGWindow* SelectionInfoPage::fMainWindow [private]
 

Definition at line 61 of file SelectionInfoPage.h.

Referenced by Init().

Mint* SelectionInfoPage::fMint [private]
 

Definition at line 58 of file SelectionInfoPage.h.

Referenced by Init().

PageDisplay* SelectionInfoPage::fPageDisplay [private]
 

Definition at line 59 of file SelectionInfoPage.h.

Referenced by Init(), and ~SelectionInfoPage().

std::string SelectionInfoPage::fText [private]
 

Definition at line 62 of file SelectionInfoPage.h.

Referenced by Draw(), SetText(), and Update().

GuiTextView* SelectionInfoPage::fTextView [private]
 

Definition at line 60 of file SelectionInfoPage.h.

Referenced by Draw(), and Init().


The documentation for this class was generated from the following files:
Generated on Thu Nov 1 12:01:05 2007 for loon by  doxygen 1.3.9.1