Creating Panes
-
IlvViewPane, which encapsulates any IlvView object.
-
IlvGraphicPane, which encapsulates any IlvGraphic object.
Most of the time, you do not have to subclass the IlvPane class as its predefined subclasses are appropriate for nearly all application needs.
This section discusses the following:
Creating a Graphic Pane
First we create the IlvGraphic object we want to add to the graphic pane. Here, we encapsulate an IlvTreeGadget object.
IlvDisplay* display = ...
IlvTreeGadget* tree = new IlvTreeGadget(display, IlvRect(0, 0, 100, 100));
Then we create a graphic pane:
IlvGraphicPane* graphicPane = new IlvGraphicPane("Tree",tree);
The first argument provided to the constructor is a string representing the name of the pane.
Creating a View Pane
First we create the IlvView object we want to add to the view pane:
IlvView* view = new IlvView(parent, IlvRect(0, 0, 100, 100));
Then we create the view pane:
IlvViewPane* viewPane = new IlvViewPane("View", view);
The first argument provided to the constructor is a string representing the name of the pane.
The view used in the view pane must be a subview. That is why the encapsulated view was created with the IlvView constructor that takes a parent view as its first argument.
Showing or Hiding a Pane
If you modify the layout of a paned container by adding or removing panes or by showing or hiding panes, you must call