11#include <owl/validate.rh>
51void TPXPictureValidator::Init(
bool autoFill)
150 case _T(
';'):
i++;
break;
172 if (Pic[
i] ==
_T(
',')) {
219 if (!IsComplete(
rslt)) {
230 }
while (IsComplete(
rslt));
249 if (!IsIncomplete(
rslt))
261 if (IsIncomplete(
rslt)) {
264 if (Pic[
j] ==
_T(
'['))
267 else if (Pic[
j] ==
_T(
'*')) {
288#if !defined(__GNUC__)
330#if defined(BI_DBCS_SUPPORT)
347#if defined(BI_DBCS_SUPPORT)
361 if (!IsComplete(
rslt))
368 if (!IsComplete(
rslt))
373 if (IsIncomplete(
rslt))
379#if defined(BI_DBCS_SUPPORT)
380#if defined(BI_PDOXWINJ_SUPPORT)
398 if (
uc1 == 0x81 &&
uc2 == 0x93) {
407 else if (
uc1 == 0x81 &&
uc2 == 0x97){
408 if (
n == 2 &&
j +
n <
len &&
417 if (
n2 == 1 && Pic[
i] ==
';'){
422 if (Pic[
i] ==
_T(
';'))
431#if defined(BI_AUTO_COMPLETION_DBCS_BY_SPACE)
465 if (Pic[
i] ==
_T(
';'))
487#if !defined(__GNUC__)
543TPXPictureValidator::SyntaxCheck()
545 const auto n =
static_cast<int>(Pic.length());
547 (Pic.back() ==
_T(
';')) ||
548 (Pic.back() ==
_T(
'*') && Pic[
n - 2] !=
_T(
';')))
576#if defined(BI_DBCS_SUPPORT)
577#if defined(BI_PDOXWINJ_SUPPORT)
586 for ( ;
n1-- > 0;
s1++)
649#if defined(BI_PDOXWINJ_SUPPORT)
658#if defined(BI_DBCS_SUPPORT)
691#if OWL_PERSISTENT_STREAMS
700 is >> GetObject()->Pic;
708TPXPictureValidator::Streamer::Write(opstream&
os)
const
711 os << GetObject()->Pic;
Definition of class TAppDictionary.
Definition of class TApplication.
#define PRECONDITION(condition)
TPXPictureValidator objects compare user input with a picture of a data format to determine the valid...
int Adjust(tstring &text, int &begPos, int &endPos, int amount)
Adjusts the 'value' of the text, given a cursor position and an amount.
virtual TPicResult Picture(TCHAR *input, bool autoFill=false)
Checks the validity of the input according to the format specified by the picture string,...
TPXPictureValidator(LPCTSTR pic, bool autoFill=false)
Constructs a picture validator object by first calling the constructor inherited from TValidator and ...
bool IsValid(LPCTSTR str)
IsValid overrides TValidator's virtual function and compares the string passed in str with the format...
void Error(TWindow *owner)
Overrides TValidator's virtual function and displays a message box that indicates an error in the pic...
bool IsValidInput(TCHAR *str, bool suppressFill)
IsValidInput overrides TValidator's virtual function and checks the string passed in str against the ...
A streamable class, TValidator defines an abstract data validation object.
uint16 Options
A bitmap member used to control options for various descendants of TValidator.
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
static void Raise()
Creates an instance of TXValidator and throws it.
ipstream, a specialized input stream derivative of pstream, is the base class for reading (extracting...
Definition of class TFrameWindow.
void ReadBaseObject(Base *base, ipstream &in)
#define IMPLEMENT_STREAMABLE1(cls, base1)
void WriteBaseObject(Base *base, opstream &out)
TPicResult
Validation result type.
@ voOnAppend
Option to only validate input on appending.
@ voFill
Option to fill in chars on IsValidInput checks.
UINT CharSize(const TCHAR *s)
Return the number of bytes of the first character of the passed string.
Object Windows Library (OWLNext Core)
#define CONST_CAST(targetType, object)