HP SunSoft Pascal 4.0 User Manual

Page 256

Advertising
background image

232

Pascal 4.0 User’s Guide

10

To compile

menu_demo.p

and link in the necessary libraries, use the following

command-line:

hostname% pc menu_demo.p -Ipascal_xview_include_path \

-Lpascal_xview_include_path -lpxview -lxview -lolgx -lX11

Now run the executable file:

hostname% a.out

base_frame := xv_create(nil, FRAME, 0);

set_FRAME_LABEL(base_frame, frame_label);

set_FRAME_SHOW_FOOTER(base_frame, TRUE);

base_panel := xv_create(base_frame, PANEL, 0);

menu := xv_create(nil, MENU, 0);

set_MENU_STRINGS_3(menu, option1, option2, option3);

set_MENU_NOTIFY_PROC(menu, addr(menu_proc));

button := xv_create(base_panel, PANEL_BUTTON, 0);

set_PANEL_LABEL_WIDTH(button, 200);

set_PANEL_LABEL_STRING(button, button_label);

set_PANEL_ITEM_MENU(button, menu);

window_main_loop(base_frame);

end. {menu_demo}

Advertising