You've already forked lazarus-ccr
tvplanit: Extract VpTaskList drawing code to separate unit VpTaskListPainter.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4816 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -147,7 +147,7 @@ msgstr "Turbo Power VisualPlanIt Demo"
|
|||||||
|
|
||||||
#: tmainform.cballowinplaceediting.caption
|
#: tmainform.cballowinplaceediting.caption
|
||||||
msgid "Allow inplace editing"
|
msgid "Allow inplace editing"
|
||||||
msgstr ""
|
msgstr "Editieren an Ort und Stelle erlauben"
|
||||||
|
|
||||||
#: tmainform.cbgranularity.text
|
#: tmainform.cbgranularity.text
|
||||||
msgid "30 Min"
|
msgid "30 Min"
|
||||||
@ -241,4 +241,3 @@ msgstr "Aufgaben"
|
|||||||
#: tmainform.titlelbl.caption
|
#: tmainform.titlelbl.caption
|
||||||
msgid "TitleLbl"
|
msgid "TitleLbl"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ Portions created by TurboPower Software Inc. are Copyright (C) 2002 TurboPower S
|
|||||||
|
|
||||||
Contributor(s): "/>
|
Contributor(s): "/>
|
||||||
<Version Major="1" Release="4"/>
|
<Version Major="1" Release="4"/>
|
||||||
<Files Count="69">
|
<Files Count="70">
|
||||||
<Item1>
|
<Item1>
|
||||||
<Filename Value="../source/vpalarmdlg.lfm"/>
|
<Filename Value="../source/vpalarmdlg.lfm"/>
|
||||||
<Type Value="LFM"/>
|
<Type Value="LFM"/>
|
||||||
@ -310,6 +310,10 @@ Contributor(s): "/>
|
|||||||
<Filename Value="../source/vpcontactgridpainter.pas"/>
|
<Filename Value="../source/vpcontactgridpainter.pas"/>
|
||||||
<UnitName Value="VpContactGridPainter"/>
|
<UnitName Value="VpContactGridPainter"/>
|
||||||
</Item69>
|
</Item69>
|
||||||
|
<Item70>
|
||||||
|
<Filename Value="../source/vptasklistpainter.pas"/>
|
||||||
|
<UnitName Value="VpTasklistPainter"/>
|
||||||
|
</Item70>
|
||||||
</Files>
|
</Files>
|
||||||
<i18n>
|
<i18n>
|
||||||
<EnableI18N Value="True"/>
|
<EnableI18N Value="True"/>
|
||||||
|
@ -3,7 +3,7 @@ unit VpBasePainter;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, Graphics,
|
Classes, Graphics, LCLType,
|
||||||
VPBase;
|
VPBase;
|
||||||
|
|
||||||
type
|
type
|
||||||
@ -23,6 +23,8 @@ type
|
|||||||
UseGran: TVpGranularity;
|
UseGran: TVpGranularity;
|
||||||
DisplayOnly: Boolean;
|
DisplayOnly: Boolean;
|
||||||
protected
|
protected
|
||||||
|
// Shared local variables of all the old painting routines
|
||||||
|
Rgn: HRGN;
|
||||||
RealWidth: Integer;
|
RealWidth: Integer;
|
||||||
RealHeight: Integer;
|
RealHeight: Integer;
|
||||||
RealLeft: Integer;
|
RealLeft: Integer;
|
||||||
|
@ -16,7 +16,6 @@ type
|
|||||||
PhoneLblWidth: Integer;
|
PhoneLblWidth: Integer;
|
||||||
StartContact: Integer;
|
StartContact: Integer;
|
||||||
RealColumnWidth: Integer;
|
RealColumnWidth: Integer;
|
||||||
Rgn: HRGN;
|
|
||||||
RealColor: TColor;
|
RealColor: TColor;
|
||||||
SizingBarColor: TColor;
|
SizingBarColor: TColor;
|
||||||
BevelDarkShadow: TColor;
|
BevelDarkShadow: TColor;
|
||||||
|
@ -38,7 +38,6 @@ type
|
|||||||
EventCount: Integer;
|
EventCount: Integer;
|
||||||
DayWidth: Integer;
|
DayWidth: Integer;
|
||||||
RealNumDays: Integer;
|
RealNumDays: Integer;
|
||||||
Rgn: HRGN;
|
|
||||||
RealRowHeight: Integer;
|
RealRowHeight: Integer;
|
||||||
RealColHeadHeight: Integer;
|
RealColHeadHeight: Integer;
|
||||||
RealRowHeadWidth: Integer;
|
RealRowHeadWidth: Integer;
|
||||||
|
@ -281,7 +281,7 @@ type
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
SysUtils, Math, Forms, Dialogs, VpTaskEditDlg, VpDlg;
|
SysUtils, Math, Forms, Dialogs, VpTaskEditDlg, VpDlg, VpTasklistPainter;
|
||||||
|
|
||||||
|
|
||||||
(*****************************************************************************)
|
(*****************************************************************************)
|
||||||
@ -658,15 +658,23 @@ begin
|
|||||||
end;
|
end;
|
||||||
{=====}
|
{=====}
|
||||||
|
|
||||||
procedure TVpTaskList.RenderToCanvas (RenderCanvas : TCanvas;
|
procedure TVpTaskList.RenderToCanvas(RenderCanvas: TCanvas; RenderIn: TRect;
|
||||||
RenderIn : TRect;
|
Angle: TVpRotationAngle; Scale: Extended; RenderDate : TDateTime;
|
||||||
Angle : TVpRotationAngle;
|
StartLine, StopLine: Integer; UseGran: TVpGranularity; DisplayOnly: Boolean);
|
||||||
Scale : Extended;
|
var
|
||||||
RenderDate : TDateTime;
|
painter: TVpTaskListPainter;
|
||||||
StartLine : Integer;
|
begin
|
||||||
StopLine : Integer;
|
tlPainting := true;
|
||||||
UseGran : TVpGranularity;
|
painter := TVpTaskListPainter.Create(Self, RenderCanvas);
|
||||||
DisplayOnly : Boolean);
|
try
|
||||||
|
painter.RenderToCanvas(RenderIn, Angle, Scale, RenderDate, StartLine,
|
||||||
|
StopLine, UseGran, DisplayOnly);
|
||||||
|
finally
|
||||||
|
painter.Free;
|
||||||
|
tlPainting := false;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
(*
|
||||||
var
|
var
|
||||||
HeadRect : TRect;
|
HeadRect : TRect;
|
||||||
Bmp : Graphics.TBitmap;
|
Bmp : Graphics.TBitmap;
|
||||||
@ -1179,7 +1187,7 @@ begin
|
|||||||
RenderCanvas.Pen.Color := SavePenColor;
|
RenderCanvas.Pen.Color := SavePenColor;
|
||||||
tlPainting := false;
|
tlPainting := false;
|
||||||
end;
|
end;
|
||||||
{=====}
|
{=====} *)
|
||||||
|
|
||||||
procedure TVpTaskList.SetColor(const Value: TColor);
|
procedure TVpTaskList.SetColor(const Value: TColor);
|
||||||
begin
|
begin
|
||||||
|
@ -21,7 +21,6 @@ type
|
|||||||
StrLn: Integer;
|
StrLn: Integer;
|
||||||
StartDate: TDateTime;
|
StartDate: TDateTime;
|
||||||
ADEventsRect: TRect;
|
ADEventsRect: TRect;
|
||||||
Rgn: HRGN;
|
|
||||||
DotDotDotColor: TColor;
|
DotDotDotColor: TColor;
|
||||||
BevelHighlightColor: TColor;
|
BevelHighlightColor: TColor;
|
||||||
BevelShadowColor: TColor;
|
BevelShadowColor: TColor;
|
||||||
|
Reference in New Issue
Block a user