Browse Source

V2 SuperGauge, breaking changes with V1. Update Spinner Test program

sganz 6 months ago
parent
commit
d3ec108818

BIN
docs/img/SuperGauge-V100.png


BIN
docs/img/SuperGauge-V200.png


File diff suppressed because it is too large
+ 477 - 144
supergauge.pas


+ 324 - 135
supergaugecommon.pas

@@ -16,7 +16,22 @@
   Massive overhaul, fixes and features, begat Super Gauge
   Massive overhaul, fixes and features, begat Super Gauge
   Needed to split off as changes broke compatibility badly
   Needed to split off as changes broke compatibility badly
 
 
+Changes
+  Renamed Frame property to BorderWidth, breaking change in gauge if property
+  is not default.
+
 ***************************** END CONTRIBUTOR(S) *****************************}
 ***************************** END CONTRIBUTOR(S) *****************************}
+{******************************** CHANGE LOG *********************************
+v2.00 - Sandy Ganz
+        Breaking change on Frame Border Width Property, Scale Tic
+        Major and Minor Width and Scale Tic Major and Minor Length. Added
+        missing property for TickArc width (inner and outer).
+        Added Dots option for Tick Marks, and a few related Dot settings.
+        Changed RangeLED type of rcGaugeOutOfRange to rcGaugeOverload and events
+
+
+******************************* END CHANGE LOG *******************************}
+
 unit SuperGaugeCommon;
 unit SuperGaugeCommon;
 
 
 {$I bgracontrols.inc}
 {$I bgracontrols.inc}
@@ -29,15 +44,15 @@ uses
 
 
 type
 type
   TSGFillStyle = (fsNone, fsGradient, fsFlat, fsPhong);   // Add more if needed here
   TSGFillStyle = (fsNone, fsGradient, fsFlat, fsPhong);   // Add more if needed here
-  TSGPointerStyle = (psLine, psLineExt, psArc , psTriangle {, psTriangleLine, psTriangleLineExt}); // Todo : Add others at some point
+  TSGPointerStyle = (psLine, psLineExt, psArc , psTriangle { psTriangleExt}); // Todo : Add others at some point
   TSGLEDStyle = (lsNone, lsFlat, lsShaded);
   TSGLEDStyle = (lsNone, lsFlat, lsShaded);
   TSGLEDShape = (lshRound, lshSquare, lshTriangle, lshDownTriangle);
   TSGLEDShape = (lshRound, lshSquare, lshTriangle, lshDownTriangle);
   TSGPointerCapPosition = (cpUnder, cpOver);
   TSGPointerCapPosition = (cpUnder, cpOver);
   TSGCapStyle = (csNone, csFlat, csShaded, csPhong);
   TSGCapStyle = (csNone, csFlat, csShaded, csPhong);
   TSGTickArc = (taNone, taOuter, taInner, taBoth);  // Arc above or below ticks, inner/both is automatic on inner, main if exist, minor othewise
   TSGTickArc = (taNone, taOuter, taInner, taBoth);  // Arc above or below ticks, inner/both is automatic on inner, main if exist, minor othewise
-  TSGRangeCheckType = (rcNone, rcGaugeOutOfRange, rcBetween, rcBothInclusive, rcStartInclusive,
+  TSGRangeCheckType = (rcNone, rcGaugeOverload, rcBetween, rcBothInclusive, rcStartInclusive,
                       rcEndInclusive, rcBothBetweenOutside, rcBothInclusiveOutside,
                       rcEndInclusive, rcBothBetweenOutside, rcBothInclusiveOutside,
-                      rcGreaterStart, rcLessEnd);   // added for range check led, see code for details
+                      rcGreaterStart, rcLessEnd, rcGreaterStartInclusive, rcLessEndInclusive);   // added for range check led, see code for details
   TSGMarkerStyle = (msCenter, msLeft, msRight);
   TSGMarkerStyle = (msCenter, msLeft, msRight);
 
 
   { TSGOrigin }
   { TSGOrigin }
@@ -52,7 +67,7 @@ type
   TSGPointerCapSettings = class(TPersistent)
   TSGPointerCapSettings = class(TPersistent)
   private
   private
     FEdgeColor: TColor;
     FEdgeColor: TColor;
-    FEdgeThickness: integer;
+    FEdgeWidth: integer;
     FFillColor: TColor;
     FFillColor: TColor;
     FOnChange: TNotifyEvent;
     FOnChange: TNotifyEvent;
     FRadius: integer;
     FRadius: integer;
@@ -62,7 +77,7 @@ type
     FDirty: boolean;
     FDirty: boolean;
 
 
     procedure SetEdgeColor(AValue: TColor);
     procedure SetEdgeColor(AValue: TColor);
-    procedure SetEdgeThickness(AValue: integer);
+    procedure SetEdgeWidth(AValue: integer);
     procedure SetFillColor(AValue: TColor);
     procedure SetFillColor(AValue: TColor);
     procedure SetOnChange(AValue: TNotifyEvent);
     procedure SetOnChange(AValue: TNotifyEvent);
     procedure SetRadius(AValue: integer);
     procedure SetRadius(AValue: integer);
@@ -84,7 +99,7 @@ type
     property EdgeColor: TColor read FEdgeColor write SetEdgeColor default clGray;
     property EdgeColor: TColor read FEdgeColor write SetEdgeColor default clGray;
     property FillColor: TColor read FFillColor write SetFillColor default clBlack;
     property FillColor: TColor read FFillColor write SetFillColor default clBlack;
     property Radius: integer read FRadius write SetRadius default 30;
     property Radius: integer read FRadius write SetRadius default 30;
-    property EdgeThickness: integer read FEdgeThickness write SetEdgeThickness default 2;
+    property EdgeWidth: integer read FEdgeWidth write SetEdgeWidth default 1;
     property LightIntensity: integer read GetLightIntensity write SetLightIntensity default 300;
     property LightIntensity: integer read GetLightIntensity write SetLightIntensity default 300;
     property CurveExponent: single read FCurveExponent write SetCurveExponent default 0.05;
     property CurveExponent: single read FCurveExponent write SetCurveExponent default 0.05;
     property CapStyle: TSGCapStyle read FCapStyle write SetCapStyle default csPhong;
     property CapStyle: TSGCapStyle read FCapStyle write SetCapStyle default csPhong;
@@ -99,16 +114,24 @@ type
     FLength: integer;
     FLength: integer;
     FExtensionLength: integer;
     FExtensionLength: integer;
     FOnChange: TNotifyEvent;
     FOnChange: TNotifyEvent;
-    FThickness: integer;
+    FWidth: integer;
     FStyle: TSGPointerStyle;
     FStyle: TSGPointerStyle;
+    FHighlightLine: boolean;
+    FHighlightColor: TColor;
+    FHighlightThickness: integer;
+    FEnabled: boolean;
     FDirty: boolean;
     FDirty: boolean;
 
 
     procedure SetColor(AValue: TColor);
     procedure SetColor(AValue: TColor);
     procedure SetLength(AValue: integer);
     procedure SetLength(AValue: integer);
     procedure SetOnChange(AValue: TNotifyEvent);
     procedure SetOnChange(AValue: TNotifyEvent);
-    procedure SetThickness(AValue: integer);
+    procedure SetWidth(AValue: integer);
     procedure SetStyle(AValue: TSGPointerStyle);
     procedure SetStyle(AValue: TSGPointerStyle);
+    procedure SetHighlightLine(AValue: boolean);
+    procedure SetHighlightColor(AValue: TColor);
+    procedure SetHighlightThickness(AValue: integer);
     procedure SetExtensionLength(AValue: integer);
     procedure SetExtensionLength(AValue: integer);
+    procedure SetEnabled(AValue: boolean);
     procedure DirtyOnChange;
     procedure DirtyOnChange;
 
 
   protected
   protected
@@ -120,10 +143,14 @@ type
 
 
   published
   published
     property Color: TColor read FColor write SetColor;
     property Color: TColor read FColor write SetColor;
-    property Length: integer read FLength write SetLength default 160;
-    property ExtensionLength: integer read FExtensionLength write SetExtensionLength default 20;
-    property Thickness: integer read FThickness write SetThickness default 5;
+    property Length: integer read FLength write SetLength default 130;
+    property ExtensionLength: integer read FExtensionLength write SetExtensionLength default 10;
+    property Width: integer read FWidth write SetWidth default 5;
     property Style: TSGPointerStyle read FStyle write SetStyle default psLineExt;
     property Style: TSGPointerStyle read FStyle write SetStyle default psLineExt;
+    property HighlightLine: boolean read FHighlightLine write SetHighlightLine default False;
+    property HighlightColor: TColor read FHighlightColor write SetHighlightColor default clGray;
+    property HighlightThickness: integer read FHighlightThickness write SetHighlightThickness default 1;
+    property Enabled: boolean read FEnabled write SetEnabled;
   end;
   end;
 
 
   { TSGScaleSettings }
   { TSGScaleSettings }
