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

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

unit OvcFxFnt;
  {-Orpheus fixed font support}

interface

uses
  {$IFDEF Win32} Windows, {$ELSE} WinTypes, WinProcs, {$ENDIF}
  Classes, Controls, Graphics, Messages, SysUtils, Forms, Dialogs,
  OvcBase, OvcConst, OvcExcpt;

var
  {List of names of the fixed fonts in the system}
  FixedFontNames : TStringList;

type
  {Orpheus fixed font class}
  TOvcFixedFont = class(TPersistent)
{.Z+}
    protected
      FFont : TFont;                           {Actual font}
      FOnChange : TNotifyEvent;                {Font on change event handler}

      {property read routines}
      function GetColor : TColor;
      function GetName : string;
      function GetSize : integer;
      function GetStyle : TFontStyles;

      {property write routines}
      procedure SetColor(const C : TColor);
      procedure SetName(const S : string);
      procedure SetSize(const S : integer);
      procedure SetStyle(const FS : TFontStyles);

      {event handler}
      procedure DoOnChange;
{.Z-}

    public
      constructor Create;
        {-Create a new fixed font object--name is first fixed font on system}
      destructor Destroy; override;
        {-Destroy the fixed font object}

      procedure Assign(F : TPersistent); override;
        {-Assign another fixed font's values to this one}

      property OnChange : TNotifyEvent
        {-On change handler}
         read FOnChange
         write FOnChange;

      property Font : TFont
        {-Font - read-only}
         read FFont;

    published
      property Color : TColor
        {-Color of the fixed font}
         read GetColor
         write SetColor;

      property Name : string
        {-Name of the fixed font}
         read GetName
         write SetName;

      property Size : integer
        {-Point size of the fixed font}
         read GetSize
         write SetSize;

      property Style : TFontStyles
        {-Style of the fixed font}
         read GetStyle
         write SetStyle;
  end;

procedure RefreshFixedFontNames;
  {-Refresh the list of fixed font names}

implementation
