rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Prototypes Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvProtoMediator Class Reference

Self-instantiating link between a 'Business Graphic Object' and its corresponding object in the application. More...

#include <ilviews/protos/grouplin.h>

Inheritance diagram for IlvProtoMediator:
IlvGroupMediator IlvAccessible

List of all members.

Public Member Functions

 IlvProtoMediator (IlvDisplay *, IlvPrototype *proto, IlAny object=0)
 Constructors.
 IlvProtoMediator (IlvDisplay *d, const char *protoName, IlAny object=0)
 See below.
virtual void install (IlvGraphicHolder *holder)
 Place the prototype instance in a scene.
void install (IlvManager *mgr)
 See below.
void install (IlvContainer *cnt)
 See below.
void setPresentation (IlvGroup *g, IlBoolean refresh=IlTrue)
 Sets the presentation that will allow the user to edit the object.

Detailed Description

Self-instantiating link between a 'Business Graphic Object' and its corresponding object in the application.

Library: ilvproto

The IlvProtoMediator class is an IlvGroupMediator that clones a given prototype at creation. This allows you to create graphical user interfaces (GUIs) for application objects created at run time. You can create multiple graphical representations of objects of the same class, each having its own values, but sharing the same behavior.

See the samples in the views directory: samples/protos/interact_synoptic and samples/protos/synoptic for examples of use.

See also:
IlvGroup, IlvGroupMediator.

Constructor & Destructor Documentation

IlvProtoMediator::IlvProtoMediator ( IlvDisplay ,
IlvPrototype proto,
IlAny  object = 0 
)

Constructors.

These constructors create a new instance of IlvProtoMediator by instantiating the prototype proto passed as an argument and linking its clone to object, in order to represent the specific values of object in the user interface. The prototype instance implements the presentation in the user interface while object is an object of the application domain. The first constructor expects its proto argument to be of the form prlibrary.prname. It looks for a library named prlibrary in the display path, as explained in IlvPrototype and IlvLoadPrototype, then looks for a prototype named prname in that library. The second constructor instantiates the argument proto instead of searching for a library.

Parameters:
d Display used to initialize the presentation.
protoName Name of the prototype. This name will be searched for in the open IlvProtoLibrary objects. The prototype will be instantiated if needed.
proto Prototype to be cloned.
object Reference to any kind of object of the application represented by the prototype instance.
See also:
IlvProtoGraphic.

Member Function Documentation

virtual void IlvProtoMediator::install ( IlvGraphicHolder holder  )  [virtual]

Place the prototype instance in a scene.

These methods place the prototype's instance in a scene. When you add a prototype instance to a scene, you may want to change the x and y values of the prototype instance to place it in a particular place in the scene. Alternatively, you may set the centerX and centerY values, to ensure that the prototype instance is centered correctly.

Parameters:
mgr IlvManager to install the group into.
cnt IlvContainer to install the group into.
holder Graphic holder to install.
void IlvProtoMediator::setPresentation ( IlvGroup g,
IlBoolean  refresh = IlTrue 
) [virtual]

Sets the presentation that will allow the user to edit the object.

Each IlvProtoMediator instance owns its presentation (the parameter g). Therefore, the presentation is destroyed when the instance is destroyed.

Reimplemented from IlvGroupMediator.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

© Copyright 2012, 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.