lcl: use TImageIndex instead of Integer in more cases

git-svn-id: trunk@22138 -
This commit is contained in:
paul 2009-10-13 09:24:26 +00:00
parent 6ae9e55963
commit 538e53caad
7 changed files with 13 additions and 14 deletions

View File

@ -250,7 +250,7 @@ type
procedure SetHelpKeyword(const Value: string); virtual;
procedure SetHelpType(Value: THelpType); virtual;
procedure SetHint(const Value: string); virtual;
procedure SetImageIndex(Value: Integer); virtual;
procedure SetImageIndex(Value: TImageIndex); virtual;
procedure SetShortCut(Value: TShortCut); virtual;
procedure SetVisible(Value: Boolean); virtual;
public

View File

@ -1453,7 +1453,7 @@ type
protected
procedure AssignClient(AClient: TObject); override;
procedure SetChecked(Value: Boolean); override;
procedure SetImageIndex(Value: Integer); override;
procedure SetImageIndex(Value: TImageIndex); override;
public
function IsCheckedLinked: Boolean; override;
function IsImageIndexLinked: Boolean; override;
@ -1469,7 +1469,7 @@ type
FDown: Boolean;
FDropdownMenu: TPopupMenu;
FGrouped: Boolean;
FImageIndex: Integer;
FImageIndex: TImageIndex;
FIndeterminate: Boolean;
FMarked: Boolean;
FMenuItem: TMenuItem;
@ -1487,7 +1487,7 @@ type
procedure SetDown(Value: Boolean);
procedure SetDropdownMenu(Value: TPopupMenu);
procedure SetGrouped(Value: Boolean);
procedure SetImageIndex(Value: Integer);
procedure SetImageIndex(Value: TImageIndex);
procedure SetIndeterminate(Value: Boolean);
procedure SetMarked(Value: Boolean);
procedure SetMenuItem(Value: TMenuItem);
@ -1553,7 +1553,7 @@ type
property Enabled;
property Grouped: Boolean read FGrouped write SetGrouped default False;
property Height stored False;
property ImageIndex: Integer read FImageIndex write SetImageIndex stored IsImageIndexStored default -1;
property ImageIndex: TImageIndex read FImageIndex write SetImageIndex stored IsImageIndexStored default -1;
property Indeterminate: Boolean read FIndeterminate write SetIndeterminate default False;
property Marked: Boolean read FMarked write SetMarked default False;
property MenuItem: TMenuItem read FMenuItem write SetMenuItem;

View File

@ -112,7 +112,7 @@ begin
end;
procedure TActionLink.SetImageIndex(Value: Integer);
procedure TActionLink.SetImageIndex(Value: TImageIndex);
begin
end;

View File

@ -116,7 +116,7 @@ begin
if IsHintLinked then FClient.Hint := Value;
end;
procedure TMenuActionLink.SetImageIndex(Value: Integer);
procedure TMenuActionLink.SetImageIndex(Value: TImageIndex);
begin
if IsImageIndexLinked then FClient.ImageIndex := Value;
end;

View File

@ -150,8 +150,7 @@ end;
procedure TTabControlNoteBookStrings.NBGetImageIndex(Sender: TObject;
TheTabIndex: Integer; var ImageIndex: Integer);
begin
if Sender=nil then ;
ImageIndex:=TabControl.GetImageIndex(TheTabIndex);
ImageIndex := TabControl.GetImageIndex(TheTabIndex);
end;
procedure TTabControlNoteBookStrings.NBChanging(Sender: TObject;
@ -482,9 +481,9 @@ end;
function TCustomTabControl.GetImageIndex(ATabIndex: Integer): Integer;
begin
Result:=TabIndex;
Result := TabIndex;
if Assigned(FOnGetImageIndex) then
FOnGetImageIndex(Self,TabIndex,Result);
FOnGetImageIndex(Self, TabIndex, Result);
end;
procedure TCustomTabControl.Loaded;

View File

@ -43,7 +43,7 @@ begin
TToolButton(FClient).Down := Value;
end;
procedure TToolButtonActionLink.SetImageIndex(Value: Integer);
procedure TToolButtonActionLink.SetImageIndex(Value: TImageIndex);
begin
{DebugLn(['TToolButtonActionLink.SetImageIndex A ',ClassName,' Client=',
TToolButton(FClient).Name,' IsImageIndexLinked=',
@ -566,7 +566,7 @@ begin
end;
end;
procedure TToolButton.SetImageIndex(Value: Integer);
procedure TToolButton.SetImageIndex(Value: TImageIndex);
begin
if FImageIndex = Value then exit;
//debugln('TToolButton.SetImageIndex ',Name,':',ClassName,' Old=',FImageIndex,' New=',Value);

View File

@ -78,7 +78,7 @@ type
procedure SetEnabled(Value: Boolean); override;
procedure SetHelpContext(Value: THelpContext); override;
procedure SetHint(const Value: string); override;
procedure SetImageIndex(Value: Integer); override;
procedure SetImageIndex(Value: TImageIndex); override;
procedure SetShortCut(Value: TShortCut); override;
procedure SetVisible(Value: Boolean); override;
procedure SetOnExecute(Value: TNotifyEvent); override;