This project seed includes the following Platform API capabilites:
- Examples of the configuration required to use the Platform API and apply customizations
- Usage of the Platform API to group, tab, and rearrange application windows
- API examples of View management and creation
- API examples of Snapshot saving and applying
- Examples of visual customization via CSS
- Examples of visual customization by providing a custom Platform Window
- Examples of behavioral customization by overriding the Platform APIs
Basic Usage:
- Clone this repository
- Install the dependencies:
npm install
- Start the live-server and launch the application:
npm start
Advanced Usage:
For users who would like to test features with a different OpenFin Runtime, configure your workspace as follows:
- Generate a local manifest file, local.json, with the specified Runtime version, e.g. canary:
npm start -- canary
- Subsequent launches will automatically use local.json; delete this file to revert to app.json
- Platform configuration has been included in the provided app.json file.
- The defaultWindowOptions key in the provided
app.json
will instruct the platform to replace our Standard Window with the provided platform-window.html file. - The commands key in the provided
app.json
will allow keyboard access to the next tab command. - The providerUrl key in the provided
app.json
will allow you to make custom changes to the Platform APIs, by pointing to a hosted provider.html file. (STARTING IN v15.80.50.x)
- A stylesheet is linked in the platform-window.html file, and allows for visual customization. For a complete view of all properties, please refer to the example stylesheet
The platform-window.html file contains the layout-container element and two custom elements: left-menu
and title-bar
. These elements, in conjunction with the js/platform-window.js file, enable the following functionality:
Provides examples of the following functionality:
- Adding a View to an existing Window
- Adding a View in a new Window
- Saving the Window's current Layout
- Restoring the Window's current Layout
- Creating a regular OpenFin Window
- Saving/Restoring Platform Snapshots
- Applying a preset arrangement on the current window (Grid, Tabs, Rows)
Provides examples of the following functionality:
- Draggable area
- Close/Maximize/Minimize buttons
Our custom Provider includes an extension that will look for a pre-configured list of externalWindows (the default being the provided my_platform_notes.txt file opened in notepad.exe) and:
- Override
getSnapshot
to include a externalWindows section containing information on any any external window included in the configuration. - Override
applySnapshot
to look for an externalWindows section and restore the position and state of any external window included in the configuration.