unit uViewCalendarioBase;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, uViewBase, dxLayoutControl, cxControls, Menus, cxStyles,
  cxGraphics, cxEdit, cxScheduler, cxSchedulerStorage,
  cxSchedulerCustomControls, cxSchedulerCustomResourceView,
  cxSchedulerDayView, cxSchedulerDateNavigator, cxSchedulerTimeGridView,
  cxSchedulerUtils, cxSchedulerWeekView, cxSchedulerYearView, dxPrnDev,
  dxPSGlbl, dxPSUtl, dxPSEngn, dxPrnPg, dxBkgnd, dxWrap, dxPSCompsProvider,
  dxPSFillPatterns, dxPSEdgePatterns, dxPSCore, dxPScxCommon,
  dxPScxScheduler2Lnk, dxPrnDlg, cxSchedulerDBStorage, ActnList, DB,
  uDADataTable, uBizCitas, JvAppStorage, JvAppRegistryStorage,
  JvComponentBase, JvFormPlacement, uViewGrid;

type
  IViewCalendarioBase = interface(IViewBase)
  ['{A5CF0823-17C6-4FBA-9DC8-6E8D310503F5}']
    function getCalendario: TcxScheduler;
    property Calendario: TcxScheduler read getCalendario;

    function GetpAnchorDate: TDateTime;
    procedure SetpAnchorDate(const Value: TDateTime);
    property pAnchorDate: TDateTime read GetpAnchorDate write SetpAnchorDate;
  end;

  TfrViewCalendarioBase = class(TfrViewBase, IViewCalendarioBase)
    cxScheduler : TcxScheduler;
  private
    AnchorDate: TDateTime;

  protected
    function GetpAnchorDate: TDateTime;
    procedure SetpAnchorDate(const Value: TDateTime);

    function getCalendario: TcxScheduler;
  public
    property pAnchorDate: TDateTime read GetpAnchorDate write SetpAnchorDate;
    property Calendario: TcxScheduler read getCalendario;
    constructor Create(AOwner : TComponent); override;
    destructor Destroy; override;
  end;

var
  frViewCalendarioBase: TfrViewCalendarioBase;

implementation

{$R *.dfm}

constructor TfrViewCalendarioBase.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
  AnchorDate := Date;
end;

destructor TfrViewCalendarioBase.Destroy;
begin
  inherited;
end;

function TfrViewCalendarioBase.getCalendario: TcxScheduler;
begin
  Result := cxScheduler;
end;

function TfrViewCalendarioBase.GetpAnchorDate: TDateTime;
begin
  Result := AnchorDate;
end;

procedure TfrViewCalendarioBase.SetpAnchorDate(const Value: TDateTime);
begin
  AnchorDate := Value;
end;

end.
