You've already forked lazarus-ccr
* Converted UIProgressViews property to new style
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2687 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -69,6 +69,10 @@ type
|
|||||||
bvClipSubviews,
|
bvClipSubviews,
|
||||||
bvShowSelectionOnTouch,
|
bvShowSelectionOnTouch,
|
||||||
bvBounceVertically,
|
bvBounceVertically,
|
||||||
|
bvProgress,
|
||||||
|
bvProgressTintColor,
|
||||||
|
bvTrackTintColor,
|
||||||
|
bvProgressViewStyle,
|
||||||
bvEnabled);
|
bvEnabled);
|
||||||
|
|
||||||
TXIBProperty = record
|
TXIBProperty = record
|
||||||
@ -109,6 +113,10 @@ const
|
|||||||
(APropertyName: 'IBUIClipsSubviews' ; ADefaultValue: ''),
|
(APropertyName: 'IBUIClipsSubviews' ; ADefaultValue: ''),
|
||||||
(APropertyName: 'IBUIShowsSelectionImmediatelyOnTouchBegin' ; ADefaultValue: ''),
|
(APropertyName: 'IBUIShowsSelectionImmediatelyOnTouchBegin' ; ADefaultValue: ''),
|
||||||
(APropertyName: 'IBUIAlwaysBounceVertical' ; ADefaultValue: ''),
|
(APropertyName: 'IBUIAlwaysBounceVertical' ; ADefaultValue: ''),
|
||||||
|
(APropertyName: 'IBUIProgress' ; ADefaultValue: '0'),
|
||||||
|
(APropertyName: 'IBUIProgressTintColor' ; ADefaultValue: ''),
|
||||||
|
(APropertyName: 'IBUITrackTintColor' ; ADefaultValue: ''),
|
||||||
|
(APropertyName: 'IBUIProgressViewStyle' ; ADefaultValue: '0'),
|
||||||
(APropertyName: 'IBUIEnabled' ; ADefaultValue: 'YES'));
|
(APropertyName: 'IBUIEnabled' ; ADefaultValue: 'YES'));
|
||||||
|
|
||||||
EventNames : array[1..1] of string = (
|
EventNames : array[1..1] of string = (
|
||||||
@ -536,18 +544,16 @@ type
|
|||||||
|
|
||||||
UIProgressView = class(UIView)
|
UIProgressView = class(UIView)
|
||||||
private
|
private
|
||||||
FProgress: float;
|
function GetProgressViewStyle: TiOSFakeProgressViewStyle;
|
||||||
FprogressTintColor: TColor;
|
procedure SetProgressViewStyle(AValue: TiOSFakeProgressViewStyle);
|
||||||
FProgressViewStyle: TiOSFakeProgressViewStyle;
|
|
||||||
FtrackTintColor: TColor;
|
|
||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
class function GetIBClassName: string; override;
|
class function GetIBClassName: string; override;
|
||||||
published
|
published
|
||||||
property progressViewStyle: TiOSFakeProgressViewStyle read FProgressViewStyle write FprogressViewStyle;
|
property progressViewStyle: TiOSFakeProgressViewStyle read GetProgressViewStyle write SetProgressViewStyle;
|
||||||
property progress: float read FProgress write FProgress;
|
property progress: double index bvProgress read GetXIBFloat write SetXIBFloat;
|
||||||
property progressTintColor: TColor read FprogressTintColor write FprogressTintColor;
|
property progressTintColor: TColor index bvProgressTintColor read GetXIBColor write SetXIBColor;
|
||||||
property trackTintColor: TColor read FtrackTintColor write FtrackTintColor;
|
property trackTintColor: TColor index bvTrackTintColor read GetXIBColor write SetXIBColor;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TNIBObjectWriter }
|
{ TNIBObjectWriter }
|
||||||
@ -1356,6 +1362,16 @@ begin
|
|||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function UIProgressView.GetProgressViewStyle: TiOSFakeProgressViewStyle;
|
||||||
|
begin
|
||||||
|
result := TiOSFakeProgressViewStyle(GetXIBInteger(bvProgressViewStyle));
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure UIProgressView.SetProgressViewStyle(AValue: TiOSFakeProgressViewStyle);
|
||||||
|
begin
|
||||||
|
SetXIBInteger(bvProgressViewStyle,ord(AValue));
|
||||||
|
end;
|
||||||
|
|
||||||
{ UIProgressView }
|
{ UIProgressView }
|
||||||
{
|
{
|
||||||
procedure UIProgressView.WriteToDomElement(AnObjectDomElement: TDOMElement);
|
procedure UIProgressView.WriteToDomElement(AnObjectDomElement: TDOMElement);
|
||||||
@ -1371,8 +1387,8 @@ constructor UIProgressView.Create(AOwner: TComponent);
|
|||||||
begin
|
begin
|
||||||
inherited Create(AOwner);
|
inherited Create(AOwner);
|
||||||
FAcceptChildsAtDesignTime := false;
|
FAcceptChildsAtDesignTime := false;
|
||||||
FprogressTintColor := clDefault;
|
progressTintColor := clDefault;
|
||||||
FtrackTintColor := clDefault;
|
trackTintColor := clDefault;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class function UIProgressView.GetIBClassName: string;
|
class function UIProgressView.GetIBClassName: string;
|
||||||
@ -2411,7 +2427,7 @@ end;
|
|||||||
|
|
||||||
function tiOSFakeComponent.GetXIBInteger(index: TXIBProperties): integer;
|
function tiOSFakeComponent.GetXIBInteger(index: TXIBProperties): integer;
|
||||||
begin
|
begin
|
||||||
result := StrToInt(GetXIBString(index,'int'));
|
result := StrToIntDef(GetXIBString(index,'int'),0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure tiOSFakeComponent.SetXIBInteger(index: TXIBProperties; AValue: integer);
|
procedure tiOSFakeComponent.SetXIBInteger(index: TXIBProperties; AValue: integer);
|
||||||
|
Reference in New Issue
Block a user