ooodev.adapter.frame.model_partial module
- class ooodev.adapter.frame.model_partial.ModelPartial(component, interface=com.sun.star.frame.XModel)[source]
Bases:
ComponentPartial
Partial class for XModel.
- Parameters:
component (XModel) –
interface (UnoInterface | None) –
- __init__(component, interface=com.sun.star.frame.XModel)[source]
Constructor
- Parameters:
component (XModel) – UNO Component that implements
com.sun.star.frame.XModel
interface.interface (UnoInterface, optional) – The interface to be validated. Defaults to
XModel
.
- Return type:
None
- attach_resource(url, *args)[source]
Informs a model about its resource description.
- Return type:
bool
- Parameters:
url (str) –
args (PropertyValue) –
- connect_controller(controller)[source]
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.
- Return type:
None
- Parameters:
controller (com.sun.star.frame.XController) –
- disconnect_controller(controller)[source]
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.
- Return type:
None
- Parameters:
controller (com.sun.star.frame.XController) –
- get_args()[source]
Provides read access on currently representation of the com.sun.star.document.MediaDescriptor of this model which describes the model and its state
- Return type:
Tuple
[PropertyValue
,...
]
- get_current_controller()[source]
Provides access to the controller which currently controls this model
- Return type:
XController
- get_current_selection()[source]
Provides read access on current selection on controller
- Return type:
XInterface
- has_controllers_locked()[source]
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 type:
bool
- lock_controllers()[source]
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.
- Return type:
None
- set_current_controller(controller)[source]
sets a registered controller as the current controller.
- Raises:
com.sun.star.container.NoSuchElementException –
NoSuchElementException
- Return type:
None
- Parameters:
controller (com.sun.star.frame.XController) –
- unlock_controllers()[source]
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.
- Return type:
None