4 ; Various window utility functions
6 ; © 1994-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 -------------------------------------------------------------
32 ; winUtils_setPosition
36 [ :LNOT::DEF:winUtils__dfn
39 ; --- winUtils_setTitle ---
41 ; On entry: R0 == pointer to string to set in title
42 ; R1 == pointer to title bar buffer
43 ; R2 == window handle to write to
47 ; Use: Sets a window's title string. If the string is different,
48 ; the title is redrawn. The contortion to do this is
49 ; unpleasant, and is not to be performed in public.
51 IMPORT winUtils_setTitle
53 ; --- winUtils_setPosition ---
55 ; On entry: R0 == window opening style
56 ; R1 == pointer to window state block
57 ; R2,R3 == extra arguments for displaying the window
59 ; On exit: R2,R3 contain position for opening with Wimp_CreateMenu
61 ; Use: Modifies the window state block pointed to by R0 so that the
62 ; window appears as required in the given opening style. The
63 ; window is always moved to the top.
65 IMPORT winUtils_setPosition
67 ; --- winUtils_findValid ---
69 ; On entry: R0 == pointer to icon block
70 ; R1 == character to find in block (not case-sensitive)
71 ; R2 == old pointer to search from, or 0
73 ; On exit: R1 == character forced to lower case
75 ; R2 points to command string
79 ; Use: Tries to find a validation string command in the given
82 IMPORT winUtils_findValid
84 ; --- winUtils_shaded ---
86 ; On entry: R0 == window handle
89 ; On exit: CS if icon is shaded, CC otherwise
91 ; Use: Informs caller whether an icon is shaded in the Sapphire
92 ; sense (ESG 31 or shaded bit set).
94 IMPORT winUtils_shaded
96 ; --- Opening styles for winUtils_setPosition ---
98 ; These are actually the same as the dbox_open styles, without the flags
102 wStyle_current # 1 ;In its current position
103 wStyle_centre # 1 ;Centred on the screen
104 wStyle_pointer # 1 ;Centred over the pointer
105 wStyle_givenY # 1 ;At a given height on screen
106 ; R2 == y coordinate to open
107 wStyle_givenXY # 1 ;At a given position on scrn
113 ;----- That's all, folks ----------------------------------------------------