AppBuilder Menu and Toolbar Additions FAQs
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 (C) 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. AppBuilder Menu Modifications
This section contains information about modifying AppBuilder menus.
1.1 How do you add a new menu item to the AppBuilder?
Steps
To add a menu item to the AppBuilder main window menu:
Example
The following example illustrates the required code modifications for adding a new tool (called Foo) to the AppBuilder main window Tools sub-menu:
MENU-ITEM mi_foo LABEL “&Foo…”
ON CHOOSE OF MENU-ITEM mi_foo RUN choose_foo_tool.
PROCEDURE choose_foo_tool :
RUN adeuib/_footool.w.
END PROCEDURE.
2 AppBuilder Toolbar Modifications
This section contains information about modifying the AppBuilder toolbar.
2.1 How do you add a new button to the AppBuilder toolbar?
Steps
To add a button to the AppBuilder main window toolbar:
bar_labels (Names of the buttons)
bar_tips (Tooltips for the buttons)
bar_images (Images for the buttons without the .bmp extension)
bar_actions (Internal procedures that execute when the buttons are chosen)
Each of the above directives contains a list of button characteristics in order of appearance on the toolbar. If, for example, you add a new button as the 5th item in the toolbar, you must add the item characteristic (name, tooltip, image, or action) as the 5th item in each directive.
Example
The following example illustrates the required code modifications for adding a new tool (called Foo) to the AppBuilder main window toolbar (after the Color button and before the Development Mode button):
&GLOBAL-DEFINE bar_count 11
&SCOPED-DEFINE bar_labels New,Open,Save,Print,Procedure,Run,Edit,List,~
Property,Colors,Foo
&SCOPED-DEFINE bar_tips New,Open,Save,Print,Procedure settings,Run,Edit code,List objects,Object properties,Colors,Foo
&SCOPED-DEFINE bar_images new,open,save,print,proc,run,editcode,list,props,color,foo
&SCOPED-DEFINE bar_actions choose_file_new,choose_file_open,choose_file_save,choose_file_print,choose_proc_settings,choose_run,choose_codedit,choose_uib_browser,choose_prop_sheet,adeuib/_selcolr.p,choose_foo_tool
a) Change the SIZE-PIXELS of rectangle group3 from 265 BY 30 to 290 BY 30
b) Change the SIZE-PIXELS of rectangle group4 from 295 BY 30 to 320 BY 30
X = h_button_bar[11]:X + h_button_bar[11]:WIDTH-P + 6
ASSIGN rh = h_button_bar[11]:FRAME
rh:WIDTH-P = rh:WIDTH-P - h_button_bar[11]:WIDTH-P.
PROCEDURE choose_foo_tool :
RUN adeuib/_footool.w.
END PROCEDURE.
The following documents provide additional information about this subject matter: