diff --git a/.gitattributes b/.gitattributes index ceba4cb8a3..cda150842e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2046,9 +2046,6 @@ ide/initialsetupdlgs.pas svneol=native#text/pascal ide/inputfiledialog.pas svneol=native#text/pascal ide/inputhistory.pas svneol=native#text/pascal ide/invertassigntool.pas svneol=native#text/pascal -ide/issuebrowser.lfm svneol=native#text/plain -ide/issuebrowser.lrs svneol=native#text/pascal -ide/issuebrowser.pas svneol=native#text/pascal ide/keymapping.pp svneol=native#text/pascal ide/keymapschemedlg.lfm svneol=native#text/plain ide/keymapschemedlg.lrs svneol=native#text/pascal @@ -2118,6 +2115,9 @@ ide/publishmodule.pas svneol=native#text/pascal ide/publishprojectdlg.lfm svneol=native#text/plain ide/publishprojectdlg.lrs svneol=native#text/pascal ide/publishprojectdlg.pas svneol=native#text/pascal +ide/restrictionbrowser.lfm svneol=native#text/plain +ide/restrictionbrowser.lrs svneol=native#text/pascal +ide/restrictionbrowser.pas svneol=native#text/pascal ide/runparamsopts.lfm svneol=native#text/plain ide/runparamsopts.lrs svneol=native#text/plain ide/runparamsopts.pas svneol=native#text/pascal diff --git a/ide/compatibilityissues.pas b/ide/compatibilityissues.pas index 7bfb98281d..b5767015a5 100644 --- a/ide/compatibilityissues.pas +++ b/ide/compatibilityissues.pas @@ -69,7 +69,7 @@ type TIssueManager = class private - FIssueProperties: TOIIssueProperties; + FIssueProperties: TOIRestrictedProperties; FIssueList: TIssueList; FIssueFiles: TStringList; FClassList: TClassHashList; @@ -84,12 +84,12 @@ type constructor Create; destructor Destroy; override; - function GetIssueProperties: TOIIssueProperties; + function GetIssueProperties: TOIRestrictedProperties; function GetIssueList: TIssueList; end; -function GetIssueProperties: TOIIssueProperties; +function GetIssueProperties: TOIRestrictedProperties; function GetIssueList: TIssueList; implementation @@ -137,7 +137,7 @@ begin end; -function GetIssueProperties: TOIIssueProperties; +function GetIssueProperties: TOIRestrictedProperties; begin if IssueManager = nil then IssueManager := TIssueManager.Create; Result := IssueManager.GetIssueProperties; @@ -151,13 +151,13 @@ end; { TIssueManager } -function TIssueManager.GetIssueProperties: TOIIssueProperties; +function TIssueManager.GetIssueProperties: TOIRestrictedProperties; var I: Integer; begin Result := nil; FreeAndNil(FIssueProperties); - FIssueProperties := TOIIssueProperties.Create; + FIssueProperties := TOIRestrictedProperties.Create; FClassList := TClassHashList.Create; @@ -219,7 +219,7 @@ end; procedure TIssueManager.AddIssueProperty(const IssueName, WidgetSetName: String); var - Issue: TOIIssueProperty; + Issue: TOIRestrictedProperty; AClass: TPersistentClass; AProperty: String; P: Integer; @@ -242,11 +242,11 @@ begin if AClass = nil then begin // add as generic widgetset issue - Inc(FIssueProperties.WidgetSetIssues[DirNameToLCLPlatform(WidgetSetName)]); + Inc(FIssueProperties.WidgetSetRestrictions[DirNameToLCLPlatform(WidgetSetName)]); Exit; end; - Issue := TOIIssueProperty.Create(AClass, AProperty, True); + Issue := TOIRestrictedProperty.Create(AClass, AProperty, True); Issue.WidgetSets := [DirNameToLCLPlatform(WidgetSetName)]; FIssueProperties.Add(Issue); //DebugLn('TIssueManager.AddIssue True'); diff --git a/ide/issuebrowser.lrs b/ide/issuebrowser.lrs deleted file mode 100644 index 4f7e03fb52..0000000000 --- a/ide/issuebrowser.lrs +++ /dev/null @@ -1,25 +0,0 @@ -{ This is an automatically generated lazarus resource file } - -LazarusResources.Add('TIssueBrowserView','FORMDATA',[ - 'TPF0'#17'TIssueBrowserView'#16'IssueBrowserView'#4'Left'#3#16#1#6'Height'#3 - +'T'#1#3'Top'#3#3#1#5'Width'#3#148#2#18'HorzScrollBar.Page'#3#147#2#18'VertSc' - +'rollBar.Page'#3'S'#1#13'ActiveControl'#7#14'NameFilterEdit'#7'Caption'#6#16 - +'IssueBrowserView'#12'ClientHeight'#3'T'#1#11'ClientWidth'#3#148#2#8'OnCreat' - +'e'#7#10'FormCreate'#10'LCLVersion'#6#6'0.9.25'#0#5'TMemo'#9'IssueMemo'#4'Le' - +'ft'#3#8#1#6'Height'#3'2'#1#3'Top'#2#18#5'Width'#3#134#1#7'Anchors'#11#5'akT' - +'op'#6'akLeft'#7'akRight'#8'akBottom'#0#8'ReadOnly'#9#10'ScrollBars'#7#14'ss' - +'AutoVertical'#8'TabOrder'#2#0#0#0#9'TGroupBox'#19'IssueFilterGroupBox'#4'Le' - +'ft'#2#6#6'Height'#2'`'#3'Top'#2#12#5'Width'#3#250#0#7'Caption'#6#19'IssueFi' - +'lterGroupBox'#12'ClientHeight'#2'N'#11'ClientWidth'#3#246#0#8'TabOrder'#2#1 - +#0#6'TLabel'#9'NameLabel'#4'Left'#2#10#6'Height'#2#14#3'Top'#2','#5'Width'#2 - +'5'#7'Caption'#6#9'NameLabel'#11'ParentColor'#8#0#0#5'TEdit'#14'NameFilterEd' - +'it'#4'Left'#2'F'#6'Height'#2#23#3'Top'#2'&'#5'Width'#3#164#0#8'OnChange'#7 - +#20'NameFilterEditChange'#8'TabOrder'#2#0#0#0#0#9'TTreeView'#13'IssueTreeVie' - +'w'#4'Left'#2#6#6'Height'#3#210#0#3'Top'#2'r'#5'Width'#3#250#0#7'Anchors'#11 - +#5'akTop'#6'akLeft'#8'akBottom'#0#17'DefaultItemHeight'#2#15#13'HideSelectio' - +'n'#8#6'Indent'#2#2#16'RightClickSelect'#9#9'RowSelect'#9#10'ScrollBars'#7#10 - +'ssAutoBoth'#11'ShowButtons'#8#9'ShowLines'#8#8'TabOrder'#2#2#18'OnSelection' - +'Changed'#7#29'IssueTreeViewSelectionChanged'#7'Options'#11#17'tvoAutoItemHe' - +'ight'#21'tvoKeepCollapsedNodes'#19'tvoRightClickSelect'#12'tvoRowSelect'#11 - +'tvoShowRoot'#11'tvoToolTips'#0#0#0#0 -]); diff --git a/ide/main.pp b/ide/main.pp index 0961c0bce7..2bc0e5674e 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -128,7 +128,7 @@ uses DialogProcs, FindReplaceDialog, FindInFilesDlg, CodeExplorer, BuildFileDlg, ProcedureList, ExtractProcDlg, FindRenameIdentifier, AbstractsMethodsDlg, CleanDirDlg, CodeContextForm, AboutFrm, BuildManager, CompatibilityIssues, - IssueBrowser, + RestrictionBrowser, // main ide MainBar, MainIntf, MainBase; @@ -7285,11 +7285,11 @@ end; procedure TMainIDE.DoShowIssueBrowser(const IssueName: String); begin - if IssueBrowserView = nil then - IssueBrowserView := TIssueBrowserView.Create(OwningComponent); + if RestrictionBrowserView = nil then + RestrictionBrowserView := TRestrictionBrowserView.Create(OwningComponent); - IssueBrowserView.SetIssueName(IssueName); - IssueBrowserView.ShowOnTop; + RestrictionBrowserView.SetIssueName(IssueName); + RestrictionBrowserView.ShowOnTop; end; procedure TMainIDE.DoShowComponentList; diff --git a/ide/issuebrowser.lfm b/ide/restrictionbrowser.lfm similarity index 91% rename from ide/issuebrowser.lfm rename to ide/restrictionbrowser.lfm index 5f54afe844..06f2202b88 100644 --- a/ide/issuebrowser.lfm +++ b/ide/restrictionbrowser.lfm @@ -1,4 +1,4 @@ -object IssueBrowserView: TIssueBrowserView +object RestrictionBrowserView: TRestrictionBrowserView Left = 272 Height = 340 Top = 259 @@ -6,7 +6,7 @@ object IssueBrowserView: TIssueBrowserView HorzScrollBar.Page = 659 VertScrollBar.Page = 339 ActiveControl = NameFilterEdit - Caption = 'IssueBrowserView' + Caption = 'RestrictionBrowserView' ClientHeight = 340 ClientWidth = 660 OnCreate = FormCreate @@ -27,7 +27,7 @@ object IssueBrowserView: TIssueBrowserView Top = 12 Width = 250 Caption = 'IssueFilterGroupBox' - ClientHeight = 78 + ClientHeight = 77 ClientWidth = 246 TabOrder = 1 object NameLabel: TLabel @@ -53,7 +53,7 @@ object IssueBrowserView: TIssueBrowserView Top = 114 Width = 250 Anchors = [akTop, akLeft, akBottom] - DefaultItemHeight = 15 + DefaultItemHeight = 19 HideSelection = False Indent = 2 RightClickSelect = True diff --git a/ide/restrictionbrowser.lrs b/ide/restrictionbrowser.lrs new file mode 100644 index 0000000000..52495c94d5 --- /dev/null +++ b/ide/restrictionbrowser.lrs @@ -0,0 +1,27 @@ +{ This is an automatically generated lazarus resource file } + + + +LazarusResources.Add('TRestrictionBrowserView','FORMDATA',[ + 'TPF0'#23'TRestrictionBrowserView'#22'RestrictionBrowserView'#4'Left'#3#16#1#6 + +'Height'#3'T'#1#3'Top'#3#3#1#5'Width'#3#148#2#18'HorzScrollBar.Page'#3#147#2 + +#18'VertScrollBar.Page'#3'S'#1#13'ActiveControl'#7#14'NameFilterEdit'#7'Capt' + +'ion'#6#22'RestrictionBrowserView'#12'ClientHeight'#3'T'#1#11'ClientWidth'#3 + +#148#2#8'OnCreate'#7#10'FormCreate'#10'LCLVersion'#6#6'0.9.25'#0#5'TMemo'#9 + +'IssueMemo'#4'Left'#3#8#1#6'Height'#3'2'#1#3'Top'#2#18#5'Width'#3#134#1#7'An' + +'chors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#8'ReadOnly'#9#10'Scro' + +'llBars'#7#14'ssAutoVertical'#8'TabOrder'#2#0#0#0#9'TGroupBox'#19'IssueFilte' + +'rGroupBox'#4'Left'#2#6#6'Height'#2'`'#3'Top'#2#12#5'Width'#3#250#0#7'Captio' + +'n'#6#19'IssueFilterGroupBox'#12'ClientHeight'#2'M'#11'ClientWidth'#3#246#0#8 + +'TabOrder'#2#1#0#6'TLabel'#9'NameLabel'#4'Left'#2#10#6'Height'#2#14#3'Top'#2 + +','#5'Width'#2'5'#7'Caption'#6#9'NameLabel'#11'ParentColor'#8#0#0#5'TEdit'#14 + +'NameFilterEdit'#4'Left'#2'F'#6'Height'#2#23#3'Top'#2'&'#5'Width'#3#164#0#8 + +'OnChange'#7#20'NameFilterEditChange'#8'TabOrder'#2#0#0#0#0#9'TTreeView'#13 + +'IssueTreeView'#4'Left'#2#6#6'Height'#3#210#0#3'Top'#2'r'#5'Width'#3#250#0#7 + +'Anchors'#11#5'akTop'#6'akLeft'#8'akBottom'#0#17'DefaultItemHeight'#2#19#13 + +'HideSelection'#8#6'Indent'#2#2#16'RightClickSelect'#9#9'RowSelect'#9#10'Scr' + +'ollBars'#7#10'ssAutoBoth'#11'ShowButtons'#8#9'ShowLines'#8#8'TabOrder'#2#2 + +#18'OnSelectionChanged'#7#29'IssueTreeViewSelectionChanged'#7'Options'#11#17 + +'tvoAutoItemHeight'#21'tvoKeepCollapsedNodes'#19'tvoRightClickSelect'#12'tvo' + +'RowSelect'#11'tvoShowRoot'#11'tvoToolTips'#0#0#0#0 +]); diff --git a/ide/issuebrowser.pas b/ide/restrictionbrowser.pas similarity index 91% rename from ide/issuebrowser.pas rename to ide/restrictionbrowser.pas index a22a91ff00..904dad32f2 100644 --- a/ide/issuebrowser.pas +++ b/ide/restrictionbrowser.pas @@ -21,9 +21,9 @@ Author: Tomas Gregorovic Abstract: - Browser for widget set compatibility issues + Browser for widget set restricted properties. } -unit IssueBrowser; +unit RestrictionBrowser; {$mode objfpc}{$H+} @@ -36,9 +36,9 @@ uses LazConf; type - { TIssueBrowserView } + { TRestrictionBrowserView } - TIssueBrowserView = class(TForm) + TRestrictionBrowserView = class(TForm) NameFilterEdit: TEdit; IssueFilterGroupBox: TGroupBox; IssueMemo: TMemo; @@ -58,13 +58,13 @@ type end; var - IssueBrowserView: TIssueBrowserView = nil; + RestrictionBrowserView: TRestrictionBrowserView = nil; implementation -{ TIssueBrowserView } +{ TRestrictionBrowserView } -procedure TIssueBrowserView.FormCreate(Sender: TObject); +procedure TRestrictionBrowserView.FormCreate(Sender: TObject); var P: TLCLPlatform; X: Integer; @@ -107,7 +107,7 @@ begin FCanUpdate := True; UpdateIssueList; end; -procedure TIssueBrowserView.IssueTreeViewSelectionChanged(Sender: TObject); +procedure TRestrictionBrowserView.IssueTreeViewSelectionChanged(Sender: TObject); var Issue: TIssue; begin @@ -121,17 +121,17 @@ begin IssueMemo.Text := Issue.Short + LineEnding + LineEnding + Issue.Description; end; -procedure TIssueBrowserView.NameFilterEditChange(Sender: TObject); +procedure TRestrictionBrowserView.NameFilterEditChange(Sender: TObject); begin UpdateIssueList; end; -procedure TIssueBrowserView.GetComponentClass(const AClass: TComponentClass); +procedure TRestrictionBrowserView.GetComponentClass(const AClass: TComponentClass); begin FClasses.Add(AClass); end; -procedure TIssueBrowserView.UpdateIssueList; +procedure TRestrictionBrowserView.UpdateIssueList; var IssueClass: String; IssueProperty: String; @@ -264,7 +264,7 @@ begin IssueMemo.Clear; end; -procedure TIssueBrowserView.SetIssueName(const AIssueName: String); +procedure TRestrictionBrowserView.SetIssueName(const AIssueName: String); var P: TLCLPlatform; Component: TComponent; @@ -289,7 +289,7 @@ begin end; initialization - {$I issuebrowser.lrs} + {$I restrictionbrowser.lrs} end. diff --git a/ideintf/objectinspector.pp b/ideintf/objectinspector.pp index 92982f258a..cfdacf69a3 100644 --- a/ideintf/objectinspector.pp +++ b/ideintf/objectinspector.pp @@ -54,7 +54,7 @@ type oipgpProperties, oipgpEvents, oipgpFavourite, - oipgpIssues + oipgpRestricted ); TObjectInspectorPages = set of TObjectInspectorPage; @@ -79,13 +79,13 @@ type function DebugReportAsString: string; end; - { TOIIssueProperty} - TOIIssueProperty = class(TOIFavouriteProperty) + { TOIRestrictedProperty} + TOIRestrictedProperty = class(TOIFavouriteProperty) public WidgetSets: TLCLPlatforms; - function IsIssue(AClass: TPersistentClass; - const APropertyName: string): TLCLPlatforms; + function IsRestricted(AClass: TPersistentClass; + const APropertyName: string): TLCLPlatforms; end; { TOIFavouriteProperties } @@ -133,16 +133,16 @@ type end; TOIFavouritePropertiesClass = class of TOIFavouriteProperties; - { TOIIssueProperties } + { TOIRestrictedProperties } - TOIIssueProperties = class(TOIFavouriteProperties) + TOIRestrictedProperties = class(TOIFavouriteProperties) public - WidgetSetIssues: Array [TLCLPlatform] of Integer; + WidgetSetRestrictions: Array [TLCLPlatform] of Integer; constructor Create; - function IsIssue(AClass: TPersistentClass; - const PropertyName: string): TLCLPlatforms; - function AreIssues(Selection: TPersistentSelectionList; + function IsRestricted(AClass: TPersistentClass; + const PropertyName: string): TLCLPlatforms; + function AreRestricted(Selection: TPersistentSelectionList; const PropertyName: string): TLCLPlatforms; end; @@ -615,7 +615,7 @@ type procedure DoViewIssues; private FFavourites: TOIFavouriteProperties; - FIssues: TOIIssueProperties; + FIssues: TOIRestrictedProperties; FOnAddToFavourites: TNotifyEvent; FOnFindDeclarationOfProperty: TNotifyEvent; FOnOIKeyDown: TKeyEvent; @@ -642,7 +642,7 @@ type procedure SetFavourites(const AValue: TOIFavouriteProperties); procedure SetComponentTreeHeight(const AValue: integer); procedure SetDefaultItemHeight(const AValue: integer); - procedure SetIssues(const AValue: TOIIssueProperties); + procedure SetIssues(const AValue: TOIRestrictedProperties); procedure SetOnShowOptions(const AValue: TNotifyEvent); procedure SetPropertyEditorHook(NewValue: TPropertyEditorHook); procedure SetSelection(const ASelection: TPersistentSelectionList); @@ -704,7 +704,7 @@ type property GridControl[Page: TObjectInspectorPage]: TOICustomPropertyGrid read GetGridControl; property Favourites: TOIFavouriteProperties read FFavourites write SetFavourites; - property Issues: TOIIssueProperties read FIssues write SetIssues; + property Issues: TOIRestrictedProperties read FIssues write SetIssues; property OnAddToFavourites: TNotifyEvent read FOnAddToFavourites write FOnAddToFavourites; property OnRemoveFromFavourites: TNotifyEvent read FOnRemoveFromFavourites @@ -1552,9 +1552,10 @@ begin WidgetSets := []; if Favourites<>nil then begin //debugln('TOICustomPropertyGrid.AddPropertyEditor A ',PropEditor.GetName); - if Favourites is TOIIssueProperties then + if Favourites is TOIRestrictedProperties then begin - WidgetSets := (Favourites as TOIIssueProperties).AreIssues(Selection,PropEditor.GetName); + WidgetSets := (Favourites as TOIRestrictedProperties).AreRestricted( + Selection,PropEditor.GetName); if WidgetSets = [] then begin PropEditor.Free; @@ -3349,7 +3350,7 @@ begin RebuildPropertyLists; end; -procedure TObjectInspectorDlg.SetIssues(const AValue: TOIIssueProperties); +procedure TObjectInspectorDlg.SetIssues(const AValue: TOIRestrictedProperties); begin if FIssues = AValue then exit; //DebugLn('TObjectInspectorDlg.SetIssues Count: ', DbgS(AValue.Count)); @@ -3819,16 +3820,16 @@ begin None := True; for Platform := Low(TLCLPlatform) to High(TLCLPlatform) do begin - if Issues.WidgetSetIssues[Platform] > 0 then + if Issues.WidgetSetRestrictions[Platform] > 0 then begin None := False; IDEImages.Images_16.Draw(WidgetSetsIssuesBox.Canvas, X, Y, IDEImages.LoadImage(16, WidgetSetImageNames[Platform])); Inc(X, 16); - S := WidgetSetsIssuesBox.Canvas.TextExtent(IntToStr(Issues.WidgetSetIssues[Platform])); + S := WidgetSetsIssuesBox.Canvas.TextExtent(IntToStr(Issues.WidgetSetRestrictions[Platform])); WidgetSetsIssuesBox.Canvas.TextOut(X, (WidgetSetsIssuesBox.Height - S.CY) div 2, - IntToStr(Issues.WidgetSetIssues[Platform])); + IntToStr(Issues.WidgetSetRestrictions[Platform])); Inc(X, S.CX); end; end; @@ -3845,10 +3846,10 @@ var X, Y, I, J: Integer; S: TSize; Platform: TLCLPlatform; - WidgetSetIssues: Array [TLCLPlatform] of Integer; + WidgetSetRestrictions: Array [TLCLPlatform] of Integer; None: Boolean; begin - for Platform := Low(TLCLPlatform) to High(TLCLPlatform) do WidgetSetIssues[Platform] := 0; + for Platform := Low(TLCLPlatform) to High(TLCLPlatform) do WidgetSetRestrictions[Platform] := 0; if Issues = nil then Exit; if Selection = nil then Exit; @@ -3857,12 +3858,12 @@ begin begin for J := 0 to Selection.Count - 1 do begin - if (Issues.Items[I] is TOIIssueProperty) and + if (Issues.Items[I] is TOIRestrictedProperty) and Selection[J].ClassType.InheritsFrom(Issues.Items[I].BaseClass) and (Issues.Items[I].PropertyName = '') then for Platform := Low(TLCLPlatform) to High(TLCLPlatform) do - if Platform in (Issues.Items[I] as TOIIssueProperty).WidgetSets then - Inc(WidgetSetIssues[Platform]); + if Platform in (Issues.Items[I] as TOIRestrictedProperty).WidgetSets then + Inc(WidgetSetRestrictions[Platform]); end; end; @@ -3871,16 +3872,16 @@ begin None := True; for Platform := Low(TLCLPlatform) to High(TLCLPlatform) do begin - if WidgetSetIssues[Platform] > 0 then + if WidgetSetRestrictions[Platform] > 0 then begin None := False; IDEImages.Images_16.Draw(WidgetSetsIssuesBox.Canvas, X, Y, IDEImages.LoadImage(16, WidgetSetImageNames[Platform])); Inc(X, 16); - S := ComponentIssuesBox.Canvas.TextExtent(IntToStr(WidgetSetIssues[Platform])); + S := ComponentIssuesBox.Canvas.TextExtent(IntToStr(WidgetSetRestrictions[Platform])); ComponentIssuesBox.Canvas.TextOut(X, (ComponentIssuesBox.Height - S.CY) div 2, - IntToStr(WidgetSetIssues[Platform])); + IntToStr(WidgetSetRestrictions[Platform])); Inc(X, S.CX); end; end; @@ -3940,7 +3941,7 @@ begin Page[2].TabVisible := ShowFavorites; Pages.Add(oisIssues); - Page[3].Name:=DefaultOIPageNames[oipgpIssues]; + Page[3].Name:=DefaultOIPageNames[oipgpRestricted]; Page[3].TabVisible := ShowIssues; Page[3].OnShow := @IssuePageShow; @@ -4011,7 +4012,7 @@ begin {, tkArray, tkRecord, tkInterface}, tkClass, tkObject, tkWChar, tkBool , tkInt64, tkQWord],FDefaultItemHeight); with IssuesGrid do begin - Name:=DefaultOIGridNames[oipgpIssues]; + Name:=DefaultOIGridNames[oipgpRestricted]; Selection:=Self.FSelection; Align:=alClient; PopupMenu:=MainPopupMenu; @@ -4187,7 +4188,7 @@ begin case Page of oipgpFavourite: Result:=FavouriteGrid; oipgpEvents: Result:=EventGrid; - oipgpIssues: Result:=IssuesGrid; + oipgpRestricted: Result:=IssuesGrid; else Result:=PropertyGrid; end; end; @@ -4717,45 +4718,47 @@ begin +' BaseClass='+dbgsName(BaseClass); end; -{ TOIIssueProperty } +{ TOIRestrictedProperty } -function TOIIssueProperty.IsIssue(AClass: TPersistentClass; const APropertyName: string): TLCLPlatforms; +function TOIRestrictedProperty.IsRestricted(AClass: TPersistentClass; + const APropertyName: string): TLCLPlatforms; begin - //DebugLn('IsIssue ', AClass.ClassName, ' ?= ', BaseClass.ClassName, ' ', APropertyName, ' ?= ', PropertyName); + //DebugLn('IsRestricted ', AClass.ClassName, ' ?= ', BaseClass.ClassName, ' ', APropertyName, ' ?= ', PropertyName); Result := []; if (CompareText(PropertyName,APropertyName) = 0) and (AClass.InheritsFrom(BaseClass)) then Result := WidgetSets; end; -{ TOIIssueProperties } +{ TOIRestrictedProperties } -constructor TOIIssueProperties.Create; +constructor TOIRestrictedProperties.Create; var P: TLCLPlatform; begin inherited Create; - for P := Low(TLCLPlatform) to High(TLCLPlatform) do WidgetSetIssues[P] := 0; + for P := Low(TLCLPlatform) to High(TLCLPlatform) do WidgetSetRestrictions[P] := 0; end; -function TOIIssueProperties.IsIssue(AClass: TPersistentClass; +function TOIRestrictedProperties.IsRestricted(AClass: TPersistentClass; const PropertyName: string): TLCLPlatforms; var I: Integer; - CurItem: TOIIssueProperty; + CurItem: TOIRestrictedProperty; begin Result := []; if (AClass=nil) or (PropertyName='') then Exit; for I := 0 to Count - 1 do begin - if not (Items[I] is TOIIssueProperty) then Continue; - CurItem:=Items[I] as TOIIssueProperty; - Result := Result + CurItem.IsIssue(AClass,PropertyName); + if not (Items[I] is TOIRestrictedProperty) then Continue; + CurItem:=Items[I] as TOIRestrictedProperty; + Result := Result + CurItem.IsRestricted(AClass,PropertyName); end; end; -function TOIIssueProperties.AreIssues(Selection: TPersistentSelectionList; +function TOIRestrictedProperties.AreRestricted( + Selection: TPersistentSelectionList; const PropertyName: string): TLCLPlatforms; var I: Integer; @@ -4764,7 +4767,7 @@ begin if Selection = nil then Exit; for i:=0 to Selection.Count-1 do begin - Result := Result + IsIssue(TPersistentClass(Selection[i].ClassType), PropertyName); + Result := Result + IsRestricted(TPersistentClass(Selection[i].ClassType), PropertyName); end; end;