@@ -143,16 +170,22 @@ type
     FEnableMainTicks: boolean;
     FEnableMainTicks: boolean;
     FEnableSubTicks: boolean;
     FEnableSubTicks: boolean;
     FReverseScale: boolean;
     FReverseScale: boolean;
-    FThicknessMainTick: integer;
-    FThicknessSubTick: integer;
-    FLengthMainTick: integer;
-    FLengthSubTick: integer;
+    FMainTickThickness: integer;
+    FSubTickThickness: integer;
+    FMainTickLength: integer;
+    FSubTickLength: integer;
     FMainTickCount: integer;
     FMainTickCount: integer;
+    FMainTickUseDots: boolean;
+    FSubTickUseDots: boolean;
     FOnChange: TNotifyEvent;
     FOnChange: TNotifyEvent;
     FSubTickCount: integer;
     FSubTickCount: integer;
     FTextColor: TColor;
     FTextColor: TColor;
     FScaleRadius: integer;
     FScaleRadius: integer;
     FTickArcStyle: TSGTickArc;
     FTickArcStyle: TSGTickArc;
+    FOuterTickArcThickness: integer;
+    FInnerTickArcThickness: integer;
+    FTickArcColor: TColor;
+    FEnabled: boolean;
     FDirty: boolean;
     FDirty: boolean;
 
 
     procedure SetEnableScaleText(AValue: boolean);
     procedure SetEnableScaleText(AValue: boolean);
@@ -168,16 +201,22 @@ type
     procedure SetEnableMainTicks(AValue: boolean);
     procedure SetEnableMainTicks(AValue: boolean);
     procedure SetEnableSubTicks(AValue: boolean);
     procedure SetEnableSubTicks(AValue: boolean);
     procedure SetReverseScale(AValue: boolean);
     procedure SetReverseScale(AValue: boolean);
-    procedure SetLengthMainTick(AValue: integer);
-    procedure SetLengthSubTick(AValue: integer);
+    procedure SetMainTickLength(AValue: integer);
+    procedure SetSubTickLength(AValue: integer);
     procedure SetMainTickCount(AValue: integer);
     procedure SetMainTickCount(AValue: integer);
     procedure SetOnChange(AValue: TNotifyEvent);
     procedure SetOnChange(AValue: TNotifyEvent);
     procedure SetSubTickCount(AValue: integer);
     procedure SetSubTickCount(AValue: integer);
     procedure SetTextColor(AValue: TColor);
     procedure SetTextColor(AValue: TColor);
-    procedure SetThicknessMainTick(AValue: integer);
-    procedure SetThicknessSubTick(AValue: integer);
+    procedure SetMainTickThickness(AValue: integer);
+    procedure SetSubTickThickness(AValue: integer);
     procedure SetTickArcStyle(AValue: TSGTickArc);
     procedure SetTickArcStyle(AValue: TSGTickArc);
+    procedure SetInnerTickArcThickness(AValue: integer);
+    procedure SetOuterTickArcThickness(AValue: integer);
+    procedure SetTickArcColor(AValue: TColor);
     procedure SetScaleRadius(AValue: integer);
     procedure SetScaleRadius(AValue: integer);
+    procedure SetMainTickUseDots(AValue: boolean);
+    procedure SetSubTickUseDots(AValue: boolean);
+    procedure SetEnabled(AValue: boolean);
     procedure DirtyOnChange;
     procedure DirtyOnChange;
 
 
   protected
   protected
@@ -190,25 +229,31 @@ type
   published
   published
     property TickColor: TColor read FTickColor write SetTickColor;
     property TickColor: TColor read FTickColor write SetTickColor;
     property TextColor: TColor read FTextColor write SetTextColor;
     property TextColor: TColor read FTextColor write SetTextColor;
-    property TextSize: integer read FTextSize write SetTextSize default 20;
-    property TextStyle: TFontStyles read FTextStyle write SetTextStyle;
+    property TextSize: integer read FTextSize write SetTextSize default 24;
+    property TextStyle: TFontStyles read FTextStyle write SetTextStyle default [fsBold];
     property TextFont: string read FTextFont write SetTextFont;
     property TextFont: string read FTextFont write SetTextFont;
-    property EnableMainTicks: boolean read FEnableMainTicks write SetEnableMainTicks;
-    property EnableSubTicks: boolean read FEnableSubTicks write SetEnableSubTicks;
-    property EnableScaleText: boolean read FEnableScaleText write SetEnableScaleText;
+    property EnableMainTicks: boolean read FEnableMainTicks write SetEnableMainTicks default True;
+    property EnableSubTicks: boolean read FEnableSubTicks write SetEnableSubTicks default True;
+    property EnableScaleText: boolean read FEnableScaleText write SetEnableScaleText default True;
     property ReverseScale: boolean read FReverseScale write SetReverseScale default False;
     property ReverseScale: boolean read FReverseScale write SetReverseScale default False;
     property Start: integer read FStart write SetStart default 0;
     property Start: integer read FStart write SetStart default 0;
     property Step: integer read FStep write SetStep default 1;
     property Step: integer read FStep write SetStep default 1;
-    property MainTickCount: integer read FMainTickCount write SetMainTickCount;
-    property SubTickCount: integer read FSubTickCount write SetSubTickCount;
-    property LengthMainTick: integer read FLengthMainTick write SetLengthMainTick;
-    property LengthSubTick: integer read FLengthSubTick write SetLengthSubTick;
-    property ThicknessMainTick: integer read FThicknessMainTick write SetThicknessMainTick;
-    property ThicknessSubTick: integer read FThicknessSubTick write SetThicknessSubTick;
-    property TextRadius: integer read FTextRadius write SetTextRadius default 120;
-    property ScaleRadius: integer read FScaleRadius write SetScaleRadius;
-    property TickArcStyle : TSGTickArc read FTickArcStyle write SetTickArcStyle default taOuter;
-  end;
+    property MainTickCount: integer read FMainTickCount write SetMainTickCount default 10;
+    property SubTickCount: integer read FSubTickCount write SetSubTickCount default 5;
+    property MainTickLength: integer read FMainTickLength write SetMainTickLength default 15;
+    property SubTickLength: integer read FSubTickLength write SetSubTickLength default 8;
+    property MainTickThickness: integer read FMainTickThickness write SetMainTickThickness default 3;
+    property SubTickThickness: integer read FSubTickThickness write SetSubTickThickness default 1;
+    property TextRadius: integer read FTextRadius write SetTextRadius default 100;
+    property ScaleRadius: integer read FScaleRadius write SetScaleRadius default 125;
+    property TickArcStyle: TSGTickArc read FTickArcStyle write SetTickArcStyle default taOuter;
+    property InnerTickArcThickness: integer read FInnerTickArcThickness write SetInnerTickArcThickness default 3;
+    property OuterTickArcThickness: integer read FOuterTickArcThickness write SetOuterTickArcThickness default 3;
+    property TickArcColor: TColor read FTickArcColor write SetTickArcColor;
+    property MainTickUseDots: boolean read FMainTickUseDots write SetMainTickUseDots default False;
+    property SubTickUseDots: boolean read FSubTickUseDots write SetSubTickUseDots default False;
+    property Enabled: boolean read FEnabled write SetEnabled;
+end;
 
 
   { TSGBandSettings }
   { TSGBandSettings }
 
 
@@ -257,16 +302,16 @@ type
     property Enabled: boolean read FEnabled write SetEnabled default False;
     property Enabled: boolean read FEnabled write SetEnabled default False;
     property StartValue: single read FStartValue write SetStartValue default 0.0;
     property StartValue: single read FStartValue write SetStartValue default 0.0;
     property EndValue: single read FEndValue write SetEndValue default 100.0;
     property EndValue: single read FEndValue write SetEndValue default 100.0;
-    property EnableText: boolean read FEnableText write SetEnableText;
+    property EnableText: boolean read FEnableText write SetEnableText default False;
     property Text: TCaption read FText write SetText;
     property Text: TCaption read FText write SetText;
-    property TextSize: integer read FTextSize write SetTextSize default 20;
+    property TextSize: integer read FTextSize write SetTextSize default 14;
     property TextFont: string read FTextFont write SetTextFont;
     property TextFont: string read FTextFont write SetTextFont;
     property TextStyle: TFontStyles read FTextStyle write SetTextStyle;
     property TextStyle: TFontStyles read FTextStyle write SetTextStyle;
-    property TextRadius: integer read FTextRadius write SetTextRadius;
+    property TextRadius: integer read FTextRadius write SetTextRadius default 90;
     property TextColor: TColor read FTextColor write SetTextColor;
     property TextColor: TColor read FTextColor write SetTextColor;
