📄 iplotdatacustomlist.pas
字号:
property Close [const Index: Integer]: Double read GetClose write SetClose;
property TraceLineColor [const Index: Integer]: TColor read GetTraceLineColor write SetTraceLineColor;
property TraceLineWidth [const Index: Integer]: Integer read GetTraceLineWidth write SetTraceLineWidth;
property TraceLineStyle [const Index: Integer]: TiPlotLineStyle read GetTraceLineStyle write SetTraceLineStyle;
property MarkerVisible [const Index: Integer]: Boolean read GetMarkerVisible write SetMarkerVisible;
property MarkerSize [const Index: Integer]: Integer read GetMarkerSize write SetMarkerSize;
property MarkerStyle [const Index: Integer]: TiPlotMarkerStyle read GetMarkerStyle write SetMarkerStyle;
property MarkerPenColor [const Index: Integer]: TColor read GetMarkerPenColor write SetMarkerPenColor;
property MarkerPenWidth [const Index: Integer]: Integer read GetMarkerPenWidth write SetMarkerPenWidth;
property MarkerPenStyle [const Index: Integer]: TPenStyle read GetMarkerPenStyle write SetMarkerPenStyle;
property MarkerBrushColor[const Index: Integer]: TColor read GetMarkerBrushColor write SetMarkerBrushColor;
property MarkerBrushStyle[const Index: Integer]: TBrushStyle read GetMarkerBrushStyle write SetMarkerBrushStyle;
property MarkerCharacter [const Index: Integer]: Char read GetMarkerCharacter write SetMarkerCharacter;
property BarVisible [const Index: Integer]: Boolean read GetBarVisible write SetBarVisible;
property BarReference [const Index: Integer]: Double read GetBarReference write SetBarReference;
property BarWidth [const Index: Integer]: Double read GetBarWidth write SetBarWidth;
property BarPenColor [const Index: Integer]: TColor read GetBarPenColor write SetBarPenColor;
property BarPenWidth [const Index: Integer]: Integer read GetBarPenWidth write SetBarPenWidth;
property BarPenStyle [const Index: Integer]: TPenStyle read GetBarPenStyle write SetBarPenStyle;
property BarBrushColor [const Index: Integer]: TColor read GetBarBrushColor write SetBarBrushColor;
property BarBrushStyle [const Index: Integer]: TBrushStyle read GetBarBrushStyle write SetBarBrushStyle;
end;
implementation
//****************************************************************************************************************************************************
constructor TiPlotDataCustomList.Create;
begin
FStoredBarVisible := True;
end;
//****************************************************************************************************************************************************
destructor TiPlotDataCustomList.Destroy;
begin
FreeMemory;
inherited;
end;
//****************************************************************************************************************************************************
procedure TiPlotDataCustomList.SetDataPointSize(Value: Integer);
begin
FDataPointSize := Value;
FMaxDataPoints := Maxint div FDataPointSize;
end;
//****************************************************************************************************************************************************
procedure TiPlotDataCustomList.Clear;
begin
FCount := 0;
FTail := 0;
if not FRingBufferEnabled then SetCapacity(0);
end;
//****************************************************************************************************************************************************
procedure TiPlotDataCustomList.Grow;
var
Delta : Integer;
begin
if FCapacity > 64 then
Delta := FCapacity div 4
else
if FCapacity > 8 then
Delta := 16
else
Delta := 4;
SetCapacity(FCapacity + Delta);
end;
//****************************************************************************************************************************************************
function TiPlotDataCustomList.GetRingBufferSize: Integer;
begin
if FRingBufferEnabled then Result := FCapacity else Result := 0;
end;
//****************************************************************************************************************************************************
procedure TiPlotDataCustomList.SetRingBufferSize(const Value: Integer);
begin
if (Value = 0) and FRingBufferEnabled then
begin
FRingBufferEnabled := False;
if FTail <> 0 then Clear;
end;
if Value <> 0 then
begin
FRingBufferEnabled := True;
if Value <> FCapacity then
begin
if FTail <> 0 then Clear;
if Value > FCapacity then
begin
SetCapacity(Value);
end
else
if Value < FCapacity then
begin
if FCount > Value then DeletePoints(FCount - Value);
SetCapacity(Value);
end;
end;
end;
end;
//****************************************************************************************************************************************************
function TiPlotDataCustomList.GetMemoryUsed: Integer;
begin
Result := FDataPointSize * FCapacity;
end;
//****************************************************************************************************************************************************
function TiPlotDataCustomList.GetActualIndex(Value: Integer): Integer;
begin
if (Value < 0) or (Value >= Count) then raise Exception.Create('Index out of Bounds');
if Tail <> 0 then
begin
Result := Value + Tail;
if Result > (Count-1) then Result := Result - Count;
end
else Result := Value;
end;
//****************************************************************************************************************************************************
function TiPlotDataCustomList.GetEmpty (const Index:Integer):Boolean; begin Result := False; end;
function TiPlotDataCustomList.GetNull (const Index:Integer):Boolean; begin Result := False; end;
//****************************************************************************************************************************************************
function TiPlotDataCustomList.GetHigh (const Index:Integer):Double; begin Result := 0; end;
function TiPlotDataCustomList.GetLow (const Index:Integer):Double; begin Result := 0; end;
function TiPlotDataCustomList.GetOpen (const Index:Integer):Double; begin Result := 0; end;
function TiPlotDataCustomList.GetClose (const Index:Integer):Double; begin Result := 0; end;
//****************************************************************************************************************************************************
function TiPlotDataCustomList.GetTraceLineColor (const Index:Integer):TColor; begin Result:=StoredTraceLineColor; end;
function TiPlotDataCustomList.GetTraceLineStyle (const Index:Integer):TiPlotLineStyle; begin Result:=StoredTraceLineStyle; end;
function TiPlotDataCustomList.GetTraceLineWidth (const Index:Integer):Integer; begin Result:=StoredTraceLineWidth; end;
function TiPlotDataCustomList.GetMarkerVisible (const Index:Integer):Boolean; begin Result:=StoredMarkerVisible; end;
function TiPlotDataCustomList.GetMarkerSize (const Index:Integer):Integer; begin Result:=StoredMarkerSize; end;
function TiPlotDataCustomList.GetMarkerStyle (const Index:Integer):TiPlotMarkerStyle; begin Result:=StoredMarkerStyle; end;
function TiPlotDataCustomList.GetMarkerPenColor (const Index:Integer):TColor; begin Result:=StoredMarkerPenColor; end;
function TiPlotDataCustomList.GetMarkerPenWidth (const Index:Integer):Integer; begin Result:=StoredMarkerPenWidth; end;
function TiPlotDataCustomList.GetMarkerPenStyle (const Index:Integer):TPenStyle; begin Result:=StoredMarkerPenStyle; end;
function TiPlotDataCustomList.GetMarkerBrushColor (const Index:Integer):TColor; begin Result:=StoredMarkerBrushColor;end;
function TiPlotDataCustomList.GetMarkerBrushStyle (const Index:Integer):TBrushStyle; begin Result:=StoredMarkerBrushStyle;end;
function TiPlotDataCustomList.GetMarkerCharacter (const Index:Integer):Char; begin Result:=StoredMarkerCharacter; end;
function TiPlotDataCustomList.GetBarVisible (const Index:Integer):Boolean; begin Result:=StoredBarVisible; end;
function TiPlotDataCustomList.GetBarReference (const Index:Integer):Double; begin Result:=StoredBarReference; end;
function TiPlotDataCustomList.GetBarWidth (const Index:Integer):Double; begin Result:=StoredBarWidth; end;
function TiPlotDataCustomList.GetBarPenColor (const Index:Integer):TColor; begin Result:=StoredBarPenColor; end;
function TiPlotDataCustomList.GetBarPenWidth (const Index:Integer):Integer; begin Result:=StoredBarPenWidth; end;
function TiPlotDataCustomList.GetBarPenStyle (const Index:Integer):TPenStyle; begin Result:=StoredBarPenStyle; end;
function TiPlotDataCustomList.GetBarBrushColor (const Index:Integer):TColor; begin Result:=StoredBarBrushColor; end;
function TiPlotDataCustomList.GetBarBrushStyle (const Index:Integer):TBrushStyle; begin Result:=StoredBarBrushStyle; end;
//****************************************************************************************************************************************************
procedure TiPlotDataCustomList.SetEmpty (const Index:Integer;const Value:Boolean); begin ;end;
procedure TiPlotDataCustomList.SetNull (const Index:Integer;const Value:Boolean); begin ;end;
//****************************************************************************************************************************************************
procedure TiPlotDataCustomList.SetHigh (const Index:Integer;const Value:Double); begin ;end;
procedure TiPlotDataCustomList.SetLow (const Index:Integer;const Value:Double); begin ;end;
procedure TiPlotDataCustomList.SetOpen (const Index:Integer;const Value:Double); begin ;end;
procedure TiPlotDataCustomList.SetClose (const Index:Integer;const Value:Double); begin ;end;
//****************************************************************************************************************************************************
procedure TiPlotDataCustomList.SetTraceLineColor (const Index:Integer;const Value:TColor );begin end;
procedure TiPlotDataCustomList.SetTraceLineStyle (const Index:Integer;const Value:TiPlotLineStyle );begin end;
procedure TiPlotDataCustomList.SetTraceLineWidth (const Index:Integer;const Value:Integer );begin end;
procedure TiPlotDataCustomList.SetMarkerVisible (const Index:Integer;const Value:Boolean );begin end;
procedure TiPlotDataCustomList.SetMarkerSize (const Index:Integer;const Value:Integer );begin end;
procedure TiPlotDataCustomList.SetMarkerStyle (const Index:Integer;const Value:TiPlotMarkerStyle);begin end;
procedure TiPlotDataCustomList.SetMarkerPenColor (const Index:Integer;const Value:TColor );begin end;
procedure TiPlotDataCustomList.SetMarkerPenWidth (const Index:Integer;const Value:Integer );begin end;
procedure TiPlotDataCustomList.SetMarkerPenStyle (const Index:Integer;const Value:TPenStyle );begin end;
procedure TiPlotDataCustomList.SetMarkerBrushColor(const Index:Integer;const Value:TColor );begin end;
procedure TiPlotDataCustomList.SetMarkerBrushStyle(const Index:Integer;const Value:TBrushStyle );begin end;
procedure TiPlotDataCustomList.SetMarkerCharacter (const Index:Integer;const Value:Char );begin end;
procedure TiPlotDataCustomList.SetBarVisible (const Index:Integer;const Value:Boolean );begin end;
procedure TiPlotDataCustomList.SetBarReference (const Index:Integer;const Value:Double );begin end;
procedure TiPlotDataCustomList.SetBarWidth (const Index:Integer;const Value:Double );begin end;
procedure TiPlotDataCustomList.SetBarPenColor (const Index:Integer;const Value:TColor );begin end;
procedure TiPlotDataCustomList.SetBarPenWidth (const Index:Integer;const Value:Integer );begin end;
procedure TiPlotDataCustomList.SetBarPenStyle (const Index:Integer;const Value:TPenStyle );begin end;
procedure TiPlotDataCustomList.SetBarBrushColor (const Index:Integer;const Value:TColor );begin end;
procedure TiPlotDataCustomList.SetBarBrushStyle (const Index:Integer;const Value:TBrushStyle );begin end;
//****************************************************************************************************************************************************
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -