Views

The term view refers to the MVC design (Model-View-Controller) component that has the following attributes:

In practice, views are collections of interface elements, such as controls, menus, command button areas (CBAs), key events, that make up one top-level window in an application. Applications may have one or more views. If an application has more than one view and if the status pane behavior is organized in this manner, then each view in an application can have its own tab. Applications can have only a single view active at any one time. The current view is the view that interacts with the user, receiving events and menu choices as if it were the only set of UI elements.

Multiple view architectures are widely used in application development on the S60 platform. Multiple view architectures:

Figure 45: Controller-view hierarchy in traditional and S60 architectures

In practice, the view concept varies depending upon your chosen architecture approach:

Traditional architecture views

In a traditional architecture, the view is derived from CCoeControl, which typically constructs a top-level window-owning control that draws itself and contains other controls.

For more information on views in tradition architecture approaches, see "Traditional Symbian OS UI application architecture".

S60 architecture views

In S60 view architecture, a view controller is added between the UI controller and the view that draws itself and contains other controls. For example, view controllers can be used to specify CBAs that are specific to specific views.

In an S60 architecture, the view controller is derived from CAknView, which is derived directly from CBase and not from CCoeControl. This means the CAknView-derived views are not controls. CAknView-derived views need to contain CCoeControl-derived classes to provide visual representation on the display.

For more information on views in S60 architecture approaches, see "S60 view architecture".

Dialog architecture views

In dialog architectures, views are implemented in modeless dialog boxes. Multiple views can be constructed using nested dialogs or a tabbed dialog pane.

For more information on views in dialog architecture approaches, see "Dialog architecture".