-    property Thickness: integer read FBandThickness write SetBandThickness;
-    property BandRadius: integer read FBandRadius write SetBandRadius;
-    Property BandColor: TColor read FBandColor write SetBandColor;
+    property BandThickness: integer read FBandThickness write SetBandThickness default 25;
+    property BandRadius: integer read FBandRadius write SetBandRadius default 85;
+    Property BandColor: TColor read FBandColor write SetBandColor default clGreen;
   end;
   end;
 
 
   { TSGFaceSettings }
   { TSGFaceSettings }
@@ -306,13 +351,13 @@ type
     property Dirty: boolean read FDirty write FDirty;
     property Dirty: boolean read FDirty write FDirty;
 
 
   published
   published
-    property FillStyle: TSGFillStyle read FFillStyle write SetFillStyle;
-    property InnerColor: TColor read FInnerColor write SetInnerColor;
-    property OuterColor: TColor read FOuterColor write SetOuterColor;
+    property FillStyle: TSGFillStyle read FFillStyle write SetFillStyle default fsGradient;
+    property InnerColor: TColor read FInnerColor write SetInnerColor default clGray;
+    property OuterColor: TColor read FOuterColor write SetOuterColor default clBlack;
     property Picture: TPicture read FPicture write SetPicture;
     property Picture: TPicture read FPicture write SetPicture;
-    property PictureEnabled: boolean read FPictureEnabled write SetPictureEnabled;
-    property PictureOffsetX: integer read FPictureOffsetX write SetPictureOffsetX default 0;
-    property PictureOffsetY: integer read FPictureOffsetY write SetPictureOffsetY default 0;
+    property PictureEnabled: boolean read FPictureEnabled write SetPictureEnabled default False;
+    property PictureOffsetX: integer read FPictureOffsetX write SetPictureOffsetX default -30;
+    property PictureOffsetY: integer read FPictureOffsetY write SetPictureOffsetY default 60;
     property LightIntensity: integer read GetLightIntensity write SetLightIntensity default 300;
     property LightIntensity: integer read GetLightIntensity write SetLightIntensity default 300;
     property CurveExponent: single read FCurveExponent write SetCurveExponent default 0.05;
     property CurveExponent: single read FCurveExponent write SetCurveExponent default 0.05;
   end;
   end;
@@ -321,15 +366,22 @@ type
 
 
   TSGFrameSettings = class(TPersistent)
   TSGFrameSettings = class(TPersistent)
   private
   private
-    FFrameColor: TColor;
-    FBorderColor: TColor;
-    FBorderRadius: integer;
+    FOuterFrameColor: TColor;
+    FMiddleFrameColor: TColor;
+    FInnerFrameColor: TColor;
+    FOuterFrameThickness: integer;
+    FMiddleFrameThickness: integer;
+    FInnerFrameThickness: integer;
+
     FOnChange: TNotifyEvent;
     FOnChange: TNotifyEvent;
     FDirty: boolean;
     FDirty: boolean;
 
 
-    procedure SetBorderRadius(AValue: integer);
-    procedure SetFrameColor(AValue: TColor);
-    procedure SetBorderColor(AValue: TColor);
+    procedure SetOuterFrameColor(AValue: TColor);
+    procedure SetMiddleFrameColor(AValue: TColor);
+    procedure SetInnerFrameColor(AValue: TColor);
+    procedure SetOuterFrameThickness(AValue: integer);
+    procedure SetMiddleFrameThickness(AValue: integer);
+    procedure SetInnerFrameThickness(AValue: integer);
     procedure SetOnChange(AValue: TNotifyEvent);
     procedure SetOnChange(AValue: TNotifyEvent);
     procedure DirtyOnChange;
     procedure DirtyOnChange;
   protected
   protected
@@ -340,9 +392,13 @@ type
     property Dirty: boolean read FDirty write FDirty;
     property Dirty: boolean read FDirty write FDirty;
 
 
   published
   published
-    property BorderRadius: integer read FBorderRadius write SetBorderRadius;
-    property FrameColor: TColor read FFrameColor write SetFrameColor;
-    property BorderColor: TColor read FBorderColor write SetBorderColor;
+    property OuterFrameColor: TColor read FOuterFrameColor write SetOuterFrameColor;
+    property MiddleFrameColor: TColor read FMiddleFrameColor write SetMiddleFrameColor;
+    property InnerFrameColor: TColor read FInnerFrameColor write SetInnerFrameColor;
+
+    property OuterFrameThickness: integer read FOuterFrameThickness write SetOuterFrameThickness;
+    property MiddleFrameThickness: integer read FMiddleFrameThickness write SetMiddleFrameThickness;
+    property InnerFrameThickness: integer read FInnerFrameThickness write SetInnerFrameThickness;
   end;
   end;
 
 
   { TSGLEDSettings }
   { TSGLEDSettings }
@@ -379,18 +435,18 @@ type
     destructor Destroy; override;
     destructor Destroy; override;
     property OnChange: TNotifyEvent read FOnChange write SetOnChange;
     property OnChange: TNotifyEvent read FOnChange write SetOnChange;
     property Dirty: boolean read FDirty write FDirty;
     property Dirty: boolean read FDirty write FDirty;
+    property ActiveNoDoChange: boolean read FActive write SetActiveNoDoChange;
 
 
   published
   published
     property ActiveColor: TColor read FActiveColor write SetActiveColor;
     property ActiveColor: TColor read FActiveColor write SetActiveColor;
     property InactiveColor: TColor read FInactiveColor write SetInactiveColor;
     property InactiveColor: TColor read FInactiveColor write SetInactiveColor;
     property BorderColor: TColor read FBorderColor write SetBorderColor;
     property BorderColor: TColor read FBorderColor write SetBorderColor;
     property Size: integer read FSize write SetSize default 10;
     property Size: integer read FSize write SetSize default 10;
-    property OffsetX: integer read FOffsetX write SetOffsetX default 0;
-    property OffsetY: integer read FOffsetY write SetOffsetY default 50;
-    property Style: TSGLEDStyle read FStyle write SetStyle default lsShaded;
+    property OffsetX: integer read FOffsetX write SetOffsetX default 50;
+    property OffsetY: integer read FOffsetY write SetOffsetY default 90;
+    property Style: TSGLEDStyle read FStyle write SetStyle default lsNone;
     property Shape: TSGLEDShape read FShape write SetShape default lshRound;
     property Shape: TSGLEDShape read FShape write SetShape default lshRound;
-    property Active: boolean read FActive write SetActive;
-    property ActiveNoDoChange: boolean read FActive write SetActiveNoDoChange;
+    property Active: boolean read FActive write SetActive default False;
   end;
   end;
 
 
   { TSGRangeCheckLEDSettings }
   { TSGRangeCheckLEDSettings }
@@ -464,7 +520,7 @@ end;
 
 
 TSGMarkerSettings = class(TPersistent)
 TSGMarkerSettings = class(TPersistent)
 private
 private
-  FValue: single;     // this is the internal gauge value not user value
+  FValue: single;     // this may be the scaled (Min/Max) value in the SuperGauge
   FEnabled: boolean;
   FEnabled: boolean;
   FColor: TColor;
   FColor: TColor;
   FHeight: integer;
   FHeight: integer;
@@ -494,10 +550,10 @@ public
 published
 published
   property Value: single read FValue write SetValue default 0.0;
   property Value: single read FValue write SetValue default 0.0;
   property Enabled: boolean read FEnabled write SetEnabled default False;
   property Enabled: boolean read FEnabled write SetEnabled default False;
-  property Color: TColor read FColor write SetColor;
-  property Height: integer read FHeight write SetHeight;
-  property Radius: integer read FRadius write SetRadius;
-  property Width: integer read FWidth write SetWidth;
+  property Color: TColor read FColor write SetColor default clGreen;
+  property Height: integer read FHeight write SetHeight default 20;
+  property Radius: integer read FRadius write SetRadius default 130;
+  property Width: integer read FWidth write SetWidth default 15;
   property Style: TSGMarkerStyle read FStyle write SetStyle default msCenter;
   property Style: TSGMarkerStyle read FStyle write SetStyle default msCenter;
 end;
 end;
 
 
@@ -578,12 +634,12 @@ begin
   DirtyOnChange;
   DirtyOnChange;
 end;
 end;
 
 
-procedure TSGPointerCapSettings.SetEdgeThickness(AValue: integer);
+procedure TSGPointerCapSettings.SetEdgeWidth(AValue: integer);
 begin
 begin
-  if (FEdgeThickness = AValue) or (AValue < 0) then
+  if (FEdgeWidth = AValue) or (AValue < 0) then
     Exit;
     Exit;
 
 
-  FEdgeThickness := AValue;
+  FEdgeWidth := AValue;
   DirtyOnChange;
   DirtyOnChange;
 end;
 end;
 
 
