Skip to content

Authoring Tools Framework 3.10 RELEASED

Ron edited this page Aug 5, 2015 · 14 revisions

Authoring Tools Framework (ATF) is in maintenance mode, with only bug fixes and minor client-requested features being put in by Sony Computer Entertainment's Worldwide Studios. Our open source users are encouraged to contribute on GitHub.

Top New Features

WPF Property Editor – this is a small new sample application designed to demonstrate the use of Windows Presentation Foundation and ATF's two-column property editor, Sce.Atf.Wpf.Controls.PropertyEditing.PropertyGridView. See the ReadMe.txt in the project file.

LocalizableStringExtractor – this tool for extracting localizable strings from source code now supports Windows Presentation Foundation's XAML files. See below for details.

Breaking Changes

  • TimelineRenderer: the method PrioritizeHits() now has two additional parameters that allow this method to know the picking rectangle that was used and to know the bounding rectangles of all timeline objects. This change solves the problem where the user might pick a timeline interval that is very close to another timeline interval and the wrong interval could be chosen by PrioritizeHits(). This is a minor breaking change. If a client has overridden this protected virtual method, then please add the two parameters and then ignore them.
  • The User32.SendMessage() overloaded method that returns a 'uint' has been marked as obsolete because for some Windows messages, the return value will not fit in 32 bits. Please use the other SendMessage overload that uses IntPtr for its parameters and return value. You can use the IntPtr cast to convert an integer to an IntPtr.
  • The Atf.Gui.OpenGL project now only targets the x86 processor. Previously it was AnyCPU but in reality it could only run on x86 due to a dependency on the third-party DDSUtil which is x86.

Detailed List of Changes by Category

Changes that have previously been pushed to GitHub are in italics.

Circuits

  • CircuitElementInfo: Added IsValid property. D2dCircuitRenderer will now use the new D2dDiagramTheme.ErrorBrush to draw circuit elements when IsValid is false.

  • CircuitEditor:

    • Added a way for classes that derive from Element to return a custom CircuitElementInfo object.
    • Fixed a bug where changing the Theme of D2dCircuitRenderer would not re-attach an event handler.
    • Fixed a problem where expanded groups that are being dragged could appear underneath other expanded groups. Selected nodes are now drawn on top of non-selected nodes.
    • Added a demonstration of custom rendering, per-element, based on some client-specific property of each circuit element.
    • Removed the obsolete 'typeRef' attribute from the schema. This attribute was obsolete in ATF 3.8.
    • CircuitEditor documents now demonstrate transformation from an older version to a newer version using LINQ to XML. See the CircuitEditor1to2 and Migrator classes.
    • Removed sub-circuit related types from schema and source code because they are obsolete now with the version transformer in place.
  • CircuitElementInfo: added the protected virtual method OnPropertyChanged(), so that derived classes can raise the PropertyChanged event.

  • When using the DrawEdgePolicy.AllFirst enum, wires that connect to expanded groups are now drawn after the expanded groups. This fixes a problem where the wire would be hidden by the group.

  • Wires within groups are now always drawn before child elements unless the child element is also an expanded group.

Direct2D

  • D2dGraphAdapter: Selected nodes (e.g., in the circuit editor) are now drawn on top of non-selected nodes.
  • CanvasControl: made SetZoom(float xZoom, float yZoom) public, so that ScrollPosition and the zoom values can be set independently.

