955.0.1 XTREE
Fixes:
• | Numeric sort now properly handles (i.e. ignores) spurious formatting characters (currency symbols, thousands separators). |
• | Current row selection and/or cell editing context is no longer lost or changed when columns are sorted. |
• | Windows events are no longer suspended during the loading of the tree. Previously, it would seem to go "dead" while loading a large amount of data, and even an animated progress AVI wouldn't have gone into suspended animation, which sort of defeated the value of the XTR'DELCTLID feature. The XTRA7 sample program illustrates the feature. |
955.0.2 ATE
Fix: Fields containing '&' (e.g. "A&W") now redisplay properly even when INFLD is not using an edit-style control for the redisplay (i.e. when neither |E nor ||C nor |M TYPE codes used.)
955.0.3 XTEXT
Fixes and minor enhancements:
• | Clicking on the Save icon now acts like F3, so can be trapped as exitcode (-3) by setting the &h0004 bit in TXC'FMAPAPP. |
• | Protecting all rows (-1) wasn't protecting the last row if it wasn't terminated with a CRLF. (The XTX1 sample program was also failing to allow a negative value for TXC'PROTROWS field.) |
• | Fix "bungy" scroll bar. |
• | Implement a right-click menu for Cut/Copy/Paste commands. Note that the text for these commands comes from the following items in the SYSMSG.xxx file: |
004,001,Cut
004,002,Copy
004,003,Paste
(If those messages are not defined, the English defaults are used.)
• | Hitting ESC or clicking on the "X" (in popup mode) now prompts the user whether they want to save the changes (if there were any changes). If not, EXITCODE is set to 1 (and indicates that the changes were discarded). If so, EXITCODE is set to 0. If you don't want to be bothered by this confirmation message, you should probably convince your users to use another exit key (such as TAB or ENTER or an F# key). The sample program XTX1 has been updated to indicate that EXITCODE 1 and 10 corresponds to no update at all. |
The text of the message box that prompts the user to confirm whether they want to save or not is taken from the 023,001 entry in SBRMSG.xxx. The title of the message box is taken from the 000,001 entry in APPMSG.xxx (which is meant to be the application name).
955.0.4 XTREE
New feature: ability to display images (JPG, BMP, PCX, TIF, GIF) in cells. Requires the VIC32 add-on imaging library.
To display images, load the column with the image filespecs, and set the column type to "I". In addition, you must specify the following column options:
ImgSiz = Width, Height, Bpp {,Fit} {,Stretch} {,ScaleQ}
ImgCount = IniCount, GrowBy
ImgDir = ImageDirectory
where:
Width and Height define the maximum display size (in pixels). If the XTF_VARY flag is not specified, then every image will be displayed at this size (scaling/stretching as needed). Otherwise, this size just specifies the maximum.
Bpp (Bits Per Pixel) may be set to 1, 8, or 24. If 1 or 8, images with greater depth may be reduced, but the precise details of the color reduction vary according to many external conditions. (For best viewing, use 24.)
Fit only applies when XTF_VARY is set, and causes any image that is smaller than the maximum size to be scaled up until it matches either the maximum width or height.
Stretch only applies when XTF_VARY is set (it is automatic otherwise), and is the same as the Fit option except that the image is stretched as needed to match both the maximum width and height. (The aspect ratio is not preserved.)
ScaleQ causes the resizing logic to use bilinear interpolation, which is slightly slower the default (bit replication) method, but gives better results.
IniCount specifies the number of images to be loaded, and would normally be set to match the Maxcount parameter of XTREE (unless you knew that not all rows would have images).
GrowBy is a clue to the ImageList allocation routine as to how much to let the initial allocation grow by. In most cases, you should just set it to 0 or 1.
ImageDirectory specifies the AMOS or native directory where the images are stored. This allows you to avoid having to specify the directory for each image in each row of the XTREE data. (However, if your images are in different directories, you can still specify the directory with the image name, in which case the ImageDirectory will be ignored.)
For example:
COLDEF="1~32~Image~I~" &
+ "ImgDir=c:\my documents\my images~" &
+ "ImgSiz=160,120,24,fit,scaleq~" &
+ "ImgCount=100,1~~"
The above column definition specifies that positions 1 thru 22 of each arrow item contain an image filespec, which will be assumed to be in the directory "c:\my documents\my images". The maximum display size for the images will be 160 pixels by 120 pixels, using 24 bit color, and maximum quality scaling. We allocate space for 100 images, with possible expansion by one at a time.
Normally, the images will occupy cells by themselves, but you can also include text in the cell with the image by appending the desired text to the image filespec, separated by a comma. For example, if the cell data was:
myimage.jpg, display text
then the cell would display the image (myimage.jpg), with the text ("display text") to the right of it. (Currently there is no option to put the text to the left of the image but it may be added if there is a demand.)
A new sample program, XTRA7 in [908,21] has been added to illustrate image display. It presents a standard File Open (multi-select) dialog from which you can select up to 100 images to be displayed in an XTREE. The XTREE also contains an editable column for you to enter descriptions of the images, and has an option to save the data to a CSV file and reload it later, plus an option to show text in the image cells.
955.0.5 XTREE
New feature: left/right click instant exit, enabled fix a new Advanced COLDEF option:
ClickExit=<lclick exitcode>,<rclick exitcode>
Where each value is a positive or negative integer. If zero, then that type of click is ignored.
The XTR'XROW and XTR'XCOL parameters return the coordinates of the clicked cell.
Examples:
! left click -> EXITCODE -88, right click -> EXITCODE -89
COLDEF="25~9~ID~S~ClickExit=-88,-89~~"
! left click ignored, right click -> EXITCODE -89
COLDEF="25~9~ID~S~ClickExit=0,-89~~"
! left click -> EXITCODE -88, right click -> EXITCODE +88
COLDEF="25~9~ID~S~ClickExit=-88,88~~"
The sample program XTRA7 has been enhanced to illustrate this; if you click on an image, it pops up a dialog with a larger version of the image and displays the image size information.
The sample program XTRA5 also now supports clicking on the description column to exit.
955.0.6 XTREE
New feature: Combo boxes.
Combo boxes are very similar to standard editable text cells. To specify, use the column code "l", either with or without the "E" (editable cell). If "El" are used together, the combo box will permit entry of arbitrary values. Otherwise "l" by itself only allows you to select from existing values. To define the values, add the following clause to that column definition:
List=item1,item2,item3,....itemn
or
List=...
For example:
COLDEF = COLDEF + "9~13~Status~SEl~" &
+ "List=Virgin, Extra Virgin, Not so Virgin~~"
This would define a column that the user can type anything into, or select from the three pre-programmed choices in the combo box.
When list is set to "...", you get a "self-service" combo, meaning that it simply exits with EXITCODE=29 when you try to scroll or display the combo contents. This allows the application to present a more complex set of choices than can be easily handled in the with the internal combo.
The XTRA5 sample program has been enhanced to illustrate the various combo box options.
955.0.7 XTREE
New feature: row foreground colors using custom RGB definitions (rather than A-Shell palette color numbers).
Use column code "C" or "c" (as before), but instead of putting a numeric palette index value (0-15) in the cell, put an alphabetic character (A-P).
custom RGB colors defined by RGBbg or RGBfg commands (using the syntax described below for defining custom row background colors), by setting the column data to a character A-P rather than to a numeric value. The numeric values continue to reference A-Shell palette colors, while alphabetic values reference previously defined RGBbg/RGBfg values.
The XTRA3 sample program was updated to illustrate this technique.
955.0.8 XTREE
Enhancement: Multi-selection mode is now supported in combination with editable cells and checkboxes. Previously, trees containing editable cells and checkboxes had to be single-selection. When using multi-selection in conjunction with editable cells, insert a one-byte column at the start of the ANSWER array to receive the selection flags.
For example, in a single-selection tree containing 2 editable checkboxes and an editable text cell, your ANSWER array might be defined as follows:
MAP1 ANSWERX
MAP2 ANSARY(100)
MAP3 CB'1,S,1 ! 1st checkbox
MAP3 CB'2,S,1 ! 2nd checkbox
MAP3 TEXT'3,S,22 ! editable text column
To allow multi-selection, specify the XTF_MSEL flag and insert another column in the ANSWER array, as shown here:
MAP1 ANSWERX
MAP2 ANSARY(100)
MAP3 SELECT,S,1 ! Selection flags (must be 1st)
MAP3 CB'1,S,1 ! 1st checkbox
MAP3 CB'2,S,1 ! 2nd checkbox
MAP3 TEXT'3,S,22 ! editable text column
A new sample program, XTRA5M, has been added to the EXLIB sample programs to illustrate this. It is the same as XTRA5 but modified for multi-select.
955.0.9 XTREE
New feature: Column-specific popup menus. As before, you define a popup (aka "right click") menu using the PopupMenu= option associated with a pseudo (zero) column. To define a column-specific popup menu, use the same syntax, but add the PopupMenu option to the definition of the corresponding real column.
If there is a PopupMenu defined for the specific column, then it will replace the PopupMenu defined for all the columns, UNLESS the definition of the column-specific PopupMenu begins with a "+". In that case, the column-specific definition is APPENDED to the default PopupMenu definition for that column.
For example, the following defines one popup menu to be used for all columns, plus two columns, each of which has its own PopupMenu. The first one appends to the shared PopupMenu, while the second one replaces it entirely:
! Shared (default) popup menu (for all columns)
COLDEF = "0~0~x~H~PopupMenu=" &
+ "Shared Menu Item 1,VK_xF501;Shared Menu Item 2,VK_xF502~~"
! This column appends its own popup menu to shared one above
COLDEF = COLDEF + "1~10~State~S~PopupMenu=+" &
+ "-------,;State Menu Item 1,VK_xF510~~"
! This column has its own popup menu, replacing shared one above
COLDEF = COLDEF + "1~10~City~S~PopupMenu=" &
+ "City Menu Item 1,VK_xF520;City Menu Item 2,VK_xF521~~"
See the XTRA2 sample program which defines custom menus for the State and Country columns.
Note that when adding COLDEF options to existing programs, you may need to increase the size of your COLDEF string. (You can get weird results if you don't.)
This update also raises the maximum limits for the length of a PopupMenu definition from 256 to about 3000, and of the entire COLDEF parameter from 1536 to about 3000.
955.0.10 XTREE
Enhancement: Rows with distinctive special foreground colors may now retain their distinctiveness even when the row is selected, by adding the COLDEF column type modifier "!" to the "C" or "c". (Normally, the text in selected rows appears white, making it impossible to tell if the row originally had a custom color or not.) If the custom FG color appears "too close" to the BG color of the selection bar (generally blue), then XTREE will display the text of the selected item in black, which should contrast with the selection bar while still making it clear that the row had a different color than the standard rows.
Note that it there is not an exact science for determining how close is "too close", so you may sometimes end up with row foreground colors that do not have a lot of contrast against the selection bar. (To make rows stand out, you might want to instead use the new row background color feature, described below.)
955.0.11 XTREE
New feature: Custom background row colors. (Previously you could only set the foreground color of a row, and you could only set it to one of the A-Shell palette colors.) To allow this, the RGBbg option in the advanced COLDEF syntax now supports an optional 4th argument (idx) which may be set to an upper case character from A-P, e.g.:
RGBbg=220,199,239,A
Since RGBbg is otherwise used to set the background color for a column, if you just want to use it to define a row background color, use the RGBbg parameter with a "zero" column, i.e.:
COLDEF = COLDEF + "0~0~x~H~RGBbg=220,201,244,E~~"
The above defines a background color made up of RGB values 220,201,244 and assigns it to the index "E", but doesn't apply it to any column.
To reference the defined color, create a column using the new column code "b", i.e.:
COLDEF = COLDEF + "6~1~ColorBG~bH~~"
The above defines a column one character wide that will be hidden (H) and thus the title will not show, but the column will be used to contain a reference to a defined RGBbg value (b).
Finally, if the column contains a character in the range of A-P, it will be used to locate the associated background color definition which will be applied to the entire row.
(If you prefer to use numeric digits in the color column data to reference the predefined RGB color, digits 0-9 will be interpreted as equivalent to letters A-J.)
You can also add the 4th argument to RGBfg definitions, if you want to reuse that color for a row background color.
The sample program XTRA2 was modified to give the top level rows each a different background color.
955.0.12 XTREE
New feature: ability to give individual cells custom background colors. The concept is similar to the row color described above, except:
• | The column code is B instead of b |
• | The column may also contain other data following the color idx character (which must be the first character in the column). |
• | You won't want to use the H code to hide the column. (That would defeat the purpose.) |
For example, consider the following column definition:
COLDEF = COLDEF + "25~10~Price~#~~"
This defines a numeric column 10 characters wide and with the title "Price". If you wanted to be able to highlight certain cells in this column (perhaps to indicate a sale price), you could change the definition as follows:
COLDEF = COLDEF + "25~11~Price~#B~~"
Then, as we have expanded the column by one, you would need to insert an extra character at the start of each item for that column. For normal cells, the extra character would be blank. But for cells you wanted to have a special background color, you would insert the color index character (A-P) at the start of the column (and make sure that the color was defined with an RGBbg (or RGBfg) clause, either for this column or for any other column.)
955.0.13 ATE
Fixes:
• | Wallpaper was leaving a one-pixel high transparent strip just under the menu bar which allowed the desktop to bleed through. |
• | ALT+key was generating a beep even when the accelerator character was recognized by A-Shell. Now it only beeps if unrecognized by A-Shell and Windows. |
• | CMD/DO file silent mode (:S) was being cleared after most commands. |
• | AUTOTPRINT no longer acts on output strings starting with ESC. (This was causing all ZTERM ESC sequences to fail when AUTOTPRINT on.) |
955.0.14 ATE
Minor wallpaper enhancements: non-destructive save/restore and auto-save on load.
Normally, the wallpaper save and restore operations are destructive in the sense that "save" clears the current wallpaper, and an attempt to restore when there is no saved wallpaper will effectively delete the current wallpaper. To accommodate applications that want to be able to issue redundant save and restore operations, you can now add 4 to the OP parameter in the TAB(-10,39) statement, i.e.:
Load wallpaper:
? TAB(-10,39);SPEC$;",0";chr(127);
Delete current wallpaper:
? TAB(-10,39);",0";chr(127);
Save (and then clear) wallpaper:
? TAB(-10,39);",1";chr(127);
Save (but don't clear) wallpaper:
? TAB(-10,39);",5";chr(127);
Restore wallpaper; clear saved copy from memory:
? TAB(-10,39);",2";chr(127);
Restore wallpaper only if there is saved wallpaper:
? TAB(-10,39);",6";chr(127);
The "load" command now also automatically "saves" a copy if there is not already a saved copy. Thus you could can now do a load followed by a restore without a save.
Buried somewhere in the motivation for this is the fact that restoring a previously saved wallpaper is much faster than re-loading it from disk.
955.0.15 COMIO
Enhancements:
• | COM ports beyond COM9 are now supported |
• | Read/write errors now logged to ashlog.log |
• | Two new optional parameters added (MSG and TIMEOUT): |
xcall COMIO, opcode, ch, buffer, status, count {,msg {,timeout}}
msg (string)
returns the text of the Windows error message if an error occurs. (The text will be truncated to fit, but for best results map MSG of 80+ characters). If no error, then MSG will be "".
timeout (numeric)
may be used to set a timeout for the read and write operations. This is particularly useful when reading with the option to read until CR or LF, since if the data ends without sending a CR or LF, you could be stuck waiting forever. If timeout occurs, the MSG parameter will be set to "TIME". The STATUS and COUNT parameters may or may not indicate an error, so when using the TIMEOUT option, you should always check the MSG parameter for "TIME".
955.0.16 IMAGE.SBR / AUI_IMAGE
Enhancements:
• | Opcode 5 (get image info) now supports and option to read the info from the image file on disk. (Previously you had to open it first). |
xcall IMAGE, 5, handle, status, imginfo {,filespec}
filespec is used if handle is zero.
• | XCALL AUI, AUI_IMAGE now supports opcode 5: |
xcall AUI, AUI_IMAGE, 5, handle, status, imginfo {,filespec}