@@ -632,7 +688,7 @@ begin
   FEdgeColor := clGray;
   FEdgeColor := clGray;
   FFillColor := clBlack;
   FFillColor := clBlack;
   FRadius := 20;
   FRadius := 20;
-  FEdgeThickness := 2;
+  FEdgeWidth := 1;
   FDirty := True;
   FDirty := True;
 end;
 end;
 
 
@@ -651,6 +707,24 @@ begin
 end;
 end;
 
 
 { TSGPointerSettings }
 { TSGPointerSettings }
+constructor TSGPointerSettings.Create;
+begin
+  FColor := BGRA(255, 127, 63); // Orange pointer
+  FLength := 130;
+  FWidth := 5;
+  FExtensionLength := 10;
+  FStyle := psLineExt;
+  FHighlightLine := False;
+  FHighlightColor := clGray;
+  FHighlightThickness := 1;
+  FDirty := True;
+  FEnabled := True;
+end;
+
+destructor TSGPointerSettings.Destroy;
+begin
+  inherited Destroy;
+end;
 
 
 procedure TSGPointerSettings.SetColor(AValue: TColor);
 procedure TSGPointerSettings.SetColor(AValue: TColor);
 begin
 begin
@@ -663,7 +737,7 @@ end;
 
 
 procedure TSGPointerSettings.SetLength(AValue: integer);
 procedure TSGPointerSettings.SetLength(AValue: integer);
 begin
 begin
-  if FLength = AValue then
+  if (FLength = AValue) or (AValue < 0) then
     Exit;
     Exit;
 
 
   FLength := AValue;
   FLength := AValue;
@@ -678,12 +752,12 @@ begin
     FOnChange(Self);
     FOnChange(Self);
 end;
 end;
 
 
-procedure TSGPointerSettings.SetThickness(AValue: integer);
+procedure TSGPointerSettings.SetWidth(AValue: integer);
 begin
 begin
-  if FThickness = AValue then
+  if (FWidth = AValue) or (AValue < 0)then
     Exit;
     Exit;
 
 
-  FThickness := AValue;
+  FWidth := AValue;
   DirtyOnChange;
   DirtyOnChange;
 end;
 end;
 
 
@@ -698,21 +772,48 @@ end;
 
 
 procedure TSGPointerSettings.SetExtensionLength(AValue: integer);
 procedure TSGPointerSettings.SetExtensionLength(AValue: integer);
 begin
 begin
-  if FExtensionLength = AValue then
+  if (FExtensionLength = AValue) or (AValue < 0) then
     Exit;
     Exit;
 
 
   FExtensionLength := AValue;
   FExtensionLength := AValue;
   DirtyOnChange;
   DirtyOnChange;
 end;
 end;
 
 
-constructor TSGPointerSettings.Create;
+procedure TSGPointerSettings.SetHighlightLine(AValue: boolean);
 begin
 begin
-  FColor := BGRA(255, 127, 63); // Orange pointer
-  FLength := 160;
-  FThickness := 5;
-  FExtensionLength := 20;
-  FStyle := psLineExt;
-  FDirty := True;
+  if FHighlightLine = AValue then
+    Exit;
+
+  FHighlightLine := AValue;
+  DirtyOnChange;
+end;
+
+
+procedure TSGPointerSettings.SetHighlightColor(AValue: TColor);
+begin
+  if (FHighlightColor = AValue) then
+    Exit;
+
+  FHighlightColor := AValue;
+  DirtyOnChange;
+end;
+
+procedure TSGPointerSettings.SetHighlightThickness(AValue: integer);
+begin
+  if (FHighlightThickness = AValue) or (AValue < 0) then
+    Exit;
+
+  FHighlightThickness := AValue;
+  DirtyOnChange;
+end;
+
+procedure TSGPointerSettings.SetEnabled(AValue: boolean);
+begin
+  if FEnabled = AValue then
+    Exit;
+
+  FEnabled := AValue;
+  DirtyOnChange;
 end;
 end;
 
 
 procedure TSGPointerSettings.DirtyOnChange;
 procedure TSGPointerSettings.DirtyOnChange;
@@ -723,20 +824,16 @@ begin
     FOnChange(Self);
     FOnChange(Self);
 end;
 end;
 
 
-destructor TSGPointerSettings.Destroy;
-begin
-  inherited Destroy;
-end;
-
 { TSGScaleSettings }
 { TSGScaleSettings }
 
 
 constructor TSGScaleSettings.Create;
 constructor TSGScaleSettings.Create;
 begin
 begin
   FTickColor := BGRA(223, 196, 125);  // Tan
   FTickColor := BGRA(223, 196, 125);  // Tan
   FTextColor := BGRA(140, 208, 211);  // Light Blue
   FTextColor := BGRA(140, 208, 211);  // Light Blue
-  FTextFont := 'Calibri';
+  FTextFont := 'default';
   FTextSize := 20;
   FTextSize := 20;
-  FTextRadius := 120;
+  FTextStyle := [fsBold];
+  FTextRadius := 100;
   FEnableMainTicks := True;
   FEnableMainTicks := True;
   FEnableSubTicks := True;
   FEnableSubTicks := True;
   FEnableScaleText := True;
   FEnableScaleText := True;
@@ -745,12 +842,18 @@ begin
   FSubTickCount := 5;
   FSubTickCount := 5;
   FStart := 0;
   FStart := 0;
   FStep := 1;
   FStep := 1;
-  FLengthMainTick := 15;
-  FLengthSubTick := 8;
-  FThicknessMainTick := 3;
-  FThicknessSubTick := 1;
+  FMainTickLength := 15;
+  FSubTickLength := 8;
+  FMainTickThickness := 3;
+  FSubTickThickness := 1;
   FTickArcStyle := taOuter;
   FTickArcStyle := taOuter;
-  FScaleRadius := 155;
+  FMainTickUseDots:= False;
+  FSubTickUseDots:= False;
+  FInnerTickArcThickness := 3;
+  FOuterTickArcThickness := 3;
+  FTickArcColor := FTickColor;  // Same as the ticks
+  FScaleRadius := 125;
+  FEnabled := True;
   FDirty := True;
   FDirty := True;
 end;
 end;
 
 
@@ -759,6 +862,15 @@ begin
   inherited Destroy;
   inherited Destroy;
 end;
 end;
 
 
+procedure TSGScaleSettings.SetEnabled(AValue: boolean);
+begin
+  if FEnabled = AValue then
+    Exit;
+
+  FEnabled := AValue;
+  DirtyOnChange;
+end;
+
 procedure TSGScaleSettings.SetTextFont(AValue: string);
 procedure TSGScaleSettings.SetTextFont(AValue: string);
 begin
 begin
   if FTextFont = AValue then
   if FTextFont = AValue then
@@ -792,6 +904,24 @@ begin
   DirtyOnChange;
   DirtyOnChange;
 end;
 end;
 
 
+procedure TSGScaleSettings.SetMainTickUseDots(AValue: boolean);
+begin
+  if FMainTickUseDots = AValue then
+    Exit;
+
+  FMainTickUseDots := AValue;
+  DirtyOnChange;
+end;
+
+procedure TSGScaleSettings.SetSubTickUseDots(AValue: boolean);
+begin
+  if FSubTickUseDots = AValue then
+    Exit;
+
+  FSubTickUseDots := AValue;
+  DirtyOnChange;
+end;
+
 procedure TSGScaleSettings.SetMaximum(AValue: integer);
 procedure TSGScaleSettings.SetMaximum(AValue: integer);
 begin
 begin
   if (FMaximum = AValue) or (AValue <= FMinimum) then
   if (FMaximum = AValue) or (AValue <= FMinimum) then
@@ -864,6 +994,33 @@ begin
   DirtyOnChange;
   DirtyOnChange;
 end;
 end;
 
 
+procedure TSGScaleSettings.SetInnerTickArcThickness(AValue: integer);
+begin
+  if FInnerTickArcThickness = AValue then
+     exit;
+
+  FInnerTickArcThickness := AValue;
+  DirtyOnChange;
+end;
+
+procedure TSGScaleSettings.SetOuterTickArcThickness(AValue: integer);
+begin
+  if FOuterTickArcThickness = AValue then
+     exit;
+
+  FOuterTickArcThickness := AValue;
+  DirtyOnChange;
+end;
+
+procedure TSGScaleSettings.SetTickArcColor(AValue: TColor);
+begin
+  if FTickArcColor = AValue then
+    Exit;
+
+  FTickArcColor := AValue;
+  DirtyOnChange;
+end;
+
 procedure TSGScaleSettings.SetEnableMainTicks(AValue: boolean);
 procedure TSGScaleSettings.SetEnableMainTicks(AValue: boolean);
 begin
 begin
   if FEnableMainTicks = AValue then
   if FEnableMainTicks = AValue then
