List of all members.
Public Member Functions
|virtual c4_View||GetTemplate ()=0|
|Return the structure of this view (initialization, called once). |
|virtual int||GetSize ()=0|
|Return the number of rows in this view. |
|virtual int||Lookup (c4_Cursor, int &)|
|Locate a row in this view, try to use native searches. |
|virtual bool||GetItem (int, int, c4_Bytes &)=0|
|Fetch one data item, return it as a generic data value. |
|virtual bool||SetItem (int, int, const c4_Bytes &)|
|Store one data item, supplied as a generic data value. |
|virtual bool||InsertRows (int, c4_Cursor, int=1)|
|Insert one or more copies of a row (if possible). |
|virtual bool||RemoveRows (int, int=1)|
|Remove one or more rows (this is not always possible). |
Protected Member Functions
|Constructor, must be overriden in derived class. |
A custom view is a view which can be accessed like any other view, using row and property operations, but which is fully managed by a customized "viewer" class. The viewer will eventually handle all requests for the view, such as defining its structure and size, as well as providing the actual data values when requested.
Custom views cannot propagate changes.
To implement a custom view, you must derive your viewer from this base class and define each of the virtual members. Then create a new object of this type on the heap and pass it to the c4_View constructor. Your viewer will automatically be destroyed when the last reference to its view goes away. See the DBF2MK sample code for an example of a viewer.