AppBuilder Palette
CST File Processing and Initialization
Beta Draft
Author: (Author's Name)
Date Last Updated: (Date)
Scheduled Release: (Release Number)
Revision History
The following revisions have been made to this document:
Date: (date)
Revision: (rev-no)
Developer: (developer)
Summary of Changes: (summary)
Copyright © 2000 by Progress Software Corporation ("PSC"), 14 Oak Park, Bedford, MA 01730, and other contributors as listed below. All Rights Reserved.
The Initial Developer of the Original Code is PSC. The Original Code is Progress IDE code released to open source December 1, 2000.
The contents of this file are subject to the Possenet Public License Version 1.0 (the "License"); you may not use this file except in compliance with the License. A copy of the License is available as of the date of this notice at http://www.possenet.org/license.html
Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. You should refer to the License for the specific language governing rights and limitations under the License.
Contributors
Jane Contributor, Joe Contributor
Contents
1. Overview
2. Architecture
3. Primary Data Structures
4. Primary Algorithms and Processes
5. Advanced Topics
6. Dependencies
7. Source Files
8. Build Process and Requirements
9. Execution Methods
10. Test Requirements and Strategies
11. Supplementary Information
12. Related Documentation
The AppBuilder has been designed to allow for easy addition of options to its palette and menu structure. Certain palette and menu options are static, in that they represent components that have their definition in the underlying 4GL. Components such as fill-ins, combo-boxes, buttons and image controls fall into this category. For these controls, the palette definitions are built into the AppBuilder code.
Most of the palette items in the later releases of the product are components that are not part of the underlying 4GL. As new features have been added to the ADM, new icons have been added to the palette with no alteration to the AppBuilder code. To achieve this, the AppBuilder makes use of files that contain the definition of the palette icons. These files are called CST (short for “customization”) files.
The AppBuilder’s CST files are used to decide the contents of the palette, various menus and the “New” dialog box that is displayed when the user chooses to create a new object. These files are read at initialization of the AppBuilder to establish the buttons that get added to the palette and menus. This document describes how these files are processed and the building the palette from them.
During the AppBuilder’s initialization process, a temp-table is populated with a list of controls that are supported by the underlying 4GL language. The AppBuilder then opens a series of CST files and parses these to determine what extra items need to be added to the palette. Records are created for these and any specialized customizations that the user may have added to the customization files.
The palette is then drawn based on the contents of the two temp-tables and its palette items are enabled to allow the user to select them at run time.
The palette uses two temp-tables – “_palette_item” and “_custom.” Their definitions are found in the include file “adeuib/custwidg.i.”
The “_palette_item” temp-table contains the definitions of all the buttons that appear on the palette.
Each “_custom” temp-table record forms the basis for the items that get added to the menus that pop up over each palette icon.
4. Primary Algorithms and Processes
The palette relies on data in the “_custom” temp-table and the “_palette_item” temp-table to define its content and layout. The definitions of these tables can be found in the file “adeuib/custwidg.i.”
During the initialization of the AppBuilder in the “initialize_uib” internal procedure in “adeuib/_uibmain.p,” a call is made to “adeuib/_getpref.p” which is responsible for reading the registry for the paths to the CST files that define the structure of the palette. If there are no entries in the registry (which will be the case if the user has not added his own CST files), the default custom files set in one of the following pre-processor directives:
· DEFAULT-CUSTOM-FILES-CS-ONLY
· DEFAULT-CUSTOM-FILES-WS-ONLY
· DEFAULT-CUSTOM-FILES-BOTH
Once the preferences have been set, the AppBuilder does some other initializations and then makes a call to “adeuib/_initpal.p.” This procedure is responsible for creating the “_palette_item” records for all the 4GL internal controls. Note that at this point, records are being created in the temp-table, not on the visible palette.
After the initial items have been added to the palette, a call is made to “adeuib/_cr_cust.p” which is responsible for reading the CST files and creating “_palette_item” records for each of them. It also creates appropriate “_custom” records for custom items that need to appear in the menus.
At this point, a call is made to “adeuib/_cr_palw.p,” which is responsible for creating the palette window, associating default triggers with the window and laying it out according to settings that were saved to the registry.
The call to “adeuib/_cr_pal.p” that follows is what results in the drawing of the palette’s toolbar. Th procedure takes a logical input value, which decides whether the palette needs to be redrawn or drawn for the first time. The procedure then iterates through the _palette_item table and creates a frame, two images and a button for each _palette_item record. During the process of creating the frame, the order value of the _palette_item record is stored to the PRIVATE-DATA attribute of the frame so that the record can be cross-referenced to the frame. The trigger on the palette runs the “tool_choose” procedure in “adeuib/uibmproe.i,” which gets included into “adeuib/_uibmain.p.” The “tool_choose” procedure is responsible for reacting to the selection of the tool.
A call is now made to “adeuib/_cr_cmnu.p,” which sets up the palette’s menu and creates custom menus for each palette item.
The last call that is made to initialize the palette is to “adeuib/_cr_npop.p,” which creates the pop-up menu that appears when the user right-clicks on the “New” button in the AppBuilder main window.
Not Available
Not Available
This tool uses the following source files:
Source File
Description
adecomm/adestds.i
Contains a number of standard definitions.
adecomm/icondir.i
Contains the algorithm that determines the adeicon directory path.
adeuib/_cr_cmnu.p
Creates the palette’s menu items.
adeuib/_cr_cust.p
Populates the _custom and _palette_item table records from the CST file.
adeuib/_cr_npop.p
Creates the pop-up menu on the “New” button in the main window.
adeuib/_cr_pal.p
Creates or reinitializes the palette toolbar.
adeuib/_cr_palw.p
Creates the palette window.
adeuib/_getpref.p
Gets registry/ini preferences for AppBuilder including CST locations
adeuib/_initpal.p
Palette table initialization routine for static controls
adeuib/_uibmain.p
Startup procedure of the AppBuilder
adeuib/custwidg.i
Temp-table definitions and pre-processor definitions
adeuib/grptrig.i
Contains the standard AppBuilder triggers for the standard actions.
adeuib/pre_proc.i
Contains AppBuilder pre-processor definitions
adeuib/sharvars.i
Contains definitions of AppBuilder shared variables
adeuib/windvars.i
Contains shared variable definitions of certain window parameters.
Table 1: AppBuilder Palette Source Files
8. Build Process and Requirements
Not Available
Not Available
10. Test Requirements and Strategies
Not Available
Not Available
The following documents provide additional information about the tool:
· Progress AppBuilder Developer’s Guide (Windows)
· AppBuilder Online Help