DllImports

  • Made all of our DllImports, and the structs that they use, use Unicode, to better support our clients.
  • Sce.Atf.BITMAP is a struct designed to mirror the native version in WinGDI.h. They did not match, because the 'long' in C++ is 32 bits whereas the 'long' in C# is 64-bits. It has been fixed. This struct was not used within ATF.
  • User32.MSG was correct only on x86 processors. In ATF, it was only used in Atf.Gui.OpenGL which was x86. MSG has been fixed to be correct on both x86 and x64.
  • The User32.WindowsHookCallback should have used IntPtr for the return value, 'wParam', and 'lParam'. Memory was not being corrupted (because the first four parameters to a Win32 function are passed in 64-bit registers with the leading bits zeroed out if necessary), but a return value that was a pointer could have been truncated. We don't think this ever happened in practice. SetWindowsHookEx and CallNextHookEx had their parameter types fixed, to
  • In FormsNcRenderer, there were some structs that were duplicated from the class User32 or that should have been placed in User32 in the first place. The following structs in FormsNcRenderer are now marked as obsolete: WINDOWPOS, MINMAXINFO, RECT, POINT.
  • In FormsNcRenderer, the struct NCCALCSIZE_PARAMS was incorrect. The fourth field should have been an IntPtr instead of a WINDOWPOS. It has been fixed. It was not used by ATF.
  • CustomFileDialog's OPENFILENAME struct was 4 bytes too short when compiled for 64-bit. This struct was unused by ATF. It has been fixed and also made to use Unicode.
  • AutomationService: fixed its SendMessage to use IntPtrs instead of ints. It's cleaner this way, but the change has no effect on memory safety.
  • Added a C++/CLI project, NativeTestHelpers, to help verify the correctness of our DllImport / PInvoke usage. All structs that are marshaled are now tested in 64-bits, to make sure that the overall size matches the native version's overall size, and that each field offset matches the native version's offset.
  • Changed the platform solutions for Samples.vs2010.sln and Everything.vs2010.sln, so that 64-bit computers are preferred when a choice must be made between 32-bit and 64-bit. For example, CodeEditor.vs2010.csproj is AnyCPU, but it has a dependency on Atf.Perforce.vs2010.csproj, which must compile to either x86 or x64. CodeEditor.vs2010.csproj will now not be built for the x86 solution platform, because the user is most likely running in 64-bit Windows.

Localization

  • LocalizableStringExtractor tool:

    • Rewrote to process source code directories containing *.csproj files (which reference *.cs and *.xaml files), instead of assemblies. It now supports parsing XAML files, looking for the 'Loc' extension. It no longer requires Microsoft Intermediate Language Disassembler (ildasm.exe) to be installed on the computer. In the resulting XML file, the localizable strings are now listed in alphabetical order. The tool is also much faster than before. Added unit tests and updated the documentation.
    • Existing translations in Localization.xml files are preserved.
    • Refactored the input and output methods to use streams instead of file paths, so that they are more flexible.
    • All file paths in the settings file are now relative to the location of the executable, rather than to the root of the ATF directory.
    • The string extraction is run asynchronously now and the operation can be canceled in the GUI.
    • The progress bar works correctly now.
    • Added support for localizing strings that use WPF's DescriptionAttribute. See LocalizedDescriptionAttribute.
    • Added argument to Extractor.ExtractMethodFromCs(), to specify a delegate with which to retrieve localized strings from each matched method call. Allows each method being searched for, to specify from which arguments it wants to retrieve string literals.
    • Added public static methods to Extractor: GetMatchingCloseParen(), GetNextArgTerminator(), TryParseArgFromBeginning().
    • Extractor.ParseMethodCallOnStringLiterals() now uses Extractor.TryParseArgFromBeginning(), instead of Extractor.TryParseStringLiteralFromBeginning(). The change allows the paramStrings argument to be set to an array whose size matches the number of arguments in the parsed method. For each argument in the parsed method, if it is a string literal, the string is present for the corresponding entry in paramStrings. If it is not a string literal, the entry is an empty string. Boolean result returned now indicates whether the whole method call was successfully parsed, not whether any string literals were found.
    • Created Extractor.TryParseForStringLiteral(). Uses regex expression to parse a string of C# code to find a sequence of one or more string literals, connected by '+' characters. Successful matching returns a string result that concatenates all matched string literals into one. Replaced use of Extractor.TryParseStringLiteralFromBeginning() with Extractor.TryParseForStringLiteral().
    • Code cleanup: Added comments, removed unused code, renamed methods, optimized by using StringBuilder instead of the += string operator.
    • Added handling in TryParseForStringLiteral() for when there are parentheses between sections of a concatenated string literal, and for converting escaped quotes in a found string literal into regular quotes.
    • Removed the separate solution file and added the project file to Everything.vs2010.sln.
    • Verbatim strings that have escaped double-quotes and that are used with the extension method syntax are now parsed correctly. For example: @"Pat said ""Yes""".Localize();
    • Added command-line options for 1) specifying which settings file to use and 2) making the tool run without any user interaction.
    • Changed the project file's output directory to match our other project files.
  • Updated ATF's XML files of localizable strings, using the recently rewritten LocalizableStringExtractor tool.

  • EmbeddedResourceStringLocalizer:

    • Removed the optimization of skipping loading of localized resources, when the language is "en", because this prevented client code from employing English localized resources if they wanted.
    • Fixed a problem where the embedded resource might not be found if the Visual Studio project folder had a '-' in its name.
  • PathUtil: Removed the optimization that would not translate the paths of localizable assets to English. We can't assume that the localizable assets at the project's root are in English and that the sub-directories are in other languages.

  • Added the classes LocalizedDescriptionAttribute and LocalizedNameAttribute, a DescriptionAttribute whose string argument can be extracted by the LocalizableStringExtractor development tool.

  • AboutDialog: Fixed the ATF credit string so that it can be localized properly.

  • Target Manager sample app has been mostly localized to Japanese.

