mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-04 09:57:15 +01:00
TAChart: Add TChartStyleEnumerator
git-svn-id: trunk@37524 -
This commit is contained in:
parent
4ca3da0301
commit
a3db9f6244
@ -58,6 +58,12 @@ type
|
||||
|
||||
TChartStyles = class;
|
||||
|
||||
TChartStyleEnumerator = class(TCollectionEnumerator)
|
||||
public
|
||||
function GetCurrent: TChartStyle;
|
||||
property Current: TChartStyle read GetCurrent;
|
||||
end;
|
||||
|
||||
{ TChartStyleList }
|
||||
|
||||
TChartStyleList = class(TCollection)
|
||||
@ -69,6 +75,7 @@ type
|
||||
function GetOwner: TPersistent; override;
|
||||
public
|
||||
constructor Create(AOwner: TChartStyles);
|
||||
function GetEnumerator: TChartStyleEnumerator; inline;
|
||||
property Style[AIndex: Integer]: TChartStyle read GetStyle; default;
|
||||
end;
|
||||
|
||||
@ -99,6 +106,13 @@ begin
|
||||
RegisterComponents(CHART_COMPONENT_IDE_PAGE, [TChartStyles]);
|
||||
end;
|
||||
|
||||
{ TChartStyleEnumerator }
|
||||
|
||||
function TChartStyleEnumerator.GetCurrent: TChartStyle;
|
||||
begin
|
||||
Result := TChartStyle(inherited GetCurrent);
|
||||
end;
|
||||
|
||||
{ TChartStyle }
|
||||
|
||||
procedure TChartStyle.Apply(ADrawer: IChartDrawer);
|
||||
@ -195,6 +209,11 @@ begin
|
||||
FOwner := AOwner;
|
||||
end;
|
||||
|
||||
function TChartStyleList.GetEnumerator: TChartStyleEnumerator;
|
||||
begin
|
||||
Result := TChartStyleEnumerator.Create(Self);
|
||||
end;
|
||||
|
||||
function TChartStyleList.GetOwner: TPersistent;
|
||||
begin
|
||||
Result := FOwner;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user