!module authorize_main_window ! version = 'X1.0' ! names = case_insensitive ! Constants used to define sizes of some of the various fields in the main ! window. value uaf$c_filter_cols : 12; ! Size (in characters) of the filter field ! Strings associated with the various menus and menu entries. These determine ! the text displayed. value uaf$t_authorize : compound_string ("Authorization Maintanance Utility"); uaf$t_file : compound_string ("File"); uaf$t_ctl_open : compound_string ("Open"); uaf$t_ctl_refresh : compound_string ("Refresh"); uaf$t_ctl_quit : compound_string ("Quit"); uaf$t_commands : compound_string ("Commands"); uaf$t_cmd_list : compound_string ("List"); uaf$t_cmd_print : compound_string ("Print"); uaf$t_cmd_modify_template : compound_string ("Modify template"); uaf$t_help : compound_string ("Help"); uaf$t_hlp_overview : compound_string ("Overview"); uaf$t_hlp_about : compound_string ("About"); ! Various main window text strings. uaf$t_main_filter : compound_string ("Filter"); uaf$t_main_select : compound_string ("Select"); uaf$t_main_username : compound_string ("Username"); uaf$t_selected_users : compound_string ("Selected Usernames"); uaf$t_group_default_users : compound_string ("Group Default Usernames"); uaf$t_main_create : compound_string ("Create"); uaf$t_main_modify : compound_string ("Modify"); uaf$t_main_delete : compound_string ("Delete"); uaf$t_main_identifiers : compound_string ("Identifiers"); uaf$t_main_reset : compound_string ("Reset"); ! Define the main window object and menu bar. object mainwindow : XmMainWindow {controls {XmMenuBar MenuBar; XmForm get_entry; }; }; object MenuBar : XmMenuBar {arguments {XmNorientation = XmHORIZONTAL; XmNspacing = 15; XmNmenuHelpWidget = XmCascadeButton help_menu_entry; }; controls {XmCascadeButton file_menu_entry; XmCascadeButton commands_menu_entry; }; }; ! Define the layout of the main window work area. object get_entry : XmForm {controls {XmLabel main_filter_label; XmText main_filter_value; XmPushButton select_usernames; XmLabel main_username_label; XmText main_username_value; XmLabel user_list_label; XmScrolledWindow user_name_window; XmLabel group_list_label; XmScrolledWindow group_name_window; XmPushButton main_create_entry; XmPushButton main_modify_entry; XmPushButton main_delete_entry; XmPushButton main_identifiers; XmPushButton main_reset_entry; }; }; ! Define the objects needed to obtain the username filter string. object main_filter_label : XmLabel {arguments {XmNlabelString = uaf$t_main_filter; XmNtopAttachment = XmATTACH_FORM; XmNtopOffset = uaf$c_top_offset; XmNrightAttachment = XmATTACH_WIDGET; XmNrightOffset = uaf$c_labval_widget_offset; XmNrightWidget = XmText main_filter_value; }; }; object main_filter_value : XmText {arguments {XmNmaxLength = uaf$s_username; XmNtopAttachment = XmATTACH_FORM; XmNtopOffset = uaf$c_top_offset; XmNrightAttachment = XmATTACH_WIDGET; XmNrightOffset = uaf$c_right_offset; XmNrightWidget = XmPushButton select_usernames; XmNleftAttachment = XmATTACH_POSITION; XmNleftPosition = uaf$c_2col_left_with_lab; XmNcolumns = uaf$c_filter_cols; XmNrows = 1; XmNmarginHeight = 0; XmNresizeHeight = false; }; callbacks {MrmNcreateCallback = procedure create_proc (uaf$c_main_filter); }; }; ! This push button is used to apply the filter string to obtain a new list of ! user names. object select_usernames : XmPushButton {arguments {XmNlabelString = uaf$t_main_select; XmNtopAttachment = XmATTACH_FORM; XmNtopOffset = uaf$c_top_offset; XmNleftAttachment = XmATTACH_POSITION; XmNleftPosition = uaf$c_2col_right; }; callbacks {XmNactivateCallback = procedure activate_proc (uaf$c_main_select); }; }; ! Define the objects needed to obtain the username string. object main_username_label : XmLabel {arguments {XmNlabelString = uaf$t_main_username; XmNtopAttachment = XmATTACH_WIDGET; XmNtopOffset = uaf$c_top_offset; XmNtopWidget = XmText main_filter_value; XmNrightAttachment = XmATTACH_WIDGET; XmNrightOffset = uaf$c_labval_widget_offset; XmNrightWidget = XmText main_username_value; }; }; object main_username_value : XmText {arguments {XmNmaxLength = uaf$s_username; XmNtopAttachment = XmATTACH_WIDGET; XmNtopOffset = uaf$c_top_offset; XmNtopWidget = XmText main_filter_value; XmNrightAttachment = XmATTACH_WIDGET; XmNrightOffset = uaf$c_right_offset; XmNrightWidget = XmPushButton select_usernames; XmNleftAttachment = XmATTACH_POSITION; XmNleftPosition = uaf$c_2col_left_with_lab; XmNcolumns = uaf$c_username_cols; XmNrows = 1; XmNmarginHeight = 0; XmNresizeHeight = false; }; callbacks {MrmNcreateCallback = procedure create_proc (uaf$c_main_username); }; }; ! Define the objects for the list of selected usernames. object user_list_label : XmLabel {arguments {XmNlabelString = uaf$t_selected_users; XmNtopAttachment = XmATTACH_WIDGET; XmNtopOffset = uaf$c_top_offset; XmNtopWidget = XmLabel main_username_label; XmNleftAttachment = XmATTACH_FORM; XmNleftOffset = uaf$c_left_offset; }; }; object user_name_window : XmScrolledWindow {arguments {XmNtopAttachment = XmATTACH_WIDGET; XmNtopOffset = uaf$c_top_offset; XmNtopWidget = XmLabel user_list_label; XmNbottomAttachment = XmATTACH_WIDGET; XmNbottomOffset = uaf$c_bottom_offset; XmNbottomWidget = XmPushButton main_create_entry; XmNrightAttachment = XmATTACH_WIDGET; XmNrightOffset = uaf$c_right_offset; XmNrightWidget = XmScrolledWindow group_name_window; XmNleftAttachment = XmATTACH_POSITION; XmNleftOffset = uaf$c_2col_left; }; controls {XmList user_name_list; }; }; object user_name_list : XmList {arguments {XmNvisibleItemCount = 10; XmNautomaticSelection = false; XmNselectionPolicy = XmSINGLE_SELECT; }; callbacks {MrmNcreateCallback = procedure create_proc (uaf$c_main_user_list); XmNsingleSelectionCallback = procedure list_proc (uaf$c_main_user_list); XmNdefaultActionCallback = procedure list_proc (uaf$c_main_user_list); }; }; ! Define the objects for the list of default groups. object group_list_label : XmLabel {arguments {XmNlabelString = uaf$t_group_default_users; XmNtopAttachment = XmATTACH_WIDGET; XmNtopOffset = uaf$c_top_offset; XmNtopWidget = XmLabel main_username_label; XmNleftAttachment = XmATTACH_POSITION; XmNleftPosition = uaf$c_2col_right; }; }; object group_name_window : XmScrolledWindow {arguments {XmNtopAttachment = XmATTACH_WIDGET; XmNtopOffset = uaf$c_top_offset; XmNtopWidget = XmLabel group_list_label; XmNbottomAttachment = XmATTACH_WIDGET; XmNbottomOffset = uaf$c_bottom_offset; XmNbottomWidget = XmPushButton main_create_entry; XmNrightAttachment = XmATTACH_FORM; XmNrightOffset = uaf$c_right_offset; XmNleftAttachment = XmATTACH_POSITION; XmNleftPosition = uaf$c_2col_right; }; controls {XmList group_name_list; }; }; object group_name_list : XmList {arguments {XmNvisibleItemCount = 10; XmNautomaticSelection = false; XmNselectionPolicy = XmSINGLE_SELECT; }; callbacks {MrmNcreateCallback = procedure create_proc (uaf$c_main_group_list); XmNsingleSelectionCallback = procedure list_proc (uaf$c_main_group_list); XmNdefaultActionCallback = procedure list_proc (uaf$c_main_group_list); }; }; ! Define the main window push button objects. object main_create_entry : XmPushButton {arguments {XmNlabelString = uaf$t_main_create; XmNbottomAttachment = XmATTACH_FORM; XmNbottomOffset = uaf$c_bottom_offset; XmNleftAttachment = XmATTACH_FORM; XmNleftOffset = uaf$c_left_offset; }; callbacks {XmNactivateCallback = procedure activate_proc (uaf$c_main_create); }; }; object main_modify_entry : XmPushButton {arguments {XmNlabelString = uaf$t_main_modify; XmNbottomAttachment = XmATTACH_FORM; XmNbottomOffset = uaf$c_bottom_offset; XmNleftAttachment = XmATTACH_WIDGET; XmNleftOffset = uaf$c_left_offset; XmNleftWidget = XmPushButton main_create_entry; }; callbacks {MrmNcreateCallback = procedure create_proc (uaf$c_main_modify); XmNactivateCallback = procedure activate_proc (uaf$c_main_modify); }; }; object main_delete_entry : XmPushButton {arguments {XmNlabelString = uaf$t_main_delete; XmNbottomAttachment = XmATTACH_FORM; XmNbottomOffset = uaf$c_bottom_offset; XmNleftAttachment = XmATTACH_WIDGET; XmNleftOffset = uaf$c_left_offset; XmNleftWidget = XmPushButton main_modify_entry; }; callbacks {XmNactivateCallback = procedure activate_proc (uaf$c_main_delete); }; }; object main_identifiers : XmPushButton {arguments {XmNlabelString = uaf$t_main_identifiers; XmNbottomAttachment = XmATTACH_FORM; XmNbottomOffset = uaf$c_bottom_offset; XmNleftAttachment = XmATTACH_WIDGET; XmNleftOffset = uaf$c_left_offset; XmNleftWidget = XmPushButton main_delete_entry; }; callbacks {XmNactivateCallback = procedure activate_proc (uaf$c_main_identifiers); }; }; object main_reset_entry : XmPushButton {arguments {XmNlabelString = uaf$t_main_reset; XmNbottomAttachment = XmATTACH_FORM; XmNbottomOffset = uaf$c_bottom_offset; XmNrightAttachment = XmATTACH_FORM; XmNrightOffset = uaf$c_right_offset; }; callbacks {XmNactivateCallback = procedure activate_proc (uaf$c_main_reset); }; }; ! Define the objects which exist within the menu bar. object file_menu_entry : XmCascadeButton {arguments {XmNlabelString = uaf$t_file; }; controls {XmPulldownMenu file_menu; }; }; object file_menu : XmPulldownMenu {controls {XmSeparator {}; XmPushButton open_button; XmPushButton refresh_button; XmPushButton quit_button; }; }; object commands_menu_entry : XmCascadeButton {arguments {XmNlabelString = uaf$t_commands; }; controls {XmPulldownMenu commands_menu; }; }; object commands_menu : XmPulldownMenu {controls {XmPushButton list_button; XmPushButton print_button; XmPushButton modify_template_button; }; }; object help_menu_entry : XmCascadeButton {arguments {XmNlabelString = uaf$t_help; }; controls {XmPulldownMenu help_menu; }; }; object help_menu : XmPulldownMenu {controls {XmPushButton about_button; XmPushButton overview_button; }; }; ! Define the file menu objects. object open_button : XmPushButton {arguments {XmNlabelString = uaf$t_ctl_open; }; callbacks {MrmNcreateCallback = procedure create_proc (uaf$c_ctl_open); XmNactivateCallback = procedure activate_proc (uaf$c_ctl_open); }; }; object refresh_button : XmPushButton {arguments {XmNlabelString = uaf$t_ctl_refresh; }; callbacks {XmNactivateCallback = procedure activate_proc (uaf$c_ctl_refresh); }; }; object quit_button : XmPushButton {arguments {XmNlabelString = uaf$t_ctl_quit; }; callbacks {XmNactivateCallback = procedure activate_proc (uaf$c_ctl_quit); }; }; ! Define the commands menu objects. object list_button : XmPushButton {arguments {XmNlabelString = uaf$t_cmd_list; XmNsensitive = false; }; callbacks {XmNactivateCallback = procedure activate_proc (uaf$c_cmd_list); }; }; object print_button : XmPushButton {arguments {XmNlabelString = uaf$t_cmd_print; XmNsensitive = false; }; callbacks {XmNactivateCallback = procedure activate_proc (uaf$c_cmd_print); }; }; object modify_template_button : XmPushButton {arguments {XmNlabelString = uaf$t_cmd_modify_template; }; callbacks {XmNactivateCallback = procedure activate_proc (uaf$c_cmd_modify_template); }; }; ! Define the help menu objects. object about_button : XmPushButton {arguments {XmNlabelString = uaf$t_hlp_about; }; callbacks {XmNactivateCallback = procedure activate_proc (uaf$c_hlp_about); }; }; object overview_button : XmPushButton {arguments {XmNlabelString = uaf$t_hlp_overview; }; callbacks {XmNactivateCallback = procedure activate_proc (uaf$c_hlp_overview); }; }; ! Define the file selection box object. object file_selection_window : XmFileSelectionDialog {arguments {XmNdialogStyle = XmDIALOG_FULL_APPLICATION_MODAL; XmNdirMask = '*SYSUAF*.DAT'; XmNdefaultPosition = false; }; callbacks {XmNokCallback = procedure activate_proc (uaf$c_file_open_file); XmNapplyCallback = procedure activate_proc (uaf$c_file_select); XmNcancelCallback = procedure activate_proc (uaf$c_file_cancel); }; };