open-insight/SYSPROG/STPROCINS/POPUP_EQUATES.txt
2024-03-25 15:17:34 -07:00

208 lines
12 KiB
Plaintext

compile insert POPUP_EQUATES
/*
** Copyright (C) 1992-2022 Revelation Software Inc. All Rights Reserved **
Author : ????
Date : ????
Purpose : Constants for use with the popup function
Amended Date Reason
======= ==== ======
Mr C 13 Apr 22 Removed logical insert
Mr C 07 May 19 Added PMODE$ constants
Mr C 11 Jan 17 Added Async and PGO fields
WER 25 Apr 16 Expanded on WIDTH and HEIGHT
Mr C 09 Apr 16 Added PDISPLAY$ constants
Mr C 28 Mar 16 Added PEMPTYTEXT$
Mr C 12 Feb 16 Removed DataSet notes, moved Popup DSN to separate
equates
Mr C 23 Jan 16 Clarified PVERSION$ contents
Mr C 03 Dec 15 Added PVERSION$ and PFORECOLOR$
Mr C 09 Nov 15 Updated for v10
rjc 15 Apr 15 Added colors (rather than color_equates) to fix
compiler warnings about color_window$
*/
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
#ifndef _POPUP_EQUATES_
#define _POPUP_EQUATES_
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
declare function Popup
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
#ifdef POPUP_PS9
common /%POPUP%/ Popup_Struct@, Popup_ColCount@, Popup_hFile@, Popup_KeyList@, Popup_OpenDocIDs@, Popup_ConInfo@, Popup_hWndET@, Popup_ClickPos@, Popup_Type@, Popup_Field@, Popup_Oconvs@, Popup_Fields@, Popup_RetVal@, Popup_Cancelled@, Popup_Unused_1@
* ClickPos <1>=area <2>=row# <3>=state <4>=select counter
* hFile <1>=data <2>=dict
* ConInfo <1>=ds <2>=xo <n,1>=name <n,2>=handle <n,3>=owned (created by Popup)
#endif
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
* Popup Record structure EQUATEs
equ PCOL$ to 1 ;* Window X position, H-alignment, and desktop flag
equ PROW$ to 2 ;* Window Y position, V-alignment, and desktop flag
equ PWIDTH$ to 3 ;* Popup window width (number of visible columns)
equ PHEIGHT$ to 4 ;* Popup window height (number of visible rows)
equ PBKCOLOR$ to 5 ;* EditTable backcolor
equ PFONT$ to 6 ;* EditTable font
equ PFILE$ to 7 ;* C,F,K,R,T - Table Name,
equ PDISPLAY$ to 8 ;* C - CursorNo, F - <Key,field>, K - @vm'd keys, L - @vm,@svm'd data, R - key, T =- Select criteria
equ PFORMAT$ to 9 ;* column format information (@vm delim'd by column, @svm by attribute) field, width, just, heading just, oconv, heading
equ PMODE$ to 10 ;* T=Table, K=Table Keys,
;* C=Cursor of Table Keys, L=Literal Data (@vm/@svm),
;* R=Columns (values) from a row, F=Column from a row (subvalues from a value)
equ PSELECT$ to 11 ;* 0=none, 1=single, 2=multiple, 3=ordered multiple
equ PTITLE$ to 12 ;* Popup window title
equ PFIELD$ to 13 ;* Fields or columns to return
equ PTYPE$ to 14 ;* Return value: K{ey}/DocID, R{ead only}, Row P{ositions}, Popup F{ield} (ie. Column), Table C{olumn} (ie. Field), E{ntire} Row
equ PCOLHDR$ to 15 ;* bool: show column headings
equ PROWNUM$ to 16 ;* bool: show row numbers
equ PROWBTN$ to 17 ;* bool: show row buttons
equ PHGRID$ to 18 ;* bool: show horizontal grid
equ PVGRID$ to 19 ;* bool: show vertical grid - NOT USED IN v10
equ PRESIZE$ to 20 ;* bool: allow column resizing
equ PBORDER$ to 21 ;* bool: show border
equ PBTNSBELOW$ to 22 ;* bool: buttons on bottom instead of right
equ PSEARCH$ to 23 ;* bool: allow search (FIND button)
equ PSORT$ to 24 ;* bool: allow column sorting
equ PLOCK$ to 25 ;* count: number of columns to "scroll lock"
equ PUSERDEF$ to 26 ;* this column is reserved as user-defineable
equ PTESTRUN$ to 27 ;* was PSUBFILE$ - for DataSet, Connection Name: @vm: hXO ( hXO can be supplied by caller )
equ PINITSELECT$ to 28 ;* @vm list of positions to select initially
equ PSHOWMISSING$ to 29 ;* boolean; if true show the phrase 'Record Missing' in columns * mtr 8-21-03
equ PPRINTABLE$ to 30 ;* boolean; if true show the print button * mtr 9-2-03
equ PSHOWGAUGE$ to 31 ;* boolean; if true show the gasgauge when populating the popup * mtr 4-14-05
equ PCAPTUREESC$ to 32 ;* boolean; if true return char(27) when user presses escape * mtr 4-14-05
equ PGREENBAR$ to 33 ;* boolean; if true turn On rowshade property of popup edittable * mtr 11-29-05, flying To Orlando To demo the new CTO
equ PODDROWCOLOR$ to 34 ;* Color, If rowshade is enabled * mtr 11-29-05, flying To Orlando To demo the new CTO
equ PEVENROWCOLOR$ to 35 ;* Color, If rowshade is enabled * mtr 11-29-05, flying To Orlando To demo the new CTO
equ PCUSTOMTEXT$ to 36 ;* Custom button text
equ PCUSTOMPROC$ to 37 ;* Custom button callback proc - passed ID of the popup window instance
equ PINITPROC$ to 38 ;* Custom initproc - - passed ID of the popup window instance, and stage flag
equ PICON$ to 39 ;* Icon to use for the popup
equ PFORECOLOR$ to 40 ;* EditTable forecolor
equ PVERSION$ to 41 ;* Version number of the Popup DSN (1000 == 10.0)
equ PFRAMESTYLE$ to 42 ;* See PS_WINDOW_EQUATES
equ PEMPTYTEXT$ to 43 ;* See EditTable EMPTYTEXT property
equ PASYNCID$ to 44 ;* If not null then run ASYNC and return via parent ENDDIALOG event
equ PPGOCALLBACK$ to 45 ;* String: contains PGO target and property name
;* - popup is modeless, close (cancel) the popup when inactive
;* - don't show a caption etc
equ PNUMFIELDS$ to 45 ;* Set to the total number of popup structure fields
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// PCOL$ constants - @vm positions
equ PCOL_VALUE$ to 1
equ PCOL_ALIGNR$ to 2 ; // TRUE$ if xpos is right-align
equ PCOL_SCREEN$ to 3 ; // TRUE$ if xpos is screen X
// PROW$ constants - @vm positions
equ PROW_VALUE$ to 1
equ PROW_ALIGNB$ to 2 ; // TRUE$ if yPos is bottom-align
equ PROW_SCREEN$ to 3 ; // TRUE$ if yPos is screen Y
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// PMODE$ (Popup source) equates
equ PMODE_TABLE$ to "T"
equ PMODE_KEYS$ to "K"
equ PMODE_CURSOR$ to "C"
equ PMODE_ROW$ to "R"
equ PMODE_COLUMN$ to "F"
equ PMODE_LITERAL$ to "L"
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// PDISPLAY$ (Column format) equates
equ PDISPLAY_FIELD$ to 1
equ PDISPLAY_WIDTH$ to 2
equ PDISPLAY_DATAJUST$ to 3
equ PDISPLAY_HDRJUST$ to 4
equ PDISPLAY_OCONV$ to 5
equ PDISPLAY_HEADING$ to 6
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// PTYPE$ (Return type) constants
equ PTYPE_KEY$ to "K"
equ PTYPE_READONLY$ to "R"
equ PTYPE_ROWPOS$ to "P"
equ PTYPE_FIELD$ to "F"
equ PTYPE_COLUMN$ to "C"
equ PTYPE_ENTIREROW$ to "E"
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// PSELECT$ (Selection) constants
equ PSELECT_NONE$ to 0
equ PSELECT_SINGLE$ to 1
equ PSELECT_MULTI$ to 2
equ PSELECT_ORDERED$ to 3
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Initialization proc constants
equ PINITPROC_INSERTROWS$ to 1 ; // Rows have just been inserted
equ PINITPROC_BEFORESHOW$ to 2 ; // Popup is about to be shown
equ PINITPROC_AFTERSHOW$ to 3 ; // Popup has just become visible
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
* Popup() function calls
*
* function PopUp(OwnerWindow, Rec, Name, Instruction)
*
* where Instruction is:
*
equ PCMDEXEC$ to 1 ;* OwnerWindow should be supplied, Rec contains override information, Name is Popup name
* if Name is supplied, Popup record will be read and Rec will be used as an override
equ PCMDSELECT$ to 2 ;* OwnerWindow is required, Rec<1> is title for dialog, Rec<2> is either "OPEN" or "SAVE"
* Popup name is returned, first Get_Status error code will be REP_ENT_NOEXISTS_ERR$ if new Popup
equ PCMDLOCK$ to 3 ;* Name is Popup name, TRUE$ returned on success, first Get_Status will be either
* REP_ENT_SHORTLOCK_ERR$ or REP_ENT_OWNLOCK_ERR$ if the Popup is in use elsewhere, otherwise
* it will be REP_ENT_LONGLOCK_ERR$ if the Popup is checked out
equ PCMDREAD$ to 4 ;* Name is Popup name, Rec is set to Popup record, TRUE$ returned on success, Get_Status is
* available for error handling
equ PCMDWRITE$ to 5 ;* Name is Popup name, Rec is Popup record, TRUE$ returned on success, Get_Status is
* available for error handling
equ PCMDUNLOCK$ to 6 ;* Name is Popup name, TRUE$ returned on success, Get_Status is available for error handling
equ PEVENTOK$ to 7 ;* reserved by Popup window
equ PEVENTCANCEL$ to 8 ;* reserved by Popup window
equ PEVENTCLEAR$ to 9 ;* reserved by Popup window
equ PEVENTALL$ to 10 ;* reserved by Popup window
equ PEVENTFIND$ to 11 ;* reserved by Popup window
equ PEVENTCLICK$ to 12 ;* reserved by Popup window
equ PEVENTDBLCLK$ to 13 ;* reserved by Popup window
equ PCMDDEFAULT$ to 14 ;* Rec is set to default Popup record, TRUE$ returned on success
equ PCMDCLOSE$ to 15 ;* reserved by Popup window
equ PCMDRETRIEVE$ to 16 ;* reserved by Popup window
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
* Popup entity ID
equ POPUPTYPE$ to "POPUP"
equ POPUPCLASS$ to ""
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
#endif
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////