AcornSearch - Acorn and RISC OS information searching
RISC OS Search
containing
"Nutty quip goes here!"
Home  |  About  |  Filebase Archive  |  StrongHelp Manuals  |  Newsgroups  |  Module Database
Validation string can contain the following commands:
(Commands are separated by ";")

A     Allowable characters.
C     24-bit colours. (3.98+)
D     Mask typed characters.
F     Set font colours.
K     Assign functionality to specific keys.
L     Text in icon will be formatted (split).
N     Icon name.
P     Sets pointer shape and active point.
R     Border commands.
S     Spritename.
T     Tint.
U     Unicode character limit.
X     Disable width calculation.
Y     Enable features.
Validation string 'A'
Use:     Exclude/accept only certain characters into a writable icon.

Syntax:     A[char list][~exclusion list]
     Allow characters in 'char list'.
     Disallow characters in 'exclusion list'

Notes:     When the system alphabet is UTF8 this validation command accepts multi-byte characters.

Examples:     A0-9a-z~b     Allows 0..9, a, c..z
     A~X          Allows all chars but X
     A~\~          Allows all chars but ~
     A~          Allows all chars
Validation string 'C' (3.98+)
Use:     To allow 24-bit colours to be specified for icons.

Wimp 3.98+
Syntax:     C{BBGGRR[/{BBGGRR}]}
     First BBGGRR is the foreground colour, the second is the background colour.
     If either colour is not included, then colour is per the top 8 bits of the flags word

Wimp 4.00+
Syntax:     C[foreground]/
           [background]/
           [slabbed-in background]/
           [moat]/
           [light 3D edge]/
           [dark 3D edge]

     All colours are in the form BBGGRR
     If any colour is not included, then colour is per the top 8 bits of the flags word

Examples:     C008000/0080FF     foreground mid green, background orange.
     CFF00FF          foreground magenta, background as for flags word.
     C/00FFFF     foreground as for flags word, background yellow.
Validation string 'D'
Use:     The masking of the contents of icons. Usually used in password icons.

Syntax:     Dchar
     Displays all typed chars as 'char'
     Special characters must be preceded by a \

Notes:     When the system alphabet is UTF8 this validation command accepts multi-byte characters.

Examples:     D*     Contents of the icon is displayed as a series of *'s.
          D-     Contents displayed as a series of '-'s
Validation string 'F'
Use:     The definition of outline font colours.

Syntax:     Fxy
     x = Background
     y = Foreground.
     x and y are hexadecimal digits: 0..9,A..F

Notes:     This call uses Wimp_SetFontColours.

Examples:     FA3     sets background to 10 and foreground to 3.
     F07     sets background to 0 and foreground to 7 (default).
Validation string 'K'
Use:     Assigns functionality to specific keys.

Syntax:     Koptions

Options:     R     Return moves caret to next writable icon. (Except for last.)
     A     Up/Down arrow moves to previous/next writable
     T     Tab moves to next, shift-Tab to previous
     D     Deleting will also report the keypress
     N     Task will be notified of all keypresses in icon

Examples:     Ktarn
          Knd
Validation string 'L'
Use:     Formatting text to fit the icon as best as possible.

Syntax:     Lh
     h is the vertical spacing between lines of text in OS units. If omitted, 40 units is used (a system font character is 32 OS units high).

Notes:     This option can only be used with icons which are horizontally and vertically centred, and do not contain an anti-aliased font. The icon must not be writable, since the caret would not be positioned correctly inside it.

          The height will only take effect on Window Manager 3.80 and later.

Examples:     L40
Validation string 'N'
Use:     Give icon a name.

Syntax:     N<string>

Notes:     This option is ignored by the Wimp; it has been reserved for template editors and applications to give icons a name so they can reference them by other means than the icon number.

Examples:     N3/FILENAME
Validation string 'P'
Use:     The changing of the pointer shape and active point.

Syntax:     Pspritename[,x,y]
     spritename is a sprite in the Wimp sprite pool.
     x and y are the new active points for the pointer.

Examples:     Pptr_write,4,4     Pointer for writable icons.
          Pptr_menu,6,5     Pointer for pop-up menu icons.
Validation string 'R'
Use:     Three dimensional borders for icons.

Syntax:     Rtype[,pushcolour]
     pushcolour is used for when the icon is in a selected state for types 5 and 6.
Types:     1     slab out
          2     slab in
          3     ridge
          4     channel
          5     action button
          6     default action
          7     writable

Examples:     R5,3     Action button which sinks down to colour 3 (Style Guide approved type)
          R4     Style Guide recommended border type.
Validation string 'S'
Use:     Including sprites in indirected icons

Syntax:     Sspritename[,<selected>]
     selected is used for when the icon is in a selected state.

Examples:          Sswitcher
          Soptoff,opton

Validation string 'T'
Use:     Apply a colour translation to an icon

Syntax:     Select 1 (deprecated)
              T0,<BBGGRR>
          Select 3 and later
              T<type>[,<parameters>]
          
Notes:     Type is the decimal type number as defined by the ColourMap module. Parameters is a comma separated list of hex numbers passed in R3 to R9 to the ColourMap module when creating the colourmap descriptor.
Validation string 'U'
Use:     Set the maximum number of characters.

Syntax:     U<n>
          
Notes:     This sets the maximum number of characters allowed in a writable icon. This is distinct from the maximum number of bytes allowed, specified in the icon block, when the system alphabet is UTF8. Theoretically you should allow 6 bytes per character, but in practice 4 is usually sufficient.
Validation string 'X'
Use:     Disable the Wimp's calculation of text in text+sprite icons on the iconbar.

Syntax:     X

Notes:     When you place a text+sprite icon on the iconbar, the Wimp will automatically calculate the width of the text and hence the icon. If your application may change the text at some point later (for example to display a status), you instead need to calculate the largest width of all potential strings (using Wimp_TextOp 1) and create the icon with this width - disabling the wimp's calculation by using the X validation string command.

     You should recalculate the widths and resize the icon when you receive Message_FontChanged.
Validation string 'Y'
Use:     Set an feature flag applying to the icon.

Syntax:     Y<option list>
          
Notes:     This string enables various features for the icon depending on the letters present.

Types:     S     Icon should be sent Message_ScrollRequest when a mouse's scroll wheel is moved while over it.

Example:     Ys

[sh-index] Back to list of manuals