Property Editing

  • PropertyGrid now supports hyperlinks in the descriptions of property descriptors. The syntax is "[open source software|https://github.com/SonyWWS]". By default, the URL is opened by the operating system, so the default browser is used. To have custom link handling behavior, override the new LinkClicked(string url) method.
  • DOM Property Editor sample app: added URLs to the property descriptor's descriptions.
  • EmbeddedCollectionEditor: fixed a layout bug.
  • PropertyGrid: fixed the support for the PropertyGridMode.DisplayToolTips enum option, so that property descriptions would appear as tooltips. https://github.com/SonyWWS/ATF/issues/37
  • FloatDataEditor: fixed problems when ShowSlider is false.

Skinning

  • SkinService: fixed problems with applying skins to C# properties that are not simple types.

Timelines

  • TimelineRenderer: the method PrioritizeHits() now has two additional parameters that allow this method to know the picking rectangle that was used and to know the bounding rectangles of all timeline objects. This change solves the problem where the user might pick a timeline interval that is very close to another timeline interval and the wrong interval could be chosen by PrioritizeHits(). This is a minor breaking change. If a client has overridden this protected virtual method, then please add the two parameters and then ignore them.
  • D2dTimelineControl: added the TimelineStart property, so that the starting value of the timeline can be specified. The default value is zer Previously, the starting value was always zero and could not easily be changed.
  • D2dScrubberManipulator: made the initial position be the same as D2dTimelineControl's TimelineStart, rather than always starting at zer

WPF

  • SimpleDomEditorWpf sample: Added localization support by adding localization markup to the XAML files and by allowing the use of embedded resources. Added About.rtf in Japanese and a few other preliminary Japanese translations.
  • Fixed an issue in the WPF docking framework where floating windows did not handle shortcut keys.
  • Fixed an issue in the WPF docking framework where if the user tried to drag a maximized floating window, it could be positioned offscreen when restored to a non-maximized state. This was because the drag was being applied to the window's stored non-maximized position. Now when a maximized window is dragged, it is restored to its original size and dragged from the current mouse position.
  • Fixed a WPF layout issue where if an app was running on the secondary monitor, when it was relaunched it would be restored to the primary monitor. This only happened when the secondary monitor was configured to be above or to the left of the primary monitor.
  • Added WpfPropertyEditor sample app to demonstrate the use of custom editors, and to show a simplified use case for ATF's WPF PropertyGrid without using the CommandService.
  • PropertyGridView: added PropertyFactory property, through which to set up a custom type editor (subclass of ValueEditor) for PropertyNode.
  • PropertyNode: added SetCustomEditor().
  • SliderValueEditor: added SetRange() so we don't have to extract the range from the property descriptor's attributes.
  • SliderBox: added Minimum/Maximum data binding. Previously, it was hard-coded to [0,1].

