Manual
API Window CommandsOn this page, API commands of the window category are described. This category covers all commands to manipulate uDraw(Graph) base windows. In multi-view mode, when one graph is shown in many base windows, some of the commands of this category are only applied to the master view which is the oldest view. Use the multi-window mode in order to manipulate any view/base window of a context. 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 permanent prefix "uDraw(Graph) 3.1 - " is used in the title which cannot be changed. In multi-view and multi-window mode, this operation affects all views of the current context. window(show_message(lang_string))Displays a message "string" in the left footer area of the base window. This command should be used to show temporary information, for example to inform the used about success of an operation. For permanent messages, command window(show_status(...)) should be used instead. The left footer area is also used by uDraw(Graph) to show system information, so it is possible that the messages supplied here are overwritten. In multi-view and multi-window mode, this operation affects all views of the current context. The parameter "string" can be a language key starting with "#%..." to use the internationalization feature for multilingual interfaces. window(show_status(lang_string))Displays a message "string" in the right footer area of the base window. This command should be used to show permanent information like the current status. For temporary information, command window(show_message(...)) should be used instead. The right footer area is not used by uDraw(Graph) to show system information. In multi-view and multi-window mode, this operation affects all views of the current context. The parameter "string" can be a language key starting with "#%..." to use the internationalization feature for multilingual interfaces. window(position(integer,integer))Sets the origin (i.e. upper left corner) of the base window to the given coordinates, where the first "integer" is the new x coordinate (in pixel) and the second is the new y coordinate. 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, where the first "integer" is the new window width (in pixel) and the second is the new height. 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, so it will disappear, but is still available by an iconic symbol. To undo this command, use window(deiconify). In multi-view and multi-window mode, this operation affects all views of the current context. window(deiconify)Deiconifies the base window, so it will appear again if it was iconified before. To undo this command, use window(iconify). In multi-view and multi-window mode, this operation affects all views of the current context. window(deactivate)Disables all user input in uDraw(Graph). This will affect the whole system, especially all views/windows of all contexts in multi-graph mode. After disabling the windows, the user is unable to manipulate any element of the user interface, so no event answers are sent to the application until the windows will be enabled again with command window(activate). window(activate)Enables the user input in uDraw(Graph) again after this has been disabled before with window(deactivate). Even in multi-graph, multi-view and multi-window mode, the whole system is affected by this command and not only the views/windows of the current context. window(background(string))Sets the background of the base window to the color specified by parameter "string". This is a RGB value like "#0f331e" in the same format as used for command-line option -graphbg. window(file_browser(boolean,lang_string,lang_string,string,string,btypes,boolean))Note: This command returns the answer browser_answer instead of the usual answer ok! With this command, the application can use the uDraw(Graph) file browser for its own purpose (on Microsoft® platforms, this command will show the native Windows® file browser and on Mac OS® X platforms, this will show the native Mac OS® file browser which does not have all the features described below). This file browser does not start any operation in uDraw(Graph) after the user has selected a file. Instead, the selected file (and chosen type) is returned to the application by sending answer browser_answer. Due to the manifold features of the file browser, the application has to specify several parameters with the following semantic:
In opposite to the file browsers used by uDraw(Graph), the file browser available with this command is modal (i.e. it will block all user input in any other uDraw(Graph) window), until it is closed by the user. At this time, the application will be informed about the selected file with API answer browser_answer(string,string), where the first "string" is the absolute file name of the selected file and the second "string" is the plain text of the current type selected in the browser (i.e. the first parameter of the "bt" list elements in the example shown above). Both strings are empty when the user has canceled the file browser. |
||