# data file for the Fltk User Interface Designer (fluid)
version 1.0108 
i18n_type 1 
i18n_include <libintl.h> 
i18n_function _ 
header_name {.h} 
code_name {.cxx}
decl {\#include "icc_examin.h"} {public
} 

decl {\#include "icc_profile.h"
\#include "config.h"
\#include "icc_utils.h"
\#include "icc_ueber.h"
\#include "icc_helfer.h"
\#include "icc_helfer_fltk.h"} {public
} 

decl {\#include <cassert>} {public
} 

decl {\#include <iostream>} {public
} 

decl {//\#include <sstream>} {public
} 

decl {\#include <stdio.h>} {public
} 

decl {\#include <string>} {public
} 

decl {\#include <vector>} {public
} 

decl {\#include <FL/Fl.H>} {public
} 

decl {\#include <FL/Fl_Window.H>} {public
} 

decl {\#include <FL/Fl_Menu_Bar.H>} {public
} 

decl {\#include <FL/Fl_Box.H>} {public
} 

decl {\#include "icc_gl.h"} {} 

decl {\#include "icc_draw.h"
\#include "icc_kette.h"
\#include "icc_oyranos_extern.h"
\#include "fl_i18n/fl_i18n.H"} {} 

decl {\#include "icc_fenster.h" 
\#include "icc_dateiwahl.h" 
\#include <FL/Fl_Hold_Browser.H>
\#include <FL/Fl_Choice.H>} {public
} 

decl {class TagDrawings;
class TagBrowser;
class TagTexts;
class MftChoice;
class GL_Ansicht;} {public
} 

decl {using namespace icc_examin_ns;} {} 

Function {iccReadInfo(char* filename)} {return_type {const char*}
} {
  code DBG_PROG_START {}
  code {char systemBefehl[1024];
  const char *textfile = "/tmp/icc_temp.txt";


  sprintf (systemBefehl, "iccdump \\"%s\\" > %s",
                                    filename, textfile);
  system (systemBefehl);

  return textfile;} {}
  code DBG_PROG_ENDE {}
} 

class TagBrowser {open : {public Fl_Hold_Browser}
} {
  decl {int X; int Y; int W; int H; const char* start_info; std::string selectedTagName;} {public
  }
  Function {TagBrowser(int X,int Y,int W,int H,const char* start_info) : Fl_Hold_Browser(X,Y,W,H,start_info), X(X), Y(Y), W(W), H(H)} {open
  } {}
  Function {reopen_nicht()} {open
  } {
    code DBG_PROG_START {}
    code {} {}
    code DBG_PROG_ENDE {}
  }
  Function {selectItem(int item)} {open
  } {
    code DBG_PROG_START {}
    code {// selection from tag_browser

  status("")

  item -= 6;
  DBG_PROG_S( item << ". Tag " )
  
  std::string text = icc_examin->waehleTag(item);
  if (text != "")
    selectedTagName = text;
  DBG_PROG_V( text );} {}
    code DBG_PROG_ENDE {}
  }
  Function {visible()} {return_type int
  } {
    code {return Fl_Widget::visible();} {}
  }
} 

decl {typedef const char* (*tagTextsCB_f)(int * line);} {public global
} 

class TagTexts {open : {public Fl_Hold_Browser}
} {
  decl {int X; int Y; int W; int H; const char* start_info;} {}
  decl {int inspekt_topline;} {public
  }
  Function {TagTexts(int X,int Y,int W,int H,const char* start_info) : Fl_Hold_Browser(X,Y,W,H,start_info), X(X), Y(Y), W(W), H(H)} {open
  } {
    code {cb = NULL;} {}
  }
  Function {hinein(std::string text, std::vector<int> patches)} {open
  } {
    code DBG_PROG_START {}
    code {//show text from tag_browser

      inspekt_topline = this->topline();

      this->clear();

      std::vector <std::string> texte = icc_parser::zeilenNachVector( text );
      int odd = 1;
      int k = 0;
      for (unsigned int i = 0; i < texte.size(); i++)
      {
        std::string text;
        if( patches.size() > k )
        if( patches[k] == (int)i )
        { 
          if(odd) {
\#if 0
            char t[8];
            sprintf(t, "%d", k/2); // test for a goof colour @31
            text = "@B";
            text.append( t );
            text.append("@.");
\#else
            text = "@B7@.";
\#endif
          }
          odd = !odd;
          ++k;
        }

        text.append( texte[i] );
        this->add( text.c_str(), 0);
      }

      this->topline(inspekt_topline);
      this->textfont(FL_COURIER);
      this->textsize(14);} {}
    code DBG_PROG_ENDE {}
  }
  Function {hinein(std::string text)} {open
  } {
    code DBG_PROG_START {}
    code {std::vector<int> patches;
this->hinein( text, patches );} {}
    code DBG_PROG_ENDE {}
  }
  decl {tagTextsCB_f cb;} {public global
  }
  Function {selectItem(int item)} {open
  } {
    code DBG_PROG_START {}
    code {// selection from tag_browser

  const char * txt = 0;
  int i = item;

  status("")

  DBG_PROG_S( item << ". Tag " )
  
  if (cb)
    txt = (*cb) ( &i );

  if(i != item)
    select(i);} {}
    code DBG_PROG_ENDE {}
  }
} 

decl {\#include <FL/fl_draw.H>} {} 

class MftChoice {: {public Fl_Choice}
} {
  decl {int X; int Y; int W; int H; const char* start_info; char typ[5];} {}
  decl {std::vector<std::string> Info; int gewaehlter_eintrag;} {public
  }
  Function {MftChoice(int X,int Y,int W,int H,const char* start_info) : Fl_Choice(X,Y,W,H,start_info), X(X), Y(Y), W(W), H(H)} {open
  } {
    code {gewaehlter_eintrag = 0;} {}
  }
  Function {profilTag(int _tag, std::string text)} {open
  } {
    code DBG_PROG_START {}
    code {icc_examin->icc_betrachter->tag_nummer = _tag;

// = profile.profil()->printTagInfo(icc_examin->icc_betrachter->tag_nummer);
    sprintf (&typ[0], profile.profil()->printTagInfo(icc_examin->icc_betrachter->tag_nummer)[1].c_str());

    DBG_PROG_V( profile.profil()->printTagInfo(icc_examin->icc_betrachter->tag_nummer)[1].c_str() )

    Info = icc_parser::zeilenNachVector (text);

    if ( strstr (typ,"mft2") != 0 )
    { DBG_PROG
      Fl_Menu_Item *mft_menue = (Fl_Menu_Item *)calloc (sizeof (Fl_Menu_Item), 6);

      mft_menue[0].text = Info[0].c_str();
      mft_menue[1].text = Info[4].c_str();
      mft_menue[2].text = Info[5].c_str();
      mft_menue[3].text = Info[6].c_str();
      mft_menue[4].text = Info[7].c_str();
      mft_menue[5].text = 0;
      icc_examin->icc_betrachter->mft_choice->menu(mft_menue);
    } else { DBG_PROG
      Fl_Menu_Item *mft_menue = (Fl_Menu_Item *)calloc (sizeof (Fl_Menu_Item), 6);

      mft_menue[0].text = Info[0].c_str();
      mft_menue[1].text = Info[4].c_str();
      mft_menue[2].text = _("lineare entrance curve with 256 steps");
      mft_menue[3].text = Info[5].c_str();
      mft_menue[4].text = _("lineare exit curve with 256 steps");
      mft_menue[5].text = 0;
      icc_examin->icc_betrachter->mft_choice->menu(mft_menue);
    }

    icc_examin->icc_betrachter->mft_choice->value( gewaehlter_eintrag );

  //auswahlCb();} {}
    code DBG_PROG_ENDE {}
  }
  Function {auswahlCb(void)} {} {
    code DBG_PROG_START {}
    code {//Auswahl aus mft_choice

  status("")

  Fl_Menu_* mw = (Fl_Menu_*)this;
  const Fl_Menu_Item* m = mw->mvalue();
  if (!m) {
    DBG_PROG_S("NULL \\n")
  } else if (m->shortcut()) {
    DBG_PROG_S("%s - %s \\n" << m->label() << fl_shortcut_label(m->shortcut()))
  } else {
    DBG_PROG_S("%s \\n" << m->label())
  }

  icc_examin->waehleMft( mw->value() );

  DBG_PROG} {}
    code DBG_PROG_ENDE {}
  }
} 

class My_Fl_Box {: {public Fl_Box}
} {
  Function {My_Fl_Box(int X,int Y,int W, int H, const char* title = 0) : Fl_Box(X,Y,W,H,title)} {open
  } {}
  Function {handle( int event )} {open return_type int
  } {
    code {int ergebnis = tastatur(event);
  if(!ergebnis)
    ;//ergebnis = Fl_Box::handle(event);
  return ergebnis;} {}
  }
} 

Function {mft_gl_menueCb_(Fl_Widget * w, void * data)} {open private
} {
  code {icc_examin->icc_betrachter->mft_gl->menueAufruf( (intptr_t) data );} {}
} 

class ICCfltkBetrachter {open
} {
  decl {bool setTitleUrl;

 int px,py,pw,ph;
 int fullscreen;
  
 int tag_nummer;
  
 enum{ WID_0, WID_3D, WID_INSPEKT }; int widget_oben;} {public
  }
  Function {init(int argc, char** argv)} {open
  } {
    code DBG_PROG_START {}
    code {fullscreen = false;
  setTitleUrl = true;} {}
    Fl_Window ueber {
      label {About ICC Examin} open
      xywh {844 749 365 295} type Double resizable
      code0 {o->hide();}
      code1 {o->use_escape_hide = true;}
      class {icc_examin_ns::MyFl_Double_Window} visible
    } {
      Fl_Group {} {open
        xywh {0 0 375 295}
      } {
        Fl_Tabs {} {open
          xywh {0 0 365 260} resizable
        } {
          Fl_Help_View ueber_html {
            label About
            xywh {0 25 365 235} box THIN_UP_BOX color 49 selection_color 47
          }
          Fl_Help_View hilfe_html {
            label Help
            xywh {0 25 365 235} box THIN_UP_BOX color 49 selection_color 47 hide
          }
          Fl_Help_View lizenz_html {
            label License
            xywh {0 25 365 235} box THIN_UP_BOX color 49 selection_color 47 hide resizable
          }
          Fl_Help_View dank_html {
            label Acknowlegement
            xywh {0 25 365 235} box THIN_UP_BOX color 49 selection_color 47 hide
          }
          Fl_Output links_text {
            label Links
            xywh {10 35 345 215} type Multiline box THIN_DOWN_BOX color 49 selection_color 47 hide
          }
        }
        Fl_Button ja {
          label Yes
          callback {ueber->hide();}
          xywh {130 264 110 25}
        }
      }
    }
    Fl_Window vcgt {
      label {Grafic Card Gamma Table} open
      xywh {223 639 370 405} type Double resizable
      code0 {o->hide();}
      code1 {o->use_escape_hide = true;}
      class {icc_examin_ns::MyFl_Double_Window} visible
    } {
      Fl_Group {} {open
        xywh {0 0 370 395}
      } {
        Fl_Box vcgt_viewer {
          xywh {0 0 370 360} resizable
          code0 {o->show();}
          class TagDrawings
        }
        Fl_Button vcgt_set_button {
          label Set
          callback {icc_examin->moniSetzen();}
          tooltip {Set the current profile as monitor profile and upload vcgt tag to the video card} xywh {10 370 85 25} hotspot
        }
        Fl_Button vcgt_reset_button {
          label Reset
          callback {icc_examin->standardGamma();}
          tooltip {reset to standard gamma} xywh {95 370 90 25} hotspot
        }
        Fl_Button vcgt_load_button {
          label Load
          callback {icc_examin->moniHolen();}
          tooltip {Load the current monitor profile} xywh {185 370 90 25} hotspot
        }
        Fl_Button vcgt_close_button {
          label Close
          callback {icc_examin->vcgtStoppen();}
          xywh {275 370 90 25}
        }
      }
    }
    Fl_Window DD {
      label Gamut open
      xywh {896 221 385 520} type Double box NO_BOX resizable
      class {icc_examin_ns::MyFl_Double_Window} visible
    } {
      Fl_Group {} {open
        xywh {0 0 385 520}
      } {
        Fl_Menu_Bar DD_menueleiste {
          xywh {0 0 385 25} align 20 when 3
        } {
          Submenu {} {
            label File open
            xywh {0 0 100 20}
          } {
            MenuItem {} {
              label Quit
              callback {quit()}
              xywh {30 30 100 20} shortcut 0x40071
            }
          }
          Submenu {} {
            label View open
            xywh {25 25 100 20}
          } {
            MenuItem DD_menueintrag_Voll {
              label {Whole Screen on/off}
              callback {Fl_Window *w = o->window();

  if (!fullscreen) {
    px = w->x();
    py = w->y();
    pw = w->w();
    ph = w->h();

    w->fullscreen();
    fullscreen = true;
  } else {
    w->fullscreen_off(px,py,pw,ph);
    fullscreen = false;
  }}
              xywh {25 25 100 20} shortcut 0x40076
            }
          }
          Submenu {} {
            label Settings open
            xywh {35 35 100 20}
          } {
            MenuItem menueintrag_gamutwarn {
              label {Gamut Warning}
              callback {Fl_Menu_* mw = (Fl_Menu_*)o;
  const Fl_Menu_Item* m = mw->mvalue();

  DBG_PROG_S (m->value())

  icc_examin->gamutwarn(m->value());}
              tooltip {Gamut Warning will gray out all colours not in your monitors gamut.} xywh {35 35 100 20} type Toggle shortcut 0x40077
              code0 {if(icc_examin->gamutwarn()) o->set();}
            }
            MenuItem menueintrag_phot_intent {
              label Perceptual
              callback {Fl_Menu_* mw = (Fl_Menu_*)o;
  const Fl_Menu_Item* m = mw->mvalue();

  DBG_PROG_S (m->value())

  menueintrag_rel_col_intent->clear();
  menueintrag_abs_col_intent->clear();

  if(m->value())
    icc_examin->intent(0);
  else
    icc_examin->intent(-1);}
              tooltip {Enable Perceptual Intent} xywh {45 45 100 20} type Toggle shortcut 0x40066
            }
            MenuItem menueintrag_rel_col_intent {
              label {Relative Colorimetric}
              callback {Fl_Menu_* mw = (Fl_Menu_*)o;
  const Fl_Menu_Item* m = mw->mvalue();

  DBG_PROG_S (m->value())

  menueintrag_phot_intent->clear();
  menueintrag_abs_col_intent->clear();

  if(m->value())
    icc_examin->intent(1);
  else
    icc_examin->intent(-1);}
              tooltip {Enable Whitepoint Adaption;  useful for gamut comparisions} xywh {55 55 100 20} type Toggle shortcut 0x40072
            }
            MenuItem menueintrag_abs_col_intent {
              label {Absolute Colorimetric}
              callback {Fl_Menu_* mw = (Fl_Menu_*)o;
  const Fl_Menu_Item* m = mw->mvalue();

  DBG_PROG_S (m->value())

  menueintrag_phot_intent->clear();
  menueintrag_rel_col_intent->clear();

  if(m->value())
    icc_examin->intent(3);
  else
    icc_examin->intent(-1);}
              tooltip {Enable Whitepoint Adaption;  useful for gamut comparisions} xywh {65 65 100 20} type Toggle shortcut 0x40061
            }
            MenuItem menueintrag_bpc {
              label BPC
              callback {Fl_Menu_* mw = (Fl_Menu_*)o;
  const Fl_Menu_Item* m = mw->mvalue();

  DBG_PROG_S (m->value())

  if(m->value())
    icc_examin->bpc(0);
  else
    icc_examin->bpc(1);}
              tooltip {Black Point Compensation} xywh {65 65 100 20} type Toggle shortcut 0x40062
            }
          }
          Submenu {} {
            label Windows open
            xywh {0 0 100 20}
          } {
            MenuItem {} {
              label {Show Main Window}
              callback {DBG_PROG_START
  details->show();
  DBG_PROG_ENDE}
              xywh {65 65 100 20} shortcut 0x4006d
            }
          }
        }
        Fl_Tile {} {open
          xywh {0 25 385 495} resizable
        } {
          Fl_Box DD_farbraum {
            xywh {0 25 385 470} box THIN_DOWN_BOX resizable
            code0 {o->hide();}
            code1 {o->typ( 1 ); // wandert ins 1. Nebenfenster}
            class GL_Ansicht
          }
          Fl_Box DD_box_stat {
            xywh {0 495 385 25} box FLAT_BOX align 21
          }
        }
      }
      Fl_Box no_box2 {
        xywh {0 0 385 520}
        code0 {o->box(FL_NO_BOX);}
        class My_Fl_Box
      }
    }
    Fl_Window details {
      label {ICC Examin} open
      xywh {375 478 385 520} type Double box NO_BOX
      code0 {o->main_win = o;}
      class {icc_examin_ns::MyFl_Double_Window} visible
    } {
      Fl_Group {} {
        label all_invisible open
        xywh {0 0 385 520}
      } {
        Fl_Menu_Bar menueleiste {
          label menuleiste_invisible open
          xywh {0 0 385 25} align 4 when 3
        } {
          Submenu {} {
            label File open
            xywh {15 15 100 20}
          } {
            MenuItem {} {
              label Open
              callback {icc_examin->oeffnen()}
              xywh {15 15 100 20} shortcut 0x4006f
            }
            MenuItem menueintrag_html_speichern {
              label {Save Report}
              callback {DBG_PROG_START

  icc_examin->berichtSpeichern ();

  DBG_PROG_ENDE}
              xywh {0 0 100 20} deactivate divider
            }
            MenuItem menueintrag_gamut_speichern {
              label {Save Gamut as Profile}
              callback {DBG_PROG_START

  icc_examin->gamutSpeichern (icc_examin_ns::ICC_ABSTRACT);

  DBG_PROG_ENDE}
              tooltip {Save gamut as abstract profile useful for proofing} xywh {10 10 100 20} deactivate
            }
            MenuItem menueintrag_gamut_vrml_speichern {
              label {Save Gamut as VRML}
              callback {DBG_PROG_START

  icc_examin->gamutSpeichern (icc_examin_ns::ICC_VRML);

  DBG_PROG_ENDE}
              tooltip {Save gamut as VRML useful for visualisation.} xywh {20 20 100 20} deactivate divider
            }
            MenuItem {} {
              label Quit
              callback {quit()}
              xywh {15 15 100 20} shortcut 0x40071
            }
          }
          MenuItem menueintrag_huelle {
            label Gamut
            callback {DBG_PROG_START
  icc_examin->zeig3D();
  DBG_PROG_ENDE}
            xywh {60 60 100 20} shortcut 0x40068 hide
          }
          Submenu {} {
            label View open
            xywh {15 15 100 20}
          } {
            MenuItem menueintrag_Voll {
              label {Whole Screen on/off}
              callback {Fl_Window *w = (Fl_Window *)details;

  if (!fullscreen) {
    px = w->x();
    py = w->y();
    pw = w->w();
    ph = w->h();

    w->fullscreen();
    fullscreen = true;
  } else {
    w->fullscreen_off(px,py,pw,ph);
    fullscreen = false;
  }}
              xywh {15 15 100 20} shortcut 0x40076
            }
          }
          Submenu menu_einstellungen {
            label Settings open
            xywh {25 25 100 20} hide
          } {
            MenuItem menueintrag_oyranos {
              label {Oyranos Settings}
              callback {icc_examin->oyranos_einstellungen();}
              xywh {25 25 100 20}
            }
            MenuItem menueintrag_lang {
              label LANG
              callback {system("echo $LANG");
\# ifdef USE_GETTEXT
  DBG_S( "domain     : " << textdomain(NULL) );
  DBG_S( "domain_path: " << bindtextdomain(NULL,NULL) );
\# endif}
              tooltip {test LANG} xywh {80 80 100 20} hide deactivate
            }
          }
          Submenu {} {
            label Windows open
            xywh {10 10 100 20} divider
          } {
            MenuItem menueintrag_3D {
              label Gamut
              callback {DBG_PROG_START
  icc_examin->zeig3D();
  DBG_PROG_ENDE}
              xywh {55 55 100 20} shortcut 0x40068 divider
            }
            MenuItem menueintrag_inspekt {
              label {Report View}
              callback {icc_examin->zeigPrueftabelle();}
              xywh {45 45 100 20} shortcut 0x40062 deactivate
            }
            MenuItem menueintrag_zeigcgats {
              label {CGATS View}
              callback {\#ifdef DEBUG
  Fl_Menu_* mw = (Fl_Menu_*)o;
  const Fl_Menu_Item* m = mw->mvalue();

  DBG_PROG_S (m->value())
\#endif

  icc_examin->zeigCGATS();}
              xywh {55 55 100 20} shortcut 0x40067 deactivate divider
            }
            MenuItem menueintrag_vcgt {
              label {Videocard Gamma}
              callback {icc_examin->vcgtStoppen();
vcgt->show();
icc_examin->vcgtZeigen();}
              xywh {20 20 100 20} shortcut 0x40074
              code0 {o->hide();}
            }
            MenuItem menueintrag_testkurven {
              label {Test Curves}
              callback {vcgt->show();
icc_examin->testZeigen();}
              xywh {30 30 100 20} shortcut 0x50074 hide
            }
          }
          Submenu menu_hilfe {
            label Help open
            xywh {0 0 100 20}
          } {
            MenuItem {} {
              label About
              callback {ueber->hotspot(ueber_html);
  ueber->show();
  initHilfe();

  /* set visible */
  Fl_Tabs *tb = dynamic_cast<Fl_Tabs*>(hilfe_html->parent());
  if(tb)
    tb->value(icc_examin->icc_betrachter->ueber_html);}
              xywh {5 5 100 20}
            }
            MenuItem {} {
              label Help
              callback {ueber->hotspot(hilfe_html);
  ueber->show();
  initHilfe();

  /* set visible */
  Fl_Tabs *tb = dynamic_cast<Fl_Tabs*>(hilfe_html->parent());
  if(tb)
    tb->value(icc_examin->icc_betrachter->hilfe_html);}
              xywh {15 15 100 20} shortcut 0xffbe
            }
            MenuItem {} {
              label License
              callback {ueber->hotspot(lizenz_html);
  ueber->show();
  initHilfe();

  /* set visible */
  Fl_Tabs *tb = dynamic_cast<Fl_Tabs*>(hilfe_html->parent());
  if(tb)
    tb->value(icc_examin->icc_betrachter->lizenz_html);}
              xywh {25 25 100 20}
            }
          }
        }
        Fl_Group {} {
          label tags_group_invisible open
          xywh {0 25 385 470} align 4 resizable
        } {
          Fl_Group {} {
            label inspect_html_group_invisible open
            xywh {0 25 385 470} align 4
          } {
            Fl_Help_View inspekt_html {
              label Inspect_html_invisible
              xywh {0 25 385 470} box FLAT_BOX color 49 align 4 resizable
              code0 {o->hide();}
            }
          }
          Fl_Tile examin {
            label examin_invisible open
            xywh {0 25 385 470} align 4 resizable
          } {
            Fl_Browser tag_browser {
              label tag_browser_invisible
              callback {o->selectItem( o->value() );}
              tooltip {Choose one profile tag} xywh {0 25 385 135} box THIN_DOWN_BOX color 49 align 4
              class TagBrowser
            }
            Fl_Group ansichtsgruppe {
              label ansichtsgruppe_invisible open
              xywh {0 160 385 335} align 4
            } {
              Fl_Group tabellengruppe {
                label tabellengruppe_invisible open
                xywh {0 160 385 335} align 4
                code0 {o->show();}
              } {
                Fl_Pack {} {
                  label tabellenpack_invisible open
                  xywh {0 160 385 335} align 4 resizable
                } {
                  Fl_Choice mft_choice {
                    label {Chain selection}
                    callback {o->auswahlCb();} open
                    tooltip {Choose a attribute} xywh {0 160 385 25} box NO_BOX down_box BORDER_BOX
                    code0 {o->show();}
                    class MftChoice
                  } {}
                  Fl_Group {} {
                    label tabellengruppe2_invisible open
                    xywh {0 185 385 310} align 4 resizable
                  } {
                    Fl_Box mft_viewer {
                      label mft_viewer_invisible
                      xywh {0 185 385 310} align 4
                      code0 {o->show();}
                      class TagDrawings
                    }
                    Fl_Browser mft_text {
                      label mft_text_invisible
                      callback {o->selectItem( o->value() );}
                      xywh {0 185 385 310} box FLAT_BOX color 49 align 4
                      code0 {o->show();}
                      class TagTexts
                    }
                    Fl_Group mft_gl_group {
                      label mft_gl_group_invisible open
                      xywh {0 185 385 310} align 4 resizable
                    } {
                      Fl_Box {} {
                        label mft_gl_box_invisible
                        xywh {0 185 385 310} box FLAT_BOX align 4
                      }
                      Fl_Box mft_gl {
                        label mft_gl_invisible
                        xywh {0 185 360 310} align 4 resizable
                        code0 {o->hide();}
                        code1 {o->typ( 2 ); // bleibt zumeist im Hauptfenster}
                        class GL_Ansicht
                      }
                      Fl_Pack mft_gl_button_pack {open
                        xywh {360 185 25 310}
                      } {
                        Fl_Button mft_gl_alltables_button {
                          label o
                          callback {icc_examin->zeigMftTabellen();}
                          tooltip {Show all channels of this table a own window.} xywh {360 185 25 25}
                          code0 {o->show();}
                        }
                      }
                    }
                  }
                }
              }
              Fl_Pack twoD_pack {
                label tag_pack_invisible open
                xywh {0 160 385 335} align 4
              } {
                Fl_Box {} {
                  label tag_box_invisible
                  xywh {0 160 385 5} box UP_BOX align 4
                }
                Fl_Group {} {
                  label tag_group_invisible open
                  xywh {0 165 385 330} align 4 resizable
                } {
                  Fl_Browser tag_text {
                    label { tag_text_invisible}
                    callback {o->selectItem( o->value() );}
                    xywh {0 165 385 330} box FLAT_BOX color 49 align 4
                    code0 {o->show();}
                    class TagTexts
                  }
                  Fl_Box tag_viewer {
                    label tag_viewer_invisible
                    xywh {0 165 385 330} align 4
                    code0 {o->hide();}
                    class TagDrawings
                  }
                }
              }
            }
          }
        }
        Fl_Group {} {
          label status_group_invisible open
          xywh {0 495 385 25} align 4
        } {
          Fl_Box box_stat {
            label {...} selected
            xywh {0 495 385 25} align 20
          }
          Fl_Progress load_progress {
            label {Loading ..}
            xywh {0 495 385 25} box THIN_UP_BOX color 49
            code0 {o->hide();}
            code1 {o->minimum(0.0);}
            code2 {o->maximum(1.0);}
          }
        }
      }
      Fl_Box no_box {
        label no_box_invisible
        xywh {0 0 385 520} align 4
        code0 {o->box(FL_NO_BOX);}
        class My_Fl_Box
      }
    }
    code {tag_text->inspekt_topline = 0;

  details->resizable(tag_text);
  //Fl::background(190,190,190);
  //Fl::background(255,255,255);
  //Fl::scheme(NULL);
  Fl_File_Icon::load_system_icons();
  Fl::get_system_colors();
  details->show((int)argc, (char**)argv);
  { // plastic sets a background image, for others unset a transparent box
    const char* style = Fl::scheme();
    if(!style || (style && strstr(style,"plastic") == 0))
      box_stat->box(FL_FLAT_BOX);
  }
  DBG_PROG} {}
    code DBG_PROG_ENDE {}
  }
  Function {run(int argc, char** argv)} {open return_type int
  } {
    code DBG_PROG_START {}
    code {int ret = Fl::run();

  DBG_PROG_ENDE;
  return ret;} {}
  }
  Function {open_veraltet(std::vector<std::string> dateinamen)} {open return_type {std::vector<std::string>}
  } {
    code DBG_PROG_START {}
    code {\#include "icc_vrml.h"

  //Fl_File_Icon	*icon;	// New file icon
  DBG_PROG

    const char* ptr = NULL;
    if (dateinamen.size()) {
      ptr = dateinamen[0].c_str();
      dateiwahl->value(ptr);
      DBG_PROG_S( dateinamen[0])
    } 
      if(ptr) DBG_PROG_V( ptr );
    if (!ptr)
      ptr = getenv("PWD");

      if(ptr) DBG_PROG_V( ptr )
    if(( ptr &&
        (ptr[0] == '/') &&
        (strlen(ptr) == 1) ) ||
        !ptr )
    {
      ptr = getenv("HOME");
    }

    dateiwahl->show();

    if(ptr)
      dateiwahl->value(ptr);


    while (dateiwahl->visible())
      Fl::wait();

    DBG_NUM_V( dateiwahl->count() )
    if (dateiwahl->count() && dateiwahl->value()) {
      DBG_NUM_V( dateiwahl->value() )
      dateinamen.resize(dateiwahl->count());
      for (int i = 1; i <= dateiwahl->count(); i++)
        dateinamen[i-1] = dateiwahl->value(i);
    }
  DBG_PROG


  if (dateinamen.size() == 0) {
    DBG_PROG_ENDE
    return dateinamen;
  }

  DBG_PROG_ENDE
  return dateinamen;} {}
  }
  Function {quit(void)} {} {
    code DBG_PROG_START {}
    code {/*Fl::remove_timeout((void (*)(void *))timeIT, (void *)viewer);
  delete viewer;
  delete browser;
  delete canvas;
  details->hide();*/
  icc_examin->quit();} {}
    code DBG_PROG_ENDE {}
  }
  Function {zeig_mich_(void* widget)} {} {
    code DBG_PROG_START {}
    code {// zeigt das ausgewaehlte Fenster (widget)

  mft_viewer->hide();
  mft_text->hide();
  tag_viewer->hide(); DBG_PROG
  tag_viewer->clear_visible(); DBG_PROG
  tag_text->hide();
  inspekt_html->hide();

  // stop
  if (widget != mft_gl) {
    mft_gl->hide();
  }
  if (widget != DD_farbraum ) {
    DD_farbraum->hide();
  }

  // start
  if( widget == inspekt_html )
  { DBG_PROG_S("inspekt_html handling")
    if( menueintrag_inspekt->value() )
      inspekt_html->show();
    else
      inspekt_html->hide();
  }

  if (widget != mft_gl &&
      widget != DD_farbraum )
  { 
    ((Fl_Widget*)widget)->show(); DBG_PROG
    if( !menueintrag_inspekt->value() &&
        !menueintrag_3D->value() )
      ;//selectItem(icc_examin->tag_nr()+6);
  } else if (widget == mft_gl) {
    DBG_PROG_S( "leave mft GL window." )
    mft_gl->show();
  } else if (widget == DD_farbraum) {
    DBG_PROG_S( "leave 3D GL window." )
    DD_farbraum->show();
  }} {}
    code DBG_PROG_ENDE {}
  }
  Function {measurement(bool has_measurement)} {open
  } {
    code {if (has_measurement) {
    DBG_PROG_S(menueintrag_inspekt->value())
    if (menueintrag_inspekt->value()) {
      inspekt_html->value(profile.profil()->report(false).c_str());
      if (inspekt_html->size() -75 < tag_text->inspekt_topline)
        inspekt_html->topline (inspekt_html->size() - 75);
      else
        inspekt_html->topline (tag_text->inspekt_topline);
    }
    menueintrag_inspekt->activate();
    menueintrag_html_speichern->activate();
    menueintrag_zeigcgats->activate();
  } else {
    menueintrag_inspekt->deactivate();
    menueintrag_html_speichern->deactivate();
    menueintrag_zeigcgats->deactivate();
  }} {}
  }
  decl {Fl_Button ** mft_gl_tables_buttons;} {global
  }
  Function {mft_gl_boxAdd( const char ** names_short, const char** names, int n, int actual )} {open
  } {
    code DBG_PROG_START {}
    code {int i;
    int h = mft_gl_alltables_button->h(),
        w = mft_gl_alltables_button->w();
    Fl_Button * o;

    mft_gl_group->begin();
    if(mft_gl_tables_buttons)
      for(i = 1; i <= (intptr_t)mft_gl_tables_buttons[0] + 1; ++i)
      {
        mft_gl_tables_buttons[i]->hide();
        mft_gl_button_pack->remove( mft_gl_tables_buttons[i] );
        if(mft_gl_tables_buttons[i])
          delete mft_gl_tables_buttons[i];
      }

    mft_gl_button_pack->begin();
    mft_gl_button_pack->size( mft_gl_button_pack->w(), mft_gl_group->h() );

    mft_gl_tables_buttons = new Fl_Button* [n+2];
    mft_gl_tables_buttons[0] = (Fl_Button*)(intptr_t) n;

    for(i = 1; i <= (intptr_t)mft_gl_tables_buttons[0]; ++i)
    {
      int kanal = i - 1;

      mft_gl_tables_buttons[i] = o = 
        new Fl_Button( mft_gl_alltables_button->x(),
                       mft_gl_alltables_button->y() + i*h,
                       w,h );
      o->copy_label( names_short[ kanal ] );
      o->callback( (Fl_Callback*)mft_gl_menueCb_ );
      o->user_data( (void*)(intptr_t)(GL_Ansicht::MENU_MAX + kanal) );
      o->tooltip( icc_strdup_m( names[ kanal ] ) );
      o->when(FL_WHEN_RELEASE);
      if(i-1 == actual)
        o->take_focus();
    }
    int oh = mft_gl_button_pack->y() + mft_gl_group->h() - (mft_gl_tables_buttons[i-1]->y() + h);

    mft_gl_tables_buttons[i] = o = new Fl_Button( mft_gl_alltables_button->x(),
                       mft_gl_alltables_button->y() + i*h,
                       w,oh );
    o->box(FL_NO_BOX);
    mft_gl_button_pack->end();
    mft_gl_button_pack->resizable(o);
  mft_gl_group->end();
  
  DBG_PROG_ENDE} {}
  }
} 

Function {dHaendler(void* o)} {return_type {static void}
} {
  code DBG_PROG_START {}
  code {Fl::remove_timeout( (void(*)(void*))dHaendler, 0 );

  if (!Fl::has_timeout( (void(*)(void*))dHaendler, 0 )
   && ((TagDrawings*)o)->active()
   && ((TagDrawings*)o)->visible_r()
   && ((TagDrawings*)o)->wiederholen)
  {
    ((TagDrawings*)o)->ruhigNeuzeichnen();

    \#ifdef DEBUG
    DBG_PROG_V( ((TagDrawings*)o)->wiederholen )
    \#endif
  }} {}
  code DBG_PROG_ENDE {}
} 

Function {initHilfe()} {open
} {
  code {/* aktualisieren */
  icc_examin->icc_betrachter->ueber_html->value(getUeberHtml().c_str());
  icc_examin->icc_betrachter->hilfe_html->value(getHilfeHtml().c_str());
  icc_examin->icc_betrachter->lizenz_html->value(getLizenzHtml().c_str());
  icc_examin->icc_betrachter->dank_html->value(getDankHtml().c_str());
  icc_examin->icc_betrachter->links_text->value(getLinksText().c_str());} {}
} 
