Integrating Rogue Wave Views with a Motif Application Using libmviews
Rogue Wave® Views was designed to be easily integrated with existing Motif applications. The library
libmviews provides a way to connect an
IlvView with an existing Motif widget and the mechanism required to respond to user action.
In the following sections, you will find information on:
Initializing Your Application
When integrating Rogue Wave Views code with a Motif-based application, you can create an Rogue Wave Views session in two different ways: you can use either the standard Rogue Wave Views initialization procedure or use the initialization block of the Motif application and call the second constructor of the
IlvDisplay class, as shown below:
Standard Rogue Wave Views Initialization Procedure
IlvDisplay* display = new IlvDisplay("Program", "", argc, argv);
Here, Rogue Wave Views establishes the connection with the display system.
Motif Application Initialization Procedure
Widget top = XtInitialize("", "Program", NULL, NULL, (Cardinal*)&argc, argv);
if (!top) {
IlvFatalError("Couldn’t open display");
exit(1);
}
IlvDisplay* display = new IlvDisplay(XtDisplay(top), "X");
Here, standard Xt function calls initialize the connection. You have to specify the application name in the constructor of
IlvDisplay to be able to find display resources from this string.
Version 5.5.1
Copyright © 2012, Rogue Wave Software, Inc. All Rights Reserved.