* made naming more consistent. Intfxxx methods are called by the interface, WSxxx methods call the interface

git-svn-id: trunk@9785 -
This commit is contained in:
marc 2006-09-02 16:21:55 +00:00
parent 504a3626cd
commit 352eaa11ed
6 changed files with 52 additions and 52 deletions

View File

@ -585,9 +585,9 @@ type
function GetSubItemImages(const AIndex: Integer): Integer;
function GetSubItems: TStrings;
function IntfUpdateAllowed: Boolean;
procedure IntfUpdateText;
procedure IntfUpdateImages;
function WSUpdateAllowed: Boolean;
procedure WSUpdateText;
procedure WSUpdateImages;
procedure SetChecked(AValue: Boolean);
procedure SetState(const ALisOrd: Integer; const AIsSet: Boolean);
@ -638,8 +638,8 @@ type
FItems: TList;
FCacheIndex: Integer; // Caches the last used item
FCacheItem: TListItem; //
procedure IntfCreateCacheItem;
function IntfUpdateAllowed: Boolean;
procedure WSCreateCacheItem;
function WSUpdateAllowed: Boolean;
procedure ItemDestroying(const AItem: TListItem); //called by TListItem when freed
procedure ReadData(Stream: TStream);
procedure WriteData(Stream: TStream);
@ -647,7 +647,7 @@ type
procedure DefineProperties(Filer: TFiler); override;
function GetCount : Integer;
function GetItem(const AIndex: Integer): TListItem;
procedure IntfCreateItems;
procedure WSCreateItems;
procedure SetItem(const AIndex: Integer; const AValue: TListItem);
public
function Add: TListItem;
@ -685,8 +685,8 @@ type
FImageIndex: Integer;
FTag: Integer;
function GetWidth: TWidth;
procedure IntfCreateColumn;
function IntfUpdateAllowed: Boolean;
procedure WSCreateColumn;
function WSUpdateAllowed: Boolean;
procedure SetVisible(const AValue: Boolean);
procedure SetAutoSize(const AValue: Boolean);
procedure SetMinWidth(const AValue: TWidth);
@ -724,7 +724,7 @@ type
FItemNeedsUpdate: TCollectionItem;
FNeedsUpdate: boolean;
function GetItem(const AIndex: Integer): TListColumn;
procedure IntfCreateColumns;
procedure WSCreateColumns;
procedure SetItem(const AIndex: Integer; const AValue: TListColumn);
protected
public

View File

@ -209,7 +209,7 @@ begin
LVC.SetViewStyle(Self, FViewStyle);
// add columns
FColumns.IntfCreateColumns;
FColumns.WSCreateColumns;
// set imagelists and item depending properties
for lvil := Low(TListViewImageList) to High(TListViewImageList) do
@ -223,7 +223,7 @@ begin
LVC.SetSort(Self, FSortType, FSortColumn);
// add items
FListItems.IntfCreateItems;
FListItems.WSCreateItems;
// set other properties
LVC.SetAllocBy(Self, FAllocBy);
@ -702,7 +702,7 @@ end;
procedure TCustomListView.Loaded;
begin
// create interface columns if needed
FColumns.IntfCreateColumns;
FColumns.WSCreateColumns;
inherited Loaded;
end;

View File

