LibreOffice
LibreOffice 24.2 SDK API Reference
|
This is the main interface of a desktop service. More...
import"XDesktop.idl";
Public Member Functions | |
boolean | terminate () |
tries to terminate the desktop. More... | |
void | addTerminateListener ([in] XTerminateListener Listener) |
registers an event listener to the desktop, which is called when the desktop is queried to terminate, and when it really terminates. More... | |
void | removeTerminateListener ([in] XTerminateListener Listener) |
unregisters an event listener for termination events. More... | |
com::sun::star::container::XEnumerationAccess | getComponents () |
provides read access to collection of all currently loaded components inside the frame tree More... | |
com::sun::star::lang::XComponent | getCurrentComponent () |
provides read access to the component inside the tree which has the UI focus More... | |
XFrame | getCurrentFrame () |
provides read access to the frame which contains the current component More... | |
Public Member Functions inherited from XInterface | |
any | queryInterface ([in] type aType) |
queries for a new interface to an existing UNO object. More... | |
void | acquire () |
increases the reference counter by one. More... | |
void | release () |
decreases the reference counter by one. More... | |
This is the main interface of a desktop service.
A desktop is an environment for components which can be viewed in frames. Frames are like frames in HTML framesets. This does not imply that a desktop can handle framesets; the frames may be top frames only.
void addTerminateListener | ( | [in] XTerminateListener | Listener | ) |
registers an event listener to the desktop, which is called when the desktop is queried to terminate, and when it really terminates.
Listener | listener for termination events |
com::sun::star::container::XEnumerationAccess getComponents | ( | ) |
provides read access to collection of all currently loaded components inside the frame tree
The component is, by definition, the model of the control which is loaded into a frame, or if no model exists, into the control itself. The service Components which is available from this method is a collection of all components of the desktop which are open within a frame of the desktop.
com::sun::star::lang::XComponent getCurrentComponent | ( | ) |
provides read access to the component inside the tree which has the UI focus
Normally, the component is the model part of the active component. If no model exists it is the active controller (view) itself.
XFrame getCurrentFrame | ( | ) |
provides read access to the frame which contains the current component
void removeTerminateListener | ( | [in] XTerminateListener | Listener | ) |
unregisters an event listener for termination events.
Listener | listener which wishes to be deregistered |
boolean terminate | ( | ) |
tries to terminate the desktop.
First, every terminate listener is called by his XTerminateListener::queryTermination() method. Throwing of a TerminationVetoException can break the termination process and the listener how has done that will be the new "controller" of the desktop lifetime. He should try to terminate it by himself after his own processes will be finished. If nobody disagree with the termination request, every listener will be called by his XTerminateListener::notifyTermination() method.
TRUE
If all listeners agree with this request FALSE
Otherwise