@@ -882,21 +1039,21 @@ begin
   DirtyOnChange;
   DirtyOnChange;
 end;
 end;
 
 
-procedure TSGScaleSettings.SetLengthMainTick(AValue: integer);
+procedure TSGScaleSettings.SetMainTickLength(AValue: integer);
 begin
 begin
-  if (FLengthMainTick = AValue) or (AValue < 1) then
+  if (FMainTickLength = AValue) or (AValue < 0) then
     Exit;
     Exit;
 
 
-  FLengthMainTick := AValue;
+  FMainTickLength := AValue;
   DirtyOnChange;
   DirtyOnChange;
 end;
 end;
 
 
-procedure TSGScaleSettings.SetLengthSubTick(AValue: integer);
+procedure TSGScaleSettings.SetSubTickLength(AValue: integer);
 begin
 begin
-  if (FLengthSubTick = AValue) or (AValue < 1) then
+  if (FSubTickLength = AValue) or (AValue < 0) then
     Exit;
     Exit;
 
 
-  FLengthSubTick := AValue;
+  FSubTickLength := AValue;
   DirtyOnChange;
   DirtyOnChange;
 end;
 end;
 
 
@@ -944,21 +1101,21 @@ begin
   DirtyOnChange;
   DirtyOnChange;
 end;
 end;
 
 
-procedure TSGScaleSettings.SetThicknessMainTick(AValue: integer);
+procedure TSGScaleSettings.SetMainTickThickness(AValue: integer);
 begin
 begin
-  if (FThicknessMainTick = AValue) or (AValue < 1) then
+  if (FMainTickThickness = AValue) or (AValue < 0) then
     Exit;
     Exit;
 
 
-  FThicknessMainTick := AValue;
+  FMainTickThickness := AValue;
   DirtyOnChange;
   DirtyOnChange;
 end;
 end;
 
 
-procedure TSGScaleSettings.SetThicknessSubTick(AValue: integer);
+procedure TSGScaleSettings.SetSubTickThickness(AValue: integer);
 begin
 begin
-  if (FThicknessSubTick = AValue) or (AValue < 1)  then
+  if (FSubTickThickness = AValue) or (AValue < 0)  then
     Exit;
     Exit;
 
 
-  FThicknessSubTick := AValue;
+  FSubTickThickness := AValue;
   DirtyOnChange;
   DirtyOnChange;
 end;
 end;
 
 
@@ -977,16 +1134,16 @@ begin
   FEnabled := False;
   FEnabled := False;
   FEnableText := False;
   FEnableText := False;
   FText := '';
   FText := '';
-  FTextColor := clBlack;
+  FTextColor := clWhite;
   FTextFont := 'default';
   FTextFont := 'default';
   FTextStyle := [];
   FTextStyle := [];
-  FTextSize := 20;
-  FTextRadius := 100;
+  FTextSize := 14;
+  FTextRadius := 90;
   FStartValue := 0;
   FStartValue := 0;
   FEndValue := 20;
   FEndValue := 20;
-  FBandRadius := 100;
+  FBandRadius := 85;
   FBandColor := clGreen;
   FBandColor := clGreen;
-  FBandThickness := 40;
+  FBandThickness := 25;
   FStartValue := 0;
   FStartValue := 0;
   FEndValue := 100;
   FEndValue := 100;
 
 
@@ -1150,9 +1307,9 @@ begin
   FInnerColor := clGray;
   FInnerColor := clGray;
   FFillStyle := fsGradient;
   FFillStyle := fsGradient;
   FPicture := TPicture.Create;
   FPicture := TPicture.Create;
-  FPictureEnabled := FALSE;
-  FPictureOffsetX := 0;
-  FPictureOffsetY := 0;
+  FPictureEnabled := False;
+  FPictureOffsetX := -30;
+  FPictureOffsetY := 60;
 
 
   FDirty := True;
   FDirty := True;
 end;
 end;
@@ -1272,9 +1429,13 @@ end;
 
 
 constructor TSGFrameSettings.Create;
 constructor TSGFrameSettings.Create;
 begin
 begin
-  FFrameColor := clBlack;
-  FBorderColor := clGray;
-  FBorderRadius := 2;
+  FOuterFrameColor := clGray;
+  FMiddleFrameColor := clSilver;
+  FInnerFrameColor := clMedGray;
+  FOuterFrameThickness := 5;
+  FMiddleFrameThickness := 5;
+  FInnerFrameThickness := 5;
+
   FDirty := True;
   FDirty := True;
 end;
 end;
 
 
@@ -1283,30 +1444,57 @@ begin
   inherited Destroy;
   inherited Destroy;
 end;
 end;
 
 
-procedure TSGFrameSettings.SetBorderRadius(AValue: integer);
+procedure TSGFrameSettings.SetOuterFrameColor(AValue: TColor);
 begin
 begin
-  if (FBorderRadius = AValue) or (AValue < 0) then
+  if FOuterFrameColor = AValue then
     Exit;
     Exit;
 
 
-  FBorderRadius := AValue;
+  FOuterFrameColor := AValue;
   DirtyOnChange;
   DirtyOnChange;
 end;
 end;
 
 
-procedure TSGFrameSettings.SetFrameColor(AValue: TColor);
+procedure TSGFrameSettings.SetMiddleFrameColor(AValue: TColor);
 begin
 begin
-  if FFrameColor = AValue then
+  if FMiddleFrameColor = AValue then
     Exit;
     Exit;
 
 
-  FFrameColor := AValue;
+  FMiddleFrameColor := AValue;
   DirtyOnChange;
   DirtyOnChange;
 end;
 end;
 
 
-procedure TSGFrameSettings.SetBorderColor(AValue: TColor);
+procedure TSGFrameSettings.SetInnerFrameColor(AValue: TColor);
 begin
 begin
-  if FBorderColor = AValue then
+  if FInnerFrameColor = AValue then
     Exit;
     Exit;
 
 
-  FBorderColor := AValue;
+  FInnerFrameColor := AValue;
+  DirtyOnChange;
+end;
+
+procedure TSGFrameSettings.SetOuterFrameThickness(AValue: integer);
+begin
+  if (FOuterFrameThickness = AValue) or (AValue < 0) then
+    Exit;
+
+  FOuterFrameThickness := AValue;
+  DirtyOnChange;
+end;
+
+procedure TSGFrameSettings.SetMiddleFrameThickness(AValue: integer);
+begin
+  if (FMiddleFrameThickness = AValue) or (AValue < 0) then
+    Exit;
+
+  FMiddleFrameThickness := AValue;
+  DirtyOnChange;
+end;
+
+procedure TSGFrameSettings.SetInnerFrameThickness(AValue: integer);
+begin
+  if (FInnerFrameThickness = AValue) or (AValue < 0) then
+    Exit;
+
+  FInnerFrameThickness := AValue;
   DirtyOnChange;
   DirtyOnChange;
 end;
 end;
 
 
@@ -1333,11 +1521,10 @@ begin
   FActiveColor := clRed;
   FActiveColor := clRed;
   FInActiveColor := clBlack;
   FInActiveColor := clBlack;
   FBorderColor := clGray;
   FBorderColor := clGray;
-  FSize := 10;
-  FOffsetX := 0;
-  FOffsetY := 50;
-  FStyle := lsShaded;
-
+  FSize := 15;
+  FOffsetX := 80;
+  FOffsetY := 120;
+  FStyle := lsNone;
   FDirty := True;
   FDirty := True;
 end;
 end;
 
 
@@ -1355,7 +1542,8 @@ begin
   DirtyOnChange;
   DirtyOnChange;
 end;
 end;
 
 
-// HACK, need to have a way to NOT dirty on change
+// HACK, need to have a way to NOT call DirtyOnChange, This is it
+// Need to expose this so the Gauge can use it and not cause a refresh
 
 
 procedure TSGLEDSettings.SetActiveNoDoChange(AValue: boolean);
 procedure TSGLEDSettings.SetActiveNoDoChange(AValue: boolean);
 begin
 begin
@@ -1464,8 +1652,9 @@ begin
   FRangeStartValue := 0;
   FRangeStartValue := 0;
   FRangeEndValue := 100;
   FRangeEndValue := 100;
   FRangeType := rcNone;
   FRangeType := rcNone;
-  FOffsetX := 90;
-  FOffsetY := 120;
+  FSize := 10;
+  FOffsetX := 50;
+  FOffsetY := 90;
 end;
 end;
 
 
 destructor TSGRangeCheckLEDSettings.Destroy;
 destructor TSGRangeCheckLEDSettings.Destroy;
@@ -1592,8 +1781,8 @@ begin
   FEnabled := False;
   FEnabled := False;
   FColor := clLime;
   FColor := clLime;
   FHeight := 20;
   FHeight := 20;
