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

main page

  EZY Web Browser sample

Program name:

ezy_web_browser.ezy

This program:

Test instructions:

The following should appear on your screen:

 

Program source:

/*EZY Prolog. Copyright (C) 2001-2008 EDMGROUP (Australia)
http://www.ezy-software.com
Code Automatically Generated by EZY Design Center

EZY Prolog - Registered version
Program author:Serguei Penkov
Copyright (C) 2008 EDMGROUP (Australia)
*/

predicates


    % SYSTEM ENTRY POINT
    initialize_gui: EZY_INITIALIZE_GUI
    % EVENT HANDLERS CODE
    back_eh: EHANDLER
    forward_eh: EHANDLER
    home_eh: EHANDLER
    edit_ehandler: EHANDLER
    go_eh: EHANDLER
clauses

% START OF GUI INITIALIZE
% EZY PROLOG PASSES CONTROL TO THIS CLAUSE WHEN FORM LOADED

initialize_gui(WINDOW):-
    !.

% PUSH BUTTON HANDLER

back_eh(_,e_control(_,_,CTRLWIN,activated),0):-!,
    ADDRESS = ["TOP_FRAME","MSIE Control"],
    ezy_object_get(CTRLWIN,ADDRESS,OBJECT_WINDOW),
    ezy_browser_back(OBJECT_WINDOW).
% PUSH BUTTON HANDLER

forward_eh(_,e_control(_,_,CTRLWIN,activated),0):-!,
    ADDRESS = ["TOP_FRAME","MSIE Control"],
    ezy_object_get(CTRLWIN,ADDRESS,OBJECT_WINDOW),
    ezy_browser_forward(OBJECT_WINDOW).
% PUSH BUTTON HANDLER

home_eh(_,e_control(_,_,CTRLWIN,activated),0):-!,
    ADDRESS = ["TOP_FRAME","MSIE Control"],
    ezy_object_get(CTRLWIN,ADDRESS,OBJECT_WINDOW),
    ezy_browser_home(OBJECT_WINDOW).
% PUSH BUTTON HANDLER

go_eh(_,e_control(_,_,CTRLWIN,activated),0):-!,
/* USE THIS CODE TO RECEIVE VALUES FROM {Value} ELEMENT */

    ADDRESS_VALUE = ["TOP_FRAME","Goto","Value"]
    ezy_object_data(CTRLWIN,ADDRESS_VALUE,RESULT_Value)
    RESULT_Value =
      ezy_gui_value(["TOP_FRAME","Goto","Value"]/*ADDRESS*/
        ezy_string(URL)/* EZY_ITEM */
    ) /* end of the ezy_reply */,
    write("URL =",URL),nl,
    ADDRESS_WEB = ["TOP_FRAME","MSIE Control"],
    ezy_object_get(CTRLWIN,ADDRESS_WEB,WINDOW_WEB),
    ezy_browser_openurl(WINDOW_WEB,URL).
% ENTRY FIELD HANDLER

edit_ehandler(_,e_control(_,_,TEXT_ENTRY_OBJECT,STATE),0):-
    !.
goal

    true.

Copyright 1997-2013 EDMGROUP (Australia)