@ -51,8 +51,8 @@ begin
FImageIndex := -1;
inherited Create(ACollection);
if not IntfUpdateAllowed then Exit;
IntfCreateColumn;
if not WSUpdateAllowed then Exit;
WSCreateColumn;
end;
destructor TListColumn.Destroy;
@ -64,7 +64,7 @@ var
WSC: TWSCustomListViewClass;
begin
idx := Index;
UpdAllowed := IntfUpdateAllowed;
UpdAllowed := WSUpdateAllowed;
if Collection is TListColumns
then begin
@ -83,7 +83,7 @@ begin
WSC.ColumnDelete(LV, Idx);
end;
procedure TListColumn.IntfCreateColumn;
procedure TListColumn.WSCreateColumn;
var
LV: TCustomListView;
WSC: TWSCustomListViewClass;
@ -101,7 +101,7 @@ begin
WSC.ColumnSetVisible(LV, Index, Self, FVisible);
end;
function TListColumn.IntfUpdateAllowed: Boolean;
function TListColumn.WSUpdateAllowed: Boolean;
begin
Result := (Collection <> nil)
and (TListColumns(Collection).FOwner <> nil)
@ -115,7 +115,7 @@ var
LV: TCustomListView;
WSC: TWSCustomListViewClass;
begin
if IntfUpdateAllowed
if WSUpdateAllowed
then begin
LV := TListColumns(Collection).FOwner;
WSC := TWSCustomListViewClass(LV.WidgetSetClass);
@ -134,7 +134,7 @@ begin
if FAlignment = AValue then Exit;
FAlignment := AValue;
Changed(False);
if not IntfUpdateAllowed then Exit;
if not WSUpdateAllowed then Exit;
LV := TListColumns(Collection).FOwner;
WSC := TWSCustomListViewClass(LV.WidgetSetClass);
@ -149,7 +149,7 @@ begin
if AValue = FCaption then Exit;
FCaption := AValue;
Changed(False);
if not IntfUpdateAllowed then Exit;
if not WSUpdateAllowed then Exit;
LV := TListColumns(Collection).FOwner;
WSC := TWSCustomListViewClass(LV.WidgetSetClass);
@ -164,7 +164,7 @@ begin
if FWidth = AValue then Exit;
FWidth := AValue;
Changed(False);
if not IntfUpdateAllowed then Exit;
if not WSUpdateAllowed then Exit;
LV := TListColumns(Collection).FOwner;
WSC := TWSCustomListViewClass(LV.WidgetSetClass);
@ -179,7 +179,7 @@ begin
if FMaxWidth = AValue then Exit;
FMaxWidth := AValue;
Changed(False);
if not IntfUpdateAllowed then Exit;
if not WSUpdateAllowed then Exit;
LV := TListColumns(Collection).FOwner;
WSC := TWSCustomListViewClass(LV.WidgetSetClass);
@ -194,7 +194,7 @@ begin
if FMinWidth = AValue then Exit;
FMinWidth := AValue;
Changed(False);
if not IntfUpdateAllowed then Exit;
if not WSUpdateAllowed then Exit;
LV := TListColumns(Collection).FOwner;
WSC := TWSCustomListViewClass(LV.WidgetSetClass);
@ -209,7 +209,7 @@ begin
if FAutoSize = AValue then Exit;
FAutoSize := AValue;
Changed(False);
if not IntfUpdateAllowed then Exit;
if not WSUpdateAllowed then Exit;
LV := TListColumns(Collection).FOwner;
WSC := TWSCustomListViewClass(LV.WidgetSetClass);
@ -224,7 +224,7 @@ begin
if FImageIndex = AValue then Exit;
FImageIndex := AValue;
Changed(False);
if not IntfUpdateAllowed then Exit;
if not WSUpdateAllowed then Exit;
LV := TListColumns(Collection).FOwner;
WSC := TWSCustomListViewClass(LV.WidgetSetClass);
@ -241,7 +241,7 @@ begin
inherited;
if OldIndex = Index then Exit;
if not IntfUpdateAllowed then Exit;
if not WSUpdateAllowed then Exit;
LV := TListColumns(Collection).FOwner;
WSC := TWSCustomListViewClass(LV.WidgetSetClass);
@ -262,7 +262,7 @@ begin
if FVisible = AValue then Exit;
FVisible := AValue;
Changed(False);
if not IntfUpdateAllowed then Exit;
if not WSUpdateAllowed then Exit;
LV := TListColumns(Collection).FOwner;
WSC := TWSCustomListViewClass(LV.WidgetSetClass);

View File

@ -86,12 +86,12 @@ begin
Result := TListColumn(inherited GetItem(AIndex));
end;
procedure TListColumns.IntfCreateColumns;
procedure TListColumns.WSCreateColumns;
var
n: Integer;
begin
for n :=0 to Count - 1 do
GetItem(n).IntfCreateColumn;
GetItem(n).WSCreateColumn;
end;
procedure TListColumns.SetItem(const AIndex: Integer; const AValue: TListColumn);

View File

