CEETRON Envision with wxWidgets
We provide ready to use platform integration to wxWidgets (https://www.wxwidgets.org/). This page describes how to integrate CEETRON Envision with wxWidgets (https://www.wxwidgets.org/) and how to get your application up and running with wxWidgets.
The platform integration classes have been tested using wxWidgets 3.x. On Linux, the integration classes require the wxGTK port of wxWidgets.
Creating a viewer
All CEETRON Envision apps need one (or more) viewers in order to visualize the 3D data. We provide two example implementations that you can find in the PlatformIntegration/Wx folder of the distribution. Both implementations derive from wxGLCanvas (and from cee::vis::ViewerUIFramework).
This class implements a minimal viewer in wxWidgets. It provides the necessary code for creating, rendering and deleting the viewer. There is no support for navigation/picking etc., just the bare minimum. To create your own Viewer, you should derive from this class.
This is a demo application oriented implementation which adds Ceetron style navigation in addition to what is in ViewerCanvas. It is used in the WxMinimal and WxMultiView examples which you can find in the Examples/Wx folder of the distribution. The class derives from ViewerCanvas and can be a good starting point for a Viewer in your own application. We recommend copying the source code of this Viewer and modifying it to suit the needs of your application.
ViewerCanvas (and ViewerCanvasDemo) uses a two-stage creation process. After the instance has been created using new, the ViewerCanvas::initializeViewer() member function must be called before the viewer is used. On Linux, using the wxGTK port of wxWidgets, there is a limitation in that this function may only be called after the window has been shown on screen, in particular it can’t usually be called from the constructor as the window isn’t yet shown at this moment. Similarly, the ViewerCanvas::shutdownViewer() member function should be called before the window is destroyed. Please see the source code in the WxMinimal and WxMultiView examples for details on how this can be accomplished.
A .vcxproj file is included for Windows users. For Linux users a Makefile for GNU Make is provided.
The Windows .vcxproj file relies on the environment variable WXWIN being set to the folder where you have installed wxWidgets. To add this environment variable, go to Control Panel->System and Security->System->Advanced system settings->Advanced->Environment Variables and there click New, setting Variable name to WXWIN and Variable value to where wxWidgets is installed (e.g. C:\wxWidgets3.0.2).
On Linux, the provided Makefile relies on the wx-config utility for obtaining the compiler options, include paths and link libraries. This means that wx-config must be available in the search path when running make. If you have correctly installed wxWidgets this should already be configured. If you have manually compiled wxWidgets without running install, you may have to add the directory manually, e.g.