ImageMovieExample shows how to use the ImageMovieWidget class.
We begin the application by including a header files that declare the standard Cornerstone application and the ImageMovieWidget:
We then declare our main function which acts as the entry point for the application:
Next, we create an instance of our application and initialize it. We also add more command line argument to the application "–dir" for specifying the image directory and "–movie-fps".
Now that we have an instance of the application, we create five squares that we place on the screen. The MultiWidgets library contains generic widgets that can be used to create MultiTouch applications. The core Widget class is a simple rectangle with an optional border. Here we also specify the size, location and color of each widget, so that they don't appear on top of each other. The widgets are added to the scene as children of the application main layer widget:
Finally, we are ready to run the application and finish the block making up the main function:
The full source code for the complete application is listed below: