Skip to content

Cleanup output window

This addresses the following issues with vtkOutputWindow.

  1. vtkOutputWindow::DisplayText method gets called for all types of messages and fired vtkCommand::MessageEvent. With no ability to determine the type of message in DisplayText overrides or MessageEvent handlers, this has little utility and one always ended up handling/overriding other Display.* methods. There was still a problem: it was challenging to determine if DisplayText was directly being called for output messages rather than via any of the other Display.* methods. This is fixed by adding vtkOutputWindow::GetCurrentMessageType protected method. Subclasses can use that in vtkOutputWindow::DisplayText overrides to determine message type. Additionally, a new vtkCommand::TextEvent is fired by vtkOutputWindow::DisplayText when the method is directly invoked.
  2. vtkOutputWindow presented all messages to cerr. It should put vtkOutputWindow::DisplayText to cout as those are not exceptions. Added UseStdErrorForAllMessages to change this.
Edited by Utkarsh Ayachit

Merge request reports