LibreOffice: XController Interface Reference

LibreOffice LibreOffice 25.8 SDK API Reference

Loading...
Searching...
No Matches
XController Interface Referencepublished

With this interface, components viewed in a Frame can serve events (by supplying dispatches). More...

`import "XController.idl";`

Inheritance diagram for XController:

## Public Member Functions
void | attachFrame ([in] XFrame Frame)
| is called to attach the controller with its managing frame.
boolean | attachModel ([in] XModel Model)
| is called to attach the controller to a new model.
boolean | suspend ([in] boolean Suspend)
| is called to prepare the controller for closing the view
any | getViewData ()
| provides access to current view status
void | restoreViewData ([in] any Data)
| restores the view status using the data gotten from a previous call to XController::getViewData().
XModel | getModel ()
| provides access to currently attached model
XFrame | getFrame ()
| provides access to owner frame of this controller
Public Member Functions inherited from XComponent
void | dispose ()
| The owner of an object calls this method to explicitly free all resources kept by this object and thus break cyclic references.
void | addEventListener ([in] XEventListener xListener)
| adds an event listener to the object.
void | removeEventListener ([in] XEventListener aListener)
| removes an event listener from the listener list.
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object.
void | acquire ()
| increases the reference counter by one.
void | release ()
| decreases the reference counter by one.

## Detailed Description

With this interface, components viewed in a Frame can serve events (by supplying dispatches).

See also
  XFrame
  com::sun::star::awt::XWindow
  XModel

Developers Guide
  Office Development - Component - Getting Frames, Controllers and Models from Each Other
  Office Development - Controllers
  Office Development - Frame-Controller-Model Paradigm in LibreOffice

## Member Function Documentation

## ◆ attachFrame()

void attachFrame | ( | [in] XFrame | Frame | ) |

is called to attach the controller with its managing frame.

Parameters

  Frame | the new owner frame of this controller

## ◆ attachModel()

boolean attachModel | ( | [in] XModel | Model | ) |

is called to attach the controller to a new model.

Parameters

  Model | the new model for this controller

Returns
  TRUE If attaching was successful
  FALSE Otherwise

## ◆ getFrame()

XFrame getFrame | ( |  | ) |

provides access to owner frame of this controller

Returns
  the frame containing this controller.

## ◆ getModel()

XModel getModel | ( |  | ) |

provides access to currently attached model

Returns
  the currently attached model.

## ◆ getViewData()

any getViewData | ( |  | ) |

provides access to current view status

Returns
  set of data that can be used to restore the current view status at later time by using XController::restoreViewData()

## ◆ restoreViewData()

void restoreViewData | ( | [in] any | Data | ) |

restores the view status using the data gotten from a previous call to XController::getViewData().

Parameters

  Data | set of data to restore it

## ◆ suspend()

boolean suspend | ( | [in] boolean | Suspend | ) |

is called to prepare the controller for closing the view

Parameters

  Suspend | TRUE Force the controller to suspend his work FALSE Try to reactivate the controller

Returns
  TRUE If request was accepted and successfully finished
  FALSE Otherwise

The documentation for this interface was generated from the following file:

- com/sun/star/frame/XController.idl