SoConsole Class |
Creates a Win32 console for printing messages.
Namespace: OIV.Inventor.Win
The SoConsole type exposes the following members.
Name | Description | |
---|---|---|
SoConsole | Calls SoConsole((System.Windows.Forms.Control ^)nullptr, (System.String ^)nullptr, true). | |
SoConsole(Control) | Calls SoConsole(parent, (System.String ^)nullptr, true). | |
SoConsole(Control, String) | Calls SoConsole(parent, name, true). | |
SoConsole(Control, String, Boolean) | Constructor. |
Name | Description | |
---|---|---|
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
GetClassName | Returns the class name. | |
GetHashCode |
Overrides GetHashCode().
(Inherited from SoNetBase.) | |
GetIconTitle | Included for portability only. | |
GetSize | Convenience routine on the window handle. | |
GetTitle | Gets window title. | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetWidgetName | Returns the window handle name. | |
Hide | This hides the component. | |
IsFullScreen | Queries if the viewer is in fullscreen mode. | |
IsFullScreenEnable | Queries if it is possible to put the viewer in fullscreen mode. | |
IsTopLevelShell | Returns true if this component is a top level shell component (has its own window). | |
IsVisible | Returns true if this component is mapped onto the screen. | |
PrintMessage | Sends a message to the console. | |
SetFullScreen | Switches the viewer into (or out of) fullscreen mode. | |
SetFullScreenEnable | Enables/disables fullscreen mode. | |
SetIconTitle | Included for portability only. | |
SetMaxNumMessages | Sets the maximum number of messages to be printed in the console. | |
SetSize | Convenience routine on the window handle. | |
SetTitle | Sets window title. | |
Show | This shows the component. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
Handle |
Implements Handle.
(Inherited from SoWinComponent.) | |
WindowCloseCallback | Sets the delegate to invoke when the user closes this component (double click in the upper left corner) - by default Hide() is called on this component, unless a delegate is specified. |
The OIV.Inventor.Win.SoConsole class provides a convenient way to display Open Inventor error messages or other application debug messages in a Win32 console. This can be a very useful feature for simple Win32 applications.
There is only one error console per application. To get this console, call OIV.Inventor.Win.SoWin.GetErrorConsole(). It is then possible to print messages to it using the printMessage function.
The console replaces the original message box mechanism. Every Open Inventor error is caught and written to the console. This includes user-defined error messages that are generated with OIV.Inventor.Errors.SoDebugError. For example, OIV.Inventor.Errors.SoDebugError.Post(System.String, System.String)("YourClass", "YourMessage") will print your message to the console.
Due to a Windows programming limitation, the console is not usable in multi-threaded applications. In this case, it is possible to switch to the original message box mechanism by setting environment variable OIV_OLD_ERROR_HANDLER.
The Save button allows the user to save error information into a file named oivErrorFile.txt. The Clear button deletes all error messages currently displayed in the console.