How to Integrate Panels into an Application
1. Choose Open from the File menu in the Main window and select the panel buffer that you want to integrate into the application. The panel buffer is opened in the Main window work space.
If the required panel buffer is already loaded, select it from the Window menu to set it as the current buffer.
2. Click the Panel Class Editor button
in the toolbar of the Main window. The Panel Class palette is opened at the bottom of the Main window.
3. In the Panel Class palette toolbar, click the New Panel Class button
to add the current buffer to the palette. This operation creates a panel class to handle the
.ilv panel and adds an icon to the application panel classes list.
4. If necessary, while the panel class icon is selected in the Panel Class palette, click the Panel Class Inspector button
to change the directory in which the C++ files for the panel class will be generated and to select code to be generated in the source code (Data, Names, Callbacks).
The Panel Class inspector appears for you to edit.
On the General page, you can specify the directories in which any files generated for the panel class are stored. If you do not enter anything in the directory fields, files are automatically generated in those directories specified in the Application Inspector.
On the Options page, the Data, Names, and Callbacks toggle buttons enable you to specify whether data, names, and callbacks are generated in the source code for the panel classes. These toggle buttons should be used to set the following:
Data—Select to generate the data in the source code so that your application does not need to read the data file at run time. The code generated using this data will only be applied on the UNIX platform; with MS-Windows, the generated data string is not used.
Names—Select to generate in the source code the member functions returning the named objects.
Callback Declarations—Views Studio provides you with a simple way to deal with callbacks. When the Callback Declarations toggle button is checked, it generates an IlvGraphicCallback function and declares a default virtual member function. The generated IlvGraphicCallback invokes the corresponding virtual member function that has the same name as the callback that you specified in Views Studio. Therefore, the names you use for callbacks in Views Studio must be valid C++ function names.
The Callback Declarations toggle button must be checked for the Callback Definitions toggle button to have any effect.
Callback Definitions—The default definition code (the body function) for these callback virtual member functions can be generated, letting you test your application before defining the real callbacks. By checking the Callback Definitions toggle button, you redefine your own versions of the callbacks in your derived classes.
If you do not want these function definitions to be generated, deselect the Callback Definition toggle button. This is useful if you do not want to derive a class from the generated class. In this case, you can write your own definition of these member functions in a separate file that will not be erased by future code generation.
The callback registering task is generated in the C++ code so that you only have to define the callback methods.
5. If necessary, click the Header and Source pages of the Panel Class inspector to specify code that should be added to the class header and source file.
6. Click the Apply button to save any changes. Click the Close button to quit the inspector.
Published date: 05/24/2022
Last modified date: 02/24/2022