Difference between revisions of "Documentation/DevGuide/OfficeDev/Controllers"
OOoWikiBot (Talk | contribs) m (FINAL VERSION FOR L10N) |
|||
Line 9: | Line 9: | ||
{{DISPLAYTITLE:Controllers}} | {{DISPLAYTITLE:Controllers}} | ||
<!--<idltopic>com.sun.star.frame.Controller;com.sun.star.frame.XController</idltopic>--> | <!--<idltopic>com.sun.star.frame.Controller;com.sun.star.frame.XController</idltopic>--> | ||
− | Controllers in {{ | + | Controllers in {{AOo}} are between a frame and document model. This is their basic role as expressed in <idl>com.sun.star.frame.XController</idl>, which has methods <code>getModel()</code> and <code>getFrame()</code>. The method <code>getFrame()</code> provides the frame that the controller is attached to. The method <code>getModel()</code> returns a document model, but it may return an empty reference if the component does not have a model. |
Usually the controller objects support additional interfaces specific to the document type they control, such as <idl>com.sun.star.sheet.XSpreadsheetView</idl> for Calc document controllers or <idl>com.sun.star.text.XTextViewCursorSupplier</idl> for Writer document controllers. | Usually the controller objects support additional interfaces specific to the document type they control, such as <idl>com.sun.star.sheet.XSpreadsheetView</idl> for Calc document controllers or <idl>com.sun.star.text.XTextViewCursorSupplier</idl> for Writer document controllers. | ||
Line 15: | Line 15: | ||
[[Image:FCMController.png|none|thumb|400px|Controller with Model and Frame]] | [[Image:FCMController.png|none|thumb|400px|Controller with Model and Frame]] | ||
− | A single document model can be controlled simultaneously by several controller instances, each associated with a separate frame. Multiple controllers and frames are created by {{ | + | A single document model can be controlled simultaneously by several controller instances, each associated with a separate frame. Multiple controllers and frames are created by {{AOo}} when the user clicks '''Window - New Window'''. |
{{PDL1}} | {{PDL1}} | ||
[[Category:Documentation/Developer's Guide/Office Development]] | [[Category:Documentation/Developer's Guide/Office Development]] |
Revision as of 17:34, 2 January 2021
Controllers in Apache OpenOffice are between a frame and document model. This is their basic role as expressed in com.sun.star.frame.XController, which has methods getModel()
and getFrame()
. The method getFrame()
provides the frame that the controller is attached to. The method getModel()
returns a document model, but it may return an empty reference if the component does not have a model.
Usually the controller objects support additional interfaces specific to the document type they control, such as com.sun.star.sheet.XSpreadsheetView for Calc document controllers or com.sun.star.text.XTextViewCursorSupplier for Writer document controllers.
A single document model can be controlled simultaneously by several controller instances, each associated with a separate frame. Multiple controllers and frames are created by Apache OpenOffice when the user clicks Window - New Window.
Content on this page is licensed under the Public Documentation License (PDL). |