Add some class-docs.
authormtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 9 Nov 2007 18:34:50 +0000 (18:34 +0000)
committermtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 9 Nov 2007 18:34:50 +0000 (18:34 +0000)
EVE/Reve/TrackEditors.cxx
EVE/Reve/TrackRnrStyleEditor.cxx
EVE/Reve/TrackRnrStyleEditor.h

index 13b0c96..e73bbc8 100644 (file)
@@ -60,6 +60,8 @@ void TrackEditor::DoEditRnrStyle()
 {
   fGedEditor->SetModel(fGedEditor->GetPad(), fM->GetRnrStyle(), kButton1Down);
 }
+
+
 //______________________________________________________________________
 // TrackListEditor
 //
index 9d5a9dd..8e96af0 100644 (file)
@@ -100,13 +100,16 @@ TrackRnrStyleSubEditor::TrackRnrStyleSubEditor(const TGWindow *p):
   AddFrame(fDelta, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
 }
 
-//______________________________________________________________________
+//______________________________________________________________________________
 void TrackRnrStyleSubEditor::CreateRefsContainer(TGVerticalFrame* p)
 {
+  // Create a frame containing track-reference controls under parent
+  // frame p.
+
   fRefsCont = new TGCompositeFrame(p, 80, 20, kVerticalFrame);
   fPMFrame  = new TGVerticalFrame(fRefsCont);
+  // Rendering control.
   {
-    // --- Rendering control
     TGGroupFrame* fitPM = new TGGroupFrame(fPMFrame, "PathMarks:", kLHintsTop | kLHintsCenterX);
     fitPM->SetTitlePos(TGGroupFrame::kLeft);
     fPMFrame->AddFrame( fitPM, new TGLayoutHints(kLHintsTop | kLHintsCenterX | kLHintsExpandX, 3, 3, 3, 3));
@@ -126,8 +129,8 @@ void TrackRnrStyleSubEditor::CreateRefsContainer(TGVerticalFrame* p)
     fFitReferences->Connect("Clicked()","Reve::TrackRnrStyleSubEditor", this, "DoFitPM()");  
     fFitDaughters->Connect("Clicked()","Reve::TrackRnrStyleSubEditor", this, "DoFitPM()");
   }
+  // Kinematics fitting.
   { 
-    // --- Kinematics fitting
     TGGroupFrame* rnrPM = new TGGroupFrame(fPMFrame, "PathMarks:", kLHintsTop | kLHintsCenterX);
     rnrPM->SetTitlePos(TGGroupFrame::kLeft);
     fPMFrame->AddFrame( rnrPM, new TGLayoutHints(kLHintsTop | kLHintsCenterX | kLHintsExpandX, 3, 3, 3, 3));
@@ -149,7 +152,7 @@ void TrackRnrStyleSubEditor::CreateRefsContainer(TGVerticalFrame* p)
   
     fRefsCont->AddFrame(fPMFrame, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
   }
-  // marker attributes
+  // Marker attributes.
   {
     fPMAtt = new TAttMarkerEditor(fRefsCont);
     TGFrameElement *el = (TGFrameElement*) fPMAtt->GetList()->First();
@@ -158,7 +161,7 @@ void TrackRnrStyleSubEditor::CreateRefsContainer(TGVerticalFrame* p)
     fRefsCont->AddFrame(fPMAtt, new TGLayoutHints(kLHintsTop, 1, 1, 3, 1));
   }
 
-  // FIRST VERTEX
+  // First vertex.
   TGCompositeFrame *title1 = new TGCompositeFrame(fRefsCont, 145, 10, 
                                                  kHorizontalFrame | 
                                                  kLHintsExpandX   | 
@@ -183,9 +186,11 @@ void TrackRnrStyleSubEditor::CreateRefsContainer(TGVerticalFrame* p)
   p->AddFrame(fRefsCont,new TGLayoutHints(kLHintsTop| kLHintsExpandX));
 }
 
-//______________________________________________________________________
+//______________________________________________________________________________
 void TrackRnrStyleSubEditor::SetModel(TrackRnrStyle* m)
 {
+  // Set model object.
+
   fM = m;
 
   fMaxR->SetValue(fM->fMaxR);
@@ -216,14 +221,19 @@ void TrackRnrStyleSubEditor::SetModel(TrackRnrStyle* m)
   fFVAtt->SetModel(&fM->fFVAtt);
 }
 
-/**************************************************************************/
+/******************************************************************************/
+
+//______________________________________________________________________________
 void TrackRnrStyleSubEditor::Changed()
 {
+  // Update registered tracks and emit "Changed()" signal.
+
   fM->UpdateBackPtrItems();
   Emit("Changed()");
 }
 
-/**************************************************************************/
+/******************************************************************************/
+
 void TrackRnrStyleSubEditor::DoMaxR()
 {
   fM->SetMaxR(fMaxR->GetValue());
@@ -254,7 +264,8 @@ void TrackRnrStyleSubEditor::DoDelta()
   Changed();
 }
 
-/**************************************************************************/
+/******************************************************************************/
+
 void TrackRnrStyleSubEditor::DoFitPM()
 {
   TGButton* b = (TGButton *) gTQSender;
@@ -307,20 +318,25 @@ void TrackRnrStyleSubEditor::DoRnrFV()
 }
 
 
-//______________________________________________________________________
+//______________________________________________________________________________
 // TrackRnrStyleEditor
 //
+// GUI editor for TrackRnrStyle.
+// It's only a wrapper around a TrackRnrStyleSubEditor that holds actual
+// widgets.
 
 ClassImp(TrackRnrStyleEditor)
 
+//______________________________________________________________________________
 TrackRnrStyleEditor::TrackRnrStyleEditor(const TGWindow *p,
                                          Int_t width, Int_t height,
                                          UInt_t options, Pixel_t back) :
   TGedFrame(p, width, height, options | kVerticalFrame, back),
-
-  fM (0),
+  fM(0),
   fRSSubEditor(0)
 {
+  // Constructor.
+
   MakeTitle("RenderStyle");
 
   fRSSubEditor = new TrackRnrStyleSubEditor(this);
@@ -338,22 +354,28 @@ TrackRnrStyleEditor::TrackRnrStyleEditor(const TGWindow *p,
   title1->AddFrame(new TGHorizontal3DLine(title1),
                   new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
   refsFrame->AddFrame(title1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
-   
+
   // path marks 
   fRSSubEditor->CreateRefsContainer(refsFrame);
   fRSSubEditor->fPMAtt->SetGedEditor((TGedEditor*)gReve->GetEditor()); 
   fRSSubEditor->fFVAtt->SetGedEditor((TGedEditor*)gReve->GetEditor());
 
+  fRSSubEditor->Connect("Changed()", "Reve::TrackRnrStyleEditor", this, "Update()");
 }
 
+//______________________________________________________________________________
 TrackRnrStyleEditor::~TrackRnrStyleEditor()
 {
+  // Destructor. Noop.
 }
 
-/**************************************************************************/
+/******************************************************************************/
 
+//______________________________________________________________________________
 void TrackRnrStyleEditor::SetModel(TObject* obj)
 {
+  // Set model object.
+
   fM = dynamic_cast<TrackRnrStyle*>(obj); 
   fRSSubEditor->SetModel(fM);
 }
index 381737d..7396fc7 100644 (file)
@@ -25,8 +25,9 @@ class TrackRnrStyleSubEditor;
 
 class TrackRnrStyleSubEditor : public TGVerticalFrame
 {
-friend class TrackRnrStyleEditor;
-friend class TrackListEditor;
+  friend class TrackRnrStyleEditor;
+  friend class TrackListEditor;
+
 private:
   TrackRnrStyleSubEditor(const TrackRnrStyleSubEditor&);            // Not implemented
   TrackRnrStyleSubEditor& operator=(const TrackRnrStyleSubEditor&); // Not implemented
@@ -34,26 +35,26 @@ private:
 protected:
   TrackRnrStyle       *fM;  
  
-  Reve::RGValuator*    fMaxR;
-  Reve::RGValuator*    fMaxZ;
-  Reve::RGValuator*    fMaxOrbits;
-  Reve::RGValuator*    fMinAng;
-  Reve::RGValuator*    fDelta;
+  Reve::RGValuator    *fMaxR;
+  Reve::RGValuator    *fMaxZ;
+  Reve::RGValuator    *fMaxOrbits;
+  Reve::RGValuator    *fMinAng;
+  Reve::RGValuator    *fDelta;
 
-  TGCheckButton*       fRnrFV;
+  TGCheckButton       *fRnrFV;
 
-  TGCompositeFrame*    fPMFrame;
-  TGButton*            fFitDaughters;
-  TGButton*            fFitReferences;
-  TGButton*            fFitDecay;
-  TGButton*            fRnrDaughters;
-  TGButton*            fRnrReferences;
-  TGButton*            fRnrDecay;
+  TGCompositeFrame    *fPMFrame;
+  TGButton            *fFitDaughters;
+  TGButton            *fFitReferences;
+  TGButton            *fFitDecay;
+  TGButton            *fRnrDaughters;
+  TGButton            *fRnrReferences;
+  TGButton            *fRnrDecay;
 
-  TGCompositeFrame*    fRefsCont;
+  TGCompositeFrame    *fRefsCont;
 
-  TAttMarkerEditor*    fPMAtt;
-  TAttMarkerEditor*    fFVAtt;
+  TAttMarkerEditor    *fPMAtt;
+  TAttMarkerEditor    *fFVAtt;
 
 public:
   TrackRnrStyleSubEditor(const TGWindow* p);
@@ -76,7 +77,7 @@ public:
 
   void CreateRefsContainer(TGVerticalFrame* p);
 
-  ClassDef(TrackRnrStyleSubEditor, 0) // Sub-editor for TrackRnrStyle
+  ClassDef(TrackRnrStyleSubEditor, 0) // Sub-editor for TrackRnrStyle.
 };
 
 /**************************************************************************/
@@ -91,8 +92,8 @@ private:
 
   void CreateRefTab();
 protected: 
-  TrackRnrStyle                   *fM; // fModel dynamic-casted to TrackRnrStyleEditor
-  TrackRnrStyleSubEditor          *fRSSubEditor;
+  TrackRnrStyle           *fM;           // Model object.
+  TrackRnrStyleSubEditor  *fRSSubEditor; // Render-style sub-editor.
 
 public:
   TrackRnrStyleEditor(const TGWindow* p=0, Int_t width=170, Int_t height=30,
@@ -101,7 +102,7 @@ public:
 
   virtual void SetModel(TObject* obj);
 
-  ClassDef(TrackRnrStyleEditor, 1); // Editor for TrackRnrStyle
+  ClassDef(TrackRnrStyleEditor, 1); // Editor for TrackRnrStyle.
 }; // endclass TrackRnrStyleEditor
 
 }