4 ; Definitions for button blocks
6 ; © 1995-1998 Straylight
9 ;----- Licensing note -------------------------------------------------------
11 ; This file is part of Straylight's Sapphire library.
13 ; Sapphire is free software; you can redistribute it and/or modify
14 ; it under the terms of the GNU General Public License as published by
15 ; the Free Software Foundation; either version 2, or (at your option)
18 ; Sapphire is distributed in the hope that it will be useful,
19 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ; GNU General Public License for more details.
23 ; You should have received a copy of the GNU General Public License
24 ; along with Sapphire. If not, write to the Free Software Foundation,
25 ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 ;----- Overview -------------------------------------------------------------
42 [ :LNOT::DEF:buttons__dfn
45 ;+ LIB sapphire:^.bsh.stdDbox
47 ; --- buttons_setup ---
49 ; On entry: R0 == dialogue box handle
50 ; R1 == pointer to buttons block
51 ; R2 == buttons base icon
52 ; R3 == number of buttons to allow
54 ; On exit: R2 == buttons flag mask
55 ; R3 == cancel button icon, or -1
57 ; Use: Sets up a dialogue box's buttons according to a buttons
62 ;----- Macros ---------------------------------------------------------------
69 ; --- Macro: BUTTON ---
71 ; Arguments: msg == message tag to put in button
73 ; Use: Inserts a text button into a buttons definition block.
77 but__f$but__c EQU but__fl
79 but__fl SETA bFlag_text
80 $label DCD but__f$but__c
85 ; --- Macro: BCANCEL ---
87 ; Arguments: text == optional text string (default is `Cancel')
89 ; Use: Inserts a cancel button into a buttons definition block.
93 but__f$but__c EQU but__fl
95 but__fl SETA bFlag_cancel
97 $label DCD but__f$but__c
100 but__fl SETA but__fl :OR: bFlag_text
110 ; Use: Inserts an OK button into a buttons definition block.
114 but__f$but__c EQU but__fl
116 but__fl SETA bFlag_ok
117 $label DCD but__f$but__c
120 ; --- Macro: BHELP ---
124 ; Use: Inserts a help button into a buttons definition block.
128 but__f$but__c EQU but__fl
130 but__fl SETA bFlag_help
131 $label DCD but__f$but__c
134 ; --- Macro: BGAP ---
138 ; Use: Omits a button in a buttons definition block.
142 but__f$but__c EQU but__fl
145 $label DCD but__f$but__c
148 ; --- Macro: BUTEND ---
152 ; Use: Terminates a buttons definition block.
156 but__f$but__c EQU but__fl+bFlag_last
163 ;----- Button block formats -------------------------------------------------
165 bFlag_cancel EQU (1<<0) ;This is the cancel button
168 bFlag_ok EQU (1<<1) ;This is the OK button
171 bFlag_help EQU (1<<2) ;This is the help button
174 bFlag_text EQU (1<<3) ;This button contains text
178 bFlag_last EQU (1<<31) ;This is the last item
183 ;----- That's all, folks ----------------------------------------------------