Overview | Module | Use | Devguide | Index

Methods' Summary | Attributes' Summary | Methods' Details | Attributes' Details

:: com :: sun :: star :: frame ::
interface XModel
  Base Interfaces
      XModel
      ┗ ::com::sun::star::lang::XComponent
  ::com::sun::star::lang::XComponent | (referenced interface's summary:) allows to exclicitly free resources and break cyclic references.
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. (see ::com::sun::star::document::MediaDescriptor for further details) Models can be controlled by controller components, which are usually views of the model. (see Controller for further details) If there is at least one controller, there is by definition a current controller. And if that controller supports the interface ::com::sun::star::view::XSelectionSupplier, it has a current selection too. See also ::com::sun::star::document::MediaDescriptor, Controller, ::com::sun::star::view::XSelectionSupplier Developers Guide OfficeDev - Component - Models - XModel OfficeDev - Component - Getting Frames, Controllers and Models from Each Other Text - Text Document Controller OfficeDev - Component - Models OfficeDev - Frame-Controller-Model Paradigm in OpenOffice.org

Methods' Summary
attachResource | informs a model about its resource description.
getURL | provides information about the location of this model
getArgs | provides read access on currently representation of the ::com::sun::star::document::MediaDescriptor of this model which describes the model and his state
connectController | is called whenever a new controller is created for this model.
disconnectController | is called whenever an existing controller should be deregistered at this model.
lockControllers | suspends some notifications to the controllers which are used for display updates.
unlockControllers | resumes the notifications which were suspended by XModel::lockControllers().
hasControllersLocked | determines if there is at least one lock remaining.
getCurrentController | provides access to the controller which currently controls this model
setCurrentController | sets a registered controller as the current controller.
getCurrentSelection | provides read access on current selection on controller

Methods' Details
attachResource
boolean
attachResource( | [in] string | URL,
| [in] sequence< ::com::sun::star::beans::PropertyValue > | Arguments );
Description informs a model about its resource description. Parameter URL specifies the resource Parameter Arguments are optional arguments for that resource (see ::com::sun::star::document::MediaDescriptor) Returns true for success false otherwise
getURL
string
getURL();
Description provides information about the location of this model Returns the URL of the resource which is represented by this model. See also XStorable::getLocation()
getArgs
sequence< ::com::sun::star::beans::PropertyValue >
getArgs();
Description provides read access on currently representation of the ::com::sun::star::document::MediaDescriptor of this model which describes the model and his state Returns the arguments with which the model was originally created or stored the last time.
connectController
void
connectController( | [in] XController | Controller );
Description is called whenever a new controller is created for this model. The ::com::sun::star::lang::XComponent interface of the controller must be used to recognize when it is deleted. Parameter Controller a new controller for this model See also XModel::disconnectController()
disconnectController
void
disconnectController( | [in] XController | Controller );
Description is called whenever an existing controller should be deregistered at this model. The ::com::sun::star::lang::XComponent interface of the controller must be used to recognize when it is deleted. Parameter Controller the existing controller which should be deregistered See also XModel::connectController()
lockControllers
void
lockControllers();
Description suspends some notifications to the controllers which are used for display updates. The calls to XModel::lockControllers() and XModel::unlockControllers() 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
void
unlockControllers();
Description resumes the notifications which were suspended by XModel::lockControllers(). The calls to XModel::lockControllers() and XModel::unlockControllers() 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
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. Returns true if any lock exist false otherwise
getCurrentController
XController
getCurrentController();
Description provides access to the controller which currently controls this model Returns 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
void
setCurrentController( | [in] XController | Controller )
raises( | ::com::sun::star::container::NoSuchElementException );
Description sets a registered controller as the current controller. Parameter Controller reference to an already existing connected controller, which should be the new active one Throws com::sun::star::container::NoSuchElementException if xController isn't an already connected controller on this model
getCurrentSelection
::com::sun::star::uno::XInterface
getCurrentSelection();
Description provides read access on current selection on controller Returns the current selection in the current controller. If there is no current controller, it returns NULL.

Top of Page

Copyright © 2000, 2014 LibreOffice contributors and/or their affiliates. All rights reserved.

LibreOffice was created by The Document Foundation, based on OpenOffice.org, which is Copyright 2000, 2010 Oracle and/or its affiliates.

The Document Foundation acknowledges all community members, please find more info at our website.

Privacy Policy | Impressum (Legal Info) | Copyright information: The source code of LibreOffice is licensed under the GNU Lesser General Public License (LGPLv3). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.