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

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

unit OvcTGRes;
  {-Orpheus glyph resource manager}

interface

uses
  {$IFDEF Win32}
  Windows,
  {$ELSE}
  WinProcs,
  {$ENDIF}
  SysUtils, Classes, Graphics;

type
  TOvcCellGlyphs = class(TPersistent)
    protected {private}
      {.Z+}
      FResource         : pointer;
      FActiveGlyphCount : Integer;
      FGlyphCount       : Integer;
      FOnCfgChanged     : TNotifyEvent;
      {.Z-}
    protected
      {.Z+}
      function GetBitMap : TBitMap;
      function GetIsDefault : boolean;
      procedure SetActiveGlyphCount(G : Integer);
      procedure SetBitMap(BM : TBitMap);
      procedure SetGlyphCount(G : Integer);
      procedure SetIsDefault(D : boolean);

      procedure CalcGlyphCount;
      function IsNotDefault : boolean;
      procedure DoCfgChanged;
      {.Z-}
    public {protected}
      {.Z+}
      property OnCfgChanged : TNotifyEvent
         read FOnCfgChanged write FOnCfgChanged;
      {.Z-}

    public
      constructor Create;
      destructor Destroy; override;

      procedure Assign(Source : TPersistent); override;

    published
      {Note: must be in this order--IsDefault, BitMap, GlyphCount, ActiveGlyphCount}
      property IsDefault : boolean
         read GetIsDefault write SetIsDefault
         stored true;

      property BitMap : TBitMap
         read GetBitMap write SetBitMap
         stored IsNotDefault;

      property GlyphCount : Integer
         read FGlyphCount write SetGlyphCount;

      property ActiveGlyphCount : Integer
         read FActiveGlyphCount write SetActiveGlyphCount;
  end;

implementation
