{$I OVC.INC}

{$B-} {Complete Boolean Evaluation}
{$I+} {Input/Output-Checking}
{$P+} {Open Parameters}
{$T-} {Typed @ Operator}
{$W-} {Windows Stack Frame}
{$X+} {Extended Syntax}

{$IFNDEF Win32}
{$G+} {286 Instructions}
{$N+} {Numeric Coprocessor}

{$C MOVEABLE,DEMANDLOAD,DISCARDABLE}
{$ENDIF}

{*********************************************************}
{*                  OVCTCPIC.PAS 2.00                    *}
{*     Copyright (c) TurboPower Software Co 1995-96      *}
{*                 All rights reserved.                  *}
{*********************************************************}

unit OvcTCPic;
  {-Orpheus Table Cell - Picture field type}

interface

uses
  {$IFDEF Win32}
  Windows,
  {$ELSE}
  WinTypes, WinProcs,
  {$ENDIF}
  SysUtils, Messages,
  Graphics, Classes, Controls, Forms, StdCtrls, Menus,
  OvcData, OvcConst, OvcBase, OvcCaret, OvcColor,
  OvcCmd, OvcEF, OvcPF,
  OvcTCmmn, OvcTCell, OvcTGRes, OvcTable, OvcTCStr, OvcTCBEF;

type
  {The editor class for TOvcTCPictureField cell components}
  TOvcTCPictureFieldEdit = class(TOvcPictureField)
    protected {private}
      {.Z+}
      FCell : TOvcBaseTableCell;
      {.Z-}

    protected
      {.Z+}
      procedure efMoveFocusToNextField; override;
      procedure efMoveFocusToPrevField; override;

      procedure WMChar(var Msg : TWMKey); message WM_CHAR;
      procedure WMGetDlgCode(var Msg : TMessage); message WM_GETDLGCODE;
      procedure WMKeyDown(var Msg : TWMKey); message WM_KEYDOWN;
      procedure WMKillFocus(var Msg : TWMKillFocus); message WM_KILLFOCUS;
      procedure WMSetFocus(var Msg : TWMSetFocus); message WM_SETFOCUS;
      {.Z-}

    public
      property CellOwner : TOvcBaseTableCell
         read FCell write FCell;
  end;

  {The picture field cell component class}
  TOvcTCCustomPictureField = class(TOvcTCBaseEntryField)
    protected
      {.Z+}
      function GetCellEditor : TControl; override;
      function GetDataType : TPictureDataType;
      function GetEpoch : integer;
      function GetPictureMask : string;

      procedure SetDataType(DT : TPictureDataType);
      procedure SetEpoch(E : integer);
      procedure SetPictureMask(const PM : string);
      {.Z-}

      property DataType : TPictureDataType
         read GetDataType write SetDataType;

      property Epoch : integer
         read GetEpoch write SetEpoch;

      property PictureMask : string
         read GetPictureMask write SetPictureMask;

    public
      function CreateEntryField(AOwner : TComponent) : TOvcBaseEntryField; override;
  end;

  TOvcTCPictureField = class(TOvcTCCustomPictureField)
    published
      {inherited from ancestor}
      property DataType;
      property PictureMask;
      property MaxLength;

      property Access;
      property Adjust;
      property AutoAdvanceChar;
      property AutoAdvanceLeftRight;
      property AutoSelect;
      property BeepOnError;
      property CaretIns;
      property CaretOvr;
      property CaretToEnd;
      property Color;
      property ControlCharColor;
      property DecimalPlaces;
      property Epoch;
      property Font;
      property ForceInsert;
      property ForceOvertype;
      property HighlightColors;
      property Hint;
      property InsertPushes;
      property Margin;
      property PadChar;
      property PasswordChar;
      property PasswordMode;
      property RangeHi stored False;
      property RangeLo stored False;
      property RightJustify;
      property ShowHint;
      property StripLiterals;
      property Table;
      property TableColor;
      property TableFont;
      property TextHiColor;
      property TextMargin;
      property TextStyle;
      property TrimBlanks;

      {events inherited from custom ancestor}
      property OnChange;
      property OnClick;
      property OnDblClick;
      property OnDragDrop;
      property OnDragOver;
      property OnEndDrag;
      property OnEnter;
      property OnError;
      property OnExit;
      property OnKeyDown;
      property OnKeyPress;
      property OnKeyUp;
      property OnMouseDown;
      property OnMouseMove;
      property OnMouseUp;
      property OnOwnerDraw;
      property OnUserCommand;
      property OnUserValidation;
  end;


implementation
