Cleanup output window
This addresses the following issues with vtkOutputWindow.
-
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 otherDisplay.*
methods. There was still a problem: it was challenging to determine ifDisplayText
was directly being called for output messages rather than via any of the otherDisplay.*
methods. This is fixed by addingvtkOutputWindow::GetCurrentMessageType
protected method. Subclasses can use that invtkOutputWindow::DisplayText
overrides to determine message type. Additionally, a newvtkCommand::TextEvent
is fired byvtkOutputWindow::DisplayText
when the method is directly invoked. - vtkOutputWindow presented all messages to
cerr
. It should putvtkOutputWindow::DisplayText
tocout
as those are not exceptions. AddedUseStdErrorForAllMessages
to change this.
Edited by Utkarsh Ayachit