Skip to content

Important ATF Components

Gary edited this page Jan 29, 2015 · 12 revisions

Table of Contents

Managed Extensibility Framework (MEF) components can easily be added to provide capabilities needed by many applications, such as common menus and menu items. Each of the components here is used in at least one ATF sample. Some components, such as ControlHostService and other components described in Application Shell Framework, are fundamental and would be used in nearly all applications.

You can also create your own components that perform similar functions and export the same types as these components. You can write the component from scratch, or derive from an existing component, as described in Deriving from Components.

For a list of various representative and useful ATF classes, listed by namespace, see Class Survey. This list includes many of the components listed here.

Core ATF Frameworks also lists components that are commonly used in ATF applications.

ATF Components

These components are all in the Sce.Atf.Applications namespace, unless otherwise noted.

Application Shell Framework

  • ControlHostService: provide a dock in which to hold controls, such as menus and toolbars. Its interface is IControlHostService. The docking control allows moving windows around on the dock, and the window configuration can be saved. For details, see ControlHostService Component.
  • CommandService: display currently available application commands to the user in menus and toolbars and provide keyboard shortcuts. Its interface is ICommandService. For more information, see CommandService Component.
  • StatusService: add a status bar at the bottom of the main form. Its interface is IStatusService. For details, see StatusService Component.
  • SettingsService: manage user-editable settings (preferences) and the persistence of these application settings, plus a settings command and dialog. Its interface is ISettingsService. For more information, see SettingsService Component.

For more information on the application shell, see ATF Application Basics and Services.

Document Framework

  • StandardFileCommands: implement File menu commands that modify the document registry: New, Open, Save, SaveAs, Save All, and Close. New and Open commands are created for each component that exports IDocumentClient in the application.
  • AutoDocumentService: open documents from the previous application session or create a new empty document when an application starts.
  • RecentDocumentCommands: add recently opened documents to the application's File > Recent Documents submenu.
  • DocumentRegistry: hold documents, provide notifications when a document is added or removed, track the most recently active document and the open document contexts, and filter by document type. It implements IDocumentRegistry.
  • MainWindowTitleService: update the main dialog's title to reflect the current document and its state, i.e., modified or not.
  • FileDialogService: provide standard file dialogs for an application, using the ATF OpenFileDialog, SaveFileDialog, and ConfirmationDialog classes. Required by StandardFileCommands.

For more information on the document framework, see Documents in ATF.

Context Framework

  • ContextRegistry: tracks the active contexts in the application with change notification. It implements IContextRegistry.

For details on working with contexts, see ATF Contexts.

Property Editing Framework

  • PropertyEditor: edit object values and attributes using the ATF PropertyGrid, which is a two-column editing control. For more information, see PropertyEditor Component.
  • GridPropertyEditor: edit object values and attributes using the ATF GridControl, an ATF spreadsheet-style editing control. For more information, see GridPropertyEditor Component.
  • PropertyEditingCommands: provide property editing commands in a context menu that can be used inside property editor controls like PropertyGrid. PropertyEditingCommands can be used with ATF property editors or with custom property editors. For more details, see PropertyEditingCommands Component.

For more details on property editing components, see Property Editor Components. For more information about property editing in general, see Property Editing in ATF. Several samples, such as ATF DOM Property Editor Sample and ATF Simple DOM Editor Sample show using property editors. For details on these samples, see DOM Property Editor Programming Discussion and Simple DOM Editor Programming Discussion.

Instancing Framework

  • StandardEditCommands: provide the Edit menu commands Cut, Copy, Paste, and Delete, using the IInstancingContext and (if available) ITransactionContext interfaces to perform the operations. For more details, see StandardEditCommands and Instancing.
  • StandardEditHistoryCommands: implement Edit menu Undo and Redo commands.
  • StandardSelectionCommands: add standard selection commands in Edit menu: Select All, Deselect All, and Invert Selection.

For information about instancing, see Instancing In ATF.

Commands

  • StandardFileExitCommand: add the File > Exit command that closes the application's main form. For information on using this component in an application, see StandardFileExitCommand.
  • StandardPrintCommands: add standard printing commands to File menu: Print, PageSetup, and PrintPreview.
  • StandardViewCommands: add the standard viewing commands on contexts implementing the IViewingContext interface.
  • SourceControlCommands: implement source control commands.

For information on creating and working with commands, see Commands in ATF.

Controls

  • TreeControlEditor: generic tree editor.
  • FilteredTreeControlEditor: filtering support for tree editors.
  • TreeListViewEditor: TreeListViewAdapter (tree with lists) with right click context menu editing.

To learn more about controls, see Controls in ATF.

Window Management

  • WindowLayoutService: save application window layouts, switch window layouts, and delete layouts.
  • WindowLayoutServiceCommands: commands for handling application window layouts in the Window > Layouts submenu: Save Layout As, Manage Layouts, and Default.
  • PaletteService: manage the global palette of objects that can be dragged onto other controls, creating an instance of the object.
  • TabbedControlSelector: enable the user to switch control focus using the Ctrl+Tab keyboard command, similar to Visual Studio, Windows®, or any tabbed Internet browser application.
  • DefaultTabCommands: provide the default commands related to document tab Controls, such as those that appear in the context menu when right-clicking on a tab.

Output, Scripts, Logging, and Debugging

  • OutputService: display text output to the user in a RichTextBox. You should also include Outputs component when you use OutputService.
  • Outputs: provide static methods for easy access to the output message facilities in the application. In Sce.Atf namespace.
  • ErrorDialogService: display error messages to users in an error dialog.
  • ScriptingService: abstract base class for components that can expose C# objects to a scripting language, such as Python.
  • AtfScriptVariables: expose common ATF services as script variables, so that the given ScriptingService can easily use these ATF services.
  • ScriptConsole: provide a dockable command console for entering Python commands and import many common .NET and ATF types into the Python namespace.
  • PythonService: scripting service for automated tests.
  • AutomationService: provide facilities to run an automated script using the .NET remoting service.
  • CrashLogger: log unhandled exceptions to a remote server. If used with UnhandledExceptionService component, put CrashLogger before UnhandledExceptionService in the TypeCatalog. In Sce.Atf namespace.
  • UnhandledExceptionService: catch all unhandled exceptions from the UI thread and present the user with the option of continuing the application so work can be saved.
  • HelpAboutCommand: add the Help > About command, which displays a dialog box with a description of the application plus the ATF version number. Applications should derive from this component.
  • DomRecorder: record DOM events on the active context and displays them in a list in a window.

For more information on scripting and debugging, see Development, Debugging, and Testing.

Specialized

  • OscService: process (Open Sound Control) OSC messages by getting and setting properties on C# objects.
  • LemurOscService : provide OSC support compatible with the Lemur iPad® application, from the Liine company.

For more information on OSC, see OSC Support.

ATF Samples Components

Samples also implement components applications can use or adapt. Each component lists the samples in which it appears.

Topics in this section

Clone this wiki locally