@ -71,7 +71,7 @@ var
WSC: TWSCustomListViewClass;
begin
if (FOwner <> nil)
and FOwner.IntfUpdateAllowed
and FOwner.WSUpdateAllowed
and ((FChangeIndex = -1) or (FUpdate <> []))
then begin
LV := FOwner.FOwner.FOwner;
@ -367,7 +367,7 @@ end;
{------------------------------------------------------------------------------}
{ TListItem IntfUpdateText }
{------------------------------------------------------------------------------}
procedure TListItem.IntfUpdateText;
procedure TListItem.WSUpdateText;
var
LV: TCustomListView;
n, Idx, Cnt, ColCnt: Integer;
@ -399,7 +399,7 @@ end;
{------------------------------------------------------------------------------}
{ TListItem IntfUpdateImages }
{------------------------------------------------------------------------------}
procedure TListItem.IntfUpdateImages;
procedure TListItem.WSUpdateImages;
var
LV: TCustomListView;
n, Idx, Cnt, ColCnt: Integer;
@ -431,11 +431,11 @@ end;
{------------------------------------------------------------------------------}
{ TListItem IntfUpdateAllowed }
{------------------------------------------------------------------------------}
function TListItem.IntfUpdateAllowed: Boolean;
function TListItem.WSUpdateAllowed: Boolean;
begin
Result := (FFlags * [lifDestroying, lifCreated] = [lifCreated])
and (FOwner <> nil)
and FOwner.IntfUpdateAllowed;
and FOwner.WSUpdateAllowed;
end;
{------------------------------------------------------------------------------}
@ -471,7 +471,7 @@ begin
AState := TListItemState(ALisOrd);
LV := FOwner.FOwner;
if IntfUpdateAllowed
if WSUpdateAllowed
and TWSCustomListViewClass(LV.WidgetSetClass).ItemGetState(LV, GetIndex, Self, AState, Result)
then begin
// update FStates
@ -528,7 +528,7 @@ begin
if FCaption = AValue then Exit;
FCaption := AValue;
LV := FOwner.FOwner;
if IntfUpdateAllowed
if WSUpdateAllowed
then TWSCustomListViewClass(LV.WidgetSetClass).ItemSetText(LV, GetIndex, Self, 0, FCaption);
end;
@ -540,7 +540,7 @@ var
LV: TCustomListView;
begin
LV := FOwner.FOwner;
if LV.Checkboxes and IntfUpdateAllowed
if LV.Checkboxes and WSUpdateAllowed
then TWSCustomListViewClass(LV.WidgetSetClass).ItemSetChecked(LV, GetIndex, Self, AValue);
end;
@ -562,7 +562,7 @@ begin
FImageIndex := AValue;
if IntfUpdateAllowed
if WSUpdateAllowed
then TWSCustomListViewClass(FOwner.FOwner.WidgetSetClass).ItemSetImage(FOwner.FOwner, GetIndex, Self, 0, FImageIndex);
end;
@ -582,7 +582,7 @@ begin
then Include(FStates, AState)
else Exclude(FStates, AState);
if not IntfUpdateAllowed then Exit;
if not WSUpdateAllowed then Exit;
LV := FOwner.FOwner;
TWSCustomListViewClass(LV.WidgetSetClass).ItemSetState(LV, GetIndex, Self, AState, AIsSet);
end;

View File

@ -70,10 +70,10 @@ begin
FCacheIndex := AIndex;
FCacheItem := AValue;
if AValue.IntfUpdateAllowed
if AValue.WSUpdateAllowed
then begin
AValue.IntfUpdateText;
AValue.IntfUpdateImages;
AValue.WSUpdateText;
AValue.WSUpdateImages;
end;
end;
@ -94,8 +94,8 @@ begin
FCacheIndex := FItems.Add(AItem);
FCacheItem := AItem;
if IntfUpdateAllowed
then IntfCreateCacheItem;
if WSUpdateAllowed
then WSCreateCacheItem;
//Notify parent TListView that something was added.
if FOwner <> nil
@ -122,18 +122,18 @@ end;
{------------------------------------------------------------------------------}
{ TListItems IntfCreateItem }
{------------------------------------------------------------------------------}
procedure TListItems.IntfCreateCacheItem;
procedure TListItems.WSCreateCacheItem;
begin
TWSCustomListViewClass(FOwner.WidgetSetClass).ItemInsert(FOwner, FCacheIndex, FCacheItem);
Include(FCacheItem.FFlags, lifCreated);
FCacheItem.IntfUpdateText;
FCacheItem.IntfUpdateImages;
FCacheItem.WSUpdateText;
FCacheItem.WSUpdateImages;
end;
{------------------------------------------------------------------------------}
{ TListItems IntfCreateItems }
{------------------------------------------------------------------------------}
procedure TListItems.IntfCreateItems;
procedure TListItems.WSCreateItems;
var
n: integer;
begin
@ -141,14 +141,14 @@ begin
begin
FCacheItem := TListItem(FItems[n]);
FCacheIndex := n;
IntfCreateCacheItem;
WSCreateCacheItem;
end;
end;
{------------------------------------------------------------------------------}
{ TListItems IntfUpdateAllowed }
{------------------------------------------------------------------------------}
function TListItems.IntfUpdateAllowed: Boolean;
function TListItems.WSUpdateAllowed: Boolean;
begin
Result := (FOwner <> nil)
and FOwner.HandleAllocated
@ -225,8 +225,8 @@ begin
FCacheIndex := AIndex;
FCacheItem := AItem;
if IntfUpdateAllowed
then IntfCreateCacheItem;
if WSUpdateAllowed
then WSCreateCacheItem;
//Notify parent TListView that something was added.
if FOwner <> nil