;
; pane.sh
;
; Pane handling facilities
;
;  1994-1998 Straylight
;

;----- Licensing note -------------------------------------------------------
;
; This file is part of Straylight's Sapphire library.
;
; Sapphire 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 2, or (at your option)
; any later version.
;
; Sapphire 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 Sapphire.  If not, write to the Free Software Foundation,
; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

;----- Overview -------------------------------------------------------------
;
; Functions provided:
;
;  pane_add
;  pane_remove
;  pane_closed
;  pane_deleted
;  pane_swap
;  pane_open
;  pane_init

		[	:LNOT::DEF:pane__dfn
		GBLL	pane__dfn

; --- pane_add ---
;
; On entry:	R0 == window handle of parent window
;		R1 == icon handle in parent window
;		R2 == window handle of pane window
;
; On exit:	May return an error
;
; Use:		This call registers a pane to be associated with the given
;		window. The pane is always opened to fit exactly within
;		the given icon -- border widths are taken into account
;		if there are scroll bars etc.
;
;		You must call pane_closed if the parent window is closed,
;		since there is no way for pane to trap this occurence.

		IMPORT	pane_add

; --- pane_remove ---
;
; On entry:	R0 == window handle for which pane was registered
;		R1 == window handle of the pane window itself
;
; On exit:	--
;
; Use:		Removes the pane from the given window. This call will
;		close the given pane, but will not actually delete it
;		(ie. with a Wimp_DeleteWindow).

		IMPORT	pane_remove

; --- pane_closed ---
;
; On entry:	R0 == window handle of parent
;
; On exit:	--
;
; Use:		Informs pane that a parent window has closed.
;		All associated panes are then closed.

		IMPORT	pane_closed

; --- pane_deleted ---
;
; On entry:	R0 == window handle of parent
;
; On exit:	--
;
; Use:		Informs pane that a parent window has been deleted.
;		All associated panes are then closed, and there
;		registration with the pane library module is
;		terminated.

		IMPORT	pane_deleted

; --- pane_swap ---
;
; On entry:	R0 == window handle of parent window
;		R1 == icon handle within parent window
;		R2 == window handle of new pane
;
; On exit:	--
;
; Use:		This call will replace the pane in associated with icon R1
;		in window R0, with the pane in R2.
;
;		The exisiting pane is closed, and the new pane is
;		opened in it's place. No error is generated if the existing
;		pane does not exist; this allows the caller to delete the
;		window before doing the swap.

		IMPORT	pane_swap

; --- pane_open ---
;
; On entry:	R0 == window handle
;
; On exit:	--
;
; Use:		Opens all the panes associated with the given window.

		IMPORT	pane_open

; --- pane_init ---
;
; On entry:	--
;
; On exit:	--
;
; Use:		Initialises the pane unit.

		IMPORT	pane_init

		]

;----- That's all, folks ----------------------------------------------------

		END
