跳轉到內容

Rebol 程式設計/dump-face

來自華夏公益教科書
DUMP-FACE face 

列印整個窗格的介面資訊。(用於除錯)

DUMP-FACE 是一個函式值。

  • 介面 -- (型別:物件)

原始碼

[編輯 | 編輯原始碼]
dump-face: func [
    "Print face info for entire pane. (for debugging)" 
    face [object!] 
    /local depth style
][
    depth: "" 
    print [depth "Style:" all [in face 'style face/style] "Offset:" face/offset "Size:" face/size 
        "Text:" if face/text [copy/part form face/text 20]
    ] 
    insert depth tab 
    if object? face/pane [dump-face face/pane] 
    if block? face/pane [foreach f face/pane [dump-face f]] 
    remove depth
]
華夏公益教科書