home *** CD-ROM | disk | FTP | other *** search
- /* cat > headers/pathname.h << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* pathname.h: header for pathname.c file */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- #define pathname_h 1
-
- #include "all.h"
- #include "newext.h"
-
- /* EOF */
- /* cat > src+obj/pathname/clear_pathnamesw.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* clear_pathnamesw: no longer display pathname */
- /* subwindow */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "pathname.h" */
-
- void clear_pathnamesw ()
- {
- window_set (path_frame, WIN_SHOW, FALSE, 0);
- }
- /* EOF */
-
- /* cat > src+obj/pathname/create_pathnamesw.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* create_pathnamesw: create pathname subwindow */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "init.h" */
-
- create_pathnamesw ()
- {
- int x_origin, y_origin;
- int x_offset, y_offset;
-
- if (window_corner (def_box, LEFT, BOTTOM, &x_origin, &y_origin))
- {
- printf ("Internal error: (create_pathnamesw) Can't get dimensions of def_box frame - ImageTool terminated!");
- exit (1);
- }
- x_offset = 50;
- y_offset = 25;
-
- path_frame = window_create (base, FRAME,
- FRAME_SHOW_LABEL, TRUE,
- WIN_ERROR_MSG, "Cannot open pathname window.",
- WIN_X, x_origin + x_offset,
- WIN_Y, y_origin + y_offset,
- WIN_COLUMNS, 80,
- 0);
- path_panel = window_create (path_frame, PANEL,
- WIN_FONT, font_panel,
- WIN_ROWS, 2,
- 0);
- path_return_but = panel_create_item (path_panel, PANEL_BUTTON,
- PANEL_LABEL_IMAGE, panel_button_image (path_panel, "return", 6, font_panel_button),
- PANEL_NOTIFY_PROC, path_return_proc,
- 0);
- path_cancel_but = panel_create_item (path_panel, PANEL_BUTTON,
- PANEL_LABEL_IMAGE, panel_button_image (path_panel, "cancel", 6, font_panel_button),
- PANEL_NOTIFY_PROC, path_cancel_proc,
- 0);
- window_fit_height (path_frame);
-
- /* set color map same with imagetool */
- (void) color_path_win ();
-
- return;
- }
- /* EOF */
-
- /* cat > src+obj/pathname/display_pathnamesw.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* display_pathnamesw: initialize and display path */
- /* subwindow */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "display.h" */
-
- display_pathnamesw (label, return_func)
- char * label;
- /* input: reminder string for frame label */
- PFUNC return_func;
- /* input: pointer to a user function of the form
- func (returned_dir, returned_filename) */
- {
- /* set values in frame */
-
- /* save return function */
- panel_set (path_return_but, PANEL_CLIENT_DATA, return_func, 0);
-
- /* display subwindow */
- window_set (path_frame,
- FRAME_LABEL, label,
- WIN_SHOW, TRUE,
- 0);
- }
- /* EOF */
-
- /* cat > src+obj/pathname/path_cancel_proc.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* path_cancel_proc: make pathname frame invisible */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "pathname.h" */
-
- void
- path_cancel_proc ()
- {
- clear_pathnamesw ();
- }
- /* EOF */
-
- /* cat > src+obj/pathname/path_return_proc.c << "EOF" */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* path_return_proc: update requested path information */
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- /* SCCS information: %W% %G% - NCSA */
-
- /* #include "pathname.h" */
-
- void
- path_return_proc ()
- {
- PFUNC func;
-
- /* get function to update requested path information */
- func = (PFUNC) panel_get (path_return_but, PANEL_CLIENT_DATA);
- (void) (*func) ("Test_directory", "Test_file");
- clear_pathnamesw ();
- }
- /* EOF */
-
-