%eden

page = 1;
endpageno = 5;

%angel

teacher = window {
   title = "Introducing Gel";
   content = [ butframe, htmlwin ];
   width = 300; height = 200 };

htmlwin = html {
   text = "<h1>Welcome...</h1><p>This environment is for exploring gel.</p>";
   relief = "flat";
   side = "top";
   fill = "both";
   expand = 1 };

butframe = frame {
   content = [ butnext ];
   side = "bottom";
   fill = "x" };

butnext = button {
   text = "Next ->";
   side = "right" };


%eden

proc butnext_trigger : butnext_mouseclick {
   if (butnext_mouseclick == 0 && page < endpageno)
      page++;
}

proc butprev_trigger : butprev_mouseclick {
   if (butprev_mouseclick == 0 && page > 1)
      page--;
}

proc page2_trigger : page {
   if (page == 2) {
      htmlwin_text = "";
   }
}