-  FWidth := 10;
-  FRadius := 165;
+  FWidth := 15;
+  FRadius := 130;
   FStyle := msCenter;
   FStyle := msCenter;
   FDirty := True;
   FDirty := True;
   FValue := 0.0;
   FValue := 0.0;

+ 7 - 2
superspinner.pas

@@ -25,6 +25,10 @@
                the way a Spinner works, new events and props. Updated code style
                the way a Spinner works, new events and props. Updated code style
                to be more similar to SuperGauge.
                to be more similar to SuperGauge.
 ***************************** END CONTRIBUTOR(S) *****************************}
 ***************************** END CONTRIBUTOR(S) *****************************}
+{******************************** CHANGE LOG *********************************
+v1.01 - Sandy Ganz
+        Minor Code clean... So Far
+******************************* END CHANGE LOG *******************************}
 
 
 unit SuperSpinner;
 unit SuperSpinner;
 
 
@@ -38,8 +42,9 @@ uses
   BCBaseCtrls, BGRAGradients, BGRABitmap, BGRABitmapTypes, SuperSpinnerCommon;
   BCBaseCtrls, BGRAGradients, BGRABitmap, BGRABitmapTypes, SuperSpinnerCommon;
 
 
 const
 const
-  VERSIONSTR = '1.00';          // spinner version
+  VERSIONSTR = '1.01';          // spinner version
   WHEEL_SPEED_FACTOR = 0.005;   // used to calculate mouse wheel speed
   WHEEL_SPEED_FACTOR = 0.005;   // used to calculate mouse wheel speed
+  BASELINE_SIZE = 150;          // For ResolveSizes()
 
 
   RESOLUTION_HIGHEST = 1;       // used for setting spinners resolution
   RESOLUTION_HIGHEST = 1;       // used for setting spinners resolution
   RESOLUTION_HIGH = 2;          // Keeps the number of position somewhat hidden
   RESOLUTION_HIGH = 2;          // Keeps the number of position somewhat hidden
@@ -413,7 +418,7 @@ begin
   FResolvedSizes.MinWH := GetMinSize;
   FResolvedSizes.MinWH := GetMinSize;
   FResolvedSizes.MinRadius := FResolvedSizes.MinWH div 2;
   FResolvedSizes.MinRadius := FResolvedSizes.MinWH div 2;
   FMinRadius := FResolvedSizes.MinRadius;
   FMinRadius := FResolvedSizes.MinRadius;
-  scale := FResolvedSizes.MinWH / 150.0;
+  scale := FResolvedSizes.MinWH / BASELINE_SIZE;
 
 
   if FAutoScale then
   if FAutoScale then
   begin
   begin

+ 11 - 7
test/test_supergauge/about.lfm

@@ -1,7 +1,7 @@
 object AboutFrm: TAboutFrm
 object AboutFrm: TAboutFrm
-  Left = 1927
+  Left = 1877
   Height = 653
   Height = 653
-  Top = 212
+  Top = 162
   Width = 615
   Width = 615
   BorderStyle = bsSingle
   BorderStyle = bsSingle
   Caption = 'About Super Gauge'
   Caption = 'About Super Gauge'
@@ -91,6 +91,7 @@ object AboutFrm: TAboutFrm
     0000
     0000
   }
   }
   OnCreate = FormCreate
   OnCreate = FormCreate
+  OnShow = FormShow
   Position = poMainFormCenter
   Position = poMainFormCenter
   LCLVersion = '3.6.0.0'
   LCLVersion = '3.6.0.0'
   object Panel1: TPanel
   object Panel1: TPanel
@@ -186,13 +187,15 @@ object AboutFrm: TAboutFrm
       'A few fixes in code (And I''m suire I added some bugs!) but'
       'A few fixes in code (And I''m suire I added some bugs!) but'
       'many enhancements to the gauge to make is more useable.'
       'many enhancements to the gauge to make is more useable.'
       ''
       ''
-      'Some notable features of SG'
+      'Some notable features of SG V2'
       ''
       ''
+      '* Multiple Scales'
+      '* Multiple Pointers'
       '* 5x Faster drawing and caching of non-changing layers'
       '* 5x Faster drawing and caching of non-changing layers'
       '* All propterties will update in design time (or should!!)'
       '* All propterties will update in design time (or should!!)'
       '* More options on drawing and shading overall'
       '* More options on drawing and shading overall'
       '* Images'
       '* Images'
-      '* Seperations of Min/Max gauge values and scale drawing'
+      '* Separation of Min/Max gauge values and scale drawing'
       '* Support for ANY range of gauge values and scale'
       '* Support for ANY range of gauge values and scale'
       '* Multiple Inner Bands with Text, range and color'
       '* Multiple Inner Bands with Text, range and color'
       '* Several Pointer styles including arc style'
       '* Several Pointer styles including arc style'
@@ -200,6 +203,8 @@ object AboutFrm: TAboutFrm
       '* Range Led with many triggers and call backs'
       '* Range Led with many triggers and call backs'
       '* Overall Gauge Overange callbacks'
       '* Overall Gauge Overange callbacks'
       '* Scale markers for use as desired'
       '* Scale markers for use as desired'
+      '* General astetic improvements'
+      '* Full support for HighDPI and related scaling issues.'
       '* AND THIS TEST PROGRAM'
       '* AND THIS TEST PROGRAM'
       ''
       ''
       '-- TEST PROGRAM OPERATION --'
       '-- TEST PROGRAM OPERATION --'
@@ -207,9 +212,8 @@ object AboutFrm: TAboutFrm
       'changes while operational. The code for this test program'
       'changes while operational. The code for this test program'
       'is a lot of cut and past, so feel free to clean as you see fit.'
       'is a lot of cut and past, so feel free to clean as you see fit.'
       ''
       ''
-      'Sizing of the gauge is not totally dynamic, you must resize '
-      'some elements to make fit. Their is an experimental autosize'
-      'options, but it''s not well implemented. '
+      'Click on the HELP menu item (must have a local browser) for '
+      'more information on the test program and SuperGauge V2'
       ''
       ''
       'Again, play with the settings!'
       'Again, play with the settings!'
       ''
       ''

+ 8 - 2
test/test_supergauge/about.pas

@@ -24,10 +24,11 @@ type
     SGTestVersionLbl: TLabel;
     SGTestVersionLbl: TLabel;
     procedure CloseBtnClick(Sender: TObject);
     procedure CloseBtnClick(Sender: TObject);
     procedure FormCreate(Sender: TObject);
     procedure FormCreate(Sender: TObject);
+    procedure FormShow(Sender: TObject);
   private
   private
 
 
   public
   public
-
+    VersionStr: string;
   end;
   end;
 
 
 var
 var
@@ -41,7 +42,12 @@ implementation
 
 
 procedure TAboutFrm.FormCreate(Sender: TObject);
 procedure TAboutFrm.FormCreate(Sender: TObject);
 begin
 begin
-  SGTestVersionLbl.Caption := VERSIONSTR;
+  SGTestVersionLbl.Caption := '??';
+end;
+
+procedure TAboutFrm.FormShow(Sender: TObject);
+begin
+  SGTestVersionLbl.Caption := VersionStr;
   SGVersionLbl.Caption := SuperGauge.VERSIONSTR;
   SGVersionLbl.Caption := SuperGauge.VERSIONSTR;
 end;
 end;
 
 

+ 313 - 0
test/test_supergauge/html/index.html

