Listing 1. fd2pl Autogenerated Code
#!/usr/local/bin/perl -w
#-*-perl-*-
# Autogenerated by fd2pl from fdesign file pbook.c
use X11::Xforms;
$list = undef;
$browser = undef;
$email_field = undef;
$name_field = undef;
$phone_field = undef;
$address1_field = undef;
$address2_field = undef;
sub create_form_list {
$obj = undef;
$list = fl_bgn_form(FL_NO_BOX, 460, 510);
$obj = fl_add_box(FL_UP_BOX, 0, 0, 460, 510,
"");
$obj = fl_add_browser(FL_HOLD_BROWSER, 10, 60,
190, 440, "");
$browser = $obj;
fl_set_object_callback($obj, "browser_clicked",
0);
$obj = fl_add_input(FL_NORMAL_INPUT, 210, 350,
230, 30, "E-Mail");
$email_field = $obj;
fl_set_object_lsize($obj, FL_MEDIUM_SIZE);
fl_set_object_lalign($obj, FL_ALIGN_TOP_LEFT);
fl_set_object_callback($obj, "update_data", 0);
$obj = fl_add_input(FL_NORMAL_INPUT, 210, 80,
230, 30, "Name");
$name_field = $obj;
fl_set_object_lsize($obj, FL_MEDIUM_SIZE);
fl_set_object_lalign($obj, FL_ALIGN_TOP_LEFT);
fl_set_object_callback($obj, "update_data", 0);
$obj = fl_add_input(FL_NORMAL_INPUT, 210, 130,
230, 30, "Phone Number");
$phone_field = $obj;
fl_set_object_lsize($obj, FL_MEDIUM_SIZE);
fl_set_object_lalign($obj, FL_ALIGN_TOP_LEFT);
fl_set_object_callback($obj, "update_data", 0);
$obj = fl_add_input(FL_NORMAL_INPUT, 210, 210,
230, 30, "Address");
$address1_field = $obj;
fl_set_object_lsize($obj, FL_MEDIUM_SIZE);
fl_set_object_lalign($obj, FL_ALIGN_TOP_LEFT);
fl_set_object_callback($obj, "update_data", 0);
$obj = fl_add_input(FL_NORMAL_INPUT, 210, 260,
230, 30, "Address");
$address2_field = $obj;
fl_set_object_lsize($obj, FL_MEDIUM_SIZE);
fl_set_object_lalign($obj, FL_ALIGN_TOP_LEFT);
fl_set_object_callback($obj, "update_data", 0);
$obj = fl_add_button(FL_NORMAL_BUTTON, 230, 410,
100, 40, "Clear");
fl_set_object_lsize($obj, FL_LARGE_SIZE);
fl_set_object_lstyle($obj,
FL_NORMAL_STYLE+FL_SHADOW_STYLE);
fl_set_object_callback($obj, "clear_data", 0);
$obj = fl_add_button(FL_NORMAL_BUTTON, 330, 410,
110, 40, "Update");
fl_set_object_lsize($obj, FL_LARGE_SIZE);
fl_set_object_lstyle($obj,
FL_NORMAL_STYLE+FL_SHADOW_STYLE);
fl_set_object_callback($obj, "update_data", 0);
$obj = fl_add_button(FL_NORMAL_BUTTON, 10, 10,
100, 40, "Quit!");
fl_set_object_lsize($obj, FL_LARGE_SIZE);
fl_set_object_callback($obj, "quit", 0);
$obj = fl_add_button(FL_NORMAL_BUTTON, 230, 450,
210, 40, "Delete Entry");
fl_set_object_lsize($obj, FL_LARGE_SIZE);
fl_set_object_lstyle($obj,
FL_NORMAL_STYLE+FL_SHADOW_STYLE);
fl_set_object_callback($obj, "delete_entry", 0);
$obj = fl_add_text(FL_NORMAL_TEXT, 290, 10, 160,
40, "PhoneBook");
fl_set_object_lcolor($obj, FL_CYAN);
fl_set_object_lsize($obj, FL_HUGE_SIZE);
fl_set_object_lalign($obj,
FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
fl_set_object_lstyle($obj,
FL_NORMAL_STYLE+FL_SHADOW_STYLE);
fl_end_form();
}
sub create_the_forms {
create_form_list();
}
1;
Copyright © 1994 - 2019 Linux Journal. All rights reserved.