mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-10 23:19: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 GetMultiLine: Boolean;
|
||||||
function FindVisiblePage(Index: Integer): Integer;
|
function FindVisiblePage(Index: Integer): Integer;
|
||||||
function IsStoredActivePage: boolean;
|
function IsStoredActivePage: boolean;
|
||||||
procedure AddRemovePageHandle(APage: TCustomPage);
|
|
||||||
procedure MoveTab(Sender: TObject; NewIndex: Integer);
|
procedure MoveTab(Sender: TObject; NewIndex: Integer);
|
||||||
procedure SetMultiLine(const AValue: Boolean);
|
procedure SetMultiLine(const AValue: Boolean);
|
||||||
procedure SetStyle(AValue: TTabStyle); virtual;
|
procedure SetStyle(AValue: TTabStyle); virtual;
|
||||||
@ -405,6 +404,7 @@ type
|
|||||||
PageClass: TCustomPageClass;
|
PageClass: TCustomPageClass;
|
||||||
function GetPageClass: TCustomPageClass; virtual;
|
function GetPageClass: TCustomPageClass; virtual;
|
||||||
function GetListClass: TNBBasePagesClass; virtual;
|
function GetListClass: TNBBasePagesClass; virtual;
|
||||||
|
procedure AddRemovePageHandle(APage: TCustomPage); virtual;
|
||||||
procedure CNNotify(var Message: TLMNotify); message CN_NOTIFY;
|
procedure CNNotify(var Message: TLMNotify); message CN_NOTIFY;
|
||||||
class procedure WSRegisterClass; override;
|
class procedure WSRegisterClass; override;
|
||||||
procedure CreateWnd; override;
|
procedure CreateWnd; override;
|
||||||
@ -475,7 +475,7 @@ type
|
|||||||
property Pages: TStrings read FAccess write SetPages;
|
property Pages: TStrings read FAccess write SetPages;
|
||||||
property ShowTabs: Boolean read FShowTabs write SetShowTabs default True;
|
property ShowTabs: Boolean read FShowTabs write SetShowTabs default True;
|
||||||
property TabPosition: TTabPosition read FTabPosition write SetTabPosition default tpTop;
|
property TabPosition: TTabPosition read FTabPosition write SetTabPosition default tpTop;
|
||||||
property IsUnpaged: boolean read FUnPaged;
|
property IsUnpaged: boolean read FUnPaged; deprecated;
|
||||||
published
|
published
|
||||||
property TabStop default true;
|
property TabStop default true;
|
||||||
end;
|
end;
|
||||||
@ -771,6 +771,7 @@ type
|
|||||||
procedure SetTabs(const AValue: TStrings);
|
procedure SetTabs(const AValue: TStrings);
|
||||||
procedure SetTabWidth(const AValue: Smallint);
|
procedure SetTabWidth(const AValue: Smallint);
|
||||||
protected
|
protected
|
||||||
|
procedure AddRemovePageHandle(APage: TCustomPage); override;
|
||||||
function CanChange: Boolean; override;
|
function CanChange: Boolean; override;
|
||||||
function CanShowTab(ATabIndex: Integer): Boolean; virtual;
|
function CanShowTab(ATabIndex: Integer): Boolean; virtual;
|
||||||
procedure Change; override;
|
procedure Change; override;
|
||||||
|
@ -607,7 +607,9 @@ procedure TCustomTabControl.InsertPage(APage: TCustomPage; Index: Integer);
|
|||||||
var
|
var
|
||||||
NewZPosition: integer;
|
NewZPosition: integer;
|
||||||
begin
|
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}
|
{$IFDEF NOTEBOOK_DEBUG}
|
||||||
DebugLn(['TCustomTabControl.InsertPage A ',dbgsName(Self),' Index=',Index,' Name=',
|
DebugLn(['TCustomTabControl.InsertPage A ',dbgsName(Self),' Index=',Index,' Name=',
|
||||||
APage.Name,' Caption=',APage.Caption]);
|
APage.Name,' Caption=',APage.Caption]);
|
||||||
@ -621,7 +623,7 @@ begin
|
|||||||
Include(APage.FFlags, pfInserting);
|
Include(APage.FFlags, pfInserting);
|
||||||
TNBPages(FAccess).InsertPage(Index, APage);
|
TNBPages(FAccess).InsertPage(Index, APage);
|
||||||
Exclude(APage.FFlags, pfInserting);
|
Exclude(APage.FFlags, pfInserting);
|
||||||
APage.Parent := Self;
|
APage.Parent := Self; // will recursively call
|
||||||
if NewZPosition >= 0 then
|
if NewZPosition >= 0 then
|
||||||
SetControlIndex(APage, NewZPosition);
|
SetControlIndex(APage, NewZPosition);
|
||||||
if PageIndex = -1 then
|
if PageIndex = -1 then
|
||||||
|
@ -496,6 +496,11 @@ begin
|
|||||||
TTabControlStrings(FTabs).TabWidth:=AValue;
|
TTabControlStrings(FTabs).TabWidth:=AValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TTabControl.AddRemovePageHandle(APage: TCustomPage);
|
||||||
|
begin
|
||||||
|
// There are no pages, don't create a handle
|
||||||
|
end;
|
||||||
|
|
||||||
function TTabControl.CanChange: Boolean;
|
function TTabControl.CanChange: Boolean;
|
||||||
begin
|
begin
|
||||||
Result:=true;
|
Result:=true;
|
||||||
|
Loading…
Reference in New Issue
Block a user