IlsSwGadgetContainerFactory
 
IlsSwGadgetContainerFactory
Category 
Dynamic view-related class (Server/Views integration)
Inheritance Path 
IlsSwGadgetContainerFactory
Description 
This factory class is used to instantiate new gadget containers. The function newInstance is called to create new containers, unless a view parameter (Server data source or Container) has been supplied, in which case the Rogue Wave Views component uses the container supplied.
Library 
<mvsw>
Header File 
#include <ilmvsw/repres.h>
Synopsis 
class IlsSwGadgetContainerFactory
{
public:
virtual IlvGadgetContainer& newInstance
(IlsSwRepresentation* swRep,
IlvDisplay* d,
const char* name,
const char* title,
const IlvRect& dims,
IlvBoolean useacc = IlvTrue,
IlvBoolean visible = IlvFalse);
static IlsSwGadgetContainerFactory& GetSingleton();
static IlsSwGadgetContainerFactory* GetSingletonPtr();
static void SetSingleton(IlsSwGadgetContainerFactory*);
};
Member Functions 
[virtual] IlvGadgetContainer& newInstance(IlsSwRepresentation* swRep,
IlvDisplay* d,
const char* name,
const char* title,
const IlvRect& dims,
IlvBoolean useacc = IlvTrue,
IlvBoolean visible = IlvFalse);
This virtual member function creates instances of type IlvGadgetContainer. The parameter swRep is not necessary to create the IlvGadgetContainer object, but it is supplied in case the factory wants to change its behavior depending on the representation being created. It may happen that the gadget container is created before the representation. If this happens, two cases can arise:
*If you fill the created container with objects (for instance, by reading an .ilv file), Server does not read the resource file specified in the dynamic view as the resource attribute. In this case, it is your responsibility to display the panel.
*If you do not load any graphic object, Server reads the resource file specified in the dynamic view.
[static] IlsSwGadgetContainerFactory& GetSingleton();
This static member function returns a reference to the IlsSwGadgetContainer factory. It creates a default factory if none was set.
[static] IlsSwGadgetContainerFactory* GetSingletonPtr();
This static member function returns a pointer to the current class singleton. If no singleton has been declared yet, it returns the null pointer.
[static] void SetSingleton(IlsSwGadgetContainerFactory* f);
This static member function sets the IlsSwGadgetContainerFactory to the supplied parameter.
See Also 
IlvGadgetContainer (in the Rogue Wave Views Reference Manual)

Version 5.8
Copyright © 2014, Rogue Wave Software, Inc. All Rights Reserved.