home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1997 May
/
VPR9705A.ISO
/
VPR_DATA
/
PROGRAM
/
CBTRIAL
/
SETUP
/
DATA.Z
/
MASK.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1997-02-14
|
10KB
|
244 lines
//----------------------------------------------------------------------------
// Mask.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
// From: Mask.pas
//----------------------------------------------------------------------------
#ifndef MaskHPP
#define MaskHPP
//----------------------------------------------------------------------------
#include <Menus.hpp>
#include <Graphics.hpp>
#include <Forms.hpp>
#include <Messages.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Classes.hpp>
#include <SysUtils.hpp>
#include <Windows.hpp>
#include <System.hpp>
#pragma warn -par
#pragma warn -hid
#pragma warn -inl
namespace Mask
{
//-- type declarations -------------------------------------------------------
enum TMaskCharType { mcNone, mcLiteral, mcIntlLiteral, mcDirective, mcMask, mcMaskOpt, mcFieldSeparator,
mcField };
enum Mask_1 { mdReverseDir, mdUpperCase, mdLowerCase, mdLiteralChar };
typedef Set<Mask_1, mdReverseDir, mdLiteralChar> TMaskDirectives;
class __declspec(delphiclass) EDBEditError;
class __declspec(pascalimplementation) EDBEditError : public Sysutils::Exception
{
typedef Sysutils::Exception inherited;
public:
/* Exception.Create */ __fastcall EDBEditError(const System::AnsiString Msg) : Sysutils::Exception(
Msg) { }
/* Exception.CreateFmt */ __fastcall EDBEditError(const System::AnsiString Msg, const System::TVarRec
* Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
/* Exception.CreateRes */ __fastcall EDBEditError(int Ident) : Sysutils::Exception(Ident) { }
/* Exception.CreateResFmt */ __fastcall EDBEditError(int Ident, const System::TVarRec * Args, const
int Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
/* Exception.CreateHelp */ __fastcall EDBEditError(const System::AnsiString Msg, int AHelpContext) :
Sysutils::Exception(Msg, AHelpContext) { }
/* Exception.CreateFmtHelp */ __fastcall EDBEditError(const System::AnsiString Msg, const System::TVarRec
* Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
) { }
/* Exception.CreateResHelp */ __fastcall EDBEditError(int Ident, int AHelpContext) : Sysutils::Exception(
Ident, AHelpContext) { }
/* Exception.CreateResFmtHelp */ __fastcall EDBEditError(int Ident, const System::TVarRec * Args, const
int Args_Size, int AHelpContext) : Sysutils::Exception(Ident, Args, Args_Size, AHelpContext) { }
public:
/* TObject.Destroy */ __fastcall virtual ~EDBEditError(void) { }
};
enum Mask_3 { msMasked, msReEnter, msDBSetText };
typedef Set<Mask_3, msMasked, msDBSetText> TMaskedState;
class __declspec(delphiclass) TCustomMaskEdit;
class __declspec(pascalimplementation) TCustomMaskEdit : public Stdctrls::TCustomEdit
{
typedef Stdctrls::TCustomEdit inherited;
private:
System::AnsiString FEditMask;
char FMaskBlank;
int FMaxChars;
bool FMaskSave;
TMaskedState FMaskState;
int FCaretPos;
int FBtnDownX;
System::AnsiString FOldValue;
bool __fastcall DoInputChar(char &NewChar, int MaskOffset);
bool __fastcall Validate(const System::AnsiString Value, int &Pos);
bool __fastcall InputChar(char &NewChar, int Offset);
bool __fastcall DeleteSelection( System::AnsiString &Value, int Offset, int Len);
int __fastcall InputString( System::AnsiString &Value, const System::AnsiString NewValue, int Offset
);
System::AnsiString __fastcall AddEditFormat(const System::AnsiString Value, bool Active);
System::AnsiString __fastcall RemoveEditFormat(const System::AnsiString Value);
int __fastcall FindLiteralChar(int MaskOffset, char InChar);
System::AnsiString __fastcall GetEditText(void);
bool __fastcall GetMasked(void);
HIDESBASE System::AnsiString __fastcall GetText(void);
int __fastcall GetMaxLength(void);
bool __fastcall CharKeys(char &CharCode);
void __fastcall SetEditText(const System::AnsiString Value);
void __fastcall SetEditMask(const System::AnsiString Value);
HIDESBASE void __fastcall SetMaxLength(int Value);
HIDESBASE void __fastcall SetText(const System::AnsiString Value);
void __fastcall DeleteKeys(Word CharCode);
void __fastcall HomeEndKeys(Word CharCode, Classes::TShiftState Shift);
void __fastcall CursorInc(int cursorPos, int Incr);
void __fastcall CursorDec(int cursorPos);
void __fastcall ArrowKeys(Word CharCode, Classes::TShiftState Shift);
HIDESBASE MESSAGE void __fastcall WMLButtonDown(Messages::TWMMouse &Message);
HIDESBASE MESSAGE void __fastcall WMLButtonUp(Messages::TWMMouse &Message);
HIDESBASE MESSAGE void __fastcall WMSetFocus(Messages::TWMSetFocus &Message);
MESSAGE void __fastcall WMCut(Messages::TMessage &Message);
MESSAGE void __fastcall WMPaste(Messages::TMessage &Message);
HIDESBASE MESSAGE void __fastcall CMEnter(Messages::TWMNoParams &Message);
HIDESBASE MESSAGE void __fastcall CMExit(Messages::TWMNoParams &Message);
HIDESBASE MESSAGE void __fastcall CMTextChanged(Messages::TMessage &Message);
MESSAGE void __fastcall CMWantSpecialKey(Messages::TWMKey &Message);
protected:
void __fastcall ReformatText(const System::AnsiString NewMask);
void __fastcall GetSel(int &SelStart, int &SelStop);
void __fastcall SetSel(int SelStart, int SelStop);
HIDESBASE void __fastcall SetCursor(int Pos);
virtual void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
virtual void __fastcall KeyUp(Word &Key, Classes::TShiftState Shift);
virtual void __fastcall KeyPress(char &Key);
virtual bool __fastcall EditCanModify(void);
virtual void __fastcall Reset(void);
int __fastcall GetFirstEditChar(void);
int __fastcall GetLastEditChar(void);
int __fastcall GetNextEditChar(int Offset);
int __fastcall GetPriorEditChar(int Offset);
int __fastcall GetMaxChars(void);
void __fastcall ValidateError(void);
void __fastcall CheckCursor(void);
__property System::AnsiString EditMask = {read=FEditMask, write=SetEditMask, nodefault};
__property TMaskedState MaskState = {read=FMaskState, write=FMaskState, nodefault};
__property int MaxLength = {read=GetMaxLength, write=SetMaxLength, nodefault};
public:
__fastcall virtual TCustomMaskEdit(Classes::TComponent* AOwner);
void __fastcall ValidateEdit(void);
HIDESBASE void __fastcall Clear(void);
HIDESBASE int __fastcall GetTextLen(void);
__property bool IsMasked = {read=GetMasked, nodefault};
__property System::AnsiString EditText = {read=GetEditText, write=SetEditText, nodefault};
__property System::AnsiString Text = {read=GetText, write=SetText, nodefault};
public:
/* TWinControl.CreateParented */ __fastcall TCustomMaskEdit(HWND ParentWindow) : Stdctrls::TCustomEdit(
ParentWindow) { }
/* TWinControl.Destroy */ __fastcall virtual ~TCustomMaskEdit(void) { }
};
class __declspec(delphiclass) TMaskEdit;
class __declspec(pascalimplementation) TMaskEdit : public TCustomMaskEdit
{
typedef TCustomMaskEdit inherited;
__published:
__property AutoSelect ;
__property AutoSize ;
__property BorderStyle ;
__property CharCase ;
__property Color ;
__property Ctl3D ;
__property DragCursor ;
__property DragMode ;
__property Enabled ;
__property EditMask ;
__property Font ;
__property ImeMode ;
__property ImeName ;
__property MaxLength ;
__property ParentColor ;
__property ParentCtl3D ;
__property ParentFont ;
__property ParentShowHint ;
__property PasswordChar ;
__property PopupMenu ;
__property ReadOnly ;
__property ShowHint ;
__property TabOrder ;
__property TabStop ;
__property Text ;
__property Visible ;
__property OnChange ;
__property OnClick ;
__property OnDblClick ;
__property OnDragDrop ;
__property OnDragOver ;
__property OnEndDrag ;
__property OnEnter ;
__property OnExit ;
__property OnKeyDown ;
__property OnKeyPress ;
__property OnKeyUp ;
__property OnMouseDown ;
__property OnMouseMove ;
__property OnMouseUp ;
__property OnStartDrag ;
public:
/* TCustomMaskEdit.Create */ __fastcall virtual TMaskEdit(Classes::TComponent* AOwner) : Mask::TCustomMaskEdit(
AOwner) { }
public:
/* TWinControl.CreateParented */ __fastcall TMaskEdit(HWND ParentWindow) : Mask::TCustomMaskEdit(ParentWindow
) { }
/* TWinControl.Destroy */ __fastcall virtual ~TMaskEdit(void) { }
};
//-- var, const, procedure ---------------------------------------------------
extern char DefaultBlank;
extern char MaskFieldSeparator;
extern char MaskNoSave;
#define mDirReverse (char)(33)
#define mDirUpperCase (char)(62)
#define mDirLowerCase (char)(60)
#define mDirLiteral (char)(92)
#define mMskAlpha (char)(76)
#define mMskAlphaOpt (char)(108)
#define mMskAlphaNum (char)(65)
#define mMskAlphaNumOpt (char)(97)
#define mMskAscii (char)(67)
#define mMskAsciiOpt (char)(99)
#define mMskNumeric (char)(48)
#define mMskNumericOpt (char)(57)
#define mMskNumSymOpt (char)(35)
#define mMskTimeSeparator (char)(58)
#define mMskDateSeparator (char)(47)
extern bool __fastcall MaskGetMaskSave(const System::AnsiString EditMask);
extern char __fastcall MaskGetMaskBlank(const System::AnsiString EditMask);
extern int __fastcall MaskGetFldSeparator(const System::AnsiString EditMask);
extern System::AnsiString __fastcall FormatMaskText(const System::AnsiString EditMask, const System::AnsiString
Value);
//-- template instantiations -------------------------------------------------
template class TMaskedState ;
template class TMaskDirectives ;
} /* namespace Mask */
#pragma warn .par
#pragma warn .hid
#pragma warn .inl
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Mask;
#endif
//-- end unit ----------------------------------------------------------------
#endif // Mask