![]() |
VR-Vantage API Documentation
|
This example shows how to build a custom application using the VR-Vantage application framework and existing parts and pieces.
What if you wanted to build your own application that looked different that any of the existing VR-Vantage applications, yet also use all of the existing widgets, pages and other parts? The easist way to do that is to build a custom VR-Vantage application and add only the things you want to it.
The basic strategy here is let the DtVrvApplication do its thing, then just customize the way it looks. Let it load plug-ins, settings, data, etc. and then just what GUI elements are assembled right before the code that assembles the GUI executes. In this way, you get all the benefits of the plug-in architecture, but all the control of programatically created GUI.
The trick to doing that is to install an application transform, which is really just a function that gets called at a certain point. In this example we are going to install a function that gets called right after the plug-ins are loaded and before the GUI is assembled.
Here is the function we want to install. It's signature has to be the same as the DtVrvApplication::ApplicationTransform funtor:
We install the functor into the DtVrvApplication in main before the applications initialize method is called.
VR-Vantage includes pre-built versions of the example application. To build it yourself, follow the instructions at Building VR-Vantage Examples, Applications, and Plug-ins.
This example is an application. You can run it by running ./bin/exampleCustom.exe (on Windows) or ./bin/exampleCustom (on Linux). For more information about running examples, please see Running Applications and Examples.