Rogue Wave Views |
Rogue Wave Views Documentation Home |
Application Framework form document view. More...
#include <ilviews/appframe/dialog/formvw.h>
Public Member Functions | |
IlvDvFormView (IlvDisplay *, const IlSymbol *inspectorName=0) | |
Constructs an IlvDvFormView object. More... | |
IlvAbstractView * | getDvView () |
Gets the IlvAbstractView of the document view. More... | |
virtual IlvGraphic * | getGraphic () |
Gets the graphic object of the document view. More... | |
virtual void | initializeView () |
Initializes the document view. More... | |
Public Member Functions inherited from IlvDvDocViewInterface | |
IlvDvDocument * | getDocument () const |
Gets the document associated with the view. More... | |
IlvDvApplication * | getDvApplication () const |
Gets the application in which the document view is displayed. More... | |
IlvDvViewContainerInterface * | getViewContainer () const |
Gets the document view container that owns the view. More... | |
virtual void | serialize (IlvDvStream &) |
Serializes the object in the stream stream. Typically, the body of the method has the following form: More... | |
Public Member Functions inherited from IlvDvInterface | |
IlBoolean | callMethod (const IlSymbol *methodName, IlvDvValue *returnedValue,...) |
Generic method for calling a method that is exported in a class interface. More... | |
IlvDvValue & | getFieldValue (const IlSymbol *fieldName, IlvDvValue &value) const |
Gets a field value. More... | |
virtual IlBoolean | isProcessingAction (const IlSymbol *methodName) const |
Returns IlTrue if the given action can be processed by the class. More... | |
virtual IlBoolean | processAction (const IlSymbol *actionName) |
Processes an action. More... | |
virtual IlBoolean | refreshAction (const IlSymbol *actionName, IlvDvActionDescriptor *desc) const |
Refresh all the menu items that reference the action given by the parameter actionName. More... | |
void | setFieldValue (const IlSymbol *fieldName, const IlvDvValue &value) |
Sets a field value. More... | |
Application Framework form document view.
Library: ilvappframe
IlvDvFormView
is a subclass of IlvGadgetContainerRectangle
and implements the IlvDvDocViewInterface
interface. It is used for displaying and editing the data of the document, within a form that is a set of gadgets contained in the view.
Gadgets of the view are built by specifying a Rogue Wave Views .ilv
file using the method IlvGadgetContainerRectangle::setFilename
. It can be invoked either in the constructor of the view or in the overridden initializeView
method.
Classes that inherit from the IlvDvFormView
class must be declared and implemented with specific macros, which allow instances of these classes to be created automatically by the document templates.
The following code sample shows how to derive from the IlvDvFormView
class:
Application Framework provides two macros that allow a form view to easily manage its gadgets:
CallbackNotification
is a useful macro that invokes a given method when a given callback is triggered. InitializeGadget
specifies a method that will initialize a gadget given by its name.These macros must be used in the interface declaration of the view, between macros IlvDvBeginInterface
and IlvDvEndInterface1
, as shown in the following example:
Suppose that a form view contains a text field of name "name" and a button with a callback of name "EraseCB". We want the text field to be initialized with the text "Default Name" and we want this text to be erased when the user clicks the button. This is shown here:
CallbackNotification
, InitializeGadget
IlvDvFormView::IlvDvFormView | ( | IlvDisplay * | , |
const IlSymbol * | inspectorName = 0 |
||
) |
Constructs an IlvDvFormView
object.
This constructor creates an instance of IlvDvFormView
whose display is given by the parameter display.
|
virtual |
Gets the IlvAbstractView
of the document view.
Must be redefined by the class that implements the interface if the class inherits from the IlvAbstractView
class. In this case, the redefined method must only return this
object. For example, the IlvDvView
class redefines the method to return (IlvView*)this
object. By default, the method returns 0
.
Reimplemented from IlvDvDocViewInterface.
|
virtual |
Gets the graphic object of the document view.
Must be redefined by the class that implements the interface if the class inherits from the IlvGraphic
class. In this case, the redefined method only returns this
object. For example, the IlvDvTextView
class redefines this method to return (IlvText*)this
object. By default, the method returns 0
.
Reimplemented from IlvDvDocViewInterface.
|
virtual |
Initializes the document view.
Called by the document associated with the view to initialize its contents. Typically, gadget classes that implement the IlvDvDocViewInterface
interface initialize the gadget using the associated document data.
Reimplemented from IlvDvDocViewInterface.
© Copyright 2015, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.