! MOTIFBURGER_DEFS.BAS ! !****************************************************************************** !* * !* © Copyright 2000 Hewlett-Packard Development Company, L.P. * !* * !* Confidential computer software. Valid license from HP required for * !* possession, use or copying. Consistent with FAR 12.211 and 12.212, * !* Commercial Computer Software, Computer Software Documentation, and * !* Technical Data for Commercial Items are licensed to the U.S. Government * !* under vendor's standard commercial license. * !* * !* HP shall not be liable for technical or editorial errors or omissions * !* contained herein. The information in this document is provided "as is" * !* without warranty of any kind and is subject to change without notice. * !* The warranties for HP products are set forth in the express limited * !* warranty statements accompanying such products. Nothing herein should be * !* construed as constituting an additional warranty. * !* * !****************************************************************************** ! ! ! INCLUDE file for MOTIFBURGER.BAS example program ! ! Defines all constants, variables and COMMON blocks ! used in the MOTIFBURGER example ! ! ! Declare constants that are associated with each possible widget. ! These values are passed along in the TAG field for callbacks and ! are used to index into the WIDGET_ARRAY array. They must match ! the definitions given in MOTIFBURGER.UIL. ! DECLARE LONG CONSTANT CREATE_ORDER = 1 DECLARE LONG CONSTANT ORDER_PDME = 2 DECLARE LONG CONSTANT FILE_PDME = 3 DECLARE LONG CONSTANT EDIT_PDME = 4 DECLARE LONG CONSTANT NYI = 5 DECLARE LONG CONSTANT APPLY = 6 DECLARE LONG CONSTANT DISMISS = 7 DECLARE LONG CONSTANT NOAPPLY = 8 DECLARE LONG CONSTANT CANCEL_ORDER = 9 DECLARE LONG CONSTANT SUBMIT_ORDER = 10 DECLARE LONG CONSTANT ORDER_BOX = 11 DECLARE LONG CONSTANT BURGER_RARE = 12 DECLARE LONG CONSTANT BURGER_MEDIUM = 13 DECLARE LONG CONSTANT BURGER_WELL = 14 DECLARE LONG CONSTANT BURGER_KETCHUP = 15 DECLARE LONG CONSTANT BURGER_MUSTARD = 16 DECLARE LONG CONSTANT BURGER_ONION = 17 DECLARE LONG CONSTANT BURGER_MAYO = 18 DECLARE LONG CONSTANT BURGER_PICKLE = 19 DECLARE LONG CONSTANT BURGER_QUANTITY = 20 DECLARE LONG CONSTANT FRIES_TINY = 21 DECLARE LONG CONSTANT FRIES_SMALL = 22 DECLARE LONG CONSTANT FRIES_MEDIUM = 23 DECLARE LONG CONSTANT FRIES_LARGE = 24 DECLARE LONG CONSTANT FRIES_HUGE = 25 DECLARE LONG CONSTANT FRIES_QUANTITY = 26 DECLARE LONG CONSTANT DRINK_LIST = 27 DECLARE LONG CONSTANT DRINK_ADD = 28 DECLARE LONG CONSTANT DRINK_SUB = 29 DECLARE LONG CONSTANT DRINK_QUANTITY = 30 DECLARE LONG CONSTANT TOTAL_ORDER = 31 DECLARE LONG CONSTANT BURGER_LABEL = 32 DECLARE LONG CONSTANT FRIES_LABEL = 33 DECLARE LONG CONSTANT DRINK_LABEL = 34 DECLARE LONG CONSTANT MENU_BAR = 35 DECLARE LONG CONSTANT FILE_MENU = 36 DECLARE LONG CONSTANT EDIT_MENU = 37 DECLARE LONG CONSTANT ORDER_MENU = 38 DECLARE LONG CONSTANT MIN_WIDGET_NAME = CREATE_ORDER DECLARE LONG CONSTANT MAX_WIDGET_NAME = ORDER_MENU ! ! Define range of widgets which are toggles ! DECLARE LONG CONSTANT MIN_TOGGLE = BURGER_RARE DECLARE LONG CONSTANT MAX_TOGGLE = BURGER_PICKLE ! ! Define indexes for food names we will need to keep around ! DECLARE LONG CONSTANT BURGERS = 1 DECLARE LONG CONSTANT FRIES = 2 DECLARE LONG CONSTANT DRINKS = 3 DECLARE LONG CONSTANT MIN_FOOD_NAME = BURGERS DECLARE LONG CONSTANT MAX_FOOD_NAME = DRINKS ! ! Define COMMON block that defines/holds all our global states ! Including: ! ! Define array of widgets indexed by above widget name values ! Type: WIDGET ! ! Define array in which we will keep track of the state of the ! toggles ! ! Define array of compound strings to hold current food names ! ! Define compound strings to hold names of currently selected ! drink and fries size ! ! Define array to hold current food quantities. Note that we don't ! actually use QUANTITIES(FRIES) but rather read the value from ! the text widget when necessary. ! ! Define root widget ID of our application ! Type: WIDGET ! ! Define root widget ID of our DRM hierarchy ! Type: WIDGET ! ! Define MRM hierarchy ID ! ! Define compound strings to hold commonly used strings ! COMMON (MOTIFBURGER_COMMON) & WIDGET WIDGET_ARRAY(MIN_WIDGET_NAME TO MAX_WIDGET_NAME), & LONG TOGGLE_ARRAY(MIN_TOGGLE TO MAX_TOGGLE), & LONG NAMES(MIN_FOOD_NAME TO MAX_FOOD_NAME), & LONG CURRENT_DRINK, CURRENT_FRIES, & LONG QUANTITIES(MIN_FOOD_NAME TO MAX_FOOD_NAME), & WIDGET TOPLEVEL_WIDGET, MAIN_WINDOW_WIDGET, & LONG MRM_HIERARCHY, & LONG LATIN_CREATE, LATIN_DISMISS, LATIN_SPACE, LATIN_ZERO ! ! End of DECBURGER_DEFS.BAS !