WinForms ControlHostService

  • Added a new property to ControlInfo called UnregisterOnClose, which is a nullable boolean. If UnregisterOnClose has a value, then that value will specify whether or not a Control is unregistered when the user clicks the close button.
  • In the Windows menu, the listed commands are supposed to have a check mark if the corresponding window is visible. This synchronization was broken and has now been fixed.
  • Fixed a crash when closing document windows and switching back and forth between Windows layouts (using the WindowLayoutService).
  • Added the new ControlInfDisplayName property, to let the Control's display name be different than the ID that is saved in the windows layout. This change will allow the user's windows layout to be consistent if the language is changed.
  • Added the MenuGroupTag property to ControlInf This lets client code specify how menu commands are organized in the Windows drop-down menu.
  • ComboBoxes that allow text editing will no longer have the text input interpreted as commands.
  • Fixed a bug where the context menu on a panel's tab might not be displayed when the user right-clicks on the tab, until the user had changed focus to another tab and then back again.
  • DockPanelSuite: fixed a problem where a floating panel did not always receive focus.

Tree Controls

  • Bug fix in DomTreeEditor/TreeView.cs: One code path was returning ItemInfo without assigning the Label property.

  • TreeControl: Added new public event ItemRendererChanged.

  • Added more visual cues to TreeControl when filtering is enabled. Tree node expanders now display a visual cue if there is one or more hidden nodes that match filters.

  • TreeItemRenderer:

    • Fixed a crash in method DrawLabel(). The node.Label property was used without checking for nullity. It crashed when searching a tree with one or more nodes with null Label.
    • Added two new public properties to expose the brushes used by tree filtering for highlighting the background for matched and unmatched nodes.
  • DomTreeEditor: Replaced TreeControlEditor with FilteredTreeControlEditor to demonstrate and exercise the FilteredTreeControlEditor code.

  • TreeListControl: Added BoolDataEditor for displaying boolean properties.

