mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 14:09:31 +02:00
Moves ChildClassAllowed to TPageControl and ifdefs out the new tabcontrol
git-svn-id: trunk@31849 -
This commit is contained in:
parent
3677e97597
commit
e102c28b17
@ -374,7 +374,6 @@ type
|
|||||||
function DialogChar(var Message: TLMKey): boolean; override;
|
function DialogChar(var Message: TLMKey): boolean; override;
|
||||||
procedure ShowControl(APage: TControl); override;
|
procedure ShowControl(APage: TControl); override;
|
||||||
procedure UpdateTabProperties; virtual;
|
procedure UpdateTabProperties; virtual;
|
||||||
function ChildClassAllowed(ChildClass: TClass): boolean; override;
|
|
||||||
class function GetControlClassDefaultSize: TSize; override;
|
class function GetControlClassDefaultSize: TSize; override;
|
||||||
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
|
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
|
||||||
property ActivePageComponent: TCustomPage read GetActivePageComponent
|
property ActivePageComponent: TCustomPage read GetActivePageComponent
|
||||||
@ -510,6 +509,7 @@ type
|
|||||||
procedure DoRemoveDockClient(Client: TControl); override;
|
procedure DoRemoveDockClient(Client: TControl); override;
|
||||||
function DoUndockClientMsg(NewTarget, Client: TControl):boolean; override;
|
function DoUndockClientMsg(NewTarget, Client: TControl):boolean; override;
|
||||||
procedure DoChange; override;
|
procedure DoChange; override;
|
||||||
|
function ChildClassAllowed(ChildClass: TClass): boolean; override;
|
||||||
public
|
public
|
||||||
constructor Create(TheOwner: TComponent); override;
|
constructor Create(TheOwner: TComponent); override;
|
||||||
function FindNextPage(CurPage: TTabSheet;
|
function FindNextPage(CurPage: TTabSheet;
|
||||||
@ -806,6 +806,8 @@ type
|
|||||||
property Visible;
|
property Visible;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$ifdef LCL_NEW_TABCONTROL}
|
||||||
|
|
||||||
{ TNewTabControl }
|
{ TNewTabControl }
|
||||||
|
|
||||||
(* TNewTabControl is a replacement for TTabControl, derived from TCustomTabControl.
|
(* TNewTabControl is a replacement for TTabControl, derived from TCustomTabControl.
|
||||||
@ -881,6 +883,8 @@ type
|
|||||||
property Visible;
|
property Visible;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$endif}
|
||||||
|
|
||||||
{ Custom draw }
|
{ Custom draw }
|
||||||
|
|
||||||
TCustomDrawTarget = (
|
TCustomDrawTarget = (
|
||||||
@ -3452,7 +3456,9 @@ end;
|
|||||||
procedure Register;
|
procedure Register;
|
||||||
begin
|
begin
|
||||||
RegisterComponents('Common Controls',[TTrackbar,TProgressBar,TTreeView,
|
RegisterComponents('Common Controls',[TTrackbar,TProgressBar,TTreeView,
|
||||||
TListView,TStatusBar,TToolBar,TUpDown,TPageControl,TTabControl,THeaderControl]);
|
TListView,TStatusBar,TToolBar,TUpDown,TPageControl,TTabControl,
|
||||||
|
{$ifdef LCL_NEW_TABCONTROL}TNewTabControl,{$endif}
|
||||||
|
THeaderControl]);
|
||||||
RegisterNoIcon([TToolButton,TTabSheet]);
|
RegisterNoIcon([TToolButton,TTabSheet]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -874,11 +874,6 @@ begin
|
|||||||
TWSCustomPageClass(Page[i].WidgetSetClass).UpdateProperties(Page[i]);
|
TWSCustomPageClass(Page[i].WidgetSetClass).UpdateProperties(Page[i]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCustomTabControl.ChildClassAllowed(ChildClass: TClass): boolean;
|
|
||||||
begin
|
|
||||||
Result:=(ChildClass<>nil) and (ChildClass.InheritsFrom(PageClass));
|
|
||||||
end;
|
|
||||||
|
|
||||||
class function TCustomTabControl.GetControlClassDefaultSize: TSize;
|
class function TCustomTabControl.GetControlClassDefaultSize: TSize;
|
||||||
begin
|
begin
|
||||||
Result.CX := 200;
|
Result.CX := 200;
|
||||||
|
@ -115,6 +115,11 @@ begin
|
|||||||
OnChange(Self);
|
OnChange(Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TPageControl.ChildClassAllowed(ChildClass: TClass): boolean;
|
||||||
|
begin
|
||||||
|
Result:=(ChildClass<>nil) and (ChildClass.InheritsFrom(PageClass));
|
||||||
|
end;
|
||||||
|
|
||||||
constructor TPageControl.Create(TheOwner: TComponent);
|
constructor TPageControl.Create(TheOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
PageClass:=TTabSheet;
|
PageClass:=TTabSheet;
|
||||||
|
@ -689,6 +689,8 @@ begin
|
|||||||
Result:=(FTabs<>nil) and TTabControlStrings(fTabs).IsUpdating;
|
Result:=(FTabs<>nil) and TTabControlStrings(fTabs).IsUpdating;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$ifdef LCL_NEW_TABCONTROL}
|
||||||
|
|
||||||
{ TTabPage }
|
{ TTabPage }
|
||||||
|
|
||||||
type
|
type
|
||||||
@ -838,6 +840,7 @@ begin
|
|||||||
Dec(FPageIndex);
|
Dec(FPageIndex);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
{$endif}
|
||||||
|
|
||||||
// included by comctrls.pp
|
// included by comctrls.pp
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user