implemented setting TTabSheet.TabIndex

git-svn-id: trunk@5731 -
This commit is contained in:
mattias 2004-08-04 09:35:38 +00:00
parent 7bf089b375
commit 540727fc1b
5 changed files with 70 additions and 15 deletions

View File

@ -102,16 +102,59 @@ type
function GetVerb(Index: Integer): string; override;
procedure ExecuteVerb(Index: Integer); override;
end;
{ Action Registration }
type
TNotifyActionListChange = procedure;
var
ActionListEditorForm: TActionListEditor;
NotifyActionListChange: TNotifyActionListChange = nil;
procedure RegActions(const ACategory: string;
const AClasses: array of TBasicActionClass;
AResource: TComponentClass);
procedure UnRegActions(const Classes: array of TBasicActionClass);
procedure EnumActions(Proc: TEnumActionProc; Info: Pointer);
function CreateAction(TheOwner: TComponent; ActionClass:
TBasicActionClass): TBasicAction;
{ ActionListEditorForm }
var
ActionListEditorForm: TActionListEditor; // global since there is normally
// only one needed
procedure ShowActionListEditor(AActionList: TActionList;
ADesigner: TComponentEditorDesigner);
implementation
procedure RegActions(const ACategory: string;
const AClasses: array of TBasicActionClass; AResource: TComponentClass);
begin
end;
procedure UnRegActions(const Classes: array of TBasicActionClass);
begin
end;
procedure EnumActions(Proc: TEnumActionProc; Info: Pointer);
begin
end;
function CreateAction(TheOwner: TComponent; ActionClass:
TBasicActionClass): TBasicAction;
begin
end;
procedure ShowActionListEditor(AActionList: TActionList;
ADesigner:TComponentEditorDesigner);
begin

View File

@ -275,19 +275,19 @@ procedure RegisterActions(const CategoryName: string;
const AClasses: array of TBasicActionClass; Resource: TComponentClass);
procedure UnRegisterActions(const AClasses: array of TBasicActionClass);
procedure EnumRegisteredActions(Proc: TEnumActionProc; Info: Pointer);
function CreateAction(AOwner: TComponent;
function CreateAction(TheOwner: TComponent;
ActionClass: TBasicActionClass): TBasicAction;
const
RegisterActionsProc: procedure (const CategoryName: string;
const AClasses: array of TBasicActionClass; Resource: TComponentClass)= nil;
UnRegisterActionsProc:
procedure (const AClasses: array of TBasicActionClass) = nil;
EnumRegisteredActionsProc:
procedure (Proc: TEnumActionProc; Info: Pointer) = nil;
CreateActionProc:
function (AOwner: TComponent;
ActionClass: TBasicActionClass): TBasicAction = nil;
const AClasses: array of TBasicActionClass;
Resource: TComponentClass)= nil;
UnRegisterActionsProc: procedure(const AClasses: array of TBasicActionClass
) = nil;
EnumRegisteredActionsProc: procedure(Proc: TEnumActionProc;
Info: Pointer) = nil;
CreateActionProc: function(TheOwner: TComponent;
ActionClass: TBasicActionClass): TBasicAction = nil;
var
ApplicationActionComponent: TComponent;
@ -324,11 +324,11 @@ begin
raise Exception.Create(SInvalidActionEnumeration);
end;
function CreateAction(AOwner: TComponent;
function CreateAction(TheOwner: TComponent;
ActionClass: TBasicActionClass): TBasicAction;
begin
if Assigned(CreateActionProc) then
Result := CreateActionProc(AOwner, ActionClass)
Result := CreateActionProc(TheOwner, ActionClass)
else
raise Exception.Create(SInvalidActionCreation);
end;

View File

@ -152,6 +152,7 @@ type
function GetPageControl: TPageControl;
function GetTabIndex: Integer;
procedure SetPageControl(APageControl: TPageControl);
procedure SetTabIndex(const AValue: Integer);
protected
procedure DoHide; dynamic;
procedure DoShow; dynamic;
@ -159,7 +160,7 @@ type
constructor Create(TheOwner: TComponent); override;
destructor Destroy; override;
property PageControl: TPageControl read GetPageControl write SetPageControl;
property TabIndex: Integer read GetTabIndex;
property TabIndex: Integer read GetTabIndex write SetTabIndex;
published
property Caption;
property ClientHeight;
@ -2305,6 +2306,9 @@ end.
{ =============================================================================
$Log$
Revision 1.141 2004/08/04 09:35:38 mattias
implemented setting TTabSheet.TabIndex
Revision 1.140 2004/07/24 11:23:56 mattias
Designer can now handle TPersistent selections, TCollectionPropertyEditor basically working

View File

@ -307,7 +307,7 @@ type
//property BorderStyle;
property Color;
property Columns stored false;
//property Constraints;
property Constraints;
//property Ctl3D;
property DataSource;
property DefaultDrawing;
@ -1767,6 +1767,9 @@ end.
{
$Log$
Revision 1.10 2004/08/04 09:35:38 mattias
implemented setting TTabSheet.TabIndex
Revision 1.9 2004/08/03 15:38:53 vincents
fix 1.0.x compilation.

View File

@ -24,7 +24,7 @@
function TTabSheet.GetTabIndex: Integer;
begin
Result:=inherited PageIndex;
Result:=PageIndex;
end;
function TTabSheet.GetPageControl: TPageControl;
@ -41,6 +41,11 @@ begin
Parent:=PageControl;
end;
procedure TTabSheet.SetTabIndex(const AValue: Integer);
begin
PageIndex:=AValue;
end;
procedure TTabSheet.DoHide;
begin