1. New Features
--------------- 1.1 COMBOBOX and LISTBOX user controls are now implemented. 1.1.1 The syntax to specify a COMBOBOX control with the 'Ctl' keyword is: Ctl[n]: COMBOBOX ( <combobox_style>, ...), <other_control_subkeys>... where the possible <combobox_style>'s are: DROPDOWNLIST Specifies a combo box consisting of a static text control with a drop-down list box which is normally closed up. This is the default style for a COMBOBOX control. DROPDOWN Specifies a combo box consisting of an edit control with a drop-down list box which is normally closed up. (Not yet fully supported.) SIMPLE Specifies a combo box consisting of an edit control atop a permanently dropped-down list box. (Not yet fully supported.) SORT Specifies that the strings in the list box are to be alphanumerically sorted. EXTENDEDUI Specifies that the combo box will use an alternate keyboard user interface, in which the down arrow drops the list box down and moves the selection, and Enter selects the current list item. With the default keyboard interface, F4 opens and closes the drop- down list, and the cursor navigation keys immediately select a list item. AUTOHSCROLL Specifies that the edit control will automatically scroll horizontally to accommodate more characters than can fit in the width of the edit control window. Applies only to SIMPLE and DROPDOWN combo boxes. HSCROLL Specifies that the list box will have a horizontal scrollbar if necessary. VSCROLL Specifies that the list box will have a vertical scrollbar if necessary. DISABLENOSCROLL Specifies that scrollbars in the list box are to be grayed out rather than removed when the number of items in the list box is less than needed to require scrolling. By default, a vertical or horizontal scrollbar is removed entirely if not required to scroll the entire list box contents into view. INTEGRALHEIGHT Specifies that the height of the list box will be adjusted to accommodate an integral number of list items. This is the default. NOINTEGRALHEIGHT Specifies that the height of the list box will be exactly as specified by the 'Size' subkey, and a partial item may be displayed at the bottom of the list box, UPPERCASE Specifies that all strings in the list box are to be converted to upper case. LOWERCASE Specifies that all strings in the list box are to be converted to lower case. OEMCONVERT Specifies that the string in the edit control is to be converted to the OEM character set and then back to the Windows character set to force the string to contain only characters that are legitimate in the OEM character set. This is useful for restricting the character set of file names and path names. Applies only to SIMPLE and DROPDOWN combo boxes. OWNERDRAWFIXED Specifies that the list items are of fixed height, and will be drawn by the FD. (Not yet supported.) OWNERDRAWVARIABLE Specifies that the list items are of variable height, and will be drawn by the FD. (Not yet supported.) HASSTRINGS Specifies that the list items in an owner-drawn list box consist of strings which are to be stored by the combo box control. (Not yet supported.) BORDER Places various styles of borders around the combo box CLIENTEDGE control. STATICEDGE MODALFRAME TABSTOP Sets a tab stop on this control. GROUP Marks this control as the first (or one past the last) in a group of controls. ACCEPTFILES Specifies that the control will accept a set of dragged- and-dropped file names. (Not yet supported.) TRANSPARENT (Not yet supported.) RIGHTALIGNEDTEXT RTLREADING LTRREADING 1.1.2 The syntax to specify a LISTBOX control with the 'Ctl' keyword is: Ctl[n]: LISTBOX ( <listbox_style>, ...), <other_control_subkeys>... where the possible <listbox_style>'s are: SORT Specifies that the strings in the list box are to be alphanumerically sorted. MULTIPLESEL Specifies that multiple items may be selected simultaneously in the list box. Items are selected or deselected by clicking or double-clicking. (Not fully supported.) By default, only one item may be selected at a time. EXTENDEDSEL Specifies that multiple items may be selected simultaneously in the list box. Individual items are selected or deselected by CTRL-clicking on them. A range of items may be selected by SHIFT-clicking or using the SHIFT-navigation keys. (Not fully supported.) By default, only one item may be selected at a time. NOSEL Specifies that items in the list box cannot be selected. Clicking an item will result in an OnCtl() handler event, but the item will not be selected. (Not fully supported.) MULTICOLUMN Specifies that the items in the list box may be arranged in multiple columns, which can be scrolled horizontally. HSCROLL Specifies that the list box will have a horizontal scrollbar if necessary. VSCROLL Specifies that the list box will have a vertical scrollbar if necessary. DISABLENOSCROLL Specifies that scrollbars in the list box are to be grayed out rather than removed when the number of items in the list box is less than needed to require scrolling. By default, a vertical or horizontal scrollbar is removed entirely if not required to scroll the entire list box contents into view. USETABSTOPS Specifies that tabs in string items will be expanded. By default, tab stops are set every 32 DBUs. INTEGRALHEIGHT Specifies that the height of the list box will be adjusted to accommodate an integral number of list items. This is the default. NOINTEGRALHEIGHT Specifies that the height of the list box will be exactly as specified by the 'Size' subkey, and a partial item may be displayed at the bottom of the list box, OWNERDRAWFIXED Specifies that the list items are of fixed height, and will be drawn by the FD. (Not yet supported.) OWNERDRAWVARIABLE Specifies that the list items are of variable height, and will be drawn by the FD. (Not yet supported.) HASSTRINGS Specifies that the list items in an owner-drawn list box consist of strings which are to be stored by the combo box control. (Not yet supported.) BORDER Places various styles of borders around the list box CLIENTEDGE control. By default, the list box has no border; STATICEDGE the BORDER style is recommended. MODALFRAME TABSTOP Sets a tab stop on this control. GROUP Marks this control as the first (or one past the last) in a group of controls. ACCEPTFILES Specifies that the control will accept a set of dragged- and-dropped file names. (Not yet supported.) TRANSPARENT (Not yet supported.) RIGHTALIGNEDTEXT RTLREADING LTRREADING 1.1.3 To populate a list box or combo box control with an initial set of strings, specify the ['text' = ] "<string_list>" subkey, where <string_list> is the desired set of strings, separated by newline ('\n') characters. For example, to populate a list box with the names of the following five cities: Atlanta San Francisco Berlin Mexico City Paris use: text="Atlanta\nSan Francisco\nBerlin\nMexico City\nParis" as the (initial) text string for the list box control. Note: The total length of the text string is currently limited to 1023 characters, including one character for each newline ('\n') item separator. For example, this accommodates a list of approximately 102 items where each item has an average width of 9 characters (plus one character for the '\n' separator). If the length of the text string exceeds 1023, it will be truncated to 1023 characters without warning. 1.1.4 The value of a COMBOBOX or LISTBOX control (as returned by the ctl(n) or getCtlVal(n) function) is the zero-based index of the currently selected item, or -1 if no items are currently selected. The value of a LISTBOX control with the MULTIPLESEL or EXTENDEDSEL style is not defined (i.e., these styles are not yet supported). The value of a COMBOBOX control with the SIMPLE or DROPDOWN style is undefined if the user types a value in the edit control window (i.e., these styles are not yet fully supported). Note: If the COMBOBOX or LISTBOX control has the SORT style, then the value of the control is the zero-based index of the item in the sorted list, which is not necessarily the same as the index of the item in the text string that was used to initialize the list. 1.1.5 The current selection in a COMBOBOX or LISTBOX control may be set programmatically by calling setCtlVal(n, index), where 'index' is the zero-based index of the item to be selected, or -1 to deselect all items in the list. For a LISTBOX with the MULTIPLESEL or EXTENDEDSEL style, you can select only one item at a time by calling setCtlVal(). It is not currently possible to make multiple selections programmatically (i.e., these styles are not yet fully supported). Note: If the COMBOBOX or LISTBOX control has the SORT style, then the index of the item to be selected is the zero-based index of the item in the sorted list, which is not necessarily the same as the index of the item in the text string that was used to initialize the list. 1.1.6 The default action for a COMBOBOX or LISTBOX control is action=NONE. If you want to run the filter code immediately when an item is selected, specify action=PREVIEW in the Ctl(n) key definition. 2. Changes ---------- 2.1 The evaluation of the sqr() integer square root function has been sped up, and is now approximately twice as fast as the Filter Factory's implementation. Many thanks to Michael Johannhanwahr, who pointed me to a "fast" integer algorithm. It turns out that, at least for a 200 MHz Pentium, this fast integer algorithm is actually a bit slower than using the Pentium FPU FSQRT instruction (including the conversion from integer to floating-point and back). However, further research turned up an algorithm by Ben Discoe (rodent@netcom.COM) at Microsoft, which basically unrolls the loop in the integer algorithm above to achieve a speed significantly faster than the Pentium FPU, even when called as a closed routine instead of generating in-line code. (Of course, these timing results apply only to a 200 MHz Pentium -- your mileage may vary -- but I believe they are a useful indication across most of the P5 and P6 line.) Note: The c2m(x,y) function also benefits from the speed-up in the integer square root algorithm, but is still significantly slower than the Filter Factory implementation. I finally broke down and disassembled parts of FF, and discovered that FF precomputes tables for both c2m(x,y) and c2d(x,y). The trick is that the tables are computed based on the ratio of x to y, where x <= y. The c2d() function, of course, depends only on this ratio; and the function c2m(x,y) may be computed as: c2m(x,y) = c2m(x/y,1) * y, where x <= y. I will probably implement this optimization in one of the next few FM releases. 2.2 The sqr() function is now polymorphic. When called with an integer argument, it computes the integer square root (by calling the integer square root routine described in 2.1 above). When called with a floating-point argument, it returns the floating-point square root (by generating an in-line FSQRT instruction). 2.3 The default dialog background image mode is now 'TILED' instead of 'EXACT'. In most cases, the FD should use either 'TILED' or 'STRETCHED' as the dialog background image mode. The 'EXACT' mode can be problematic, and should be used only in special circumstances. 2.4 FM now recognizes the following additional manifest constants: DIM_EXACT Used in a call to setDialogImageMode to specify 'EXACT' mode. DIM_TILED Used in a call to setDialogImageMode to specify 'TILED' mode. DIM_STRETCHED Used in a call to setDialogImageMode to specify 'TILED' mode. CTP_EXTENDEDUI Used in a call to set/clearCtlProperties to specified the extended keyboard user interface for a combo box control. BLACKONWHITE Used as the second argument to setDialogImageMode WHITEONBLACK to specify the stretch mode when the first argument COLORONCOLOR is DIM_STRETCHED. HALFTONE MAXSTRETCHBLTMODE STRETCH_ANDSCANS STRETCH_ORSCANS STRETCH_DELETESCANS STRETCH_HALFTONE 3. Bug Fixes ------------ 3.1 A race condition that could occur after pressing the 'Compile' button has been ameliorated by introducing a 10 millisecond delay between the time the user interface is drawn and the filter code is first run. The symptom of the race condition is that the user interface might be only partially drawn before the filter code begins to run, in which case the user interface would not finish drawing until after the filter code was executed. This problem may still occur, but should be much rarer. If it becomes a problem again, we can increase the delay or seek another solution. 3.2 In Advanced Edit Mode, toggling the 'Use inlines' checkbox did not force a complete recompile, just a new code generation pass. However, the 'Use inlines' flag is processed in the parse phase, not the code generation phase, so the new setting of 'Use inlines' was not properly recognized. This bug has now been fixed: toggling 'Use inlines' will now force a complete recompile. 3.3 A problem which could cause a GPF within Photoshop's MMXCORE or FASTCORE module has been fixed, However, there may still be some situations in which the GPF can occur, mainly while previewing large (~30MB) images with the Advanced Mode 'Proxy big gulp' option in effect. To aid problem analysis, three temporary error messages have been added to FM. If you get a FilterMeister error message box with any of the following messages, please record the details and send them to me: a) "Big gulp failed. AdvanceState returned n" where n is a decimal error code. (This is not actually an error, just a warning; execution may still proceed correctly. Turning off the 'Proxy big gulp' option should eliminate this message, but preview dragging will be slower.) b) "Not enough memory to generate a preview image at this zoom level." In this case, execution cannot proceed; try using a smaller proxy preview zoom level, or increase available memory. c) "Unknown error (n) while trying to generate a preview image." where n is a decimal error code. A mystery case; please send me the details, including the value of the error code. 4. Known Problems ----------------- 4.1 The 'bool' data type is not yet fully supported. This can lead to unwarranted error messages when using the Boolean constants "true" and "false", such as: FM-E-BADREF: Attempt to dereference through a non-pointer or selector or: FM-F-BADMIX: Illegal mixing of operand types. As a temporary workaround, the compiler now treats "true" and "false" as integer constants instead of Boolean constants. |