[Contents] [Intro] [Reference] [Tutorial] [Questions [New [Index]
Overview -> Reference -> API Reference -> Commands of Category Window

daVinci API Definition - Window Commands

On this page, API commands of the window category are described. This category covers all commands to manipulate windows in daVinci. The commands of this category are enclosed by keyword window(...). Click here to get an overview of all API commands.

window(title(string))

Sets the title of the base window to string. A string "daVinci V2.1 - " is a permanent prefix of all window titles and cannot be changed. In multi-view and multi-window mode, this operation will affect all views of the current context.

window(show_message(string))

Displays a message string in the left footer area of the base window. This command should be used to show temporal information such as "saving done". For permanent messages, command window(show_status(...)) should be used instead. In multi-view and multi-window mode, this operation will affect all views of the current context.

window(show_status(string))

Displays a message string in the right footer area of the base window. This command should be used to show permanent informations such as a current status. For temporal messages, command window(show_message(...)) should be used instead. In multi-view and multi-window mode, this operation will affect all views of the current context.

window(position(integer,integer))

Sets the x/y position of the base window to the given values. The first integer is the new x-coordinate, the second is the new y-coordinate of the window. Do not use negative values or values larger than the screen. In multi-view mode, this operation will only affect the master view of the current context.

window(size(integer,integer))

Sets the width and height of the base window to the given values. The first integer is the new width, the second is the new height of the window. Do not use negative values or values larger than the screen. In multi-view mode, this operation will only affect the master view of the current context.

window(raise)

Raises the
base window to the front such that it lays on top of all the other windows. In multi-view mode, this operation will only affect the master view of the current context.

window(iconify)

Iconifies the
base window. The inverse command is window(deiconify). In multi-view and multi-window mode, this operation will affect all views of the current context.

window(deiconify)

Deiconifies the
base window. The inverse command is window(iconify). In multi-view and multi-window mode, this operation will affect all views of the current context.

window(activate)

Enables user input in daVinci again after this has been disabled before with command
window(deactivate). In multi-graph and multi-view mode, this operation will affect all opened windows of daVinci and not only the views of the current context.

window(deactivate)

Disables all user input in daVinci. This will deactivate the whole system, such that the user is not able to do anything in daVinci, and no answers are sent to the application until it will be enabled again with command
window(activate). In multi-graph and multi-view mode, this operation will affect all opened windows of daVinci and not only the views of the current context.

window(file_browser(boolean,string,string,string,string,btypes,boolean))

-> Returns answer browser_answer(...)!

By using this command, the application has the opportunity to use daVinci's file browser for its own purpose. This file browser does not start any operation in daVinci after the user has selected a file. Instead, the selected file (and type) is returned to the application by sending answer browser_answer(...). Due to the manifold features of the daVinci file browser, the application need to specify several parameters which have the following semantic:

  1. boolean (first one)
    Flag for opening a file. Should be true if the browser is used to open a file, false otherwise. There are two differences between an opening and saving browser: The opening browser does not ask the user with a confirm window if the selected file exist (which is done by the saving browser to avoid accidental overwriting) and the opening browser does not allow to choose a not existing file (whereas the saving browser does).

  2. string (first one)
    Window title of the file browser.

  3. string (second one)
    Short label text of the left activation button that is responsible for closing the browser. Should be usually "Open", "Save" or something like that.

  4. string (third one)
    Initial directory of the browser. If empty (i.e. ""), the home directory of the user is used as default.

  5. string (forth one)
    Initial file of the browser in the initial directory, may be empty (i.e. ""). The entry of the selection field of the browser at start-up will be composed of the initial directory and the initial file.

  6. btypes
    This list specifies the types (i.e. file patterns), available in the Types menu of the browser. The list need to have at least one entry to retrieve the default type of the browser which is always the first type of the list. An empty list is not allowed and will force an error. The elements of list btypes are three-tuples with the following syntax:

    bt(string,string,string)

    1. string: A plain text description of the type, e.g. "PostScript Files"
    2. string: The pattern for the type in shell notation, e.g. "*.ps"
    3. string: An optional postfix for the window header, e.g. "PostScript"

    The header postfix (3. string) will be added to the window title of the browser each time the particular type is selected by the user. So, if the window has title "Save" and there are two types with postfix "X" and "Y", then the title of the browser will be either "Save X" or "Save Y". For example, here is a valid btypes parameter for a browser with a C pattern and a generic pattern for all files:

    [bt("C Files","*.c","C"),bt("All Files,"*","")]

  7. boolean (second one)
    Flag to show hidden files initially. Should be usually false to filter the hidden files. The user will be able to modify this setting at any time by using the Show hidden check button of the browser.
The application file browser is modal, in opposite to the file browsers used by daVinci. So, after opening an application file browser, all user interaction in daVinci will be disabled until the browser is closed by the user. At this time, the application will be informed about the selected file with API answer browser_answer(string,string), whereby the first string is the absolute file name of the selected file and the second string is the plain text of the selected type (i.e. the first string of the corresponding bt(...) three-tuple). Both strings are empty if the user has canceled the file browser.


daVinci V2.1 Online Documentation - Page update: June 15, 1998