{$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}

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

unit OvcTGPns;
  {-Orpheus Table - grid pens}

interface

uses
  Classes, Graphics;

type
  TGridEffect = (geNone, geVertical, geHorizontal, geBoth, ge3D);

type
  TOvcGridPen = class(TPersistent)
    protected {private}
      {.Z+}
      FNormalColor : TColor;
      FSecondColor : TColor;
      FEffect      : TGridEffect;
      FStyle       : TPenStyle;

      FOnCfgChanged  : TNotifyEvent;
      {.Z-}

    protected
      {.Z+}
      procedure SetNormalColor(C : TColor);
      procedure SetSecondColor(C : TColor);
      procedure SetEffect(E : TGridEffect);
      procedure SetStyle(S : TPenStyle);

      procedure DoCfgChanged;
      {.Z-}

    public {protected}
      {.Z+}
      property OnCfgChanged : TNotifyEvent
         read FOnCfgChanged write FOnCfgChanged;
      {.Z-}

    public
      constructor Create;
      procedure Assign(Source : TPersistent); override;

    published
      property NormalColor : TColor
         read FNormalColor write SetNormalColor;

      property SecondColor : TColor
         read FSecondColor write SetSecondColor;

      property Style : TPenStyle
         read FStyle write SetStyle;

      property Effect : TGridEffect
         read FEffect write SetEffect;
  end;

  TOvcGridPenSet = class(TPersistent)
    protected {private}
      {.Z+}
      FNormalGrid        : TOvcGridPen;
      FLockedGrid        : TOvcGridPen;
      FCellWhenFocused   : TOvcGridPen;
      FCellWhenUnfocused : TOvcGridPen;
      {.Z-}

    protected
      {.Z+}
      procedure SetOnCfgChanged(OC : TNotifyEvent);
      {.Z-}

    public {protected}
      {.Z+}
      property OnCfgChanged : TNotifyEvent
         write SetOnCfgChanged;
      {.Z-}

    public
      constructor Create;
      destructor Destroy; override;

      procedure Assign(Source : TPersistent); override;

    published
      property NormalGrid : TOvcGridPen
         read FNormalGrid write FNormalGrid;

      property LockedGrid : TOvcGridPen
         read FLockedGrid write FLockedGrid;

      property CellWhenFocused : TOvcGridPen
         read FCellWhenFocused write FCellWhenFocused;

      property CellWhenUnfocused : TOvcGridPen
         read FCellWhenUnfocused write FCellWhenUnfocused;
  end;

implementation
