Concepts
The actual Fluent user interface layout is controlled by the following three XML files:
1. AvailableControls.xml
2. RibbonDefinition.xml
3. custom.xml
These files can be viewed using the tools described in Developer Tools.
AvailableControls.xml
This file provides a set of ready-to-use definitions of controls (for example, buttons, groups, tabs, menu options) that can be added to the Fluent user interface. Most importantly, it provides button definitions for all standard actions in Model Manager. In addition, it can contain definitions for composite elements such as button groups for reuse in different places. Each control has a unique id attribute by which it can be referenced in the actual ribbon definition.
RibbonDefinition.xml
This file defines the actual structure of the ribbon, file menu, quick access toolbar and help menu. It uses the controls defined in AvailableControls.xml. A control can be added into the appropriate location by referencing it with a ref attribute. When a control is instantiated in a particular context, some of its properties can also be overwritten. For example, you can insert a predefined button but display a different icon.
The ribbon definition file can also contain new definitions of controls (indicated by an id attribute). In fact, the Fluent user interface can be entirely defined in this file without the usage of an AvailableControls.xml.
* 
Separating the definition and the usage of controls is recommended because it allows reusing definitions and makes the ribbon definition file more readable.
It is possible to replace the default ribbon definition XML file by a completely new definition.
custom.xml
Instead of replacing the default RibbonDefinition.xml you can also modify the standard layout by specifying a ribbon customization in the standard custom.xml. You can,
1. Remove controls
2. Add new controls
3. Modify existing controls, for example, modify their display name or icon
4. Change the order
Upon startup, Creo Element/Direct Model Manager builds the user interface in the following order:
1. Read the AvailableControls.xml and build a list of available controls.
2. Read the RibbonDefinition.xml and build an internal representation of the user interface layout. Whenever a control is identified by a ref attribute, its definition is read from the available controls.
3. Finally, any customization defined in custom.xml is applied to the internal layout representation. Only after this step is completed, the actual user interface is created.
In most cases a control can be defined by static properties. For example, simple button definitions just refer to an existing WMAbstractAction. The button created from this definition has the same name and icon as the underlying action. Some user interface controls, however, need to be created dynamically at runtime. The list of saved searches, for instance, is stored in the database and cannot be configured statically in the XML file. This can be implemented by specifying a Java class that creates those controls at runtime.
Was this helpful?