-
Notifications
You must be signed in to change notification settings - Fork 262
Other ATF Services
ATF offers a Document Framework that supports using documents for application data.
These interfaces handle document services:
-
IDocument
: provide read-only and dirty properties. -
IDocumentService
: provide document commands, such as Open, Close, Save, and Save As. These commands use theIDocumentClient
implementation for a particular client to handle documents. Notifications allow tracking what the user is doing with the document. -
IDocumentRegistry
: interface for the document registry, which holds documents, provides notifications when a document is added or removed, tracks the most recently active document and the open document contexts, and filters by document type. -
IDocumentClient
: perform the actual open, close, and display methods for a client. Applications should implement a document client implementingIDocumentClient
for every document type they handle.
The following components provide menus, a document registry, and other services:
-
StandardFileCommands
: implement File menu commands that modify the document registry: New, Open, Save, SaveAs, Save All, and Close. -
AutoDocumentService
: open documents from the previous application session or create an empty document when an application starts. -
RecentDocumentCommands
: add recently opened documents to the application's File > Recent Documents submenu. -
DocumentRegistry
: track open documents in an application. It can retrieve the active document or most recently active document of a given type. -
MainWindowTitleService
: update the main dialog's title to reflect the current document and its state, that is, modified or not.
The FileDialogService
component implements IFileDialogService
, which contains methods to manage standard file dialogs. FileDialogService
has file dialogs — for single and multiple files — and a save dialog. The dialog methods support standard file filtering and return the file path in a reference parameter.
If you use the StandardFileCommands
component, you don't need to use FileDialogService
directly. StandardFileCommands
calls the IFileDialogService
methods for these dialogs. However, you must include FileDialogService
or a component that implements IFileDialogService
in the MEF catalog, because StandardFileCommands
imports IFileDialogService
.
Applications create their own component deriving from the ATF HelpAboutCommand
component to display a Help dialog with a rich text message. Override the ShowHelpAbout()
to customize it for the application information. Also modify the RTF file that ShowHelpAbout()
uses, typically named About.rtf
.
See any of the ATF Code Samples that use HelpAboutCommand
for an example, such as ATF Simple DOM Editor Sample.
The Resources
class contains a variety of image resources for standard images. You can use these images for command icons, cursors, and so on. You only need to reference the image resource to have it automatically embedded in your application's resources by the ResourceUtil
class.
ATF Application Basics and Services
-
WinForms Application: Show a
Main()
function pattern common in WinForms application ATF samples and what it accomplishes. - WPF Application: Discuss how WPF applications differ from WinForms ones in basic application structure.
- ControlHostService Component: This component is responsible for exposing client Controls in the application's main form.
- CommandService Component: Show the basics of supporting commands in ATF.
- SettingsService Component: This component manages preferences and their persistence.
- StatusService Component: Show how to use this component to display status messages.
- Other ATF Services: Describe other services: document management, file dialogs, Help dialog, and resources.
- Home
- Getting Started
- Features & Benefits
- Requirements & Dependencies
- Gallery
- Technology & Samples
- Adoption
- News
- Release Notes
- ATF Community
- Searching Documentation
- Using Documentation
- Videos
- Tutorials
- How To
- Programmer's Guide
- Reference
- Code Samples
- Documentation Files
© 2014-2015, Sony Computer Entertainment America LLC