logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

MatchEditor - StringEditor with pattern matching

Description

       MatchEditor  is  a  StringEditor  subclass  that  checks the validity of its contents against a specified
       pattern.  It is suitable for entering strings that must conform to a particular format such as  a  number
       or  a  file  name.  The matching pattern is specified according to the rules of scanf(3).  For example, a
       pattern of "%3d" will match a 3-digit integer, a pattern of "%[ab]" will match a string  containing  only
       a's and b's, and a pattern of "(%f, %f)" will match the string "(12.0, 5E23)".

Name

       MatchEditor - StringEditor with pattern matching

Public Operations

MatchEditor(ButtonState*,constchar*sample,constchar*done)
              Create  a  new  MatchEditor  object.   The  ButtonState, sample string, and termination string are
              passed to the StringEditor constructor.

       voidMatch(constchar*pattern,booleankeystroke=true)
              Specify the pattern to match against.  When MatchEditor performs matching, it will  highlight  any
              trailing  part of the edit string that does not conform to pattern.  The user can then correct the
              string.  If keystroke is true, matching will occur on every  keystroke;  otherwise  matching  will
              only occur on the completion of the edit.  The initial pattern matches any string, and the initial
              value of keystroke is true.

Restrictions

       MatchEditor  uses  sscanf  internally  to  check  the  pattern  match.  Different versions of sscanf have
       different scanning capabilities; check with your local version to see what patterns you can use.

See Also

StringEditor(3I)

InterViews                                         7 Dec 1989                                    MatchEditor(3I)

Synopsis

#include<InterViews/matcheditor.h>

See Also