Older Newer
Wed, 06 Nov 2019 14:40:35 . . . . SyneRyder [Adding links to functions]


Changes by last author:

Added:
1. New Features

---------------

1.1 New Control Classes

This release introduces four new user controls: BITMAP, IMAGE, METAFILE,

and ICON.

1.1.1 BITMAP Control Class

The BITMAP control class is based on the Win32 static bitmap control,

and is used to display a (possibly scaled) bitmap in a rectangular

region of the dialog box. The format for the BITMAP control is:

ctl[n]:BITMAP(<bitmap_properties>),image="filename",<general_properties>

where '(<bitmap_properties>)' is an optional comma-separated list of

bitmap-specific properties, including:

NOTIFY - enables the control to send messages when it is

clicked. You must specify this if the control is

to process tooltips, cause an action, or invoke a

handler; otherwise, this control is purely passive.

CENTERIMAGE - centers the bitmap within the rectangle instead of

scaling it to cover the entire rectangle

SUNKEN - draws a sunken-looking frame around the rectangle

BORDER - these properties draw other various frames around

CLIENTEDGE the specified rectangle

STATICEDGE

MODALFRAME

Note that the BITMAP control does not support transparency; i.e., the

bitmap will always have a solid background color. For a control that

displays a pseudo-transparent bitmap, use the IMAGE control below.

1.1.2 IMAGE Control Class

The IMAGE control class is similar to the BITMAP control, but is based

on the Win32 owner-drawn static class. The principal difference is

that the IMAGE control supports a form of pseudo-transparency: The

color of the first pixel in the bitmap (i.e., the pixel in the upper

left corner) is taken to be the "transparency" color for the bitmap.

All pixels of this color in the bitmap will be replaced with the

underlying background pixels in the dialog box, thus giving the appearance

of transparency. The format for the IMAGE control is:

ctl[n]:IMAGE(<image_properties>),image="filename",<general_properties>

where '(<image_properties>)' is an optional comma-separated list of

image-specific properties, including:

NOTIFY - enables the control to send messages when it is

clicked. You must specify this if the control is

to process tooltips, cause an action, or invoke a

handler; otherwise, this control is purely passive.

SUNKEN - draws a sunken-looking frame around the rectangle

BORDER - these properties draw other various frames around

CLIENTEDGE the specified rectangle

STATICEDGE

MODALFRAME

1.1.3 METAFILE Control Class

The METAFILE control class is similar to the BITMAP control, but is based

on the Win32 ENHMETAFILE static control. The METAFILE control is used to

display a metafile-based image (rather than a bitmap image) in the specified

rectangle. The image to be displayed may be either a 16-bit Windows Metafile

(.wmf), with or without an Aldus placeable header, or a 32-bit Enhanced

Metafile (.emf). The format for the METAFILE control is:

ctl[n]:METAFILE(<metafile_properties>),image="filename",<general_properties>

where '(<metafile_properties>)' is an optional comma-separated list of

metafile-specific properties, including:

NOTIFY - enables the control to send messages when it is

clicked. You must specify this if the control is

to process tooltips, cause an action, or invoke a

handler; otherwise, this control is purely passive.

SUNKEN - draws a sunken-looking frame around the rectangle

BORDER - these properties draw other various frames around

CLIENTEDGE the specified rectangle

STATICEDGE

MODALFRAME

1.1.4 ICON Control Class

The ICON control class is similar to the BITMAP control, but is based

on the Win32 ICON static control. The ICON control is used to display

a standard Windows icon (a special form of bitmap image) in the specified

rectangle. The format for the ICON control is:

ctl[n]:ICON(<icon_properties>),image="filename",<general_properties>

where '(<icon_properties>)' is an optional comma-separated list of

icon-specific properties, including:

NOTIFY - enables the control to send messages when it is

clicked. You must specify this if the control is

to process tooltips, cause an action, or invoke a

handler; otherwise, this control is purely passive.

CENTERIMAGE - centers the icon within the rectangle instead of

scaling it to cover the entire rectangle

SUNKEN - draws a sunken-looking frame around the rectangle

BORDER - these properties draw other various frames around

CLIENTEDGE the specified rectangle

STATICEDGE

MODALFRAME

1.2 New Control Pseudo-classes

This release also introduces two new user control pseudo-classes:

NONE and MODIFY.

1.2.1 NONE Control Class

Specifying NONE for the class of a control simply deletes the control.

This is useful, for example, to delete one of the predefined user

controls, or to delete unused controls in a multi-filter. The format

for using the NONE class is:

ctl[n]:NONE

To delete control 'n' at run time, call the new built-in function

deleteCtl(n).

1.2.2 MODIFY Control Class

Specifying MODIFY as the control class does not create a new control,

but modifies the general properties of an already existing control.

This is useful, for example, to customize the general properties of

a predefined control. The format for using the MODIFY class is:

