Index: trunk/MagicSoft/Cosy/Changelog
===================================================================
--- trunk/MagicSoft/Cosy/Changelog	(revision 8806)
+++ trunk/MagicSoft/Cosy/Changelog	(revision 8807)
@@ -1,3 +1,10 @@
                                                                   -*-*- END -*-*-
+
+ 2008/01/14 Thomas Bretz
+
+   * tpoint/gui.C:
+     - added individual reset buttons
+
+
 
  2008/01/09 Thomas Bretz
Index: trunk/MagicSoft/Cosy/tpoint/gui.C
===================================================================
--- trunk/MagicSoft/Cosy/tpoint/gui.C	(revision 8806)
+++ trunk/MagicSoft/Cosy/tpoint/gui.C	(revision 8807)
@@ -1101,5 +1101,5 @@
     }
 
-    Bool_t ProcessMessage(Long_t msg, Long_t mp1, Long_t)
+    Bool_t ProcessMessage(Long_t msg, Long_t mp1, Long_t mp2)
     {
         // cout << "Msg: " << hex << GET_MSG(msg) << endl;
@@ -1148,4 +1148,11 @@
                     return kTRUE;
                 }
+
+                // In the default cas a reset button must have been pressed
+                cout << "DEL! " << mp1-2*MPointing::GetNumPar() <<endl;
+
+                fBending[mp1-2*MPointing::GetNumPar()] = 0;
+                DisplayBending();
+
                 return kTRUE;
             }
@@ -1155,5 +1162,5 @@
     }
 
-    void AddTextButton(TGCompositeFrame *f, TString txt, Int_t id=-1, TGLayoutHints *h=0)
+    TGButton *AddTextButton(TGCompositeFrame *f, TString txt, Int_t id=-1, TGLayoutHints *h=0)
     {
         TGButton *but = new TGTextButton(f, txt, id);
@@ -1161,8 +1168,9 @@
         f->AddFrame(but, h);
         fList->Add(but);
-
-    }
-
-    void AddCheckButton(TGCompositeFrame *f, TString txt, Int_t id=-1, TGLayoutHints *h=0)
+        return but;
+
+    }
+
+    TGButton *AddCheckButton(TGCompositeFrame *f, TString txt, Int_t id=-1, TGLayoutHints *h=0)
     {
         TGButton *but = new TGCheckButton(f, txt, id);
@@ -1170,4 +1178,17 @@
         f->AddFrame(but, h);
         fList->Add(but);
+        return but;
+    }
+
+    TGButton *AddResetButton(TGCompositeFrame *f, Int_t id, TGLayoutHints *h, Int_t height)
+    {
+        // Move this to a AddResetButton function
+        TGPictureButton *but = new TGPictureButton(f, "Totenkopf.xpm", id);
+        but->SetHeight(height); // Offsets from TGLayout
+        but->SetWidth(height);
+        but->Associate(this);
+        f->AddFrame(but, h);
+        fList->Add(but);
+        return but;
     }
 
@@ -1233,5 +1254,5 @@
         fFont = gVirtualX->LoadQueryFont("7x13bold");
 
-        TGLayoutHints *hints0 = new TGLayoutHints(kLHintsExpandY, 7, 5, 5, 6);
+        TGLayoutHints *hints0 = new TGLayoutHints(kLHintsExpandY,                7, 5, 5, 0);
         TGLayoutHints *hints1 = new TGLayoutHints(kLHintsExpandX|kLHintsExpandY, 5, 7, 5, 6);
         TGLayoutHints *hints2 = new TGLayoutHints(kLHintsCenterX|kLHintsCenterY, 5, 5, 5, 5);
@@ -1267,15 +1288,17 @@
         fList->Add(comp);
 
-        TGLayoutHints *hints3 = new TGLayoutHints(kLHintsLeft|kLHintsTop, 0, 20, 5, 0);
+        TGLayoutHints *hints3 = new TGLayoutHints(kLHintsLeft|kLHintsTop, 0, 10, 5, 0); //20, 5, 0);
         fList->Add(hints3);
 
-        TGLabel *l;
-
         TGVerticalFrame *vframe = new TGVerticalFrame(comp, 1, 1);
+        for (int i=0; i<MPointing::GetNumPar(); i++)
+            AddCheckButton(vframe, fBending.GetVarName(i), i);
+
+        TGButton *but = (TGButton*)fList->FindWidget(0);
+
+
+
         comp->AddFrame(vframe, hints3);
         fList->Add(vframe);
-
-        for (int i=0; i<MPointing::GetNumPar(); i++)
-            AddCheckButton(vframe, fBending.GetVarName(i), i);
 
         vframe = new TGVerticalFrame(comp, 1, 1);
@@ -1283,11 +1306,12 @@
         fList->Add(vframe);
 
-        l = new TGLabel(vframe, "+000.0000");
+        hints3 = new TGLayoutHints(kLHintsLeft|kLHintsTop, 0, 7, 5, 0);
+        fList->Add(hints3);
+
+        TGLabel *l = new TGLabel(vframe, "+000.0000");
         l->SetTextJustify(kTextRight);
         fList->Add(l);
         fLabel.Add(l);
 
-        TGButton *but = (TGButton*)fList->FindWidget(0);
-
         TGLayoutHints *h = new TGLayoutHints(kLHintsCenterY, 0, 0, but->GetHeight()-l->GetHeight());
         fList->Add(h);
@@ -1301,12 +1325,23 @@
         comp->AddFrame(vframe, hints3);
         fList->Add(vframe);
-
         for (int i=0; i<MPointing::GetNumPar(); i++)
             AddLabel(vframe, "\xb1 00.0000\xb0", h)->SetTextJustify(kTextRight);
+
+        hints3 = new TGLayoutHints(kLHintsLeft|kLHintsTop, 0, 20, 5, 0);
+        fList->Add(hints3);
+
+        TGLayoutHints *hreset = new TGLayoutHints(kLHintsNormal, 0, 0, 3, 1);
+        fList->Add(hreset);
+
+        TGVerticalFrame *vframe2 = new TGVerticalFrame(comp, 1, 1);
+        comp->AddFrame(vframe2, hints3);
+        fList->Add(vframe2);
+        for (int i=0; i<MPointing::GetNumPar(); i++)
+            AddResetButton(vframe2, i+2*MPointing::GetNumPar(), hreset,
+                           but->GetHeight()-4);
 
         vframe = new TGVerticalFrame(comp, 1, 1);
         comp->AddFrame(vframe, hints3);
         fList->Add(vframe);
-
         for (int i=0; i<MPointing::GetNumPar(); i++)
             AddLabel(vframe, fBending.GetDescription(i), h);
Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 8806)
+++ trunk/MagicSoft/Mars/Changelog	(revision 8807)
@@ -18,4 +18,11 @@
 
                                                  -*-*- END OF LINE -*-*-
+
+ 2008/01/14 Thomas Bretz
+
+   * mpointing/MPointing.h:
+     - added enumeration operator[]
+
+
 
  2008/01/11 Thomas Bretz
Index: trunk/MagicSoft/Mars/mpointing/MPointing.h
===================================================================
--- trunk/MagicSoft/Mars/mpointing/MPointing.h	(revision 8806)
+++ trunk/MagicSoft/Mars/mpointing/MPointing.h	(revision 8807)
@@ -227,4 +227,6 @@
     }
 
+    Double_t &operator[](UInt_t i) { return *fCoeff[i]; }
+
     void SetMinuitParameters(TMinuit &m, Int_t n=-1) const;
     void GetMinuitParameters(TMinuit &m, Int_t n=-1);
