Jump to content

Rebol Programming/inform

From Wikibooks, open books for an open world

USAGE:

[edit | edit source]
INFORM panel /offset where /title ttl /timeout time 

DESCRIPTION:

[edit | edit source]

Display an exclusive focus panel for alerts, dialogs, and requestors.

INFORM is a function value.

ARGUMENTS:

[edit | edit source]
  • panel -- (Type: object)

REFINEMENTS:

[edit | edit source]
  • /offset
    • where -- Offset of panel (Type: pair)
  • /title
    • ttl -- Dialog window title (Type: string)
  • /timeout
    • time -- (Type: any)

SOURCE CODE

[edit | edit source]
inform: func [
    {Display an exclusive focus panel for alerts, dialogs, and requestors.} 
    panel [object!] 
    /offset where [pair!] "Offset of panel" 
    /title ttl [string!] "Dialog window title" 
    /timeout time
][
    panel/text: copy any [ttl "Dialog"] 
    panel/offset: either offset [where] [system/view/screen-face/size - panel/size / 2] 
    panel/feel: system/view/window-feel 
    show-popup panel 
    either time [if none? wait time [hide-popup/timeout]] [do-events]
]