; Assembler header file for ActionButton
; Written by DefMod (Dec  9 2012) on Sun Dec  9 15:43:59 2012
; Jonathan Coxhead, jonathan@doves.demon.co.uk, 5 Sept 1995

; OSLib---efficient, type-safe, transparent, extensible,
; register-safe API coverage of RISC OS
; 
; Copyright (c) 1994-2012 Jonathan Coxhead and OSLib maintainers
; 
; Licence:
; 
;    OSLib is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation; either version 1, or (at your option)
; any later version - and this with the following clarification and
; special exception:
; 
;    Linking this library statically or dynamically with other modules
; is making a combined work based on this library. Thus, the terms
; and conditions of the GNU General Public License cover the whole
; combination.
; 
;    As a special exception, the copyright holders of this library
; give you permission to link this library with independent modules
; to produce an executable, regardless of the license terms of these
; independent modules, and to copy and distribute the resulting
; executable under terms of your choice, provided that you also meet,
; for each linked independent module, the terms and conditions of the
; license of that module. An independent module is a module which is
; not derived from or based on this library. If you modify this
; library, you may extend this exception to your version of the library,
; but you are not obliged to do so. If you do not wish to do so, delete
; this exception statement from your version.
; 
;    OSLib is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
; GNU General Public License for more details.
; 
;    You should have received a copy of the GNU General Public License
; along with this programme; if not, write to the Free Software
; Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, USA.

        [       :LNOT: :DEF: ActionButton_Hdr
        GBLS    ActionButton_Hdr

        [       :LNOT: :DEF: Get_Types
        GBLS    Get_Types
        ]
        [       :LNOT: :DEF: Types_Hdr
Get_Types                       SETS    "GET oslib/Types.Hdr"
        |
Get_Types                       SETS    ""
        ]
        $Get_Types

        [       :LNOT: :DEF: Get_Toolbox
        GBLS    Get_Toolbox
        ]
        [       :LNOT: :DEF: Toolbox_Hdr
Get_Toolbox                     SETS    "GET oslib/Toolbox.Hdr"
        |
Get_Toolbox                     SETS    ""
        ]
        $Get_Toolbox

        [       :LNOT: :DEF: Get_Gadget
        GBLS    Get_Gadget
        ]
        [       :LNOT: :DEF: Gadget_Hdr
Get_Gadget                      SETS    "GET oslib/Gadget.Hdr"
        |
Get_Gadget                      SETS    ""
        ]
        $Get_Gadget

;Symbols for constants
Class_ActionButton              *       &80
ActionButton_IsDefault          *       &1
ActionButton_IsCancel           *       &2
ActionButton_IsLocal            *       &4
ActionButton_IsMenu             *       &8
ActionButton_ShowAsMenu         *       &8
ActionButton_ShowAtCentre       *       &10
ActionButton_ShowAtPointer      *       &20
Action_ActionButtonSelected     *       &82881
ActionButton_SelectedAdjust     *       &1
ActionButton_SelectedSelect     *       &4
ActionButton_SelectedDefault    *       &8
ActionButton_SelectedCancel     *       &10
ActionButton_SelectedLocal      *       &20

;Symbols for structure offsets and sizes
        ^       0
ActionButton_Gadget_text        #       Toolbox_MsgReference
ActionButton_Gadget_text_limit  #       Int
ActionButton_Gadget_click_show  #       Toolbox_StringReference
ActionButton_Gadget_action      #       Bits
ActionButton_Gadget             *       @

        ^       0
ActionButton_Object             Gadget_Object_MEMBERS
ActionButton_Object_text        #       Toolbox_MsgReference
ActionButton_Object_text_limit  #       Int
ActionButton_Object_click_show  #       Toolbox_StringReference
ActionButton_Object_action      #       Bits
ActionButton_Object             *       @

ActionButton_ActionSelectedBlock *       Toolbox_ActionHeaderBase


;Symbols for SWI's and SWI reason codes
ActionButton_SetText            *       &80
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &80
   ;  R3 = action_button (Toolbox_C)
   ;  R4 -> text (String)

ActionButton_GetText            *       &81
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &81
   ;  R3 = action_button (Toolbox_C)
   ;  R4 = text (pointer to String)
   ;  R5 = size (Int)
   ;Exit
   ;  R5 = used (Int)

ActionButton_SetAction          *       &82
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &82
   ;  R3 = action_button (Toolbox_C)
   ;  R4 = action (Bits)

ActionButton_GetAction          *       &83
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &83
   ;  R3 = action_button (Toolbox_C)
   ;Exit
   ;  R0 = action (Bits)

ActionButton_SetClickShow       *       &84
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &84
   ;  R3 = action_button (Toolbox_C)
   ;  R4 = obj (Toolbox_O)
   ;  R5 = show_flags (Bits)

ActionButton_GetClickShow       *       &85
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &85
   ;  R3 = action_button (Toolbox_C)
   ;Exit
   ;  R0 = obj (Toolbox_O)

        ]
        END
