%eden
## set up this display just once!
/*
if (buttonDisplay==@) 
{
	OpenDisplay("buttonDisplay",325,150);
	## need to set these parameters appropriately on start up
}
*/

OpenDisplay("buttonDisplay",325,150);
## need to set these parameters appropriately on start up


proc buttonDisplay_display_screen : buttonDisplay { 
	DisplayScreen(&buttonDisplay, "buttonDisplay");
};


## location ="http://www.dcs.warwick.ac.uk/~wmb/sudokuExperience/Activity2/";

## where the files to be input are located

%scout

## global settings here

integer ydisp, buttontextlen;
ydisp = 5; buttontextlen = 20;

%eden
/*

## template for a button and action:
## label is button1text / action is button1action / loadfile is filename1

%scout

string button1text, filename1;
button1text = ""; filename1 = "DUMMY.e";

window button1 = {
        type: TEXT
        frame: ([{10,ydisp}, 1, 20])
        string: button1text
        border: 1
        bgcolor: "white"
        sensitive: ON
};

%eden

proc button1action : button1_mouse_1 {
        ## writeln("init button1act");
        onlineinclude(location // filename1);
        ## ydisp = ydisp-40;
        ## writeln("act1end");
}

%scout

## where to put local modifications to the button specification

string bgcol_sudoku;

*/

%scout

string button1text, filename1;
button1text=""; filename1 = "DUMMY.e";

window button1 = {
        type: TEXT
        frame: ([{10,ydisp}, 1, buttontextlen])
        string: button1text
        border: 1
        bgcolor: "white"
        sensitive: ON
};

%eden

proc button1action : button1_mouse_1 {
        ## writeln("init button1act");
        onlineinclude(location // filename1);
        ## ydisp = ydisp-40;
        ## writeln("act1end");
}


%scout

string button2text, filename2;
button2text=""; filename2 = "DUMMY.e";

window button2 = {
        type: TEXT
        frame: ([{10,ydisp+40}, 1, buttontextlen])
        string: button2text
        border: 1
        bgcolor: "white"
        sensitive: ON
};

%eden

proc button2action : button2_mouse_1 {
        ## writeln("init button2act");
        onlineinclude(location // filename2);
        ## ydisp = ydisp-40;
        ## writeln("act2end");
}


%scout

string button3text, filename3;
button3text = ""; filename3 = "DUMMY.e";

window button3 = {
        type: TEXT
        frame: ([{10,ydisp+80}, 1, buttontextlen])
        string: button3text
        border: 1
        bgcolor: "white"
        sensitive: ON
};

%eden

proc button3action : button3_mouse_1 {
        ## writeln("init button3act");
        onlineinclude(location // filename3);
        ## ydisp = ydisp-40;
        ## writeln("act3end");
}


%scout

string button4text, filename4;
button4text=""; filename4 = "DUMMY.e";

window button4 = {
        type: TEXT
        frame: ([{10,ydisp+120}, 1, buttontextlen])
        string: button4text
        border: 1
        bgcolor: "white"
        sensitive: ON
};

%eden

proc button4action : button4_mouse_1 {
        ## writeln("init button4act");
        onlineinclude(location // filename4);
        ## ydisp = ydisp-40;
        ## writeln("act4end");
}


%scout

string button5text, filename5;
button5text=""; filename5 = "DUMMY.e";

window button5 = {
        type: TEXT
        frame: ([{10,ydisp+160}, 1, buttontextlen])
        string: button5text
        border: 1
        bgcolor: "white"
        sensitive: ON
};

%eden

proc button5action : button5_mouse_1 {
        ## writeln("init button5act");
        onlineinclude(location // filename5);
        ## ydisp = ydisp-40;
        ## writeln("act5end");
}



%scout

string button6text, filename6;
button6text=""; filename6 = "DUMMY.e";

window button6 = {
        type: TEXT
        frame: ([{10,ydisp+200}, 1, buttontextlen])
        string: button6text
        border: 1
        bgcolor: "white"
        sensitive: ON
};

%eden

proc button6action : button6_mouse_1 {
        ## writeln("init button6act");
        onlineinclude(location // filename6);
        ## ydisp = ydisp-40;
        ## writeln("act6end");
}


%scout

string button7text, filename7;
button7text=""; filename7 = "DUMMY.e";

window button7 = {
        type: TEXT
        frame: ([{10,ydisp+240}, 1, buttontextlen])
        string: button7text
        border: 1
        bgcolor: "white"
        sensitive: ON
};

%eden

proc button7action : button7_mouse_1 {
        ## writeln("init button7act");
        onlineinclude(location // filename7);
        ## ydisp = ydisp-40;
        ## writeln("act7end");
}


%scout

string button8text, filename8;
button8text=""; filename8 = "DUMMY.e";

window button8 = {
        type: TEXT
        frame: ([{10,ydisp+280}, 1, buttontextlen])
        string: button8text
        border: 1
        bgcolor: "white"
        sensitive: ON
};

%eden

proc button8action : button8_mouse_1 {
        ## writeln("init button8act");
        onlineinclude(location // filename8);
        ## ydisp = ydisp-40;
        ## writeln("act8end");
}


%scout

string button9text, filename9;
button9text=""; filename9 = "DUMMY.e";

window button9 = {
        type: TEXT
        frame: ([{10,ydisp+320}, 1, buttontextlen])
        string: button9text
        border: 1
        bgcolor: "white"
        sensitive: ON
};

%eden

proc button9action : button9_mouse_1 {
        ## writeln("init button9act");
        onlineinclude(location // filename9);
        ## ydisp = ydisp-40;
        ## writeln("act9end");
}

%scout
buttonDisplay = <button1 / button2 /button3 /button4 /button5 /button6 /button7 /button8 /button9 >;


%eden
FileLoadedOkay = 1;
