interface XModel in module com::sun::star::frame::

(Global Index)

Syntax

interface XModel : com::sun::star::lang::XComponent ;

Description

represents a component which is created from an URL and arguments.

It is a representation of a resource in the sense that it was created/loaded from the resource. The arguments are passed to the loader to modify its behavior. An example for such an argument is "AsTemplate", which loads the resource as a template for a new document.

Models can be controlled by controller components, which are usually views of the model.

If there is at least one controller, there is by definition a current controller. And if that controller supports the interface XSelectionSupplier , it has a current selection too.

Method Summary

attachResource informs a model about its resource description.

getURL

getArgs

connectController is called whenever a new controller is created for this model.

disconnectController is called whenever a new controller is created for this model.

lockControllers suspends some notifications to the controllers which are used for display updates.

unlockControllers resumes the notifications which were suspended by .

hasControllersLocked determines if there is at least one lock remaining.

getCurrentController

setCurrentController sets a registered controller as the current controller.

getCurrentSelection

Known Services Which Export this Interface

com::sun::star::sheet::SpreadsheetDocument

Method Details



attachResource

Syntax

boolean attachResource (
string aURL,
sequence< com::sun::star::beans::PropertyValue > aArgs );

Description

informs a model about its resource description.


getURL

Syntax

string getURL ();

Returns

the URL of the resource which is represented by this model.

See also

XStorable::getLocation

getArgs

Syntax

sequence< com::sun::star::beans::PropertyValue > getArgs ();

Returns

the arguments with which the model was originally created or stored the last time.

connectController

Syntax

oneway void connectController (
com::sun::star::frame::XController xController );

Description

is called whenever a new controller is created for this model.

The XComponent interface of the controller must be used to recognize when it is deleted.

See also

releaseController

disconnectController

Syntax

oneway void disconnectController (
com::sun::star::frame::XController xController );

Description

is called whenever a new controller is created for this model.

The XComponent interface of the controller must be used to recognize when it is deleted.

See also

registerController

lockControllers

Syntax

oneway void lockControllers ();

Description

suspends some notifications to the controllers which are used for display updates.

The calls to and may be nested and even overlapping, but they must be in pairs. While there is at least one lock remaining, some notifications for display updates are not broadcasted.


unlockControllers

Syntax

oneway void unlockControllers ();

Description

resumes the notifications which were suspended by .

The calls to and may be nested and even overlapping, but they must be in pairs. While there is at least one lock remaining, some notifications for display updates are not broadcasted.


hasControllersLocked

Syntax

boolean hasControllersLocked ();

Description

determines if there is at least one lock remaining.

While there is at least one lock remaining, some notifications for display updates are not broadcasted to the controllers.


getCurrentController

Syntax

com::sun::star::frame::XController getCurrentController ();

Returns

the controller which currently controls this model.

If the controller which is active is a controller of this model, it will be returned. If not, the controller which was the last active of this model is returned. If no controller of this model ever was active, the controller first registered is returned. If no controller is registered for this model, NULL is returned.


setCurrentController

Syntax

void setCurrentController (
com::sun::star::frame::XController xController )
raises ( com::sun::star::container::NoSuchElementException );

Description

sets a registered controller as the current controller.


getCurrentSelection

Syntax

com::sun::star::uno::XInterface getCurrentSelection ();

Returns

the current selection in the current controller.

If there is no current controller, it returns NULL.

Top of Page