Other

  • The scripts in \Test no longer require VS2010 to be installed as long as VS2012 or VS2013 are available.

  • UniquePathIdValidator:

    • Fixed a bug where a DomNode being removed and then added to a different parent would skip having its ID checked.
    • Fixed a crash bug that would occur if the adapted DomNode was the root of a DOM tree and its ID changed.
  • StringUtil: Added an extension method for strings called SplitAndKeepDelimiters().

  • PaletteService: Added the CategoryComparer property so that clients can provide custom comparison logic for sorting the categories in the palette.

  • Made significant performance improvements to FilteredTreeControlEditor. Reduced memory footprint due to over usage of caching tree nodes.

  • ErrorDialogService: Fixed a crash that could occur if the error or warning message was sent from a thread other than the main GUI thread.

  • WinFormsUtil: Made InvokeIfRequired and CheckForIllegalCrossThreadCall extension methods and allowed their Control parameters to be null.

  • ThumbnailService: made Initialize() virtual.

  • GdiUtil: Added a new method for drawing expanders.

  • FloatDataEditor rolls our own trackbar thumb GDI drawing when visual styles are disabled by the user in the operating system. This prevents a crash.

  • FsmEditor:

    • Added new child "triggerType" to transitionType. The new addition is used for testing EmbeddedCollectionEditor.
    • Used PropertyGridView.CustomizeAttributes to save horizontal space for the Triggers property.
    • Changed the value of minOccurs from 2 to 0, for transitionType's "trigger" element, in FSM_customized.xsd.
    • Added skin service.
  • CommandServiceBase:

    • Fixed properties listed in wrong order within InvalidOperatorException message.
    • Put in some test code for ensuring that the commands can be sorted correctly in the menus. The test code is disabled with a #if.
  • Open Sound Control: made minor layout improvements to the OSC dialog box.

  • AutoDocumentService:

    • Subscribes to the IMainWindow.Loaded event for initialization instead of IMainWindow.Loading.
    • Added the virtual CreateNewDocuments() method, to allow derived classes to customize the behavior of how new documents are automatically created.
  • Added some logic in MainForm.OnLoad() to ensure that the Loading and Loaded events are handled in the correct order.

  • Added MsBuildUtils library and its unit tests. This new library allows Visual Studio project files and solution files to be searched for *.cs and *.xaml files.

  • LiveConnectService: added newlines at the ends of the error messages, to work better with other messages in the Outputs component.

  • SettingsService: added customization points for derived classes. Made the class SettingsLoadSaveDialog public.

  • SettingsService: made the user settings dialog title be customizable.

  • StringEnumRule: added a getter, to retrieve the string values that were passed into the constructor.

  • PropertyEditingControl: fixed a problem where the drop-down property editing control could appear on the wrong monitor.

  • DomGen: 1) updated the pre-compiled DomGen.exe and Atf.Core.dll to fix a problem with how XSD elements that are arrays of simple types are handled -- a ChildInfo should have been generated instead of an AttributeInf 2) Fixed a bug where certain schemas, like the collada.xsd, could cause multiple duplicate AttributeInfos in a DomNodeType. 3) Re-ran all of our GenSchemaDef.bat files, to use the latest DomGen.exe, and fixed a couple more minor problems. 4) Added some unit tests.

  • Direct2D:

    • D2dBitmap: added checks for being disposed.
    • D2dBitmap: added methods for copying from integer arrays.
    • D2dFactory: added an optional parameter to CreateBitmap() that lets the client use an integer array instead of a GDI bitmap for changing or restoring the D2dBitmap.
    • D2dTextFormat.cs: Fixed null reference exception bug in getter of Trimming property.
    • D2dFactory.CreateTextLayout(): added support for underlining and striking-out text.
    • D2dGraphics.DrawText(string text, D2dTextFormat textFormat,PointF upperLeft, ...): removed the usage of alignment properties in the given D2dTextFormat object because drawing text at a point should not use these alignments.
  • XmlSchemaTypeLoader: exposed the private dictionary of annotations as a protected property.

  • NumericMaxRule and NumericMinRule: Exposed the 'max' and 'min' value of the rules, as well as whether the limits are inclusive.

  • DomXmlWriter: Fixed exception when writing out a non-abstract element that has a SubstitutionGroupChildRule for it. Effectively, the DomXmlWriter was requiring that a substitution take place for the element. But according to the standard, it is acceptable for the original element to be used (if it is not abstract). https://github.com/SonyWWS/ATF/pull/40

  • FileWatcherService: fixed a problem where the FileChanged event could be raised for changes to a file that happened before FileWatcherService began watching that file. This behavior was observed on one Windows 8 computer when the file was changed (and the stream flushed) and then immediately afterwards FileWatcherService was used to watch that file. Perhaps virus scanning or hard disk encryption was delaying the operating system file change notifications for too long on this computer. The fix was to check the time stamp since the file was last modified.

  • WinFormsUtil.GetFocusedControl() will now search for the nearest ancestor of the focused control that is a .NET control, rather than always returning null if the focused control was native-only.

  • User32: added GetParent().

  • Reduced unnecessary file I/O by these two components -- DefaultTabCommands and RecentDocumentCommands. They no longer check for the existence of a file in their ICommandClient.CanDoCommand() methods.

  • DefaultTabCommands: is now much more customizable. For example, client code can now 1) remove unwanted context menu commands that appear on the tab controls and 2) choose how the document path is calculated, given the document's Control.

  • FormNcRenderer: fixed a crash that could happen if an app used multiple GUI threads.

  • TargetCommands and TargetEnumerationService: made the command names be localizable.

  • Added support for Visual Studio 2015 to the build scripts.

Clone this wiki locally