Data Access User Manual > Rogue Wave Views Data Access Common Framework > Data Access Basics > Rogue Wave Views Interface > Containers
 
Containers
Applications interact with the end user through windows that appear on the computer screen. A container is a window that may hold a given number of graphic objects (such as charts, gauges, buttons, and so on). Most of the interaction between an application and the end user takes place through containers and the graphic objects they contain.
Note: In Rogue Wave Views Studio, containers are referred to as panels.
Data Access typically uses the Rogue Wave Views IlvGadgetContainer class as a base class for the panels of the application.
Three different techniques can be used to set up a container. You can:
1. Code completely in C++.
*Create the container.
*Create the graphic objects.
*Put the graphic objects into the container.
*Set their positions and any other properties as required (font, color, and so on).
Since this technique requires the most coding, it is seldom used except in situations where a great deal of flexibility is required (such as creating graphic objects that depend on run-time information).
2. Design the panel using Rogue Wave Views Studio and save it in an .ilv data file. Then create the container by coding in C++ and initialize it by reading the .ilv data file. Although this technique is more convenient than the previous one, it still has one shortcoming: in order to manipulate a graphic object in a container through coding, you need to call the getObject member function and cast its result into the appropriate type.
3. Design the panel using Rogue Wave Views Studio and generate the source code for the corresponding panel class. This technique combines the benefits of the previous technique with those gained from the fact that Rogue Wave Views Studio generates a custom subclass of the IlvGadgetContainer class that corresponds to the panel being generated. This panel class will have appropriate member functions to retrieve the objects contained in the panel and will define virtual member functions to handle callbacks.
Note that these techniques can be combined. For example, it is possible to design a panel with Rogue Wave Views Studio, generate its source code, and then, at run time, create additional objects and put them into the container.
For more information regarding the code generated by Rogue Wave Views Studio, refer to the Rogue Wave Views Gadgets - User’s Manual.

Version 6.1
Copyright © 2016, Rogue Wave Software, Inc. All Rights Reserved.