2001-06-13 14:33:31 +00:00
|
|
|
// -*- C++ -*-
|
2002-03-11 17:00:41 +00:00
|
|
|
/**
|
|
|
|
* \file input_validators.h
|
|
|
|
* Copyright 2002 the LyX Team
|
|
|
|
* Copyright 1999-2001 Allan Rae
|
|
|
|
* Read the file COPYING
|
2000-06-12 11:55:12 +00:00
|
|
|
*
|
2002-03-11 17:00:41 +00:00
|
|
|
* \author Allan Rae, rae@lyx.org
|
|
|
|
*/
|
2000-06-12 11:55:12 +00:00
|
|
|
|
2002-03-11 17:00:41 +00:00
|
|
|
/* Input validators and filters for xforms.
|
2000-06-12 11:55:12 +00:00
|
|
|
* A collection of input filtering and validating functions for use in
|
2001-04-03 14:30:58 +00:00
|
|
|
* XForms dialogs. Mainly meant for filtering input boxes although may
|
2000-06-12 11:55:12 +00:00
|
|
|
* be extended to include other generally useful xforms-specific tools.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef INPUT_VALIDATORS_H
|
|
|
|
#define INPUT_VALIDATORS_H
|
|
|
|
|
2002-04-23 08:16:27 +00:00
|
|
|
#ifdef __GNUG__
|
2002-03-11 17:00:41 +00:00
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
2000-06-12 11:55:12 +00:00
|
|
|
#if defined(__cplusplus)
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#endif
|
|
|
|
|
2001-07-28 12:24:16 +00:00
|
|
|
/** Only allow integer numbers,
|
|
|
|
possibly preceeded by a +' or '-' sign */
|
|
|
|
int fl_int_filter(FL_OBJECT *, char const *, char const *, int);
|
|
|
|
/** Only allow integer numbers. No '+' or '-' signs. */
|
2000-06-12 11:55:12 +00:00
|
|
|
int fl_unsigned_int_filter(FL_OBJECT *, char const *, char const *, int);
|
2001-07-28 12:24:16 +00:00
|
|
|
/** Only allow floating point numbers,
|
|
|
|
possibly preceeded by a +' or '-' sign */
|
|
|
|
int fl_float_filter(FL_OBJECT *, char const *, char const *, int);
|
|
|
|
/** Only allow floating point numbers. No '+' or '-' signs. */
|
2000-12-06 22:24:17 +00:00
|
|
|
int fl_unsigned_float_filter(FL_OBJECT *, char const *, char const *, int);
|
2000-06-12 11:55:12 +00:00
|
|
|
|
2000-11-03 09:47:02 +00:00
|
|
|
/** Only allow lowercase letters. */
|
|
|
|
int fl_lowercase_filter(FL_OBJECT *, char const *, char const *, int);
|
|
|
|
|
2000-06-12 11:55:12 +00:00
|
|
|
#if defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|