next up previous contents
Next: trial_field_manager() Up: Writing the Standard Panel Previous: Writing the Standard Panel   Contents

trial_open()

This is the routine which is called when the window's name is selected from the panels menu on the command window. It should create the window if necessary and then display the window. The following code should be adequate.

/* trial.c 
 * 
 * standard routines for trial window
 *
 */
#include <stdio.h>
#include <xview/xview.h>

#include <pm_main.h>
#include <ui_init.h>
#include <constants.h>
#include "trial_cui.h"

static trial_win_objects *trial_ip = NULL;

/* 
 * trial_open()
 *
 * displays the trial window, creating it if necessary.
 */
trial_open()
{
  if (trial_ip == NULL)
    {
      /* create the window, make the owner the dstool cmd panel */
      trial_ip = trial_win_objects_initialize(NULL, ui_windows->cmd_win->win);
      trial_field_manager();
    }
  /* show the window */
  xv_set(trial_ip->win, WIN_SHOW, TRUE, WIN_FRONT, NULL);
}



root
1998-11-02