ctl[n]:MODIFY,<general_properties>

1.3 Tooltips

You can now define a pop-up tooltip for any user control by using the

tooltip="text" property specifier. For example:

ctl[0]:CHECKBOX,"Wrap",tooltip="Wrap effect at edge of image"

For static control classes (IMAGE, BITMAP, ICON, METAFILE, RECT,

FRAME, and STATICTEXT), you must specify the 'notify' class-specific

property so the control can process tooltip messages.

To change the tooltip for a control at run time, call the built-in

function setCtlToolTip(c,"new tooltip text",s), where 'c' is the

index of the control and 's' specifies any style bits (usually 0).

For example:

setCtlToolTip(0, "Replicate pixels at edge of image", 0x02);

where the style 0x02 (TTF_CENTERTIP) causes the tooltip to be centered

beneath the control rather than positioned to the right of the cursor.

To delete the tooltip for a control, specify tooltip="" or specify

NULL instead of a character string for the second argument in the

call to setCtlToolTip().

1.4 New Function setCtlImage()

Use the new built-in function setCtlImage(c,"filename",'X') to change

the image displayed by an IMAGE, METAFILE, BITMAP, or ICON control at run

time. 'X' is a char constant that specifies the type of image file, as

follows:

'B' - bitmap file (.bmp)

'W' - Windows (old-style) metafile (.wmf)

'E' - enhanced metafile (.emf)

'I' - icon file (.ico)

'C' - cursor file (.cur)

'J' - JPEG file (.jpg)

'G' - GIF file (.gif)

'M' - MIG (mouse-ivo graphics) file (.mig)

0 - unspecified file type

Note: Only the 'B', 'W', 'E', and 'I' file types are recognized in the

current release. The remaining types are reserved for future use.

1.5 New Function ErrorOk()

A new built-in function, ErrorOk(fmt,...), has been added. This is similar

to the Error() built-in function, but displays only one pushbutton (OK),

and always returns IDOK.

1.6 Action=ABOUT

A new default control action ('action=about') has been added. Specifying

this action for a control causes the FM 'About' dialog box to be displayed

when the control is activated. (For static control classes, you must

include the 'notify' class-specific property if this action is to have

any effect.) To set this action for a control at run time, call the

setCtlAction(n,a) function with CA_ABOUT as the second argument.

1.7 TRACKBAR Tick Marks

You can now set the frequency of tick marks in a TRACKBAR control with

the 'ticfreq=n' control property, or by calling the setCtlTicFreq(c,n)

built-in function. The control will draw a tick mark at an interval of

every 'n' units; the default is n=1. (You must specify the 'autoticks'

property for the TRACKBAR control if this to have any visible effect.)

2. Changes

----------

2.1 New Registration Scheme (Full version only)

In the full versions of FM, authorization to generate a standalone filter

is now based on a 'registration code' rather than a password. You will be

asked for your user name, organization, and registration code the first time

you try to Make a standalone filter. Thereafter, the registration information

is stored in a secure manner in the Windows registry, and you will normally

never be required to reenter your registration information.

2.2 Configurable Predefined Controls

The OK, Cancel, Edit, and FM Logo predefined controls are now fully configurable

by the Filter Designer. They are defined the same as an ordinary user control,

using special dedicated control indexes at the high end of the index range.

Since these special control indexes may be assigned different values in future

releases, always refer to them by their symbolic names: CTL_OK, CTL_CANCEL,

CTL_EDIT, and CTL_LOGO. The default definitions for these controls are:

ctl[CTL_OK]:PUSHBUTTON(default),"OK",pos=(306,126),size=(34,14),

action=apply,tooltip="Apply filter to main image"

ctl[CTL_CANCEL]:PUSHBUTTON,"Cancel",pos=(269,126),size=(34,14),

action=cancel,tooltip="Exit without applying filter"

ctl[CTL_EDIT]:PUSHBUTTON,"&Edit >>>",pos=(231,126),size=(34,14),

action=edit,tooltip="Edit filter source code"

ctl[CTL_LOGO]:IMAGE(notify),image="logo2.bmp",pos=(352,97),size=(32,43),

action=about,tooltip="About this filter"

If you want to customize these predefined controls in your filter,

you can completely redefine or delete them. If you want to change

only the general properties of a predefined control, you can simply

use the MODIFY pseudo-class specifier. For example, to change the

logo 'image' and 'size' general properties:

ctl[CTL_LOGO]:MODIFY,image="MyLogo.bmp",size=(34,40)

To delete a predefined control altogether, use the NONE pseudo-class

specifier. For example, if you want to delete the OK control from

your demo filter, specify:

ctl[CTL_OK]:NONE

Note that the CTL_EDIT control is handled specially. You cannot change

the predefined text labels and tooltips for this control, since they are

assigned dynamically by FM. If you really want to change the label and/or