@@ -0,0 +1,313 @@
+<!doctype html>
+<html>
+    <head>
+        <title>SuperGauge V2.0+ Help</title>
+    </head>
+    <H1>SuperGauge V2.0+</H1>
+    <p>
+        Information and help for SuperGauge V2.0+ and the Test Program
+    </p>
+    <h2>Test Program Overall Operations</h2>
+    <p>
+        The test progam has access to just about every property for the gauge. In 
+        addition pre-set Gauges are in the dropdown under the Displayed gauge that
+        can be used to change the look and expose many different settings. 
+    </p>
+    <p>
+        It's initial use was to help test the gauge functionality, but it's useful
+        for changing properties live and seeing how it looks live without a recompile.
+        Also LOOK at the code, while not pretty it will show how to do most things
+        you would need to do to use the gauge. Also some extra code is included to
+        turn the Markers into Min, Max and Peak hold indicators using timers. When
+        in doubt look at the code!
+    </p>
+    <p>
+        The left side of the form has the Gauge in the upper portion and 
+        the Knobs to control the gauge (Both main pointer and Aux pointer) below it.
+    </p>
+    Under the Gauge is a dropdown that has a bunch of pre-designed gauges to check out. 
+    Changing to any other style will reset most all properties of the gauge, so if
+    you have settings and you change the style from the drop down, it will reset
+    them from the default as dropped on a form Gauge settings.
+    <p>
+        The 'Round' checkbox if enabled will take all values from the Knobs and
+        round them before setting the gauge. Common status of some of the basic settings
+        are all displayed next to the knobs.
+    </p>
+    Buttons in the group box are as follows -
+    <ul>
+        <li>Toggle Random - Turns on the random value generation for both pointers. If the knob is RED it indicates the pointer is Disabled.
+            A shortcut to enable/disble a pointer is to simply Double Click the knob to toggle a pointers ENABLED status
+        </li>
+        <li>Overload Positive - Sets the Gauge Value to a value greater then the MaxValue to put the gauge into an OVERLOAD condition</li>
+        <li>Overload Negative - Sets the Gauge Value to a value less then the MinValue to put the gauge into an OVERLOAD condition</li>
+        <li>Min Value - Sets the gauge to the MinValue</li>
+        <li>Max Value - Sets the gauge to the MaxValue</li>
+        <li>Numbers +/- - These can change the value by a preset amount</li>
+        <li>Zero - Resets a few gauge values (Value, AuxValue, Markers, and a few other things</li>
+        <li>Round Value - Will take the current Knob values and ROUNDS them</li>
+    </ul>
+    <p>
+        The Right side of the form has a Tabbed interface, each tab has related settings and
+        allows run time changing of most all properties. These tabs have a lot of controls on them,
+        but hopefully it's clear what each one does.
+    </p>
+    Hovering over most controls will show the controls hint and give a short description
+    of what it is trying to do. Again, if unsure, look at the code and see what it's doing.
+    <br>
+    <h2>The Tabs</h2>
+    <hr>
+    <h3>Basic</h3>
+    <p>
+        The 2 group boxes (Size, Position) let you resize and move the gauge at runtime to see changes. Friendly
+        reset buttons also can reset to default sizes. The 3rd groupbox 'Basic' has some important settings for the
+        Gauge. The ones to look at are Min/Max values and the Auto Scale check box.
+    </p>
+    <p>
+        The Min and Max values for both the Main and Aux set the range span of the pointers. That is if you
+        want your gauge Value to respond to a range of 0-100, then set the MinVal to 0, and MaxVal to 100. Same
+        for the independant Aux Pointer.
+    </p>
+    <p>
+        <strong>These Min and Max Values apply to both Main and Aux Pointers (Examples)</strong>
+    </p>
+    <p>
+        MinVal = 0, MaxVal = 100 - Simple 0 to 100 range (inclusive) as expected
+    </p>
+    <p>
+        MinVal = -5, MaxVal = 5 - The pointer range will be from -5 to 5
+    </p>
+    <p>
+        MinVal = 100, MaxVal = 0 - The pointer will operate backwards on a range of 100 (Pointer Left most) to 0 (Pointer Right Most) 
+        This is useful for Backwards working gauges (See Scale Options)
+    </p>
+    <p>
+		Note : The MinValue and MaxValue are also used for the RangeLED and the Markers for scaling. The AuxMinValue and
+		AuxMaxValue have no impact on the RangeLED and Markers</p>
+    <strong>
+    *****************************************************
+    <br>
+    NOTE : Setting of the gauge MinValue and MaxValue 
+    <br>
+    are for the RANGE of the gauge and what the Pointers
+    <br> 
+    will represent on a 0-270 degree gauge. The settings
+    <br>
+    of the Scale and how it reads is INDEPENDENT of the
+    <br> 
+    settings on the Min/Max Value
+    <br>
+    *****************************************************
+    <br>
+    </strong>
+    <h4>Auto Scale</h4>
+    <p>When the Auto Scale checkbox is NOT enabled the gauge will draw with dimensions that are specified
+        in the properties. A pixel is a pixel so to speak, no internal scaling done. However IF you design across different platforms
+        and either design or deployment is on a HighDPI and one is a Low/NormalDPI monitor you will have a problem in that 
+        the size of the component will be changed by the LCL
+    </p>
+    <p>
+        To eliminate this issue set the AutoScale property to true (Click the checkbox in the test program)
+    </p>
+    <p> To see some effects of the Auto Scale in action, hit the '<strong>+ W&amp;H Size</strong>' button to increase the size of the gauge.
+        While the Frame of the gauge will scale in size (with or without Auto Scale), nothing else will. If you do the same with the Auto Scale
+        enabled, it will preserve the look of and scale all components of the gauge. This is sometimes needed
+        as the LCL will change the scale and thus the size of your component. This is not always desired, so
+        the Auto Scale option exists. 
+    </p>
+    <hr>
+    <h3>Frame</h3>
+    <p>
+        This page contains the basic settings for the 3 Frame rings of the gauge. Colors and Thickness of each can be specified
+        for your desired look. 
+        <br>
+        Changing the thickness of the Outermost will automatically push in the Middle, and Inner as the are drawn with respect to 
+        eachother. 
+        <br>
+        If you do not want to use a particular one set the thickness to zero, or you can also set the color to 
+        <strong>clNone</strong> and the ring will be drawn, but transparent. This can be useful for spacing out
+        the gauge from other components and such.
+    </p>
+    <p>Again NOTE that the Frame is the only part that will automatically scale with the size of the Gauge, changing the
+        size of the frame rings will NOT change anything else that is displayed (Scale, Pointers, etc).
+    </p>
+    <hr>
+    <h3>Face</h3>
+    <p>
+        The Face page has a few settings, most are self explanitory. The Fill style allows the background of the face to be
+        a few different styles. Try each from the drop down to save me the work of explaining them all.
+    </p>
+    <p>For the Light Intensity and Curve Exponent they are related to the Phong type of style. Similar to a few other places 
+        within the gauge. These change how the shading looks. Just play around for your look. These ONLY affect the look when the style 
+        is set to fsPhong Fill Style
+    </p>
+    <p>The last property of interest is the Picture. You can load an image that can be drawn on the face and moved around.
+        This is useful for Logo's or other indicators you may want
+    </p>
+    <hr>
+    <h3>Scales</h3>
+    <p>The Gauge has the ability to display 2 different scales. The Main and Aux scale. These both have the same setting options.
+        A lot of options exist for the Scales. The topmost options are check boxes that enable specific modes, how tick marks are drawn,
+        drawing the scale reversed (from High to low), etc.
+    </p>
+    <p>Below those options are <strong>Scale Start</strong> and <strong>Scale Step</strong> these along with the
+        <strong>Main Tick Count</strong> and <strong>Subtick Count</strong> Determine most of the scale range. 
+    </p>
+    <strong>Explination Of Each</strong>
+    <ul>
+        <li>Scale Start - The starting value of the scale</li>
+        <li>Scale Step - The increment for each Main Tick</li>
+        <li>Main Tick Count - The number of Main Ticks</li>
+        <li>SubTick Count - The number of ticks between each Main Tick</li>
+    </ul>
+    <br>
+    Use the Preset Gauge selections on the test program to see specific example and how to set these up.
+    <p>
+        In addition settings for an arc above or below the Tick marks can be enabled along with a few settings for Fonts and
+        related size and color.
+    </p>
+    <p>
+        <strong>REMEMBER : The settings for the scale have no impact on the Pointers, RangeLED, etc., it's for display ONLY</strong>
+    </p>
+    <hr>
+    <h3>Pointers</h3>
+    <p>
+        Pointers are mapped to the MinValue and MaxValue of the gauge and use those to properly scale pointer movement. The pointers do
+        not follow the scale if that is not clear. Their are two pointers, the Main and the Aux. The main pointer follows the gauges Value 
+        and the Aux Pointer follows the AuxValue. Pretty simple.
+    </p>
+    <p>
+        The RangeLED follows the Main Pointers Value only. Also both Pointers have 
+        the ability to trigger events based on Overload conditions. Anything that is above or below the MinValue or MaxValue 
+        (AuxMinValue, AuxMaxValue) can trigger specific events to alert. On overload conditions, the gauge will be 'pegged'
+        to the MinValue or MaxValue, and for the Aux pointer similar but will be the AuxMinValue and AuxMaxValue. 
+    </p>
+    <p>
+        The test program will flash some elements RED in these conditions. Also note that the RangeLED can be set to automatically 
+        watch for the gauge out of range condition and light up the LED if desired (use the <strong>rcGaugeOutOfRange</strong> setting in RangeLED.RangeType)
+    </p>
+    Several types of pointers are available.
+    <br>
+    <br>
+    <strong>Pointer Styles</strong>
+    <ul>
+        <li>psLine - A pointer that eminates from the center of the the gauge outwards</li>
+        <li>psLineExt - A pointer with a 'Tail' from the back side of the center and outwards</li>
+        <li>psArc - Instead of a pointer from the center of the gauge, this will draw an ARC indicating the position*</li>
+        <li>psTriangle - a Triangle shaled pointer*</li>
+    </ul>
+    * Some settings will not apply to the selected style
+    <br>
+    <br>
+    <strong>Pointer Notes</strong>
+    <ul>
+        <li>PointerCap settings are used to draw the pointer cap over or under the pointer, or not at all.</li>
+        <li>When the Aux Pointer is drawn it is <strong>ALWAYS</strong> drawn under the main pointer and the cap</li>
+        <li>Highlight settings will draw a <strong>CENTER</strong> line for line type pointers and an <strong>OUTLINE</strong> for Triangle pointers, and is ignored for arc.</li>
+    </ul>
+    <hr>
+    <h3>Cap</h3>
+    <p>
+        The PointerCapSettings is used to set the look of the center cap on the gauge. This is used to get a specific look along
+        with the PointerSettings. Position and Style are the main settings along with color and shading.
+    </p>
+    <strong>Position Settings</Strong>
+    <ul>
+        <li>cpOver - Draw the cap OVER the pointer</li>
+        <li>cpUnder - Draw the cap UNDER the pointer</li>
+    </ul>
+    <p>
+        NOTE: The AuxPointer is <strong>ALWAYS</strong> drawn under both the Main Pointer and the Cap
+    </p>
+    <strong>Style Settings</strong>
+    <ul>
+        <li>csNone - Don't draw the Cap</li>
+        <li>csFlat - Draw a solid color (non-shaded) Cap</li>
+        <li>csShaded - Draw a simple shaded Cap, uses Edge and Fill Colors to shade</li>
+        <li>csPhong - Draw a Phong shaded Cap, uses Light Intensity and Curve as well as Edge and Fill Colors</li>
+    </ul>
+    <p>
+		The reset of the settings are related to the colors and various sizes
+    </p>
+    <hr>
+    <h3>Text</h3>
+    <p>
+		The Gauge supports three Text objects, each can be customized independently. The offset is based on the center 
+		of the Gauge, so OffsetX=0, OffsetY=0 would be the center. These values can be negative or positive to move the 
+		text as needed.
+	</p>
+	<p>
+		The reset of the Text Settings are for Font Attributes and are pretty self explanitory.
+	</p>
+	<p>
+		Text can be used for static information or could be used for displaing dyamic information. They are relatively lightweight to
+		draw. An example would be to 'digitally' display the gauge value. 
+	</p>
+    <hr>
+    <h3>Band</h3>
+    <p>
+		Bands are a colored Arc to help mark a range on the Scale of the gauge. Their are a total of 4 bands. The bands 
+		are based on 0-100% of the gauge, and independent of any MinValue/MaxValue setting. 
+    </p>
+    <p>
+		Bands can have any color, a specific radius and thickness as well as text centered in the arcs range. The position of the
+		text from the center of the Gauge will allow different text sizes to be centered in the band, or even out of the band
+		Above or Below if desired.
+    </p>
+    <p>
+		As bands are all independent of eachother they can be drawn touching, with a gap, and at various radius to
+		allow better usability. An example might be a tachometer where the 'Redline' of the engine is at 6000 RPM. A RED
+		band starting at 60 and Ending at 80 in that range would be a common metaphore in automotive gauges. See predefined
+		gauges in the test program for examples of Bands.
+    </p>
+    <hr>
+    <h3>RangeLED</h3>
+    <p>
+		The RangeLED is used for an on Gauge display of a specific condition based on the Value of the gauge. This can be used as an indicator
+		for a variety of conditons including over, under and between values. The LED indicator can be moved to any position and has a 
+		few different styles and shading options. You can set a Start Value, Ending Value depening on the Range Type selected. One special
+		case of the Range Type is to automatically track the Overload condition and toggle the LED based on the MinValue/MaxValues.
+    </p>
+    <strong>Select Range Error Type</strong>
+    <ul>
+		<li>rcNone - Not Used, Manual control (Enable/Disable) of the LED is possible</li>
+		<li>rcGaugeOutOfRange - Ignores Start and End, uses the Gauge Main Vaues for MinValue/MaxValue Range and will indicate Overload Condition</li>
+		<li>rcBetween - Between Start and End, non-inclusive</li>
+		<li>rcBothInclusive - Start and End inclusive</li>
+		<li>rcStartInclusive - Including Start, up to and not including End</li>
+		<li>rcEndInclusive - Between Start, Not Including it, and Including End</li>
+		<li>rcBothBetweenOutside - Outside of Start and End, not including them</li>
+		<li>rcBothInclusiveOutside - Outside of Start and End, Including them</li>
+		<li>rcGreaterStart - Ignore End Value, anything greater then the start</li>
+		<li>rcLessEnd - Less than the End value, ignores start</li>
+		<li>rcGreaterStartInclusive - Ignores End Value, but includes the Start</li>
+		<li>rcLessEndInclusive - Ignores the Start Value, but includes the End</li>
+	</ul>
+	<p>
+		Note : If the gauge Value is in an Over Range condition the Gauge value will still be checked. Don't
+		expect the RangeLED start values to be limited to the MinValue and MaxValue and set the RangeLED Start and End
+		values accordingly. This applies only to the Main values not the Aux.
+	</p>
+	<p>
+		Also trying to change the LED state to Active or Not Active may not
+		work as the gauge will override the setting if the Range Type is set
+		to something other than <strong>rcNone</strong>, which allows for manual control of the RangeLED.
+	</p>
+	<p>
+		The RangeLED can fire a couple of events, RangeLEDActive, and RangeLEDInactive to monitor the state if needed. 
+		See example code for how these work. It's pretty simple</p>
+    <hr>
+    <h3>Markers</h3>
+    <p>
+		Markers are a small triangle that can be used to indicate various things. The Gauge supports three Markers, all 
+		with independent settings. The value of the Marker are mapped to
+		MinValue and MaxValue of the gauge so it's easily coordinated with the pointer. The shape of the Marker can be a 
+		centered triangle, one aligned for below the pointer, and one for above the pointer. The radius, size, and color
+		are all adjustable. The set value is with respect to the MinValue and MaxValue of the gauge to allow easy
+		coordination of such things as peak values, etc.
+    </p>
+    <p>
+    	Note : The gauge has no mechanism for tracking min, max and peak values as shown in the Test program. This
+    	is all done externally to the gauge. See sample code in the Test program to see how it works.
+    </p>
+</html>

+ 0 - 1
test/test_supergauge/project1.lpi

@@ -79,7 +79,6 @@
     </CodeGeneration>
     </CodeGeneration>
     <Linking>
     <Linking>
       <Debugging>
       <Debugging>
-        <GenerateDebugInfo Value="False"/>
         <DebugInfoType Value="dsDwarf3"/>
         <DebugInfoType Value="dsDwarf3"/>
       </Debugging>
       </Debugging>
       <Options>
       <Options>

File diff suppressed because it is too large
+ 1056 - 1059
test/test_supergauge/sgtest.lfm


File diff suppressed because it is too large
+ 615 - 159
test/test_supergauge/sgtest.pas


+ 1 - 1
test/test_superspinner/about.pas

@@ -48,7 +48,7 @@ end;
 procedure TAboutFrm.FormShow(Sender: TObject);
 procedure TAboutFrm.FormShow(Sender: TObject);
 begin
 begin
   SGTestVersionLbl.Caption := VersionStr;
   SGTestVersionLbl.Caption := VersionStr;
-    SGVersionLbl.Caption := SuperSpinner.VERSIONSTR;
+  SGVersionLbl.Caption := SuperSpinner.VERSIONSTR;
 end;
 end;
 
 
 procedure TAboutFrm.CloseBtnClick(Sender: TObject);
 procedure TAboutFrm.CloseBtnClick(Sender: TObject);

+ 4 - 4
test/test_superspinner/sstest.lfm

@@ -1,7 +1,7 @@
 object SSTestFrm: TSSTestFrm
 object SSTestFrm: TSSTestFrm
-  Left = 525
+  Left = 2520
   Height = 877
   Height = 877
-  Top = 153
+  Top = 172
   Width = 1247
   Width = 1247
   Caption = 'SSTestFrm'
   Caption = 'SSTestFrm'
   ClientHeight = 877
   ClientHeight = 877
@@ -17,10 +17,10 @@ object SSTestFrm: TSSTestFrm
     Height = 877
     Height = 877
     Top = 0
     Top = 0
     Width = 711
     Width = 711
-    ActivePage = BasicTab
+    ActivePage = PointerTab
     Align = alRight
     Align = alRight
     HotTrack = True
     HotTrack = True
-    TabIndex = 0
+    TabIndex = 3
     TabOrder = 0
     TabOrder = 0
     object BasicTab: TTabSheet
     object BasicTab: TTabSheet
       Caption = 'Basic'
       Caption = 'Basic'

Some files were not shown because too many files changed in this diff