Difference between revisions of "Documentation/DevGuide/OfficeDev/Controllers"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Robot: Changing Category:Documentation/Developers Guide/Office Development)
m
Line 8: Line 8:
 
{{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 {{PRODUCTNAME}} 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 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.
+
Controllers in {{PRODUCTNAME}} 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.

Revision as of 18:01, 4 October 2008



Controllers in OpenOffice.org 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.

Controller with Model and Frame

There can be more than one controller instance with frames of their own controlling the same document model simultaneously. Multiple controllers and frames are created by OpenOffice.org when the user clicks Window - New Window.

Content on this page is licensed under the Public Documentation License (PDL).
Personal tools