Resources

Within Antetype resources are any graphics that are used in the background of a cell. A resource can be anything from an icon to a larger graphical element.

Document image

Resources can be imported into Antetype in a variety of ways, from the resource inspector using the + button, via double click and using cut and paste.



Valid file types

Antetype imports pixel and vector formats like: PNG JPEG, GIF, SVG.



Resource names

The names gives to resources depend on the way the resource was added to Antetype. A resource created from a file will have the filename of the resource, resources that are dragged or pasted into Antetype will have names based on the identifiers passed to Antetype.



It is not possible to have two resources with the same name within Antetype. When Antetype detects that an imported resource has the same name as an existing resource, it prompts the user whether the imported resource should overwrite and replace the existing resource or not import the resource. This behavior is useful when updating resources, as all places where an existing resource is used will be updated with the replaced resource. To import a resource with the same name, either change the file name of the resource you want to import or change the name of the resource in the Resource Inspector.

Document image



Drag & Drop

Compatible files that are dropped on to the Antetype canvas are copied into the resource inspector and a rectangle cell is created with the file's graphical representation as the cell background.

The created cell will be placed on the same level in the hierarchy as the currently selected cell.

For apps that support the dragging of resources, it is possible to drag an image resource from another app into Antetype. The behavior is identical to that of a dragged file, but the name of the resource may not match the original.

Resources dragged onto the resource inspector are just loaded into the resource inspector and no cells are created.



Cut & Paste

Adding a resource that has been cut or copied from another app and placed on the OS X clipboard is as easy as dragging a resource to Antetype.

A normal paste operation ⌘ V adds the pasted resource to the resource inspector and creates a rectangle cell with a representation of the resource as the background, for normal paste this resource is placed at the top of the current screen hierarchy.

It is also possible to perform a Paste Inside operation ⇧ ⌘ V this works just as the normal paste operation, but pastes the new cell inside the currently selected item in the screen hierarchy.

When importing resources into Antetype via the clipboard attention needs to be paid to how the resource is put on the clipboard by the source application, Antetype must recognise the resource as a valid type as listed above, in some cases it is better to use drag and drop to import resources or even to export and explicitly import into Antetype.

Note

Pasting a copied resource multiple times into Antetype will result in a single entry in the resource inspector, but if the resource is re-copied from the source application it is given a different identifier and will be treated as a different resource in Antetype.



Using resource inspector

Within the resource inspector there is a + button that can be used to import resources into Antetype, pressing the + button opens a file selection dialog, where a user can choose relevant files to import into Antetype.

Document image

Files imported in this way are only loaded into the resource inspector and cells are not created on a screen.





Working with Resources

The resource inspector shows all resources that have been loaded into an Antetype file and these resources can be used as background images in cells or widgets.



Drag onto canvas

It is possible to select multiple resources within the resource inspector which makes dragging resources onto the Antetype slightly more complicated. Resources can only be dragged to the canvas.



From the Style Bar

The Image Fill pop-over in the style bar combines the resource chooser and the image settings. All imported resources show up and can be selected.

From the Style Inspector

Within the style inspector in the background section it is possible to set the type to image. Clicking on the file selector shows a version of the resource inspector that can be used to choose the resource that should be used as the background.



Export

Resources can be exported from Antetype in the same format they were originally added to Antetype. Select either a single or multiple resources in the resource inspector and then use the context menu and select Export…. A Save dialog is shown so that the target directory can be selected and the user can also choose to overwrite any existing images.



Editing resources in other applications

To edit a resource in an external application users can simply choose to edit it in an external application from the context menu in the resource inspector. As part of the editing process we export a version of the resource to a temporary folder and pass the temporary resource to the specified application. Each time the resource is saved in the other application, the changes are automatically loaded back into Antetype. If this simple method doesn't suit your workflow (perhaps a colleague edits icons or the editing software is not your computer) you can choose to export the resource manually, edit manually and then import it back into Antetype. Please note that you must make sure that the filename matches the name of the resource in the resource inspector otherwise it will not replace the existing resource but create a new resource when imported.