{*******************************************************}
{                                                       }
{       ZaphodsMap                                      }
{       Project Options                                 }
{       (Language: English)                             }
{                                                       }
{       Developed by HREF Tools Corp. 2005-2011         }
{                                                       }
{       v1.041                                          }
{*******************************************************}

unit {*htns*}ZaphodProjectOptions;

interface

uses
  Classes;

type
  IZaphodProjectOptions = interface
    ['{05095B1E-113A-4056-AE41-F7F994563CAC}']
    function GetProjectOption(RootComponent: TComponent;
      OptionName: string): string;
    procedure GetProjectOptions(RootComponent: TComponent; Options: TStrings);
    function GetProjectOutputDir(RootComponent: TComponent): string;
    function GetPackageDLLOutputDir(RootComponent: TComponent): string;
    function GetPackageDCPOutputDir(RootComponent: TComponent): string;
    function GetProjectFileName(RootComponent: TComponent): string;
    function ProjectIsPackage(RootComponent: TComponent): Boolean;
    function ProjectIsALibrary(RootComponent: TComponent): Boolean;
  end;

function GetRootComponent(AComponent: TComponent): TComponent;

implementation

function GetRootComponent(AComponent: TComponent): TComponent;
begin
  Result := AComponent;
  if Result <> nil then
    while Result.Owner <> nil do
      Result := Result.Owner;
end;

end.
