Difference between revisions of "Documentation/DevGuide/OfficeDev/Dispatch Framework"

From Apache OpenOffice Wiki
Jump to: navigation, search
m
m (FINAL VERSION FOR L10N)
Line 5: Line 5:
 
|NextPage=Documentation/DevGuide/OfficeDev/Using the Desktop
 
|NextPage=Documentation/DevGuide/OfficeDev/Using the Desktop
 
}}
 
}}
{{DISPLAYTITLE:Dispatch Framework}}
+
{{Documentation/DevGuideLanguages|Documentation/DevGuide/OfficeDev/{{SUBPAGENAME}}}}
 +
{{DISPLAYTITLE:Dispatch Framework}}
 
<!--<idltopic>com.sun.star.frame.XDispatchProvider</idltopic>-->
 
<!--<idltopic>com.sun.star.frame.XDispatchProvider</idltopic>-->
 
The dispatch framework is designed to provide uniform access to components for a GUI by using command URLs that mirror menu items, such as '''Edit - Select All''', with various document components. Only the component knows how to execute a command. Similarly, different document components trigger changes in the UI by common commands. For example, a controller might create UI elements like a menu bar, or open a hyperlink.
 
The dispatch framework is designed to provide uniform access to components for a GUI by using command URLs that mirror menu items, such as '''Edit - Select All''', with various document components. Only the component knows how to execute a command. Similarly, different document components trigger changes in the UI by common commands. For example, a controller might create UI elements like a menu bar, or open a hyperlink.

Revision as of 11:14, 13 May 2009



The dispatch framework is designed to provide uniform access to components for a GUI by using command URLs that mirror menu items, such as Edit - Select All, with various document components. Only the component knows how to execute a command. Similarly, different document components trigger changes in the UI by common commands. For example, a controller might create UI elements like a menu bar, or open a hyperlink.

Command dispatching follows a chain of responsibility. Calls to the dispatch API are moderated by the frame, so all dispatch API calls from the UI to the component and conversely are handled by the frame. The frame passes on the command until an object is found that can handle it. It is possible to restrict, extend or redirect commands at the frame through a different frame implementation or through other components connecting to the frame.

It has already been discussed that frames and controllers have an interface com.sun.star.frame.XDispatchProvider. The interface is used to query a dispatch object for a command URL from a frame and have the dispatch object execute the command. This interface is one element of the dispatch framework.

By offering the interception of dispatches through the interface com.sun.star.frame.XDispatchProviderInterception, the Frame service offers a method to modify a component's handling of GUI events while keeping its whole API available simultaneously.

Template:Documentation/Note

The usage of the Dispatch Framework is described in the section Using the Dispatch Framework.

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