cObject
---cUIObject
------DfBaseObject
---------DfBaseWindow
------------DfBaseUIWindow
---------------DfBaseContainer
------------------DfBaseDialog
---------------------Container3d
------------------------MdiDialog
---------------------------AppDialog
------------------------------View
---------------------------------dbAppClient_
---------------------------------ReportView
View is used to provide a "basic" (non data-entry) Multiple Document Interface (MDI) view. Views may contain basic objects (Container, Group, TabDialog, Form, Grid, Button, etc.) and may never contain data-aware objects (any of the "db" classes). The dbView is used to create DEO views. View objects are MDI (multiple document interface) objects and must be placed inside of a MDI client-area object (ClientArea). View and (dbView) objects are usually saved in their own source files (.vw files) and placed inside of a client-area object with the use command.
The dbView class is a data-aware class similar to the View class. dbView is the class used by the DataFlex Studio to create View components and has all the capabilities of the View class in addition to data handling capabilities.
We recommend using dbView for most (probably all) your container needs. You can use a dbView without any data-aware controls and it works pretty much the same as a View.
View1.vw
Use dfAllEnt.pkg : Activate_View Activate_View1 For oView1 Object oView1 is a View Set Label to "My View1 Label" Set Size to 120 280 : End_Object
// View1.vw - deferred view
Use dfAllEnt.pkg : Deferred_View Activate_View1 For ; ; Object oView1 is a View Set Label to "My View1 Label" Set Size to 120 280 : CD_End_Object
Activate_View Activate_ObjectName for oObjectName Object oObjectName is a View Set Label to text Set Size to height length : End_Object
or (deferred version)
Deferred_View Activate_ObjectName for ; ; Object oObjectName is a View Set Label to text Set Size to height length : CD_End_Object
Three levels of programming classes are supported: basic (non-MDI, no support for tool-bars or status-bars), application (App classes - MDI support, basic button-bar and tool-bar support), and high level application.
A proper MDI (Multiple Document Interface) application consists of an MDI Panel object (which contains and supports a menu-bar, a tool bar, a status-bar and a client-area), an MDI client-area object (which contains and support MDI child-dialogs or views) and MDI-Views. The "App" classes (AppPanel, AppClientArea, AppDialog, cToolBar, cStatusBar) provide the needed cooperative support to create an MDI application.
Although complete applications can be written using the "App" classes they are considered to be intermediate level classes. A higher and more powerful level of classes exist and it is expected that most applications will be written using the high level classes (Panel, MenuBar, cToolBar, ClientArea, View, dbView, ReportView). A normal program is structured as follows:
Panel MenuBar PopupMenus : cToolBar ClientArea : Views (View, dbView, ReportView) : Statusbar
The View is a sub-class of the AppDialog class and is unchanged. Refer to AppDialog for information on this class. The View is non DEO high-level application class.
View are usually activated from the popup menu by sending a custom activate message to the client-area object. The custom message is defined by the command Activate_View or Deferred_View. Views may also be activated by sending the message Activate_view to the object.
The Deferred_View command is used in conjunction with the CD_End_Object command to defer the creation of the view until it is activated. Deferring views will improve program load time.
When an application is about the be exited the client-area object will send two messages to each registered view. It send the message get Verify_Exit_Application to each view. If any view returns a non-zero value the application will not be closed.
When the verify_exit_application function is called the default behavior of all View objects is to call the view_changed function. If this function returns a non-zero, a verification message is displayed ("changes exist..") and the user is given the chance to halt the program exit.
If all views allow the application to be closed, the client-area will send the message Notify_Exit_Application to all views. By default this does nothing. It provides a hook to perform any system close down operations. It can not be used to stop the program exit. The program will then be closed.
The Popup_Modal message allows you to invoke a normally modeless View or dbView as a modal view. When modal, the view will act as a ModalPanel, meaning that it will float outside of the application panel and all windows under it will be disabled. This means global menus and toolbars are disabled.