Buttons
button(Top,Left,Depth,Width,Label) check(Top,Left, Depth, Width, Label, Initial Value, Final Value) radio(Top,Left,Depth,Width,Label, Initial Value, Final Value) text(Top,Left,Depth,Width, Text Value) scrolltext(Top, Left,Depth,Width, Text) scrolltext(Top, Left,Depth,Width, Text, Font, Size, Style)
carpanel :- dialog('Test Car',50,150,210,310, [button(142,157,26,66,'Ok'), button(145,10,20,60,'Cancel'), radio(70,10,20,130, 'colour : green', off, Green), radio(90,10,20,130, 'colour : red',off,Red), radio(110,10,20,130,'colour : black',on,Black), check(70,200,20,120,'left wheels',off,Left), check(90,200,20,120,'right wheels',off,Right), check(110,200,20,120,'sun roof',on,Roof), text(10,10,20,110,'Operator name:'), edit(10,125,20,95,'',Op), text(36,10,20,150,'Operator supervisor:'), edit(36,165,20,55,'Jones',read(Super))], Response).
edit(Top,Left,Depth,Width, Initial Value, Final Value)
scrolledit(Top, Left, Depth, Width, Initial, Final)which is a scrollable edit field in a dialog
altread :- prolog_flag(dialog_font,Font), dialog('',50,60,120,370, [button(87,287,26,66,'OK'), button(90,10,20,60,'Cancel'), text(10,10,32,350,'Enter a term:',Font,10,0), edit(45,10,32,350,'',read(Term) ) ], Response).
Figure 12: An alternate read dialog
Menus
menu(Top,Left,Depth,Width,Items, Pre selected, Selections) menu(Top,Left,Depth,Width,Items, Pre selected, Selections, Font, Size, Style, Colour) popup(Top,Left,Depth,Width,Label, Items, Pre selected, Selections)
calendar(SelDay,SelMonth) :- months(Months), days(Days), mdialog(100,220,150,200, [button(120, 130, 20, 60, 'Ok'), button(120,10,20,60,'Cancel'), text(8,8,16,180, 'Choose a day and month:'), popup( 35,10,20,165, 'Month:', Months, 'March',SelMonth), popup(70,10,20,165, 'Day: ',Days, 'Friday',SelDay)], Response). months(['January', 'February', 'March', 'April','May','June','July','August', 'September','October','November','December']). days(['Monday','Tuesday','Wednesday', 'Thursday','Friday','Saturday','Sunday']).