예제 #1
0
/*--------------------------------------------------------------------
 * event handler
 *
 * when a event occurs, this function is invoked
 */
void src_viewer::handle_event( event& e ) {
  inherited::handle_event( e );

  switch ( e.kind() ) {
  case SELECTION:
    {
      vnode* vn = e.get_object();
      void* event_source = e.get_source();
      if ( event_source == text ) return; // ignore local event
      show( vn );
    }
    break;

  case CLOSE_FILESET:
    {
      clear_cache();
      clear();
    }
    break;

  case NEW_FILESET:
    {
      /* show the first file_block */
      FileSetBlock* file_set = suif_env->get_file_set_block();
      if (file_set) {
        view(file_set->get_file_block(0));
      }
    }
    break;
  case REFRESH:
  case PROC_MODIFIED:
  case FSE_MODIFIED:
    {
      refresh();
    }
    break;

  default:
    break;
  }
}
예제 #2
0
/*--------------------------------------------------------------------
 * event handler
 *
 */
void info_viewer::handle_event( event& e ) {
  inherited::handle_event(e);

  switch (e.kind()) {
  case SELECTION:
    {
      if ( e.get_source() == text ) {
	return;	// ignore local selection
      }
      view( e.get_object() );
    }
    break;
  case INVOCATION:
    {
      if ( e.get_source() == text ) {
	/* local event */
	view( e.get_object() );
      }
    }
    break;
  case CLOSE_FILESET:
  case NEW_FILESET:
    {
      clear();
    }
    break;
  case REFRESH:
  case PROC_MODIFIED:
  case FSE_MODIFIED:
    {
      refresh();
    }
    break;
  default:
    break;
  }
}
예제 #3
0
/*--------------------------------------------------------------------
 * event handler
 *
 * when a event occurs, this function is invoked
 */
void
output_viewer::handle_event(event& e)
{
  inherited::handle_event( e );

  switch ( e.kind() ) {
  case SELECTION:
    {
      void* event_source = e.get_source();
      if (event_source == text) return; // ignore local event
      show( e.get_object() );
    }
    break;

  case CLOSE_FILESET:
    {
      clear();
    }
    break;

  default:
    break;
  }
}