:: com :: sun :: star :: drawing :: framework ::

unpublished interface XViewController
Base Interfaces
XViewControllerXResourceController

XResourceController
Description
The view sub controller manages the set of active views and controls their life time.

It maintains the set of active views and the list of factories that used for creation and possibly caching of views.


Methods' Summary
addViewFactory Register a new factory for one type of view.  
removeViewFactoryForURL Unregister a factory for one type of view.  
removeViewFactoryForReference Unregister a factory for all view types that it has been registered for.  
getView Return the view object for the given ResourceId.  
getFirstViewForAnchor Return the first, and typically the only, view object that is bound to the specified anchor. If you are interested in all views bound to the anchor then you have to access the configuration to obtain a list of all their resource ids.  
Methods' Details
addViewFactory
void
addViewFactory( [in] string  sViewURL,
[in] XViewFactory  xViewFactory );

Description
Register a new factory for one type of view.

When one factory is responsible for more than one type of view then this method has to be called for each type. If this method is called multiple times for the same URL then a previously registered factory is replaced.

Parameter sViewURL
This URL specifies the type of the view to be created. The URL has to be unique among view types.
Parameter xViewFactory
The factory object that is responsible for creation, deletion, and possibly caching of views of the specified type.
removeViewFactoryForURL
void
removeViewFactoryForURL( [in] string  sViewURL );

Description
Unregister a factory for one type of view.

When the factory has been registered for more than one type of view then for the other types the factory remains registered.

Use removeFactoryForReference() to unregister a factory for all view types that it has been registered for.

Parameter sViewURL
View type for which to unregister the factory.
removeViewFactoryForReference
void
removeViewFactoryForReference( [in] XViewFactory  xViewFactory );

Description
Unregister a factory for all view types that it has been registered for.

Use removeViewFactoryForURL() to unregister a factory for just one type of view.

Parameter xViewFactory
The factory to unregister.
getView
XView
getView( [in] XResourceId  xResourceId );

Description
Return the view object for the given ResourceId.
Parameter xResourceId
Return the view that is specified by this resource id.
Returns
Returns an empty reference when no view can be found for the given xResourceId.
getFirstViewForAnchor
XView
getFirstViewForAnchor( [in] XResourceId  xAnchor );

Description
Return the first, and typically the only, view object that is bound to the specified anchor. If you are interested in all views bound to the anchor then you have to access the configuration to obtain a list of all their resource ids.
Parameter xAnchor
This resource id specifies the anchor to which the requested view is bound.
Returns
Returns an empty reference when no view can be found that is bound to the specified anchor.
Top of Page