The XView Toolkit
231
10
Menu Demo Program
Here is a more complicated program,
menu_demo.p
, that makes a window
and a panel with a menu button. The choices displayed are: Option 1, Option2,
and Option 3.
program MenuDemo(output);
#include "stddefs_p.h"
#include "attrgetset_p.h"
var
base_frame : Frame;
base_panel : Panel;
button : Panel_button_item;
menu : Menu;
frame_label : string;
button_label : string;
option1 : Cstringp;
option2 : Cstringp;
option3 : Cstringp;
procedure menu_proc(menu_: Menu; menu_item: Menu_item);
var
menu_string : Cstringp;
begin
menu_string := get_MENU_STRING(menu_item);
set_FRAME_RIGHT_FOOTER(base_frame, menu_string^);
end;
begin
frame_label := 'FRAME LABEL';
button_label := 'BUTTON LABEL';
new(option1); option1^ := 'OPTION 1';
new(option2); option2^ := 'OPTION 2';
new(option3); option3^ := 'OPTION 3';
xv_init(0);
Содержание SunSoft Pascal 4.0
Страница 14: ...xiv Pascal 4 0 User s Guide ...
Страница 16: ...xvi Pascal 4 0 User s Guide ...
Страница 30: ...6 Pascal 4 0 User s Guide 1 ...
Страница 160: ...136 Pascal 4 0 User s Guide 6 ...
Страница 268: ...244 Pascal 4 0 User s Guide 11 ...
Страница 320: ...296 Pascal 4 0 User s Guide B ...
Страница 331: ...Index 307 ...
Страница 333: ......