From: <mar...@us...> - 2006-05-17 07:15:34
|
Revision: 10606 Author: marquardt Date: 2006-05-17 00:15:21 -0700 (Wed, 17 May 2006) ViewCVS: http://svn.sourceforge.net/jvcl/?rev=10606&view=rev Log Message: ----------- thinned out JvgTypes.pas Modified Paths: -------------- trunk/jvcl/run/JvgCommClasses.pas trunk/jvcl/run/JvgFlyingText.pas trunk/jvcl/run/JvgLabel.pas trunk/jvcl/run/JvgProgress.pas trunk/jvcl/run/JvgTypes.pas Modified: trunk/jvcl/run/JvgCommClasses.pas =================================================================== --- trunk/jvcl/run/JvgCommClasses.pas 2006-05-17 06:45:14 UTC (rev 10605) +++ trunk/jvcl/run/JvgCommClasses.pas 2006-05-17 07:15:21 UTC (rev 10606) @@ -90,7 +90,7 @@ private FBufferedDraw: Boolean; FSteps: Integer; - FPercentFilling: TPercentRange; + FPercentFilling: Integer; FBrushStyle: TBrushStyle; FOrientation: TglGradientDir; //...public! FActive: Boolean; @@ -98,14 +98,14 @@ procedure SetActive(Value: Boolean); procedure SetOrientation(Value: TglGradientDir); procedure SetSteps(Value: Integer); - procedure SetPercentFilling(Value: TPercentRange); + procedure SetPercentFilling(Value: Integer); procedure SetBrushStyle(Value: TBrushStyle); protected property Active: Boolean read FActive write SetActive; property BufferedDraw: Boolean read FBufferedDraw write FBufferedDraw default False; property Orientation: TglGradientDir read FOrientation write SetOrientation; property Steps: Integer read FSteps write SetSteps default 255; - property PercentFilling: TPercentRange read FPercentFilling write SetPercentFilling default 100; + property PercentFilling: Integer read FPercentFilling write SetPercentFilling default 100; property BrushStyle: TBrushStyle read FBrushStyle write SetBrushStyle default bsSolid; public constructor Create; override; @@ -672,9 +672,9 @@ end; end; -procedure TJvgCustomGradient.SetPercentFilling(Value: TPercentRange); +procedure TJvgCustomGradient.SetPercentFilling(Value: Integer); begin - if FPercentFilling <> Value then + if (FPercentFilling <> Value) and (Value >= 0) and (Value <= 100) then begin FPercentFilling := Value; Changed; Modified: trunk/jvcl/run/JvgFlyingText.pas =================================================================== --- trunk/jvcl/run/JvgFlyingText.pas 2006-05-17 06:45:14 UTC (rev 10605) +++ trunk/jvcl/run/JvgFlyingText.pas 2006-05-17 07:15:21 UTC (rev 10606) @@ -66,7 +66,7 @@ FGradient: TJvgGradient; FThreeDGradient: TJvg3DGradient; FInteriorOffset: Word; - FScalePercent: TSpPercent; + FScalePercent: Integer; FStepScaleFactor: Single; FResultFont: TFont; FTimerInterval: Word; @@ -111,7 +111,7 @@ procedure BuildTxtBitmap; procedure WMSize(var Msg: TWMSize); message WM_SIZE; procedure OnParamsChanged(Sender: TObject); - procedure Repaint_; + procedure InternalRepaint; function GetText: TStrings; procedure SetHorAlign(Value: TglHorAlign); @@ -119,7 +119,7 @@ procedure SetTransparent(Value: Boolean); procedure SetBackgrColor(Value: TColor); procedure SetInteriorOffset(Value: Word); - procedure SetScalePercent(Value: TSpPercent); + procedure SetScalePercent(Value: Integer); procedure SetStepScaleFactor(Value: Single); procedure SetResultFont(Value: TFont); procedure SetTimerInterval(Value: Word); @@ -149,7 +149,7 @@ property Gradient: TJvgGradient read FGradient write FGradient; property Gradient3D: TJvg3DGradient read FThreeDGradient write FThreeDGradient; property InteriorOffset: Word read FInteriorOffset write SetInteriorOffset default 0; - property ScalePercent: TSpPercent read FScalePercent write SetScalePercent default 5; + property ScalePercent: Integer read FScalePercent write SetScalePercent default 5; property StepScaleFactor: Single read FStepScaleFactor write SetStepScaleFactor; property ResultFont: TFont read FResultFont write SetResultFont; property TimerInterval: Word read FTimerInterval write SetTimerInterval default 10; @@ -658,16 +658,16 @@ begin FNeedRemakeBackground := True; BuildBitmaps; - Repaint_; + InternalRepaint; end; procedure TJvgFlyingText.OnParamsChanged(Sender: TObject); begin BuildBitmaps; - Repaint_; + InternalRepaint; end; -procedure TJvgFlyingText.Repaint_; +procedure TJvgFlyingText.InternalRepaint; //var R: TRect; begin if FLoaded then @@ -680,14 +680,14 @@ begin FHorAlign := Value; BuildBitmaps; - Repaint_; + InternalRepaint; end; procedure TJvgFlyingText.SetVertAlign(Value: TglVertAlign); begin FVertAlign := Value; BuildBitmaps; - Repaint_; + InternalRepaint; end; procedure TJvgFlyingText.SetTransparent(Value: Boolean); @@ -695,14 +695,14 @@ FTransparent := Value; FNeedRemakeBackground := True; BuildBitmaps; - Repaint_; + InternalRepaint; end; procedure TJvgFlyingText.SetBackgrColor(Value: TColor); begin FBackgrColor := Value; BuildBitmaps; - Repaint_; + InternalRepaint; end; procedure TJvgFlyingText.SetInteriorOffset(Value: Word); @@ -710,11 +710,14 @@ FInteriorOffset := Value; end; -procedure TJvgFlyingText.SetScalePercent(Value: TSpPercent); +procedure TJvgFlyingText.SetScalePercent(Value: Integer); begin - FScalePercent := Value; - BuildBitmaps; - Repaint_; + if (Value >= 1) and (Value <= 99) then + begin + FScalePercent := Value; + BuildBitmaps; + InternalRepaint; + end; end; procedure TJvgFlyingText.SetStepScaleFactor(Value: Single); @@ -725,7 +728,7 @@ Value := 2; FStepScaleFactor := Value; BuildBitmaps; - Repaint_; + InternalRepaint; end; procedure TJvgFlyingText.SetResultFont(Value: TFont); @@ -767,7 +770,7 @@ for I := 0 to FText.Count - 1 do FText[I] := Trim(FText[I]); BuildBitmaps; - Repaint_; + InternalRepaint; Active := OldActive; end; @@ -777,7 +780,7 @@ Exit; FFastDraw := Value; BuildBitmaps; - Repaint_; + InternalRepaint; end; procedure TJvgFlyingText.SetDirection(Value: TglScalingDir); @@ -788,7 +791,7 @@ if csDesigning in ComponentState then begin BuildBitmaps; - Repaint_; + InternalRepaint; end; end; @@ -798,7 +801,7 @@ Exit; FShowTextWhilePassive := Value; BuildBitmaps; - Repaint_; + InternalRepaint; end; procedure TJvgFlyingText.SetVisible(Value: Boolean); @@ -810,7 +813,7 @@ if FVisible then begin BuildBitmaps; - Repaint_; + InternalRepaint; end; end; Modified: trunk/jvcl/run/JvgLabel.pas =================================================================== --- trunk/jvcl/run/JvgLabel.pas 2006-05-17 06:45:14 UTC (rev 10605) +++ trunk/jvcl/run/JvgLabel.pas 2006-05-17 07:15:21 UTC (rev 10606) @@ -49,6 +49,9 @@ RadianEscapments: array [TglLabelDir] of Integer = (0, -1800, -900, 900); type + TFontWeight = (fwDONTCARE, fwTHIN, fwEXTRALIGHT, fwLIGHT, fwNORMAL, fwMEDIUM, + fwSEMIBOLD, fwBOLD, fwEXTRABOLD, fwHEAVY); + {$IFDEF USEJVCL} TJvgCustomLabel = class(TJvGraphicControl) {$ELSE} Modified: trunk/jvcl/run/JvgProgress.pas =================================================================== --- trunk/jvcl/run/JvgProgress.pas 2006-05-17 06:45:14 UTC (rev 10605) +++ trunk/jvcl/run/JvgProgress.pas 2006-05-17 07:15:21 UTC (rev 10606) @@ -55,7 +55,7 @@ FColors: TJvgSimleLabelColors; FGradient: TJvgGradient; FGradientBack: TJvgGradient; - FPercent: TPercentRange; + FPercent: Integer; FCaptionAlignment: TAlignment; FCaptionDirection: TglLabelDir; FCaptionStyle: TglTextStyle; @@ -68,7 +68,7 @@ procedure SetBevelInner(Value: TPanelBevel); procedure SetBevelOuter(Value: TPanelBevel); procedure SetBevelBold(Value: Boolean); - procedure SetPercent(Value: TPercentRange); + procedure SetPercent(Value: Integer); procedure SetCaptionAlignment(Value: TAlignment); procedure SetCaptionDirection(Value: TglLabelDir); procedure SetCaptionStyle(Value: TglTextStyle); @@ -92,7 +92,7 @@ property Colors: TJvgSimleLabelColors read FColors write FColors; property Gradient: TJvgGradient read FGradient write FGradient; property GradientBack: TJvgGradient read FGradientBack write FGradientBack; - property Percent: TPercentRange read FPercent write SetPercent; + property Percent: Integer read FPercent write SetPercent; property CaptionAlignment: TAlignment read FCaptionAlignment write SetCaptionAlignment default taLeftJustify; property CaptionDirection: TglLabelDir read FCaptionDirection write SetCaptionDirection default fldLeftRight; property CaptionStyle: TglTextStyle read FCaptionStyle write SetCaptionStyle default fstShadow; @@ -391,9 +391,9 @@ Repaint; end; -procedure TJvgProgress.SetPercent(Value: TPercentRange); +procedure TJvgProgress.SetPercent(Value: Integer); begin - if FPercent <> Value then + if (FPercent <> Value) and (Value >= 0) and (Value <= 100) then begin FPercent := Value; FGradient.PercentFilling := FPercent; Modified: trunk/jvcl/run/JvgTypes.pas =================================================================== --- trunk/jvcl/run/JvgTypes.pas 2006-05-17 06:45:14 UTC (rev 10605) +++ trunk/jvcl/run/JvgTypes.pas 2006-05-17 07:15:21 UTC (rev 10606) @@ -85,7 +85,6 @@ {$ENDIF MSWINDOWS} type - TSpPercent = 1..99; TglItemsDrawStyle = (idsNone, idsRecessed, idsRaised); TglWallpaperOption = (fwoNone, fwoStretch, fwoPropStretch, fwoTile); TglDrawState = (fdsDefault, fdsDisabled, fdsDelicate); @@ -104,13 +103,10 @@ // TglGgradientColorOnStep = ( fgcIncrease, fgcDecrease ); TglLabelDir = (fldLeftRight, fldRightLeft, fldUpDown, fldDownUp); TglAlignment = (ftaLeftJustify, ftaRightJustify, ftaCenter, ftaBroadwise); - TFontWeight = (fwDONTCARE, fwTHIN, fwEXTRALIGHT, fwLIGHT, fwNORMAL, fwMEDIUM, - fwSEMIBOLD, fwBOLD, fwEXTRABOLD, fwHEAVY); TglGlyphKind = (fgkCustom, fgkDefault); TglFileType = (fftUndefined, fftGif, fftJpeg, fftBmp); // TglProgressBorderStyle = (fbsFlat, fbsCtl3D, fbsStatusControl, // fbsRaised, fbsRaisedFrame, fbsRecessedFrame); - TPercentRange = 0..100; TglLabelOption = (floActiveWhileControlFocused, floBufferedDraw, floDelineatedText, floIgnoreMouse, {floQuality3D,} floTransparentFont); TglLabelOptions = set of TglLabelOption; @@ -143,7 +139,6 @@ TglTreeViewOptions = set of TglTreeViewOption; TFocusControlMethod = (fcmOnMouseEnter, fcmOnMouseDown, fcmOnMouseUp); - TProgressChangeEvent = procedure(Sender: TObject; Percent: Integer) of object; TglOnGetItemColorEvent = procedure(Sender: TObject; Index: Integer; var Color: TColor) of object; // TglDrawGlyphsOption = ( fgoDefaultEnabled, fgoDefaultDisabled ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |