| United States-English |
|
|
|
![]() |
Common Desktop Environment: Advanced User's and System Administrator's Guide > Chapter 4 Registering
an ApplicationStep 7: Creating the Application Group |
|
Once you have created the action and data type definitions for the application, you must create the configuration files responsible for creating what the user actually sees—the application group and its contents. The application group is a directory at the top level of the Application Manager (see Figure 4-1 “Application groups at the top level of Application Manager”) There are three steps to creating the application group:
To create an application group, create the directories in the registration package under appmanager, as shown in Figure 4-7 “The appmanager directory” The <appgroup_name> in Figure 4-7 “The appmanager directory” is the name for the application group. The name can be any allowable file (directory) name. Use a name that describes the application. The desktop provides a default application-group icon. However, you will probably want to provide a custom icon. If you want to provide a unique icon for the application group, you must create:
For example, suppose you want to create an application group named Media_Tools. The following data type definition, placed in a file app_root/dt/appconfig/types/language/name.dt, assigns a unique icon to the application group icon.
The attributes section of the definition specifies the icon to be used. The criteria section of the definition specifies that the data type be defined to any directory named Media_Tools that is a subdirectory of a directory named appmanager. ,"Figure 4-9 “How an application group gets a unique icon” shows the relationship between the application group name and the data type definition. The PATH_PATTERN field in the data type definition connects a unique icon to the application group. You should also create an Open and Print action for the application group data type:
OpenAppGroup and PrintAppGroup actions are built-in actions defined in /usr/dt/appconfig/types/language/dtappman.dt. The most important item in the application group is an icon to start the application (an action icon). If the application group contains a suite of applications, there is usually an icon for each application. In addition to one or more action icons, the application group may contain:
The application group can contain subdirectories. The application group should contain an icon that launches the application. If the group supplies a suite of applications, there should be an icon for each one. These icons are called application icons, or action icons, since they represent an underlying action. An action icon is created by creating an executable file with the same name as the action it will run:
The file is called an action file, because its purpose is to create a visual representation of the underlying action. For example, if you've created an action named BestTextEditor that runs the BestTextEditor application, you would create an executable file named BestTextEditor. In File Manager and the Application Manager, the action file will use the icon image specified in the action definition. Figure 4-10 “The application icon is a file in the application group” illustrates the relationship between the action definition, action file, and actual entry in the Application Manager window. The desktop provides a README data type that you can use for your application's README files. Use one of these naming conventions:
In most cases, you do not need to provide a Front Panel control definition; the user can add the application to the Front Panel by dropping the action icon on the Install Icon control in a subpanel. You might want to create a Front Panel configuration file containing a control definition for your application if you want users to be able to install a control that behaves differently than the action icon—for example, if the control monitors a file and changes appearance when the monitored file changes. Front Panel configuration files are placed in the app_root/dt/appconfig/types/language directory. The naming convention is name.fp. If you supply a configuration file containing a control, the user can add the control to a subpanel by dropping the *.fp file on the Install Icon control in the subpanel. For example, the following definition can be placed in a Front Panel configuration file in the application group. If the user drops this file on an Install Icon control in a subpanel, a control is created in the subpanel that runs a single instance of the BestTextEditor application. If BestTextEditor is already running, the window is moved to the top of the window stack in the current workspace.
For additional information about creating Front Panel configuration files, see:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||