home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
x
/
volume10
/
contool
/
part06
/
contool_ui.c
Wrap
C/C++ Source or Header
|
1990-10-30
|
40KB
|
1,891 lines
/*
* contool_ui.c - User interface object initialization functions.
* This file was generated by `gxv' from `contool.G'.
* DO NOT EDIT BY HAND.
*/
#include <stdio.h>
#include <sys/param.h>
#include <sys/types.h>
#include <xview/xview.h>
#include <xview/canvas.h>
#include <xview/icon_load.h>
#include <xview/panel.h>
#include <xview/scrollbar.h>
#include <xview/svrimage.h>
#include <xview/termsw.h>
#include <xview/text.h>
#include <xview/tty.h>
#include <xview/xv_xrect.h>
#include "contool_ui.h"
/*
* Create object `file_menu' in the specified instance.
*/
Xv_opaque
contool_file_menu_create(ip, owner)
caddr_t *ip;
Xv_opaque owner;
{
extern Menu_item popup_load_config();
extern Menu_item popup_save_config();
extern Menu_item start_logging();
extern Menu_item stop_logging();
extern Menu_item print_messages();
Xv_opaque obj;
obj = xv_create(XV_NULL, MENU_COMMAND_MENU,
XV_KEY_DATA, INSTANCE, ip,
MENU_ITEM,
XV_KEY_DATA, INSTANCE, ip,
MENU_STRING, "Load Configuration...",
MENU_GEN_PROC, popup_load_config,
NULL,
MENU_ITEM,
XV_KEY_DATA, INSTANCE, ip,
MENU_STRING, "Save Configuration...",
MENU_GEN_PROC, popup_save_config,
NULL,
MENU_ITEM,
XV_KEY_DATA, INSTANCE, ip,
MENU_STRING, "Start Logging",
MENU_GEN_PROC, start_logging,
NULL,
MENU_ITEM,
XV_KEY_DATA, INSTANCE, ip,
MENU_STRING, "Stop Logging",
MENU_GEN_PROC, stop_logging,
NULL,
MENU_ITEM,
XV_KEY_DATA, INSTANCE, ip,
MENU_STRING, "Print",
MENU_GEN_PROC, print_messages,
NULL,
MENU_DEFAULT, 2,
MENU_GEN_PIN_WINDOW, (Xv_opaque) ip[0], "File",
NULL);
return obj;
}
/*
* Create object `view_menu' in the specified instance.
*/
Xv_opaque
contool_view_menu_create(ip, owner)
caddr_t *ip;
Xv_opaque owner;
{
extern Menu_item become_console();
extern Menu_item clear_messages();
extern Menu_item reset_filter();
Xv_opaque obj;
obj = xv_create(XV_NULL, MENU_COMMAND_MENU,
XV_KEY_DATA, INSTANCE, ip,
MENU_ITEM,
XV_KEY_DATA, INSTANCE, ip,
MENU_STRING, "Become Console",
MENU_GEN_PROC, become_console,
NULL,
MENU_ITEM,
XV_KEY_DATA, INSTANCE, ip,
MENU_STRING, "Clear Messages",
MENU_GEN_PROC, clear_messages,
NULL,
MENU_ITEM,
XV_KEY_DATA, INSTANCE, ip,
MENU_STRING, "Reset Filter",
MENU_GEN_PROC, reset_filter,
NULL,
MENU_DEFAULT, 2,
MENU_GEN_PIN_WINDOW, (Xv_opaque) ip[0], "View",
NULL);
return obj;
}
/*
* Create object `edit_menu' in the specified instance.
*/
Xv_opaque
contool_edit_menu_create(ip, owner)
caddr_t *ip;
Xv_opaque owner;
{
extern Menu_item edit_filters();
extern Menu_item edit_properties();
Xv_opaque obj;
obj = xv_create(XV_NULL, MENU_COMMAND_MENU,
XV_KEY_DATA, INSTANCE, ip,
MENU_ITEM,
XV_KEY_DATA, INSTANCE, ip,
MENU_STRING, "Filters...",
MENU_GEN_PROC, edit_filters,
NULL,
MENU_ITEM,
XV_KEY_DATA, INSTANCE, ip,
MENU_STRING, "Properties...",
MENU_GEN_PROC, edit_properties,
NULL,
MENU_DEFAULT, 2,
MENU_GEN_PIN_WINDOW, (Xv_opaque) ip[0], "Edit",
NULL);
return obj;
}
/*
* Create object `filter_insert_menu' in the specified instance.
*/
Xv_opaque
contool_filter_insert_menu_create(ip, owner)
caddr_t *ip;
Xv_opaque owner;
{
extern Menu filter_insert_handler();
extern Menu_item insert_at_top();
extern Menu_item insert_above();
extern Menu_item insert_below();
extern Menu_item insert_at_bottom();
Xv_opaque obj;
obj = xv_create(XV_NULL, MENU_COMMAND_MENU,
XV_KEY_DATA, INSTANCE, ip,
MENU_GEN_PROC, filter_insert_handler,
MENU_ITEM,
XV_KEY_DATA, INSTANCE, ip,
MENU_STRING, "At top",
MENU_GEN_PROC, insert_at_top,
NULL,
MENU_ITEM,
XV_KEY_DATA, INSTANCE, ip,
MENU_STRING, "Above selection",
MENU_GEN_PROC, insert_above,
NULL,
MENU_ITEM,
XV_KEY_DATA, INSTANCE, ip,
MENU_STRING, "Below selection",
MENU_GEN_PROC, insert_below,
NULL,
MENU_ITEM,
XV_KEY_DATA, INSTANCE, ip,
MENU_STRING, "At bottom",
MENU_GEN_PROC, insert_at_bottom,
NULL,
MENU_DEFAULT, 4,
NULL);
return obj;
}
/*
* Create object `filter_edit_menu' in the specified instance.
*/
Xv_opaque
contool_filter_edit_menu_create(ip, owner)
caddr_t *ip;
Xv_opaque owner;
{
extern Menu filter_edit_handler();
extern Menu_item filter_cut();
extern Menu_item filter_copy();
extern Menu_item filter_paste();
extern Menu_item filter_delete();
Xv_opaque obj;
obj = xv_create(XV_NULL, MENU_COMMAND_MENU,
XV_KEY_DATA, INSTANCE, ip,
MENU_GEN_PROC, filter_edit_handler,
MENU_ITEM,
XV_KEY_DATA, INSTANCE, ip,
MENU_STRING, "Cut",
MENU_GEN_PROC, filter_cut,
NULL,
MENU_ITEM,
XV_KEY_DATA, INSTANCE, ip,
MENU_STRING, "Copy",
MENU_GEN_PROC, filter_copy,
NULL,
MENU_ITEM,
XV_KEY_DATA, INSTANCE, ip,
MENU_STRING, "Paste",
MENU_GEN_PROC, filter_paste,
MENU_PULLRIGHT, contool_filter_paste_menu_create(ip, NULL),
NULL,
MENU_ITEM,
XV_KEY_DATA, INSTANCE, ip,
MENU_STRING, "Delete",
MENU_GEN_PROC, filter_delete,
NULL,
MENU_DEFAULT, 1,
NULL);
return obj;
}
/*
* Create object `filter_paste_menu' in the specified instance.
*/
Xv_opaque
contool_filter_paste_menu_create(ip, owner)
caddr_t *ip;
Xv_opaque owner;
{
extern Menu_item paste_at_top();
extern Menu_item paste_above();
extern Menu_item paste_below();
extern Menu_item paste_at_bottom();
Xv_opaque obj;
obj = xv_create(XV_NULL, MENU_COMMAND_MENU,
XV_KEY_DATA, INSTANCE, ip,
MENU_ITEM,
XV_KEY_DATA, INSTANCE, ip,
MENU_STRING, "At top",
MENU_GEN_PROC, paste_at_top,
NULL,
MENU_ITEM,
XV_KEY_DATA, INSTANCE, ip,
MENU_STRING, "Above selection",
MENU_GEN_PROC, paste_above,
NULL,
MENU_ITEM,
XV_KEY_DATA, INSTANCE, ip,
MENU_STRING, "Below selection",
MENU_GEN_PROC, paste_below,
NULL,
MENU_ITEM,
XV_KEY_DATA, INSTANCE, ip,
MENU_STRING, "At bottom",
MENU_GEN_PROC, paste_at_bottom,
NULL,
MENU_DEFAULT, 4,
NULL);
return obj;
}
/*
* Initialize an instance of object `base'.
*/
contool_base_objects *
contool_base_objects_initialize(ip, owner)
contool_base_objects *ip;
Xv_opaque owner;
{
if (!ip && !(ip = (contool_base_objects *) calloc(1, sizeof (contool_base_objects))))
return (contool_base_objects *) NULL;
if (!ip->base)
ip->base = contool_base_base_create(ip, owner);
if (!ip->contool_controls)
ip->contool_controls = contool_base_contool_controls_create(ip, ip->base);
if (!ip->file)
ip->file = contool_base_file_create(ip, ip->contool_controls);
if (!ip->view)
ip->view = contool_base_view_create(ip, ip->contool_controls);
if (!ip->edit)
ip->edit = contool_base_edit_create(ip, ip->contool_controls);
if (!ip->display)
ip->display = contool_base_display_create(ip, ip->base);
return ip;
}
/*
* Create object `base' in the specified instance.
*/
Xv_opaque
contool_base_base_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
Xv_opaque obj;
obj = xv_create(owner, FRAME,
XV_KEY_DATA, INSTANCE, ip,
XV_WIDTH, 575,
XV_HEIGHT, 246,
XV_LABEL, "Contool 3.0",
FRAME_CLOSED, FALSE,
FRAME_SHOW_FOOTER, TRUE,
FRAME_SHOW_RESIZE_CORNER, TRUE,
NULL);
return obj;
}
/*
* Create object `contool_controls' in the specified instance.
*/
Xv_opaque
contool_base_contool_controls_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
Xv_opaque obj;
obj = xv_create(owner, PANEL,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:contool_controls",
XV_X, 0,
XV_Y, 0,
XV_WIDTH, WIN_EXTEND_TO_EDGE,
XV_HEIGHT, 32,
WIN_BORDER, FALSE,
NULL);
return obj;
}
/*
* Create object `file' in the specified instance.
*/
Xv_opaque
contool_base_file_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
Xv_opaque obj;
obj = xv_create(owner, PANEL_BUTTON,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:file",
XV_X, 4,
XV_Y, 4,
XV_WIDTH, 54,
XV_HEIGHT, 20,
PANEL_LABEL_STRING, "File",
PANEL_ITEM_MENU, contool_file_menu_create((caddr_t *) ip, NULL),
NULL);
return obj;
}
/*
* Create object `view' in the specified instance.
*/
Xv_opaque
contool_base_view_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
Xv_opaque obj;
obj = xv_create(owner, PANEL_BUTTON,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:view",
XV_X, 67,
XV_Y, 4,
XV_WIDTH, 62,
XV_HEIGHT, 20,
PANEL_LABEL_STRING, "View",
PANEL_ITEM_MENU, contool_view_menu_create((caddr_t *) ip, NULL),
NULL);
return obj;
}
/*
* Create object `edit' in the specified instance.
*/
Xv_opaque
contool_base_edit_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
Xv_opaque obj;
obj = xv_create(owner, PANEL_BUTTON,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:edit",
XV_X, 138,
XV_Y, 4,
XV_WIDTH, 56,
XV_HEIGHT, 20,
PANEL_LABEL_STRING, "Edit",
PANEL_ITEM_MENU, contool_edit_menu_create((caddr_t *) ip, NULL),
NULL);
return obj;
}
/*
* Create object `display' in the specified instance.
*/
Xv_opaque
contool_base_display_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
Xv_opaque obj;
obj = xv_create(owner, TEXTSW,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:display",
XV_X, 0,
XV_Y, 27,
XV_WIDTH, WIN_EXTEND_TO_EDGE,
XV_HEIGHT, WIN_EXTEND_TO_EDGE,
OPENWIN_SHOW_BORDERS, TRUE,
NULL);
return obj;
}
/*
* Initialize an instance of object `props'.
*/
contool_props_objects *
contool_props_objects_initialize(ip, owner)
contool_props_objects *ip;
Xv_opaque owner;
{
if (!ip && !(ip = (contool_props_objects *) calloc(1, sizeof (contool_props_objects))))
return (contool_props_objects *) NULL;
if (!ip->props)
ip->props = contool_props_props_create(ip, owner);
if (!ip->prop_controls)
ip->prop_controls = contool_props_prop_controls_create(ip, ip->props);
if (!ip->default_action)
ip->default_action = contool_props_default_action_create(ip, ip->prop_controls);
if (!ip->default_beep_count)
ip->default_beep_count = contool_props_default_beep_count_create(ip, ip->prop_controls);
if (!ip->default_beep_times)
ip->default_beep_times = contool_props_default_beep_times_create(ip, ip->prop_controls);
if (!ip->default_command)
ip->default_command = contool_props_default_command_create(ip, ip->prop_controls);
if (!ip->log_file)
ip->log_file = contool_props_log_file_create(ip, ip->prop_controls);
if (!ip->log_style)
ip->log_style = contool_props_log_style_create(ip, ip->prop_controls);
if (!ip->print_filter)
ip->print_filter = contool_props_print_filter_create(ip, ip->prop_controls);
if (!ip->good_icon)
ip->good_icon = contool_props_good_icon_create(ip, ip->prop_controls);
if (!ip->bad_icon)
ip->bad_icon = contool_props_bad_icon_create(ip, ip->prop_controls);
if (!ip->flash_icon)
ip->flash_icon = contool_props_flash_icon_create(ip, ip->prop_controls);
if (!ip->stamp_resolution)
ip->stamp_resolution = contool_props_stamp_resolution_create(ip, ip->prop_controls);
if (!ip->message2)
ip->message2 = contool_props_message2_create(ip, ip->prop_controls);
if (!ip->max_message)
ip->max_message = contool_props_max_message_create(ip, ip->prop_controls);
if (!ip->message3)
ip->message3 = contool_props_message3_create(ip, ip->prop_controls);
if (!ip->delete_amount)
ip->delete_amount = contool_props_delete_amount_create(ip, ip->prop_controls);
if (!ip->message4)
ip->message4 = contool_props_message4_create(ip, ip->prop_controls);
if (!ip->props_apply)
ip->props_apply = contool_props_props_apply_create(ip, ip->prop_controls);
if (!ip->props_reset)
ip->props_reset = contool_props_props_reset_create(ip, ip->prop_controls);
return ip;
}
/*
* Create object `props' in the specified instance.
*/
Xv_opaque
contool_props_props_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
Xv_opaque obj;
obj = xv_create(owner, FRAME_CMD,
XV_KEY_DATA, INSTANCE, ip,
XV_WIDTH, 500,
XV_HEIGHT, 479,
XV_LABEL, "Contool: Properties",
XV_SHOW, FALSE,
FRAME_SHOW_FOOTER, FALSE,
FRAME_SHOW_RESIZE_CORNER, FALSE,
FRAME_CMD_PUSHPIN_IN, FALSE,
NULL);
xv_set(xv_get(obj, FRAME_CMD_PANEL), WIN_SHOW, FALSE, NULL);
return obj;
}
/*
* Create object `prop_controls' in the specified instance.
*/
Xv_opaque
contool_props_prop_controls_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
Xv_opaque obj;
obj = xv_create(owner, PANEL,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:prop_controls",
XV_X, 0,
XV_Y, 0,
XV_WIDTH, WIN_EXTEND_TO_EDGE,
XV_HEIGHT, WIN_EXTEND_TO_EDGE,
WIN_BORDER, FALSE,
NULL);
return obj;
}
/*
* Create object `default_action' in the specified instance.
*/
Xv_opaque
contool_props_default_action_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
extern int default_action();
Xv_opaque obj;
obj = xv_create(owner, PANEL_TOGGLE,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:default_action",
XV_X, 96,
XV_Y, 14,
XV_WIDTH, 211,
XV_HEIGHT, 139,
PANEL_VALUE_X, 205,
PANEL_VALUE_Y, 14,
PANEL_LAYOUT, PANEL_HORIZONTAL,
PANEL_CHOICE_NCOLS, 1,
PANEL_LABEL_STRING, "Default action:",
PANEL_NOTIFY_PROC, default_action,
PANEL_CHOICE_STRINGS,
"Beep",
"Command",
"Flash icon",
"Open window",
"Timestamp",
0,
NULL);
return obj;
}
/*
* Create object `default_beep_count' in the specified instance.
*/
Xv_opaque
contool_props_default_beep_count_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
Xv_opaque obj;
obj = xv_create(owner, PANEL_NUMERIC_TEXT,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:default_beep_count",
XV_X, 306,
XV_Y, 19,
XV_WIDTH, 80,
XV_HEIGHT, 15,
PANEL_VALUE_X, 315,
PANEL_VALUE_Y, 19,
PANEL_LAYOUT, PANEL_HORIZONTAL,
PANEL_VALUE_DISPLAY_LENGTH, 2,
PANEL_VALUE_STORED_LENGTH, 2,
PANEL_MAX_VALUE, 99,
PANEL_MIN_VALUE, 0,
PANEL_READ_ONLY, FALSE,
NULL);
return obj;
}
/*
* Create object `default_beep_times' in the specified instance.
*/
Xv_opaque
contool_props_default_beep_times_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
Xv_opaque obj;
obj = xv_create(owner, PANEL_MESSAGE,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:default_beep_times",
XV_X, 394,
XV_Y, 19,
XV_WIDTH, 34,
XV_HEIGHT, 13,
PANEL_LABEL_STRING, "times",
PANEL_LABEL_BOLD, FALSE,
NULL);
return obj;
}
/*
* Create object `default_command' in the specified instance.
*/
Xv_opaque
contool_props_default_command_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
Xv_opaque obj;
obj = xv_create(owner, PANEL_TEXT,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:default_command",
XV_X, 306,
XV_Y, 48,
XV_WIDTH, 177,
XV_HEIGHT, 15,
PANEL_VALUE_X, 315,
PANEL_VALUE_Y, 48,
PANEL_LAYOUT, PANEL_HORIZONTAL,
PANEL_VALUE_DISPLAY_LENGTH, 21,
PANEL_VALUE_STORED_LENGTH, 1024,
PANEL_READ_ONLY, FALSE,
NULL);
return obj;
}
/*
* Create object `log_file' in the specified instance.
*/
Xv_opaque
contool_props_log_file_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
extern Panel_setting file_completion();
Xv_opaque obj;
obj = xv_create(owner, PANEL_TEXT,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:log_file",
XV_X, 141,
XV_Y, 174,
XV_WIDTH, 344,
XV_HEIGHT, 15,
PANEL_LABEL_STRING, "Log file:",
PANEL_VALUE_X, 205,
PANEL_VALUE_Y, 174,
PANEL_LAYOUT, PANEL_HORIZONTAL,
PANEL_VALUE_DISPLAY_LENGTH, 35,
PANEL_VALUE_STORED_LENGTH, 256,
PANEL_READ_ONLY, FALSE,
PANEL_NOTIFY_PROC, file_completion,
NULL);
return obj;
}
/*
* Create object `log_style' in the specified instance.
*/
Xv_opaque
contool_props_log_style_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
Xv_opaque obj;
obj = xv_create(owner, PANEL_CHOICE,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:log_style",
XV_X, 96,
XV_Y, 194,
XV_WIDTH, 314,
XV_HEIGHT, 23,
PANEL_VALUE_X, 205,
PANEL_VALUE_Y, 194,
PANEL_LAYOUT, PANEL_HORIZONTAL,
PANEL_CHOICE_NROWS, 1,
PANEL_LABEL_STRING, "Log messages:",
PANEL_CHOICE_STRINGS,
"Before filtering",
"After filtering",
0,
NULL);
return obj;
}
/*
* Create object `print_filter' in the specified instance.
*/
Xv_opaque
contool_props_print_filter_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
Xv_opaque obj;
obj = xv_create(owner, PANEL_TEXT,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:print_filter",
XV_X, 119,
XV_Y, 237,
XV_WIDTH, 364,
XV_HEIGHT, 15,
PANEL_LABEL_STRING, "Print filter:",
PANEL_VALUE_X, 203,
PANEL_VALUE_Y, 237,
PANEL_LAYOUT, PANEL_HORIZONTAL,
PANEL_VALUE_DISPLAY_LENGTH, 35,
PANEL_VALUE_STORED_LENGTH, 256,
PANEL_READ_ONLY, FALSE,
NULL);
return obj;
}
/*
* Create object `good_icon' in the specified instance.
*/
Xv_opaque
contool_props_good_icon_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
extern Panel_setting file_completion();
Xv_opaque obj;
obj = xv_create(owner, PANEL_TEXT,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:good_icon",
XV_X, 79,
XV_Y, 274,
XV_WIDTH, 406,
XV_HEIGHT, 15,
PANEL_LABEL_STRING, "\"All is well\" icon:",
PANEL_VALUE_X, 205,
PANEL_VALUE_Y, 274,
PANEL_LAYOUT, PANEL_HORIZONTAL,
PANEL_VALUE_DISPLAY_LENGTH, 35,
PANEL_VALUE_STORED_LENGTH, 256,
PANEL_READ_ONLY, FALSE,
PANEL_NOTIFY_PROC, file_completion,
NULL);
return obj;
}
/*
* Create object `bad_icon' in the specified instance.
*/
Xv_opaque
contool_props_bad_icon_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
extern Panel_setting file_completion();
Xv_opaque obj;
obj = xv_create(owner, PANEL_TEXT,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:bad_icon",
XV_X, 50,
XV_Y, 294,
XV_WIDTH, 435,
XV_HEIGHT, 15,
PANEL_LABEL_STRING, "\"Check console\" icon:",
PANEL_VALUE_X, 205,
PANEL_VALUE_Y, 294,
PANEL_LAYOUT, PANEL_HORIZONTAL,
PANEL_VALUE_DISPLAY_LENGTH, 35,
PANEL_VALUE_STORED_LENGTH, 256,
PANEL_READ_ONLY, FALSE,
PANEL_NOTIFY_PROC, file_completion,
NULL);
return obj;
}
/*
* Create object `flash_icon' in the specified instance.
*/
Xv_opaque
contool_props_flash_icon_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
extern Panel_setting file_completion();
Xv_opaque obj;
obj = xv_create(owner, PANEL_TEXT,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:flash_icon",
XV_X, 111,
XV_Y, 314,
XV_WIDTH, 374,
XV_HEIGHT, 15,
PANEL_LABEL_STRING, "\"Flash\" icon:",
PANEL_VALUE_X, 205,
PANEL_VALUE_Y, 314,
PANEL_LAYOUT, PANEL_HORIZONTAL,
PANEL_VALUE_DISPLAY_LENGTH, 35,
PANEL_VALUE_STORED_LENGTH, 256,
PANEL_READ_ONLY, FALSE,
PANEL_NOTIFY_PROC, file_completion,
NULL);
return obj;
}
/*
* Create object `stamp_resolution' in the specified instance.
*/
Xv_opaque
contool_props_stamp_resolution_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
Xv_opaque obj;
obj = xv_create(owner, PANEL_NUMERIC_TEXT,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:stamp_resolution",
XV_X, 40,
XV_Y, 350,
XV_WIDTH, 246,
XV_HEIGHT, 15,
PANEL_LABEL_STRING, "Timestamp resolution:",
PANEL_VALUE_X, 205,
PANEL_VALUE_Y, 350,
PANEL_LAYOUT, PANEL_HORIZONTAL,
PANEL_VALUE_DISPLAY_LENGTH, 6,
PANEL_VALUE_STORED_LENGTH, 6,
PANEL_MAX_VALUE, 999,
PANEL_MIN_VALUE, 0,
PANEL_READ_ONLY, FALSE,
NULL);
return obj;
}
/*
* Create object `message2' in the specified instance.
*/
Xv_opaque
contool_props_message2_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
Xv_opaque obj;
obj = xv_create(owner, PANEL_MESSAGE,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:message2",
XV_X, 296,
XV_Y, 350,
XV_WIDTH, 48,
XV_HEIGHT, 13,
PANEL_LABEL_STRING, "seconds",
PANEL_LABEL_BOLD, FALSE,
NULL);
return obj;
}
/*
* Create object `max_message' in the specified instance.
*/
Xv_opaque
contool_props_max_message_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
Xv_opaque obj;
obj = xv_create(owner, PANEL_NUMERIC_TEXT,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:max_message",
XV_X, 32,
XV_Y, 386,
XV_WIDTH, 254,
XV_HEIGHT, 15,
PANEL_LABEL_STRING, "Maximum message text:",
PANEL_VALUE_X, 205,
PANEL_VALUE_Y, 386,
PANEL_LAYOUT, PANEL_HORIZONTAL,
PANEL_VALUE_DISPLAY_LENGTH, 6,
PANEL_VALUE_STORED_LENGTH, 6,
PANEL_MAX_VALUE, 999999,
PANEL_MIN_VALUE, 0,
PANEL_READ_ONLY, FALSE,
NULL);
return obj;
}
/*
* Create object `message3' in the specified instance.
*/
Xv_opaque
contool_props_message3_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
Xv_opaque obj;
obj = xv_create(owner, PANEL_MESSAGE,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:message3",
XV_X, 295,
XV_Y, 386,
XV_WIDTH, 33,
XV_HEIGHT, 13,
PANEL_LABEL_STRING, "bytes",
PANEL_LABEL_BOLD, FALSE,
NULL);
return obj;
}
/*
* Create object `delete_amount' in the specified instance.
*/
Xv_opaque
contool_props_delete_amount_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
Xv_opaque obj;
obj = xv_create(owner, PANEL_NUMERIC_TEXT,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:delete_amount",
XV_X, 14,
XV_Y, 406,
XV_WIDTH, 272,
XV_HEIGHT, 15,
PANEL_LABEL_STRING, "Overflow deletion amount:",
PANEL_VALUE_X, 205,
PANEL_VALUE_Y, 406,
PANEL_LAYOUT, PANEL_HORIZONTAL,
PANEL_VALUE_DISPLAY_LENGTH, 6,
PANEL_VALUE_STORED_LENGTH, 6,
PANEL_MAX_VALUE, 999999,
PANEL_MIN_VALUE, 0,
PANEL_READ_ONLY, FALSE,
NULL);
return obj;
}
/*
* Create object `message4' in the specified instance.
*/
Xv_opaque
contool_props_message4_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
Xv_opaque obj;
obj = xv_create(owner, PANEL_MESSAGE,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:message4",
XV_X, 295,
XV_Y, 406,
XV_WIDTH, 33,
XV_HEIGHT, 13,
PANEL_LABEL_STRING, "bytes",
PANEL_LABEL_BOLD, FALSE,
NULL);
return obj;
}
/*
* Create object `props_apply' in the specified instance.
*/
Xv_opaque
contool_props_props_apply_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
extern void accept_properties();
Xv_opaque obj;
obj = xv_create(owner, PANEL_BUTTON,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:props_apply",
XV_X, 191,
XV_Y, 442,
XV_WIDTH, 53,
XV_HEIGHT, 20,
PANEL_LABEL_STRING, "Apply",
PANEL_NOTIFY_PROC, accept_properties,
NULL);
return obj;
}
/*
* Create object `props_reset' in the specified instance.
*/
Xv_opaque
contool_props_props_reset_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
extern void reset_properties();
Xv_opaque obj;
obj = xv_create(owner, PANEL_BUTTON,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:props_reset",
XV_X, 256,
XV_Y, 442,
XV_WIDTH, 51,
XV_HEIGHT, 20,
PANEL_LABEL_STRING, "Reset",
PANEL_NOTIFY_PROC, reset_properties,
NULL);
return obj;
}
/*
* Initialize an instance of object `filters'.
*/
contool_filters_objects *
contool_filters_objects_initialize(ip, owner)
contool_filters_objects *ip;
Xv_opaque owner;
{
if (!ip && !(ip = (contool_filters_objects *) calloc(1, sizeof (contool_filters_objects))))
return (contool_filters_objects *) NULL;
if (!ip->filters)
ip->filters = contool_filters_filters_create(ip, owner);
if (!ip->filter_controls)
ip->filter_controls = contool_filters_filter_controls_create(ip, ip->filters);
if (!ip->filter_list)
ip->filter_list = contool_filters_filter_list_create(ip, ip->filter_controls);
if (!ip->filter_insert)
ip->filter_insert = contool_filters_filter_insert_create(ip, ip->filter_controls);
if (!ip->filter_edit)
ip->filter_edit = contool_filters_filter_edit_create(ip, ip->filter_controls);
if (!ip->filter_update)
ip->filter_update = contool_filters_filter_update_create(ip, ip->filter_controls);
if (!ip->filter_type)
ip->filter_type = contool_filters_filter_type_create(ip, ip->filter_controls);
if (!ip->start)
ip->start = contool_filters_start_create(ip, ip->filter_controls);
if (!ip->stop)
ip->stop = contool_filters_stop_create(ip, ip->filter_controls);
if (!ip->comment)
ip->comment = contool_filters_comment_create(ip, ip->filter_controls);
if (!ip->ignore)
ip->ignore = contool_filters_ignore_create(ip, ip->filter_controls);
if (!ip->action)
ip->action = contool_filters_action_create(ip, ip->filter_controls);
if (!ip->filter_beep_count)
ip->filter_beep_count = contool_filters_filter_beep_count_create(ip, ip->filter_controls);
if (!ip->filter_beep_times)
ip->filter_beep_times = contool_filters_filter_beep_times_create(ip, ip->filter_controls);
if (!ip->filter_command)
ip->filter_command = contool_filters_filter_command_create(ip, ip->filter_controls);
if (!ip->filters_apply)
ip->filters_apply = contool_filters_filters_apply_create(ip, ip->filter_controls);
if (!ip->filters_reset)
ip->filters_reset = contool_filters_filters_reset_create(ip, ip->filter_controls);
return ip;
}
/*
* Create object `filters' in the specified instance.
*/
Xv_opaque
contool_filters_filters_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
extern void filter_done();
Xv_opaque obj;
obj = xv_create(owner, FRAME_CMD,
XV_KEY_DATA, INSTANCE, ip,
XV_WIDTH, 510,
XV_HEIGHT, 620,
XV_LABEL, "Contool: Filters",
XV_SHOW, FALSE,
FRAME_SHOW_FOOTER, FALSE,
FRAME_SHOW_RESIZE_CORNER, FALSE,
FRAME_CMD_PUSHPIN_IN, FALSE,
FRAME_DONE_PROC, filter_done,
NULL);
xv_set(xv_get(obj, FRAME_CMD_PANEL), WIN_SHOW, FALSE, NULL);
return obj;
}
/*
* Create object `filter_controls' in the specified instance.
*/
Xv_opaque
contool_filters_filter_controls_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
Xv_opaque obj;
obj = xv_create(owner, PANEL,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:filter_controls",
XV_X, 0,
XV_Y, 0,
XV_WIDTH, WIN_EXTEND_TO_EDGE,
XV_HEIGHT, WIN_EXTEND_TO_EDGE,
WIN_BORDER, FALSE,
NULL);
return obj;
}
/*
* Create object `filter_list' in the specified instance.
*/
Xv_opaque
contool_filters_filter_list_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
extern int filter_notify();
Xv_opaque obj;
obj = xv_create(owner, PANEL_LIST,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:filter_list",
XV_X, 70,
XV_Y, 14,
PANEL_LIST_WIDTH, 350,
XV_HEIGHT, 200,
PANEL_LABEL_STRING, "Filters:",
PANEL_LAYOUT, PANEL_HORIZONTAL,
PANEL_LIST_DISPLAY_ROWS, 10,
PANEL_READ_ONLY, TRUE,
PANEL_CHOOSE_ONE, FALSE,
PANEL_CHOOSE_NONE, TRUE,
PANEL_NOTIFY_PROC, filter_notify,
NULL);
return obj;
}
/*
* Create object `filter_insert' in the specified instance.
*/
Xv_opaque
contool_filters_filter_insert_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
Xv_opaque obj;
obj = xv_create(owner, PANEL_BUTTON,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:filter_insert",
XV_X, 126,
XV_Y, 218,
XV_WIDTH, 67,
XV_HEIGHT, 20,
PANEL_LABEL_STRING, "Insert",
PANEL_ITEM_MENU, contool_filter_insert_menu_create((caddr_t *) ip, NULL),
NULL);
return obj;
}
/*
* Create object `filter_edit' in the specified instance.
*/
Xv_opaque
contool_filters_filter_edit_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
Xv_opaque obj;
obj = xv_create(owner, PANEL_BUTTON,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:filter_edit",
XV_X, 202,
XV_Y, 218,
XV_WIDTH, 56,
XV_HEIGHT, 20,
PANEL_LABEL_STRING, "Edit",
PANEL_ITEM_MENU, contool_filter_edit_menu_create((caddr_t *) ip, NULL),
NULL);
return obj;
}
/*
* Create object `filter_update' in the specified instance.
*/
Xv_opaque
contool_filters_filter_update_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
extern void filter_update();
Xv_opaque obj;
obj = xv_create(owner, PANEL_BUTTON,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:filter_update",
XV_X, 267,
XV_Y, 218,
XV_WIDTH, 62,
XV_HEIGHT, 20,
PANEL_LABEL_STRING, "Update",
PANEL_NOTIFY_PROC, filter_update,
NULL);
return obj;
}
/*
* Create object `filter_type' in the specified instance.
*/
Xv_opaque
contool_filters_filter_type_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
extern int set_filter_type();
Xv_opaque obj;
obj = xv_create(owner, PANEL_CHOICE,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:filter_type",
XV_X, 80,
XV_Y, 259,
XV_WIDTH, 272,
XV_HEIGHT, 23,
PANEL_VALUE_X, 126,
PANEL_VALUE_Y, 259,
PANEL_LAYOUT, PANEL_HORIZONTAL,
PANEL_CHOICE_NROWS, 1,
PANEL_LABEL_STRING, "Type:",
PANEL_NOTIFY_PROC, set_filter_type,
PANEL_CHOICE_STRINGS,
"Single line filter",
"Multi-line filter",
0,
NULL);
return obj;
}
/*
* Create object `start' in the specified instance.
*/
Xv_opaque
contool_filters_start_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
Xv_opaque obj;
obj = xv_create(owner, PANEL_TEXT,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:start",
XV_X, 65,
XV_Y, 303,
XV_WIDTH, 429,
XV_HEIGHT, 15,
PANEL_LABEL_STRING, "Pattern:",
PANEL_VALUE_X, 126,
PANEL_VALUE_Y, 303,
PANEL_LAYOUT, PANEL_HORIZONTAL,
PANEL_VALUE_DISPLAY_LENGTH, 46,
PANEL_VALUE_STORED_LENGTH, 256,
PANEL_READ_ONLY, FALSE,
NULL);
return obj;
}
/*
* Create object `stop' in the specified instance.
*/
Xv_opaque
contool_filters_stop_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
Xv_opaque obj;
obj = xv_create(owner, PANEL_TEXT,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:stop",
XV_X, 35,
XV_Y, 323,
XV_WIDTH, 459,
XV_HEIGHT, 15,
PANEL_LABEL_STRING, "End pattern:",
PANEL_VALUE_X, 126,
PANEL_VALUE_Y, 323,
PANEL_LAYOUT, PANEL_HORIZONTAL,
PANEL_VALUE_DISPLAY_LENGTH, 46,
PANEL_VALUE_STORED_LENGTH, 256,
PANEL_READ_ONLY, FALSE,
NULL);
return obj;
}
/*
* Create object `comment' in the specified instance.
*/
Xv_opaque
contool_filters_comment_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
Xv_opaque obj;
obj = xv_create(owner, PANEL_TEXT,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:comment",
XV_X, 49,
XV_Y, 359,
XV_WIDTH, 445,
XV_HEIGHT, 15,
PANEL_LABEL_STRING, "Comment:",
PANEL_VALUE_X, 126,
PANEL_VALUE_Y, 359,
PANEL_LAYOUT, PANEL_HORIZONTAL,
PANEL_VALUE_DISPLAY_LENGTH, 46,
PANEL_VALUE_STORED_LENGTH, 256,
PANEL_READ_ONLY, FALSE,
NULL);
return obj;
}
/*
* Create object `ignore' in the specified instance.
*/
Xv_opaque
contool_filters_ignore_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
extern int set_filter_action();
Xv_opaque obj;
obj = xv_create(owner, PANEL_CHOICE,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:ignore",
XV_X, 14,
XV_Y, 395,
XV_WIDTH, 321,
XV_HEIGHT, 23,
PANEL_VALUE_X, 126,
PANEL_VALUE_Y, 395,
PANEL_LAYOUT, PANEL_HORIZONTAL,
PANEL_CHOICE_NROWS, 1,
PANEL_LABEL_STRING, "When matched:",
PANEL_NOTIFY_PROC, set_filter_action,
PANEL_CHOICE_STRINGS,
"Save message",
"Ignore message",
0,
NULL);
return obj;
}
/*
* Create object `action' in the specified instance.
*/
Xv_opaque
contool_filters_action_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
extern int set_match_action();
Xv_opaque obj;
obj = xv_create(owner, PANEL_TOGGLE,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:action",
XV_X, 32,
XV_Y, 423,
XV_WIDTH, 196,
XV_HEIGHT, 139,
PANEL_VALUE_X, 126,
PANEL_VALUE_Y, 423,
PANEL_LAYOUT, PANEL_HORIZONTAL,
PANEL_CHOICE_NCOLS, 1,
PANEL_LABEL_STRING, "When saved:",
PANEL_NOTIFY_PROC, set_match_action,
PANEL_CHOICE_STRINGS,
"Beep",
"Command",
"Flash icon",
"Open window",
"Timestamp",
0,
NULL);
return obj;
}
/*
* Create object `filter_beep_count' in the specified instance.
*/
Xv_opaque
contool_filters_filter_beep_count_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
Xv_opaque obj;
obj = xv_create(owner, PANEL_NUMERIC_TEXT,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:filter_beep_count",
XV_X, 228,
XV_Y, 428,
XV_WIDTH, 80,
XV_HEIGHT, 15,
PANEL_VALUE_X, 237,
PANEL_VALUE_Y, 428,
PANEL_LAYOUT, PANEL_HORIZONTAL,
PANEL_VALUE_DISPLAY_LENGTH, 2,
PANEL_VALUE_STORED_LENGTH, 2,
PANEL_MAX_VALUE, 99,
PANEL_MIN_VALUE, 0,
PANEL_READ_ONLY, FALSE,
NULL);
return obj;
}
/*
* Create object `filter_beep_times' in the specified instance.
*/
Xv_opaque
contool_filters_filter_beep_times_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
Xv_opaque obj;
obj = xv_create(owner, PANEL_MESSAGE,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:filter_beep_times",
XV_X, 316,
XV_Y, 428,
XV_WIDTH, 34,
XV_HEIGHT, 13,
PANEL_LABEL_STRING, "times",
PANEL_LABEL_BOLD, FALSE,
NULL);
return obj;
}
/*
* Create object `filter_command' in the specified instance.
*/
Xv_opaque
contool_filters_filter_command_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
Xv_opaque obj;
obj = xv_create(owner, PANEL_TEXT,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:filter_command",
XV_X, 228,
XV_Y, 457,
XV_WIDTH, 265,
XV_HEIGHT, 15,
PANEL_VALUE_X, 237,
PANEL_VALUE_Y, 457,
PANEL_LAYOUT, PANEL_HORIZONTAL,
PANEL_VALUE_DISPLAY_LENGTH, 32,
PANEL_VALUE_STORED_LENGTH, 1024,
PANEL_READ_ONLY, FALSE,
NULL);
return obj;
}
/*
* Create object `filters_apply' in the specified instance.
*/
Xv_opaque
contool_filters_filters_apply_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
extern void accept_filters();
Xv_opaque obj;
obj = xv_create(owner, PANEL_BUTTON,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:filters_apply",
XV_X, 196,
XV_Y, 583,
XV_WIDTH, 53,
XV_HEIGHT, 20,
PANEL_LABEL_STRING, "Apply",
PANEL_NOTIFY_PROC, accept_filters,
NULL);
return obj;
}
/*
* Create object `filters_reset' in the specified instance.
*/
Xv_opaque
contool_filters_filters_reset_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
extern void reset_filters();
Xv_opaque obj;
obj = xv_create(owner, PANEL_BUTTON,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:filters_reset",
XV_X, 261,
XV_Y, 583,
XV_WIDTH, 51,
XV_HEIGHT, 20,
PANEL_LABEL_STRING, "Reset",
PANEL_NOTIFY_PROC, reset_filters,
NULL);
return obj;
}
/*
* Initialize an instance of object `load'.
*/
contool_load_objects *
contool_load_objects_initialize(ip, owner)
contool_load_objects *ip;
Xv_opaque owner;
{
if (!ip && !(ip = (contool_load_objects *) calloc(1, sizeof (contool_load_objects))))
return (contool_load_objects *) NULL;
if (!ip->load)
ip->load = contool_load_load_create(ip, owner);
if (!ip->load_controls)
ip->load_controls = contool_load_load_controls_create(ip, ip->load);
if (!ip->load_type)
ip->load_type = contool_load_load_type_create(ip, ip->load_controls);
if (!ip->load_file)
ip->load_file = contool_load_load_file_create(ip, ip->load_controls);
if (!ip->accept_load)
ip->accept_load = contool_load_accept_load_create(ip, ip->load_controls);
return ip;
}
/*
* Create object `load' in the specified instance.
*/
Xv_opaque
contool_load_load_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
Xv_opaque obj;
obj = xv_create(owner, FRAME_CMD,
XV_KEY_DATA, INSTANCE, ip,
XV_WIDTH, 444,
XV_HEIGHT, 146,
XV_LABEL, "Contool: Load Configuration",
XV_SHOW, FALSE,
FRAME_SHOW_FOOTER, FALSE,
FRAME_SHOW_RESIZE_CORNER, FALSE,
FRAME_CMD_PUSHPIN_IN, FALSE,
NULL);
xv_set(xv_get(obj, FRAME_CMD_PANEL), WIN_SHOW, FALSE, NULL);
return obj;
}
/*
* Create object `load_controls' in the specified instance.
*/
Xv_opaque
contool_load_load_controls_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
Xv_opaque obj;
obj = xv_create(owner, PANEL,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:load_controls",
XV_X, 0,
XV_Y, 0,
XV_WIDTH, WIN_EXTEND_TO_EDGE,
XV_HEIGHT, WIN_EXTEND_TO_EDGE,
WIN_BORDER, FALSE,
NULL);
return obj;
}
/*
* Create object `load_type' in the specified instance.
*/
Xv_opaque
contool_load_load_type_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
Xv_opaque obj;
obj = xv_create(owner, PANEL_TOGGLE,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:load_type",
XV_X, 105,
XV_Y, 14,
XV_WIDTH, 162,
XV_HEIGHT, 52,
PANEL_VALUE_X, 149,
PANEL_VALUE_Y, 14,
PANEL_LAYOUT, PANEL_HORIZONTAL,
PANEL_CHOICE_NCOLS, 1,
PANEL_LABEL_STRING, "Load:",
PANEL_CHOICE_STRINGS,
"Tool properties",
"Filter definitions",
0,
NULL);
return obj;
}
/*
* Create object `load_file' in the specified instance.
*/
Xv_opaque
contool_load_load_file_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
extern Panel_setting file_completion();
Xv_opaque obj;
obj = xv_create(owner, PANEL_TEXT,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:load_file",
XV_X, 14,
XV_Y, 72,
XV_WIDTH, 415,
XV_HEIGHT, 15,
PANEL_LABEL_STRING, "Configuration file:",
PANEL_VALUE_X, 149,
PANEL_VALUE_Y, 72,
PANEL_LAYOUT, PANEL_HORIZONTAL,
PANEL_VALUE_DISPLAY_LENGTH, 35,
PANEL_VALUE_STORED_LENGTH, 256,
PANEL_READ_ONLY, FALSE,
PANEL_NOTIFY_PROC, file_completion,
NULL);
return obj;
}
/*
* Create object `accept_load' in the specified instance.
*/
Xv_opaque
contool_load_accept_load_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
extern void load_filters();
Xv_opaque obj;
obj = xv_create(owner, PANEL_BUTTON,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:accept_load",
XV_X, 199,
XV_Y, 107,
XV_WIDTH, 46,
XV_HEIGHT, 20,
PANEL_LABEL_STRING, "Load",
PANEL_NOTIFY_PROC, load_filters,
NULL);
return obj;
}
/*
* Initialize an instance of object `store'.
*/
contool_store_objects *
contool_store_objects_initialize(ip, owner)
contool_store_objects *ip;
Xv_opaque owner;
{
if (!ip && !(ip = (contool_store_objects *) calloc(1, sizeof (contool_store_objects))))
return (contool_store_objects *) NULL;
if (!ip->store)
ip->store = contool_store_store_create(ip, owner);
if (!ip->store_controls)
ip->store_controls = contool_store_store_controls_create(ip, ip->store);
if (!ip->store_type)
ip->store_type = contool_store_store_type_create(ip, ip->store_controls);
if (!ip->store_file)
ip->store_file = contool_store_store_file_create(ip, ip->store_controls);
if (!ip->accept_store)
ip->accept_store = contool_store_accept_store_create(ip, ip->store_controls);
return ip;
}
/*
* Create object `store' in the specified instance.
*/
Xv_opaque
contool_store_store_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
Xv_opaque obj;
obj = xv_create(owner, FRAME_CMD,
XV_KEY_DATA, INSTANCE, ip,
XV_WIDTH, 444,
XV_HEIGHT, 146,
XV_LABEL, "Contool: Store Configuration",
XV_SHOW, FALSE,
FRAME_SHOW_FOOTER, FALSE,
FRAME_SHOW_RESIZE_CORNER, FALSE,
FRAME_CMD_PUSHPIN_IN, FALSE,
NULL);
xv_set(xv_get(obj, FRAME_CMD_PANEL), WIN_SHOW, FALSE, NULL);
return obj;
}
/*
* Create object `store_controls' in the specified instance.
*/
Xv_opaque
contool_store_store_controls_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
Xv_opaque obj;
obj = xv_create(owner, PANEL,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:store_controls",
XV_X, 0,
XV_Y, 0,
XV_WIDTH, WIN_EXTEND_TO_EDGE,
XV_HEIGHT, WIN_EXTEND_TO_EDGE,
WIN_BORDER, FALSE,
NULL);
return obj;
}
/*
* Create object `store_type' in the specified instance.
*/
Xv_opaque
contool_store_store_type_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
Xv_opaque obj;
obj = xv_create(owner, PANEL_TOGGLE,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:store_type",
XV_X, 102,
XV_Y, 14,
XV_WIDTH, 165,
XV_HEIGHT, 52,
PANEL_VALUE_X, 149,
PANEL_VALUE_Y, 14,
PANEL_LAYOUT, PANEL_HORIZONTAL,
PANEL_CHOICE_NCOLS, 1,
PANEL_LABEL_STRING, "Store:",
PANEL_CHOICE_STRINGS,
"Tool properties",
"Filter definitions",
0,
NULL);
return obj;
}
/*
* Create object `store_file' in the specified instance.
*/
Xv_opaque
contool_store_store_file_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
extern Panel_setting file_completion();
Xv_opaque obj;
obj = xv_create(owner, PANEL_TEXT,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:store_file",
XV_X, 14,
XV_Y, 72,
XV_WIDTH, 415,
XV_HEIGHT, 15,
PANEL_LABEL_STRING, "Configuration file:",
PANEL_VALUE_X, 149,
PANEL_VALUE_Y, 72,
PANEL_LAYOUT, PANEL_HORIZONTAL,
PANEL_VALUE_DISPLAY_LENGTH, 35,
PANEL_VALUE_STORED_LENGTH, 256,
PANEL_READ_ONLY, FALSE,
PANEL_NOTIFY_PROC, file_completion,
NULL);
return obj;
}
/*
* Create object `accept_store' in the specified instance.
*/
Xv_opaque
contool_store_accept_store_create(ip, owner)
caddr_t ip;
Xv_opaque owner;
{
extern void store_filters();
Xv_opaque obj;
obj = xv_create(owner, PANEL_BUTTON,
XV_KEY_DATA, INSTANCE, ip,
XV_HELP_DATA, "contool:accept_store",
XV_X, 197,
XV_Y, 107,
XV_WIDTH, 49,
XV_HEIGHT, 20,
PANEL_LABEL_STRING, "Store",
PANEL_NOTIFY_PROC, store_filters,
NULL);
return obj;
}