/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ module com { module sun { module star { module frame { /** represents a component which is created from a 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 com::sun::star::document::MediaDescriptor @see Controller @see com::sun::star::view::XSelectionSupplier */ published interface XModel: com::sun::star::lang::XComponent { /** informs a model about its resource description. @param URL specifies the resource @param Arguments are optional arguments for that resource (see com::sun::star::document::MediaDescriptor) @return `TRUE` for successThe com::sun::star::lang::XComponent interface of the controller must be used to recognize when it is deleted.
@param Controller a new controller for this model @see XModel::disconnectController() */ void connectController( [in] XController Controller ); /** 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.
@param Controller the existing controller which should be deregistered @see XModel::connectController() */ void disconnectController( [in] XController Controller ); /** 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.
*/ void lockControllers(); /** 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.
*/ void unlockControllers(); /** 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.
@return `TRUE` if any lock exist