CHANGES TO REBOL/VIEW FOR BETA 4.1 ---------------------------------- Version: 0.9.9 Date: 31-May-2000 REBOL Technologies Subject to Change VID CHANGES Styles are now local and a style sheet is returned from stylize function. This style sheet can be provided to a layout with the STYLES word. This was needed to prevent use of global styles in applications, which would become a problem as REBOL grows. In addition, a style can be defined within the layout itself using the STYLE word. For example: some-styles: stylize [thin-button button [size: 100x10]] view layout [styles some-styles thin-button "Hello" [unview/all]] The primary attributes of a style can be modified from the specification of the style in the layout. For instance, you can simply specify a FONT or PARA. This change required the deletion of the PARA word as a STYLE, reverting to the previous TEXT word. LABEL is now what was TEXT in Beta 4. For example: view layout [ size 200x200 backdrop effect [gradient 1x0 255.255.255 0.0.0] text "Some text" para [origin: 10x50] font [color: 0.0.0] ] In layouts, the ACROSS and BELOW words will cause a return when changing from one to the other. This is to help produce better layouts for most uses. New VID style: ANIM, a generic animation style. ANIM takes as additional specifier words: FRAMES and RATE. FRAMES is followed by a block of image files which are loaded and automatically animated in sequence. RATE is followed by the desired the animation rate. For example: view layout [ anim frames [ %pic.jpg %pic2.jpg %pic3.jpg ] rate 12 ] LIST styles have been extended so that they accept these additional specifiers: DATA and MAP. DATA is followed by a nested block of data which is the data used to fill in the list. If an item in the data block is a file, by default this file will be loaded into the image field of the corresponding list template style. Otherwise the data item goes into the respective list template style's text field. To change this default behavior the specifier MAP can be provided. Following MAP is a block of words which map the data to different face fields in the respective template styles. For example: view layout [ LIST 200x200 [ across text text ] data [ [%bay.jpg %bay.jpg] ["Text" 2] ] map [text image] ] Using ^C to copy-text from fields has been fixed. CLEAR-FIELDS function added - clears all text fields in the layout passed to the function as an argument. Popup functions have been renamed to be more consistent with rest of REBOL/View naming: show-popup was open-popup, hide-popup was close-popup. VIEW CHANGES Default view fonts names for AmigaOS have been changed to "CGTimes","CGTriumvirate", "LetterGothic". These natives have been added to ease development of text editors in REBOL/view: CARET-TO-OFFSET - Converts text offset to xy pair OFFSET-TO-CARET - Converts xy pair to text offset TEXTINFO - Provides information about a given line of text within a face. TEXTINFO is used with the system/view/line-info object which contains the fields to be populated. The information returned by TEXTINFO is useful for knowing where the cursor might go if a user pressed up to move up a line in a field containing many lines of wrapped text. View text handling major restructing. The restructuring should result in great speed improvements in text rendering for all REBOL/view platforms. VIEW INSTALLATION CHANGES A .rebol file is written during UNIX install. This file records the product-install-path and product version information. The UNIX install now operates better on custom installs (no env var settings needed). CORE LEVEL CHANGES MAKE-DIR has an additional refinement: /deep. MAKE-DIR/deep will attempt to create the entire path structure given as an argument if that path does not exist. If MAKE-DIR fails, all directories that were created up to the directory that caused the failure will be removed. For example: MAKE-DIR/deep %some/long/path/name/ LOAD/next %file.r now will not load in the header of a script. LOAD/next on a script will return a block containing the word REBOL followed by the rest of the script as a string advanced to right after the word REBOL (right before the header block). LOAD/next/header %file.r will load the header from a script. LOAD/next/header will search through a string until it finds the next header. Some examples: LOAD/next %script.r == [REBOL { [ Title: ... etc }] LOAD/next/header %script == [ make object! [Title: "script" ...] { rest-of-script ... } ] ] The rest of LOAD and her refinements remain the same in their behavior. SPLIT-PATH has been slightly modified to be more consistent in its results. You can now QUERY an object. QUERY will return a block containing the fields that have been modified in an object since its creation or since it was last passed to QUERY/clear. QUERY will return none if there have not been any changed fields. QUERY/clear will clear the modified state of all the fields in an object. QUERY on an object is not recursive. QUERY on a top level object will not report if something has changed in a sub-object. NETWORKING CHANGES The recent reported network errors have been fixed. Support for asynchronous TCP DNS lookups in Windows has been added. Sending data through a TCP connection now uses non-blocking i/o and thus can be interrupted by the escape key.