[REBOL] Re: default offset
From: g:santilli:tiscalinet:it at: 3-Oct-2003 10:50
Hi patrick,
On Friday, October 3, 2003, 10:31:11 AM, you wrote:
p> I guess 'view use some default value, but I have not find where it is.
Use the SOURCE, Luke!
>> source view
view: func [
"Displays a window face."
view-face [object!]
/new "Creates a new window and returns immediately"
/offset xy [pair!] "Offset of window on screen"
/options opts [block! word!] "Window options [no-title no-border resize]"
/title text [string!] "Window bar title"
/local scr-face
][
scr-face: system/view/screen-face
if find scr-face/pane view-face [return view-face]
either any [new empty? scr-face/pane] [
view-face/text: any [
view-face/text
all [system/script/header system/script/title]
copy ""
]
new: all [not new empty? scr-face/pane]
append scr-face/pane view-face
view-face/feel: window-feel
] [change scr-face/pane view-face]
if offset [view-face/offset: xy]
if options [view-face/options: opts]
if title [view-face/text: text]
show scr-face
if new [do-events]
view-face
]
So the default is the offset of the face you provide. If you use
LAYOUT, inside it (at the beginning) there's:
if not parent [new-face/offset: any [all [offset where]
either all [(system/version/4 = 2) (system/version/5 <= 3)] [25x50] [25x25]
]]
Regards,
Gabriele.
--
Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer
Amiga Group Italia sez. L'Aquila --- SOON: http://www.rebol.it/