mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 19:02:31 +02:00
LCL: TTAbControl, refactor. more FUnused
git-svn-id: trunk@42598 -
This commit is contained in:
parent
2ace435f10
commit
063ff08625
@ -384,7 +384,6 @@ type
|
||||
function GetMultiLine: Boolean;
|
||||
function FindVisiblePage(Index: Integer): Integer;
|
||||
function IsStoredActivePage: boolean;
|
||||
procedure AddRemovePageHandle(APage: TCustomPage);
|
||||
procedure MoveTab(Sender: TObject; NewIndex: Integer);
|
||||
procedure SetMultiLine(const AValue: Boolean);
|
||||
procedure SetStyle(AValue: TTabStyle); virtual;
|
||||
@ -405,6 +404,7 @@ type
|
||||
PageClass: TCustomPageClass;
|
||||
function GetPageClass: TCustomPageClass; virtual;
|
||||
function GetListClass: TNBBasePagesClass; virtual;
|
||||
procedure AddRemovePageHandle(APage: TCustomPage); virtual;
|
||||
procedure CNNotify(var Message: TLMNotify); message CN_NOTIFY;
|
||||
class procedure WSRegisterClass; override;
|
||||
procedure CreateWnd; override;
|
||||
@ -475,7 +475,7 @@ type
|
||||
property Pages: TStrings read FAccess write SetPages;
|
||||
property ShowTabs: Boolean read FShowTabs write SetShowTabs default True;
|
||||
property TabPosition: TTabPosition read FTabPosition write SetTabPosition default tpTop;
|
||||
property IsUnpaged: boolean read FUnPaged;
|
||||
property IsUnpaged: boolean read FUnPaged; deprecated;
|
||||
published
|
||||
property TabStop default true;
|
||||
end;
|
||||
@ -771,6 +771,7 @@ type
|
||||
procedure SetTabs(const AValue: TStrings);
|
||||
procedure SetTabWidth(const AValue: Smallint);
|
||||
protected
|
||||
procedure AddRemovePageHandle(APage: TCustomPage); override;
|
||||
function CanChange: Boolean; override;
|
||||
function CanShowTab(ATabIndex: Integer): Boolean; virtual;
|
||||
procedure Change; override;
|
||||
|
@ -607,7 +607,9 @@ procedure TCustomTabControl.InsertPage(APage: TCustomPage; Index: Integer);
|
||||
var
|
||||
NewZPosition: integer;
|
||||
begin
|
||||
if FUnPaged or (IndexOf(APage) >= 0) then Exit;
|
||||
// only called from TNBPages, but not TNBNoPages
|
||||
// Also called from TCustomPage.SetParent
|
||||
if (IndexOf(APage) >= 0) then Exit;
|
||||
{$IFDEF NOTEBOOK_DEBUG}
|
||||
DebugLn(['TCustomTabControl.InsertPage A ',dbgsName(Self),' Index=',Index,' Name=',
|
||||
APage.Name,' Caption=',APage.Caption]);
|
||||
@ -621,7 +623,7 @@ begin
|
||||
Include(APage.FFlags, pfInserting);
|
||||
TNBPages(FAccess).InsertPage(Index, APage);
|
||||
Exclude(APage.FFlags, pfInserting);
|
||||
APage.Parent := Self;
|
||||
APage.Parent := Self; // will recursively call
|
||||
if NewZPosition >= 0 then
|
||||
SetControlIndex(APage, NewZPosition);
|
||||
if PageIndex = -1 then
|
||||
|
@ -496,6 +496,11 @@ begin
|
||||
TTabControlStrings(FTabs).TabWidth:=AValue;
|
||||
end;
|
||||
|
||||
procedure TTabControl.AddRemovePageHandle(APage: TCustomPage);
|
||||
begin
|
||||
// There are no pages, don't create a handle
|
||||
end;
|
||||
|
||||
function TTabControl.CanChange: Boolean;
|
||||
begin
|
||||
Result:=true;
|
||||
|
Loading…
Reference in New Issue
Block a user