2001-06-13 14:33:31 +00:00
|
|
|
// -*- C++ -*-
|
2002-03-11 17:00:41 +00:00
|
|
|
/**
|
|
|
|
* \file input_validators.h
|
2002-09-05 15:14:23 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
2000-06-12 11:55:12 +00:00
|
|
|
*
|
2002-09-05 14:10:50 +00:00
|
|
|
* \author Allan Rae
|
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
* Full author contact details are available in file CREDITS.
|
2002-03-11 17:00:41 +00:00
|
|
|
*/
|
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
|
|
|
|
|
2003-09-05 13:15:43 +00:00
|
|
|
#include "forms_fwd.h"
|
2002-03-11 17:00:41 +00:00
|
|
|
|
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
|