Index: trunk/MagicSoft/Mars/mmain/MAnalysis.cc
===================================================================
--- trunk/MagicSoft/Mars/mmain/MAnalysis.cc	(revision 1057)
+++ trunk/MagicSoft/Mars/mmain/MAnalysis.cc	(revision 1076)
@@ -25,5 +25,4 @@
 #include "MAnalysis.h"
 
-#include <stdlib.h>        // atof
 #include <iostream.h>
 
@@ -32,4 +31,6 @@
 #include <TGTextEntry.h>   // TGNumberEntry
 
+#include "MImgCleanStd.h"  // MImgCleanStd
+
 ClassImp(MAnalysis)
 
@@ -59,4 +60,7 @@
     TGCompositeFrame *frame = CreateNewTab("Setup");
 
+    TGGroupFrame *grp = new TGGroupFrame(frame, "Setup Display");
+    fList->Add(grp);
+
     //
     // Align the lines:
@@ -64,88 +68,33 @@
     //  - padding: top=20, bottom=0, left=20, right=0
     //
-    TGLayoutHints *layline = new TGLayoutHints(kLHintsNormal, 20, 0, 20);
-    fList->Add(layline);
+    TGLayoutHints *laybut = new TGLayoutHints(kLHintsNormal, 10, 10, 10);
+    fList->Add(laybut);
 
     //
     // Create check buttons for the first two lines
     //
-    fCheckButton1 = new TGCheckButton(frame, "Display Hillas Histograms when finished");  //, M_CHECK_DISPLHIL);
-    fCheckButton2 = new TGCheckButton(frame, "Display Star Map Histogram when finished"); //, M_CHECK_DISPLHIL);
+    fCheckButton1 = new TGCheckButton(grp, "Display Hillas Histograms when finished");  //, M_CHECK_DISPLHIL);
+    fCheckButton2 = new TGCheckButton(grp, "Display Star Map Histogram when finished"); //, M_CHECK_DISPLHIL);
+
+    fList->AddFirst(fCheckButton1);
+    fList->AddFirst(fCheckButton2);
+
+    //
+    // Create first two lines with the checkbuttons
+    //
+    grp->AddFrame(fCheckButton1, laybut);
+    grp->AddFrame(fCheckButton2, laybut);
+
+    TGLayoutHints *laygrp = new TGLayoutHints(kLHintsNormal|kLHintsExpandX, 20, 20, 20);
+    fList->Add(laygrp);
+
+    frame->AddFrame(grp, laygrp);
 
     /*
-     FIXME...
-
-     fList->Add(fCheckButton1);
-     fList->Add(fCheckButton2);
+     * Create GUI for image cleaning
      */
-
-    //
-    // Create first two lines with the checkbuttons
-    //
-    frame->AddFrame(fCheckButton1, layline);
-    frame->AddFrame(fCheckButton2, layline);
-
-    //
-    // Create entry fields and labels for line 3 and 4
-    //
-
-    /*
-     * --> use with root >=3.02 <--
-     *
-
-     TGNumberEntry *fNumEntry1 = new TGNumberEntry(frame, 3.0, 2, M_NENT_LVL1, kNESRealOne, kNEANonNegative);
-     TGNumberEntry *fNumEntry2 = new TGNumberEntry(frame, 2.5, 2, M_NENT_LVL1, kNESRealOne, kNEANonNegative);
-
-     */
-
-    //
-    // Create a frame for line 3 and 4 to be able
-    // to align entry field and label in one line
-    //
-    TGHorizontalFrame *f1 = new TGHorizontalFrame(frame, 0, 0);
-    TGHorizontalFrame *f2 = new TGHorizontalFrame(frame, 0, 0);
-
-    fNumEntry1 = new TGTextEntry(f1, "****");
-    fNumEntry2 = new TGTextEntry(f2, "****");
-
-    // --- doesn't work like expected --- fNumEntry1->SetAlignment(kTextRight);
-    // --- doesn't work like expected --- fNumEntry2->SetAlignment(kTextRight);
-
-    fNumEntry1->SetText("3.0");
-    fNumEntry2->SetText("2.5");
- 
-    fList->Add(fNumEntry1);
-    fList->Add(fNumEntry2);
-
-    TGLabel *l1 = new TGLabel(f1, "Cleaning Level 1 for standard image cleaning.");
-    TGLabel *l2 = new TGLabel(f2, "Cleaning Level 2 for standard image cleaning.");
-
-    l1->SetTextJustify(kTextLeft);
-    l2->SetTextJustify(kTextLeft);
-
-    fList->Add(l1);
-    fList->Add(l2);
-
-    //
-    // Align the text of the label centered, left in the row
-    // with a left padding of 10
-    //
-    TGLayoutHints *laylabel = new TGLayoutHints(kLHintsCenterY|kLHintsLeft, 10); //, 10); //, 5, 5);
-    fList->Add(laylabel);
-
-    //
-    // Add one entry field and the corresponding label to each line
-    //
-    f1->AddFrame(fNumEntry1);
-    f2->AddFrame(fNumEntry2);
-
-    f1->AddFrame(l1, laylabel);
-    f2->AddFrame(l2, laylabel);
-
-    //
-    // Add line 3 and 4 to tab
-    //
-    frame->AddFrame(f1, layline);
-    frame->AddFrame(f2, layline);
+    fImgClean = new MImgCleanStd;
+    fImgClean->CreateGui(frame, laygrp);
+    fList->Add(fImgClean);
 }
 
@@ -192,19 +141,4 @@
     const Bool_t displstarmap = fCheckButton2->GetState();
 
-    Float_t cleanlvl1 = atof(fNumEntry1->GetText());
-    Float_t cleanlvl2 = atof(fNumEntry2->GetText());
-
-    if (cleanlvl1<0)
-    {
-        cleanlvl1=0;
-        fNumEntry1->SetText("0");
-    }
-
-    if (cleanlvl2<0)
-    {
-        cleanlvl2=0;
-        fNumEntry2->SetText("0");
-    }
-
     //
     // Create a empty Parameter List and an empty Task List
@@ -245,10 +179,9 @@
 
     MCerPhotCalc ncalc;
-    MImgCleanStd clean(cleanlvl1, cleanlvl2);
     MHillasCalc  hcalc;
 
     tlist.AddToList(&read);
     tlist.AddToList(&ncalc);
-    tlist.AddToList(&clean);
+    tlist.AddToList(fImgClean);
     tlist.AddToList(&hcalc);
 
Index: trunk/MagicSoft/Mars/mmain/MAnalysis.h
===================================================================
--- trunk/MagicSoft/Mars/mmain/MAnalysis.h	(revision 1057)
+++ trunk/MagicSoft/Mars/mmain/MAnalysis.h	(revision 1076)
@@ -9,4 +9,6 @@
 class TGCheckButton;
 
+class MImgCleanStd;
+
 class MAnalysis : public MBrowser
 {
@@ -15,6 +17,8 @@
     TGCheckButton *fCheckButton2;
 
-    TGTextEntry   *fNumEntry1;
-    TGTextEntry   *fNumEntry2;
+//    TGTextEntry   *fNumEntry1;
+//    TGTextEntry   *fNumEntry2;
+
+    MImgCleanStd  *fImgClean;
 
     void CalculateHillas();