tooltip for an EDIT control, delete the predefined control and define

your own edit control using some other available control index. For

example:

//delete the predefined edit control

ctl[CTL_EDIT]:NONE

//now define my own custom version

ctl[49]:PUSHBUTTON,"Edit",action=edit,tooltip="Open/Close edit window"

Finally, note that the CTL_EDIT control is *never* defined in a standalone

filter; any references to the CTL_EDIT control index will be ignored in a

standalone filter.

In future releases, the predefined proxy preview, progress bar, and Host

Application static text controls will also be fully configurable.

In the current release, the range of valid control indexes is 0 - 63,

inclusive. The predefined controls are assigned indexes in the range

50 - 63. To avoid conflict with the predefined controls, use indexes

in the range 0 - 49 for your own control definitions.

2.3 New Default FM Logo

The default FM Logo in the filter dialog box now uses the IMAGE control to

display a transparent scaleable bitmap of Wern's Gartenzwerg logo. You are

free to redefine the logo in any way you like. To revert to the metafile-

based "butterfly" logo used in release 0.4.11, use the following control

and Embed specifications:

ctl[CTL_LOGO]:METAFILE(notify),image="buttrfly.wmf",

pos=(329,90),size=(56,47),action=about

Embed:metafile="buttrfly.wmf"

Note: "buttrfly.wmf" is supplied as an external file in the FM installation

package.

2.4 Host Application Trademark Symbols

To be legally correct, appropriate trademark (tm) and registered trademark (®)

symbols have been inserted into the names of various host applications as

displayed by the Host Application static text control in the FM dialog box.

2.5 Use CMOV and Use MMX

The 'Use CMOV' checkbox in Advanced Edit mode is now turned off by default,

even if the CMOV instructions are available on the host processor. If

either the 'Use CMOV' or 'Use MMX' checkbox is checked when you try to MAKE

a standalone filter, FM warns that the resulting filter may not execute

correctly on all systems.

2.6 Warning to Embed Resources

FM now warns you when making a standalone filter if you have specified a

background image for the dialog box, or you have specified an image for

any of the static image controls (IMAGE, BITMAP, ICON, METAFILE), but

no files have been embedded with the Embed: specifier. This is not

necessarily an error, but a reminder to the FD to embed any resources

as desired.

2.7 Reminder to use Return Statement

FM now warns you if your ForEveryTile handler does not contain a return

statement. The previous "kludge" of specifying a bare 'true' or 'false'

expression as the return value is now obsolescent, and will be phased out

altogether in a future release. This warning will serve as a reminder

to you to replace all such bare 'true' or 'false' return values with the

proper return statement (i.e., 'return true' or 'return false').

This warning also applies to other handlers which expect a return value,

such as OnZeroDivide.

2.8 New Control Default Values

The default size, position, and action for certain user controls has

changed. This may affect your dialog layout if you depended on these

defaults.

2.9 New Embeddable File Types

In addition to bitmaps, you can now embed metafiles, icons, and wave files

in your standalone filter with the Embed: key. To embed a metafile,

specify:

Embed:metafile="filename"

To embed an icon, specify:

Embed:icon="filename"

To embed a wave file, specify:

Embed:wave="filename"

Note: Wave files are reserved for future use.

2.10 New End-of-file Token

The optional FF+ end-of-file token has been changed from %EOF to %%EOF to

avoid a syntactic ambiguity. You can think of %%EOF as marking the start

of a "super" comment that extends to the physical end of the source file.

This is useful, for example, to comment out large sections of source code

when tracking down the location of a compilation error.

3. Bug Fixes

------------

3.1 A scrollbar with an inverted range (min > max) did not display the

initial value correctly. This has been fixed.

3.2 Vertical scrollbars and trackbars (e.g., STANDARD(vert), SCROLLBAR(vert),

or TRACKBAR(vert)) now function correctly.

3.3 The 'bottomtip' and 'righttip' properties for a horizontal or vertical

TRACKBAR control (respectively) now operate correctly. (Previously,

'bottomtip' functioned the same as 'toptip' and 'righttip' functioned

the same as 'lefttip'.)

3.4 The background of a STATICTEXT control is now updated properly when

changing the text for the control.

3.5 A TRACKBAR control is now updated correctly whenever its background color

is changed.

3.6 The default action for a scrollbar or trackbar was ignored in previous

releases, and the 'apply' action was always performed. This has been fixed.

3.7 Referencing a user-declared array no longer causes a GP fault. (However,

note that arrays are still not implemented, and should *not* be declared

in your current FF+ code.)

3.8 A few resource leaks have been fixed.

4. Known Problems

-----------------

4.1 A TRACKBAR control with an inverted range (min > max) does not function

correctly.

4.2 The TTF_CENTERTIP style is not always applied correctly when specified in

a call to setCtlToolTip().