Copyright (1997-2013) EDMGROUP Pty Ltd - EZY Prolog Reference

 EZY Template program

main page

Description:

prolog_main():-

write ( "Welcome to EZY Prolog\n" ),

dlg_openfilename ( "Open DCL File" , "DCL" , "*.dcl" , DCL_FILE ),

write ( "Control Tree for layout: " , DCL_FILE , "\n" ),

ezy_window_create ( DCL_FILE , WINDOW ),

ezy_get_control_tree ( WINDOW , CONTROL_TREE ),

CONTROL_TREE =bi( _ , _ ,node( open , TREELIST ), _ ),

OFFSET = "" ,

print_control_treelist( OFFSET , TREELIST ),

nl ,

ezy_window_destroy ( WINDOW ).

 

print_control_treelist( _ ,[]):-! .

print_control_treelist( OFFSET ,[bi( ID , NAME , leaf , ICONID )|TAIL]):-

! ,

ezy_get_control_class ( ICONID , TYPE ),

write ( "\n" , OFFSET , "ID =" , ID , ", NAME=" , NAME , ", TYPE=" , TYPE ),

print_control_treelist( OFFSET , TAIL ).

 

print_control_treelist( OFFSET ,[bi( ID , NAME ,node( _ , TREELIST ), ICONID )|TAIL]):-

! ,

ezy_get_control_class ( ICONID , TYPE ),

write ( "\n" , OFFSET , "ID =" , ID , ", NAME=" , NAME , ", TYPE=" , TYPE ),

concat ( OFFSET , "" , NEWOFFSET ),

print_control_treelist( NEWOFFSET , TREELIST ),

print_control_treelist( OFFSET , TAIL ).

 

Copyright 1997-2013 EDMGROUP (Australia)