lazarus/lcl/industrialbase.pp
mattias 89190707c1 LCL: exploded some With-blocks for fpc 3.1.1
git-svn-id: trunk@50237 -
2015-11-06 18:35:28 +00:00

53 lines
1.1 KiB
ObjectPascal

unit IndustrialBase;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Controls, Graphics;
type
{ TIndustrialBase }
TIndustrialBase = class(TGraphicControl)
private
FAntiAliasingMode: TAntialiasingMode;
procedure SetAntiAliasingMode(AValue: TAntialiasingMode);
protected
procedure GraphicChanged;
public
constructor Create(aOwner: TComponent); override;
published
property AntiAliasingMode: TAntialiasingMode read FAntiAliasingMode
write SetAntiAliasingMode default amDontCare;
end;
implementation
constructor TIndustrialBase.Create(aOwner: TComponent);
begin
inherited Create(aOwner);
FAntiAliasingMode := amDontCare;
SetInitialBounds(0, 0, GetControlClassDefaultSize.cx, GetControlClassDefaultSize.cy);
ControlStyle := ControlStyle - [csSetCaption];
end;
procedure TIndustrialBase.GraphicChanged;
begin
if Assigned(Parent) and (Visible or (csDesigning in ComponentState))
then Invalidate;
end;
procedure TIndustrialBase.SetAntiAliasingMode(AValue: TAntialiasingMode);
begin
if FAntiAliasingMode=AValue then Exit;
FAntiAliasingMode:=AValue;
GraphicChanged;
end;
end.